; LLVM IR from Devaniti/BoolkaEngine :: ThirdParty/imgui/imgui.ll (ZN5ImGui15DebugNodeTabBarEP11ImGuiTabBarPKc)

; 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.ImVec2 = type { float, float }
%struct.ImGuiTabBar = type { %struct.ImVector.38, i32, i32, i32, i32, i32, i32, i32, %struct.ImRect, float, float, float, float, float, float, float, float, float, float, i32, i8, i8, i8, i8, i8, i16, i16, float, %struct.ImVec2, %struct.ImVec2, %struct.ImGuiTextBuffer }
%struct.ImVector.38 = type { i32, i32, ptr }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImGuiTextBuffer = type { %struct.ImVector.2 }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImGuiTabItem = type <{ i32, i32, i32, i32, float, float, float, i16, i16, i16, i8, i8 }>

@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.330 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.331 = external hidden unnamed_addr constant [54 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: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14ImFormatStringPcmPKcz(ptr noundef, i64 noundef, ptr noundef, ...) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN5ImGui17GetStyleColorVec4Ei(i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef, ptr noundef nonnull align 4 dereferenceable(16)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui13PopStyleColorEi(i32 noundef) #2

declare void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, i32 noundef, float noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5ImGui21GetForegroundDrawListEv() #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5ImGui13GetFrameCountEv() #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui5PopIDEv() #2

declare void @_ZN5ImGui7TreePopEv() #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui8SameLineEff(float noundef, float noundef) #2

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui15DebugNodeTabBarEP11ImGuiTabBarPKc(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [256 x i8], align 16
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca %struct.ImVec2, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImVec2, align 4
  %14 = alloca %struct.ImVec2, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %17 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  store ptr %17, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %18 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %19 = getelementptr inbounds i8, ptr %18, i64 256
  store ptr %19, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.ImGuiTabBar, ptr %20, i32 0, i32 7
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = call noundef i32 @_ZN5ImGui13GetFrameCountEv()
  %24 = sub nsw i32 %23, 2
  %25 = icmp sge i32 %22, %24
  %26 = zext i1 %25 to i8
  store i8 %26, ptr %8, align 1, !tbaa !20
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = ptrtoint ptr %28 to i64
  %31 = ptrtoint ptr %29 to i64
  %32 = sub i64 %30, %31
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ImGuiTabBar, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 4, !tbaa !21
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ImGuiTabBar, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %struct.ImVector.38, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !22
  %41 = load i8, ptr %8, align 1, !tbaa !20, !range !23, !noundef !24
  %42 = trunc i8 %41 to i1
  %43 = zext i1 %42 to i64
  %44 = select i1 %42, ptr @.str.6, ptr @.str.328
  %45 = call noundef i32 (ptr, i64, ptr, ...) @_Z14ImFormatStringPcmPKcz(ptr noundef %27, i64 noundef %32, ptr noundef @.str.327, ptr noundef %33, i32 noundef %36, i32 noundef %40, ptr noundef %44)
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = sext i32 %45 to i64
  %48 = getelementptr inbounds i8, ptr %46, i64 %47
  store ptr %48, ptr %6, align 8, !tbaa !5
  %49 = load i8, ptr %8, align 1, !tbaa !20, !range !23, !noundef !24
  %50 = trunc i8 %49 to i1
  br i1 %50, label %53, label %51

51:                                               ; preds = %2
  %52 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN5ImGui17GetStyleColorVec4Ei(i32 noundef 1)
  call void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(16) %52)
  br label %53

53:                                               ; preds = %51, %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %56 = call noundef zeroext i1 (ptr, ptr, ...) @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef %54, ptr noundef @.str.278, ptr noundef %55)
  %57 = zext i1 %56 to i8
  store i8 %57, ptr %9, align 1, !tbaa !20
  %58 = load i8, ptr %8, align 1, !tbaa !20, !range !23, !noundef !24
  %59 = trunc i8 %58 to i1
  br i1 %59, label %61, label %60

60:                                               ; preds = %53
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 1)
  br label %61

61:                                               ; preds = %60, %53
  %62 = load i8, ptr %8, align 1, !tbaa !20, !range !23, !noundef !24
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %109

64:                                               ; preds = %61
  %65 = call noundef zeroext i1 @_ZN5ImGui13IsItemHoveredEi(i32 noundef 0)
  br i1 %65, label %66, label %109

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %67 = call noundef ptr @_ZN5ImGui21GetForegroundDrawListEv()
  store ptr %67, ptr %10, align 8, !tbaa !5
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ImGuiTabBar, ptr %69, i32 0, i32 8
  %71 = getelementptr inbounds %struct.ImRect, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ImGuiTabBar, ptr %72, i32 0, i32 8
  %74 = getelementptr inbounds %struct.ImRect, ptr %73, i32 0, i32 1
  call void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196) %68, ptr noundef nonnull align 4 dereferenceable(8) %71, ptr noundef nonnull align 4 dereferenceable(8) %74, i32 noundef -16711681, float noundef 0.000000e+00, i32 noundef 15, float noundef 1.000000e+00)
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ImGuiTabBar, ptr %76, i32 0, i32 17
  %78 = load float, ptr %77, align 4, !tbaa !25
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ImGuiTabBar, ptr %79, i32 0, i32 8
  %81 = getelementptr inbounds %struct.ImRect, ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds %struct.ImVec2, ptr %81, i32 0, i32 1
  %83 = load float, ptr %82, align 4, !tbaa !26
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %78, float noundef %83)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ImGuiTabBar, ptr %84, i32 0, i32 17
  %86 = load float, ptr %85, align 4, !tbaa !25
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ImGuiTabBar, ptr %87, i32 0, i32 8
  %89 = getelementptr inbounds %struct.ImRect, ptr %88, i32 0, i32 1
  %90 = getelementptr inbounds %struct.ImVec2, ptr %89, i32 0, i32 1
  %91 = load float, ptr %90, align 4, !tbaa !27
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef %86, float noundef %91)
  call void @_ZN10ImDrawList7AddLineERK6ImVec2S2_jf(ptr noundef nonnull align 8 dereferenceable(196) %75, ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %12, i32 noundef -16711936, float noundef 1.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ImGuiTabBar, ptr %93, i32 0, i32 18
  %95 = load float, ptr %94, align 8, !tbaa !28
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ImGuiTabBar, ptr %96, i32 0, i32 8
  %98 = getelementptr inbounds %struct.ImRect, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds %struct.ImVec2, ptr %98, i32 0, i32 1
  %100 = load float, ptr %99, align 4, !tbaa !26
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef %95, float noundef %100)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ImGuiTabBar, ptr %101, i32 0, i32 18
  %103 = load float, ptr %102, align 8, !tbaa !28
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ImGuiTabBar, ptr %104, i32 0, i32 8
  %106 = getelementptr inbounds %struct.ImRect, ptr %105, i32 0, i32 1
  %107 = getelementptr inbounds %struct.ImVec2, ptr %106, i32 0, i32 1
  %108 = load float, ptr %107, align 4, !tbaa !27
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef %103, float noundef %108)
  call void @_ZN10ImDrawList7AddLineERK6ImVec2S2_jf(ptr noundef nonnull align 8 dereferenceable(196) %92, ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %14, i32 noundef -16711936, float noundef 1.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %109

109:                                              ; preds = %66, %64, %61
  %110 = load i8, ptr %9, align 1, !tbaa !20, !range !23, !noundef !24
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %179

112:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !29
  br label %113

113:                                              ; preds = %175, %112
  %114 = load i32, ptr %15, align 4, !tbaa !29
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ImGuiTabBar, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct.ImVector.38, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !22
  %119 = icmp slt i32 %114, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %178

121:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ImGuiTabBar, ptr %122, i32 0, i32 0
  %124 = load i32, ptr %15, align 4, !tbaa !29
  %125 = call noundef nonnull align 4 dereferenceable(35) ptr @_ZN8ImVectorI12ImGuiTabItemEixEi(ptr noundef nonnull align 8 dereferenceable(16) %123, i32 noundef %124)
  store ptr %125, ptr %16, align 8, !tbaa !5
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN5ImGui6PushIDEPKv(ptr noundef %126)
  %127 = call noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef @.str.329)
  br i1 %127, label %128, label %131

128:                                              ; preds = %121
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN5ImGui18TabBarQueueReorderEP11ImGuiTabBarPK12ImGuiTabItemi(ptr noundef %129, ptr noundef %130, i32 noundef -1)
  br label %131

131:                                              ; preds = %128, %121
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef 2.000000e+00)
  %132 = call noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef @.str.330)
  br i1 %132, label %133, label %136

133:                                              ; preds = %131
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN5ImGui18TabBarQueueReorderEP11ImGuiTabBarPK12ImGuiTabItemi(ptr noundef %134, ptr noundef %135, i32 noundef 1)
  br label %136

136:                                              ; preds = %133, %131
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %137 = load i32, ptr %15, align 4, !tbaa !29
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ImGuiTabItem, ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !30
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ImGuiTabBar, ptr %141, i32 0, i32 3
  %143 = load i32, ptr %142, align 8, !tbaa !32
  %144 = icmp eq i32 %140, %143
  %145 = zext i1 %144 to i64
  %146 = select i1 %144, i8 42, i8 32
  %147 = sext i8 %146 to i32
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ImGuiTabItem, ptr %148, i32 0, i32 0
  %150 = load i32, ptr %149, align 4, !tbaa !30
  %151 = load ptr, ptr %16, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ImGuiTabItem, ptr %151, i32 0, i32 7
  %153 = load i16, ptr %152, align 4, !tbaa !33
  %154 = sext i16 %153 to i32
  %155 = icmp ne i32 %154, -1
  br i1 %155, label %156, label %160

156:                                              ; preds = %136
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = load ptr, ptr %16, align 8, !tbaa !5
  %159 = call noundef ptr @_ZNK11ImGuiTabBar10GetTabNameEPK12ImGuiTabItem(ptr noundef nonnull align 8 dereferenceable(152) %157, ptr noundef %158)
  br label %161

160:                                              ; preds = %136
  br label %161

161:                                              ; preds = %160, %156
  %162 = phi ptr [ %159, %156 ], [ @.str.6, %160 ]
  %163 = load ptr, ptr %16, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.ImGuiTabItem, ptr %163, i32 0, i32 4
  %165 = load float, ptr %164, align 4, !tbaa !34
  %166 = fpext float %165 to double
  %167 = load ptr, ptr %16, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.ImGuiTabItem, ptr %167, i32 0, i32 5
  %169 = load float, ptr %168, align 4, !tbaa !35
  %170 = fpext float %169 to double
  %171 = load ptr, ptr %16, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.ImGuiTabItem, ptr %171, i32 0, i32 6
  %173 = load float, ptr %172, align 4, !tbaa !36
  %174 = fpext float %173 to double
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.331, i32 noundef %137, i32 noundef %147, i32 noundef %150, ptr noundef %162, double noundef %166, double noundef %170, double noundef %174)
  call void @_ZN5ImGui5PopIDEv()
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %175

175:                                              ; preds = %161
  %176 = load i32, ptr %15, align 4, !tbaa !29
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %15, align 4, !tbaa !29
  br label %113, !llvm.loop !37

178:                                              ; preds = %120
  call void @_ZN5ImGui7TreePopEv()
  br label %179

179:                                              ; preds = %178, %109
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #5
  ret void
}

declare noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef) #3

declare noundef zeroext i1 @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef, ptr noundef, ...) #3

declare void @_ZN10ImDrawList7AddLineERK6ImVec2S2_jf(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef) #3

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

declare void @_ZN5ImGui18TabBarQueueReorderEP11ImGuiTabBarPK12ImGuiTabItemi(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK11ImGuiTabBar10GetTabNameEPK12ImGuiTabItem(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 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 #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, !12, i64 40}
!10 = !{!"_ZTS11ImGuiTabBar", !11, i64 0, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !13, i64 44, !15, i64 60, !15, i64 64, !15, i64 68, !15, i64 72, !15, i64 76, !15, i64 80, !15, i64 84, !15, i64 88, !15, i64 92, !15, i64 96, !12, i64 100, !7, i64 104, !7, i64 105, !16, i64 106, !16, i64 107, !16, i64 108, !17, i64 110, !17, i64 112, !15, i64 116, !14, i64 120, !14, i64 128, !18, i64 136}
!11 = !{!"_ZTS8ImVectorI12ImGuiTabItemE", !12, i64 0, !12, i64 4, !6, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS6ImRect", !14, i64 0, !14, i64 8}
!14 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_ZTS15ImGuiTextBuffer", !19, i64 0}
!19 = !{!"_ZTS8ImVectorIcE", !12, i64 0, !12, i64 4, !6, i64 8}
!20 = !{!16, !16, i64 0}
!21 = !{!10, !12, i64 20}
!22 = !{!10, !12, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!10, !15, i64 92}
!26 = !{!10, !15, i64 48}
!27 = !{!10, !15, i64 56}
!28 = !{!10, !15, i64 96}
!29 = !{!12, !12, i64 0}
!30 = !{!31, !12, i64 0}
!31 = !{!"_ZTS12ImGuiTabItem", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !17, i64 28, !17, i64 30, !17, i64 32, !16, i64 34}
!32 = !{!10, !12, i64 24}
!33 = !{!31, !17, i64 28}
!34 = !{!31, !15, i64 16}
!35 = !{!31, !15, i64 20}
!36 = !{!31, !15, i64 24}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}


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

%struct.ImVec2 = type { float, float }

@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.330 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.331 = external hidden unnamed_addr constant [54 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14ImFormatStringPcmPKcz(ptr noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN5ImGui17GetStyleColorVec4Ei(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui13PopStyleColorEi(i32 noundef) local_unnamed_addr #2

declare void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, i32 noundef, float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5ImGui13IsItemHoveredEi(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5ImGui13GetFrameCountEv() local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui5PopIDEv() local_unnamed_addr #2

declare void @_ZN5ImGui7TreePopEv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui8SameLineEff(float noundef, float noundef) local_unnamed_addr #2

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui15DebugNodeTabBarEP11ImGuiTabBarPKc(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca [256 x i8], align 16
  %4 = alloca %struct.ImVec2, align 4
  %5 = alloca %struct.ImVec2, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #5
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = tail call noundef i32 @_ZN5ImGui13GetFrameCountEv()
  %11 = add nsw i32 %10, -2
  %.not = icmp slt i32 %9, %11
  %12 = getelementptr inbounds i8, ptr %0, i64 20
  %13 = load i32, ptr %12, align 4, !tbaa !19
  %14 = load i32, ptr %0, align 8, !tbaa !20
  %15 = select i1 %.not, ptr @.str.328, ptr @.str.6
  %16 = call noundef i32 (ptr, i64, ptr, ...) @_Z14ImFormatStringPcmPKcz(ptr noundef nonnull %3, i64 noundef 256, ptr noundef nonnull @.str.327, ptr noundef %1, i32 noundef %13, i32 noundef %14, ptr noundef nonnull %15)
  br i1 %.not, label %17, label %.critedge

17:                                               ; preds = %2
  %18 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN5ImGui17GetStyleColorVec4Ei(i32 noundef 1)
  call void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(16) %18)
  %19 = call noundef zeroext i1 (ptr, ptr, ...) @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef nonnull %0, ptr noundef nonnull @.str.278, ptr noundef nonnull %3)
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 1)
  br i1 %19, label %.preheader, label %72

.critedge:                                        ; preds = %2
  %20 = call noundef zeroext i1 (ptr, ptr, ...) @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef nonnull %0, ptr noundef nonnull @.str.278, ptr noundef nonnull %3)
  %21 = call noundef zeroext i1 @_ZN5ImGui13IsItemHoveredEi(i32 noundef 0)
  br i1 %21, label %22, label %38

22:                                               ; preds = %.critedge
  %23 = call noundef ptr @_ZN5ImGui21GetForegroundDrawListEv()
  %24 = getelementptr inbounds i8, ptr %0, i64 44
  %25 = getelementptr inbounds i8, ptr %0, i64 52
  call void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196) %23, ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(8) %25, i32 noundef -16711681, float noundef 0.000000e+00, i32 noundef 15, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %26 = getelementptr inbounds i8, ptr %0, i64 92
  %27 = load float, ptr %26, align 4, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %0, i64 48
  %29 = load float, ptr %28, align 4, !tbaa !22
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef %27, float noundef %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %30 = load float, ptr %26, align 4, !tbaa !21
  %31 = getelementptr inbounds i8, ptr %0, i64 56
  %32 = load float, ptr %31, align 4, !tbaa !23
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef %30, float noundef %32)
  call void @_ZN10ImDrawList7AddLineERK6ImVec2S2_jf(ptr noundef nonnull align 8 dereferenceable(196) %23, ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5, i32 noundef -16711936, float noundef 1.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %33 = getelementptr inbounds i8, ptr %0, i64 96
  %34 = load float, ptr %33, align 8, !tbaa !24
  %35 = load float, ptr %28, align 4, !tbaa !22
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef %34, float noundef %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %36 = load float, ptr %33, align 8, !tbaa !24
  %37 = load float, ptr %31, align 4, !tbaa !23
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %36, float noundef %37)
  call void @_ZN10ImDrawList7AddLineERK6ImVec2S2_jf(ptr noundef nonnull align 8 dereferenceable(196) %23, ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef -16711936, float noundef 1.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br i1 %20, label %.preheader, label %72

38:                                               ; preds = %.critedge
  br i1 %20, label %.preheader, label %72

.preheader:                                       ; preds = %38, %17, %22
  %39 = load i32, ptr %0, align 8, !tbaa !20
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %41 = getelementptr inbounds i8, ptr %0, i64 24
  br label %42

._crit_edge:                                      ; preds = %58, %.preheader
  call void @_ZN5ImGui7TreePopEv()
  br label %72

42:                                               ; preds = %.lr.ph, %58
  %.047 = phi i32 [ 0, %.lr.ph ], [ %69, %58 ]
  %43 = call noundef nonnull align 4 dereferenceable(35) ptr @_ZN8ImVectorI12ImGuiTabItemEixEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %.047)
  call void @_ZN5ImGui6PushIDEPKv(ptr noundef nonnull %43)
  %44 = call noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef nonnull @.str.329)
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  call void @_ZN5ImGui18TabBarQueueReorderEP11ImGuiTabBarPK12ImGuiTabItemi(ptr noundef nonnull %0, ptr noundef nonnull %43, i32 noundef -1)
  br label %46

46:                                               ; preds = %45, %42
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef 2.000000e+00)
  %47 = call noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef nonnull @.str.330)
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  call void @_ZN5ImGui18TabBarQueueReorderEP11ImGuiTabBarPK12ImGuiTabItemi(ptr noundef nonnull %0, ptr noundef nonnull %43, i32 noundef 1)
  br label %49

49:                                               ; preds = %48, %46
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %50 = load i32, ptr %43, align 4, !tbaa !25
  %51 = load i32, ptr %41, align 8, !tbaa !27
  %52 = icmp eq i32 %50, %51
  %53 = select i1 %52, i32 42, i32 32
  %54 = getelementptr inbounds i8, ptr %43, i64 28
  %55 = load i16, ptr %54, align 4, !tbaa !28
  %.not46 = icmp eq i16 %55, -1
  br i1 %.not46, label %58, label %56

56:                                               ; preds = %49
  %57 = call noundef ptr @_ZNK11ImGuiTabBar10GetTabNameEPK12ImGuiTabItem(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull %43)
  br label %58

58:                                               ; preds = %49, %56
  %59 = phi ptr [ %57, %56 ], [ @.str.6, %49 ]
  %60 = getelementptr inbounds i8, ptr %43, i64 16
  %61 = load float, ptr %60, align 4, !tbaa !29
  %62 = fpext float %61 to double
  %63 = getelementptr inbounds i8, ptr %43, i64 20
  %64 = load float, ptr %63, align 4, !tbaa !30
  %65 = fpext float %64 to double
  %66 = getelementptr inbounds i8, ptr %43, i64 24
  %67 = load float, ptr %66, align 4, !tbaa !31
  %68 = fpext float %67 to double
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.331, i32 noundef %.047, i32 noundef %53, i32 noundef %50, ptr noundef %59, double noundef %62, double noundef %65, double noundef %68)
  call void @_ZN5ImGui5PopIDEv()
  %69 = add nuw nsw i32 %.047, 1
  %70 = load i32, ptr %0, align 8, !tbaa !20
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %42, label %._crit_edge, !llvm.loop !32

72:                                               ; preds = %22, %17, %._crit_edge, %38
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #5
  ret void
}

declare noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef, ptr noundef, ...) local_unnamed_addr #3

declare void @_ZN10ImDrawList7AddLineERK6ImVec2S2_jf(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef) local_unnamed_addr #3

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

declare void @_ZN5ImGui18TabBarQueueReorderEP11ImGuiTabBarPK12ImGuiTabItemi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK11ImGuiTabBar10GetTabNameEPK12ImGuiTabItem(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 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 #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, !8, i64 40}
!6 = !{!"_ZTS11ImGuiTabBar", !7, i64 0, !8, i64 16, !8, i64 20, !8, i64 24, !8, i64 28, !8, i64 32, !8, i64 36, !8, i64 40, !12, i64 44, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !8, i64 100, !9, i64 104, !9, i64 105, !15, i64 106, !15, i64 107, !15, i64 108, !16, i64 110, !16, i64 112, !14, i64 116, !13, i64 120, !13, i64 128, !17, i64 136}
!7 = !{!"_ZTS8ImVectorI12ImGuiTabItemE", !8, i64 0, !8, i64 4, !11, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTS6ImRect", !13, i64 0, !13, i64 8}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !9, i64 0}
!15 = !{!"bool", !9, i64 0}
!16 = !{!"short", !9, i64 0}
!17 = !{!"_ZTS15ImGuiTextBuffer", !18, i64 0}
!18 = !{!"_ZTS8ImVectorIcE", !8, i64 0, !8, i64 4, !11, i64 8}
!19 = !{!6, !8, i64 20}
!20 = !{!6, !8, i64 0}
!21 = !{!6, !14, i64 92}
!22 = !{!6, !14, i64 48}
!23 = !{!6, !14, i64 56}
!24 = !{!6, !14, i64 96}
!25 = !{!26, !8, i64 0}
!26 = !{!"_ZTS12ImGuiTabItem", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !16, i64 28, !16, i64 30, !16, i64 32, !15, i64 34}
!27 = !{!6, !8, i64 24}
!28 = !{!26, !16, i64 28}
!29 = !{!26, !14, i64 16}
!30 = !{!26, !14, i64 20}
!31 = !{!26, !14, i64 24}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


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