; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/ImGui (implot)

; 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.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImPlotContext = type { %struct.ImPool.34, %struct.ImPool.36, ptr, ptr, ptr, ptr, ptr, %struct.ImPlotTicker, %struct.ImPlotAnnotationCollection, %struct.ImPlotTagCollection, i8, [3 x i8], %struct.ImPlotStyle, %struct.ImVector.6, %struct.ImVector.7, %struct.ImPlotColormapData, %struct.ImVector.10, %struct.tm, %struct.ImVector.42, %struct.ImVector.42, %struct.ImVector.10, i32, i32, %struct.ImPlotNextPlotData, %struct.ImPlotNextItemData, %struct.ImPlotInputMap, i8, %struct.ImGuiTextBuffer, ptr, %struct.ImPool.43, ptr, ptr }
%struct.ImPool.34 = type { %struct.ImVector.35, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.35 = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %struct.ImVector.4 }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImPool.36 = type { %struct.ImVector.37, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.37 = type { i32, i32, ptr }
%struct.ImPlotTicker = type <{ %struct.ImVector.38, %struct.ImGuiTextBuffer, %struct.ImVec2, %struct.ImVec2, i32, [4 x i8] }>
%struct.ImVector.38 = type { i32, i32, ptr }
%struct.ImPlotAnnotationCollection = type <{ %struct.ImVector.39, %struct.ImGuiTextBuffer, i32, [4 x i8] }>
%struct.ImVector.39 = type { i32, i32, ptr }
%struct.ImPlotTagCollection = type <{ %struct.ImVector.40, %struct.ImGuiTextBuffer, i32, [4 x i8] }>
%struct.ImVector.40 = type { i32, i32, ptr }
%struct.ImPlotStyle = type <{ float, i32, float, float, float, float, float, float, float, float, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, [21 x %struct.ImVec4], i32, i8, i8, i8, i8 }>
%struct.ImVec4 = type { float, float, float, float }
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, ptr }
%struct.ImPlotColormapData = type <{ %struct.ImVector.9, %struct.ImVector.10, %struct.ImVector.10, %struct.ImVector.9, %struct.ImVector.10, %struct.ImVector.10, %struct.ImGuiTextBuffer, %struct.ImVector.10, %struct.ImVector.41, %struct.ImGuiStorage, i32, [4 x i8] }>
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImVector.41 = type { i32, i32, ptr }
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr }
%struct.ImVector.42 = type { i32, i32, ptr }
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImPlotNextPlotData = type { [6 x i32], [6 x %struct.ImPlotRange], [6 x i8], [6 x i8], [6 x ptr], [6 x ptr] }
%struct.ImPlotRange = type { double, double }
%struct.ImPlotNextItemData = type { [5 x %struct.ImVec4], float, i32, float, float, float, float, float, float, float, i8, i8, i8, i8, i8, i8, i32 }
%struct.ImPlotInputMap = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float }
%struct.ImGuiTextBuffer = type { %struct.ImVector.24 }
%struct.ImVector.24 = type { i32, i32, ptr }
%struct.ImPool.43 = type { %struct.ImVector.44, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.44 = type { i32, i32, ptr }
%struct.ImPlotItemGroup = type <{ i32, [4 x i8], %struct.ImPlotLegend, %struct.ImPool.46, i32, [4 x i8] }>
%struct.ImPlotLegend = type <{ i32, i32, i32, i32, %struct.ImVector.10, %struct.ImGuiTextBuffer, %struct.ImRect, i8, i8, i8, [5 x i8] }>
%struct.ImPool.46 = type { %struct.ImVector.47, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.47 = type { i32, i32, ptr }
%struct.ImPlotItem = type <{ i32, i32, %struct.ImRect, i32, i8, i8, i8, i8 }>

@GImPlot = external dso_local global ptr, align 8

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

; Function Attrs: 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare noundef float @_ZN5ImGui17GetTextLineHeightEv() #5

declare noundef ptr @_ZN5ImGui19FindRenderedTextEndEPKcS1_(ptr noundef, ptr noundef) #5

declare <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef, ptr noundef, i1 noundef zeroext, float noundef) #5

declare void @_ZN10ImDrawList7AddTextERK6ImVec2jPKcS4_(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK15ImPlotItemGroup14GetLegendCountEv(ptr noundef nonnull align 8 dereferenceable(124)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN15ImPlotItemGroup14GetLegendLabelEi(ptr noundef nonnull align 8 dereferenceable(124), i32 noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ImPlot17LegendSortingCompEPKvS1_(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ImPlot17ShowLegendEntriesER15ImPlotItemGroupRK6ImRectbRK6ImVec2S7_bR10ImDrawList(ptr noundef nonnull align 8 dereferenceable(124) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, i1 noundef zeroext %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4, i1 noundef zeroext %5, ptr noundef nonnull align 8 dereferenceable(196) %6) #7 {
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca float, align 4
  %33 = alloca %struct.ImVec2, align 4
  %34 = alloca %struct.ImVec2, align 4
  %35 = alloca %struct.ImVec2, align 4
  %36 = alloca %struct.ImVec2, align 4
  %37 = alloca %struct.ImVec2, align 4
  %38 = alloca %struct.ImVec2, align 4
  %39 = alloca %struct.ImRect, align 4
  %40 = alloca %struct.ImVec2, align 4
  %41 = alloca %struct.ImVec2, align 4
  %42 = alloca %struct.ImVec2, align 4
  %43 = alloca %struct.ImVec2, align 4
  %44 = alloca %struct.ImRect, align 4
  %45 = alloca %struct.ImVec2, align 4
  %46 = alloca %struct.ImVec2, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca %struct.ImRect, align 4
  %50 = alloca i8, align 1
  %51 = alloca i8, align 1
  %52 = alloca i8, align 1
  %53 = alloca i8, align 1
  %54 = alloca i32, align 4
  %55 = alloca ptr, align 8
  %56 = alloca %struct.ImVec2, align 4
  %57 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  %58 = zext i1 %2 to i8
  store i8 %58, ptr %11, align 1, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  %59 = zext i1 %5 to i8
  store i8 %59, ptr %14, align 1, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  %60 = call noundef float @_ZN5ImGui17GetTextLineHeightEv()
  store float %60, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %61 = load float, ptr %16, align 4, !tbaa !11
  store float %61, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  store float 2.000000e+00, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  %62 = call noundef i32 @_ZN6ImPlotL16GetStyleColorU32Ei(i32 noundef 10)
  store i32 %62, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  %63 = load i32, ptr %19, align 4, !tbaa !13
  %64 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %63, float noundef 2.500000e-01)
  store i32 %64, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  store float 0.000000e+00, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #10
  store i8 0, ptr %22, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = call noundef i32 @_ZNK15ImPlotItemGroup14GetLegendCountEv(ptr noundef nonnull align 8 dereferenceable(124) %65)
  store i32 %66, ptr %23, align 4, !tbaa !13
  %67 = load i32, ptr %23, align 4, !tbaa !13
  %68 = icmp slt i32 %67, 1
  br i1 %68, label %69, label %72

69:                                               ; preds = %7
  %70 = load i8, ptr %11, align 1, !tbaa !9, !range !15, !noundef !16
  %71 = trunc i8 %70 to i1
  store i1 %71, ptr %8, align 1
  store i32 1, ptr %24, align 4
  br label %335

72:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %73 = load ptr, ptr @GImPlot, align 8, !tbaa !5
  store ptr %73, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %74 = load ptr, ptr %25, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ImPlotContext, ptr %74, i32 0, i32 20
  store ptr %75, ptr %26, align 8, !tbaa !5
  %76 = load ptr, ptr %26, align 8, !tbaa !5
  %77 = load i32, ptr %23, align 4, !tbaa !13
  call void @_ZN8ImVectorIiE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %76, i32 noundef %77)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  store i32 0, ptr %27, align 4, !tbaa !13
  br label %78

78:                                               ; preds = %88, %72
  %79 = load i32, ptr %27, align 4, !tbaa !13
  %80 = load i32, ptr %23, align 4, !tbaa !13
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  br label %91

83:                                               ; preds = %78
  %84 = load i32, ptr %27, align 4, !tbaa !13
  %85 = load ptr, ptr %26, align 8, !tbaa !5
  %86 = load i32, ptr %27, align 4, !tbaa !13
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEi(ptr noundef nonnull align 8 dereferenceable(16) %85, i32 noundef %86)
  store i32 %84, ptr %87, align 4, !tbaa !13
  br label %88

88:                                               ; preds = %83
  %89 = load i32, ptr %27, align 4, !tbaa !13
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %27, align 4, !tbaa !13
  br label %78, !llvm.loop !17

91:                                               ; preds = %82
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ImPlotItemGroup, ptr %92, i32 0, i32 2
  %94 = getelementptr inbounds %struct.ImPlotLegend, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !19
  %96 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %95, i32 noundef 64)
  br i1 %96, label %97, label %109

97:                                               ; preds = %91
  %98 = load i32, ptr %23, align 4, !tbaa !13
  %99 = icmp sgt i32 %98, 1
  br i1 %99, label %100, label %109

100:                                              ; preds = %97
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %25, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ImPlotContext, ptr %102, i32 0, i32 28
  store ptr %101, ptr %103, align 8, !tbaa !31
  %104 = load ptr, ptr %26, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ImVector.10, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !57
  %107 = load i32, ptr %23, align 4, !tbaa !13
  %108 = sext i32 %107 to i64
  call void @qsort(ptr noundef %106, i64 noundef %108, i64 noundef 4, ptr noundef @_ZN6ImPlot17LegendSortingCompEPKvS1_)
  br label %109

109:                                              ; preds = %100, %97, %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  store i32 0, ptr %28, align 4, !tbaa !13
  br label %110

110:                                              ; preds = %323, %109
  %111 = load i32, ptr %28, align 4, !tbaa !13
  %112 = load i32, ptr %23, align 4, !tbaa !13
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  br label %326

115:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %116 = load ptr, ptr %26, align 8, !tbaa !5
  %117 = load i32, ptr %28, align 4, !tbaa !13
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEi(ptr noundef nonnull align 8 dereferenceable(16) %116, i32 noundef %117)
  %119 = load i32, ptr %118, align 4, !tbaa !13
  store i32 %119, ptr %29, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = load i32, ptr %29, align 4, !tbaa !13
  %122 = call noundef ptr @_ZN15ImPlotItemGroup13GetLegendItemEi(ptr noundef nonnull align 8 dereferenceable(124) %120, i32 noundef %121)
  store ptr %122, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = load i32, ptr %29, align 4, !tbaa !13
  %125 = call noundef ptr @_ZN15ImPlotItemGroup14GetLegendLabelEi(ptr noundef nonnull align 8 dereferenceable(124) %123, i32 noundef %124)
  store ptr %125, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %126 = load ptr, ptr %31, align 8, !tbaa !5
  %127 = call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef %126, ptr noundef null, i1 noundef zeroext true, float noundef -1.000000e+00)
  store <2 x float> %127, ptr %33, align 4
  %128 = getelementptr inbounds %struct.ImVec2, ptr %33, i32 0, i32 0
  %129 = load float, ptr %128, align 4, !tbaa !58
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  store float %129, ptr %32, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %130 = load i8, ptr %14, align 1, !tbaa !9, !range !15, !noundef !16
  %131 = trunc i8 %130 to i1
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  br i1 %131, label %132, label %146

132:                                              ; preds = %115
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ImRect, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %134, ptr noundef nonnull align 4 dereferenceable(8) %135)
  store <2 x float> %136, ptr %35, align 4
  %137 = load i32, ptr %28, align 4, !tbaa !13
  %138 = sitofp i32 %137 to float
  %139 = load float, ptr %16, align 4, !tbaa !11
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ImVec2, ptr %140, i32 0, i32 1
  %142 = load float, ptr %141, align 4, !tbaa !59
  %143 = fadd float %139, %142
  %144 = fmul float %138, %143
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %36, float noundef 0.000000e+00, float noundef %144)
  %145 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(8) %36)
  store <2 x float> %145, ptr %34, align 4
  br label %161

146:                                              ; preds = %115
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.ImRect, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %148, ptr noundef nonnull align 4 dereferenceable(8) %149)
  store <2 x float> %150, ptr %37, align 4
  %151 = load i32, ptr %28, align 4, !tbaa !13
  %152 = sitofp i32 %151 to float
  %153 = load float, ptr %17, align 4, !tbaa !11
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ImVec2, ptr %154, i32 0, i32 0
  %156 = load float, ptr %155, align 4, !tbaa !58
  %157 = fadd float %153, %156
  %158 = load float, ptr %21, align 4, !tbaa !11
  %159 = call float @llvm.fmuladd.f32(float %152, float %157, float %158)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %38, float noundef %159, float noundef 0.000000e+00)
  %160 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %37, ptr noundef nonnull align 4 dereferenceable(8) %38)
  store <2 x float> %160, ptr %34, align 4
  br label %161

161:                                              ; preds = %146, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  %162 = load float, ptr %32, align 4, !tbaa !11
  %163 = load float, ptr %21, align 4, !tbaa !11
  %164 = fadd float %163, %162
  store float %164, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #10
  call void @_ZN6ImRectC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %39)
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #10
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %41, float noundef 2.000000e+00, float noundef 2.000000e+00)
  %165 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %41)
  store <2 x float> %165, ptr %40, align 4
  %166 = getelementptr inbounds %struct.ImRect, ptr %39, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %166, ptr align 4 %40, i64 8, i1 false), !tbaa.struct !60
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #10
  %167 = load float, ptr %17, align 4, !tbaa !11
  %168 = fsub float %167, 2.000000e+00
  %169 = load float, ptr %17, align 4, !tbaa !11
  %170 = fsub float %169, 2.000000e+00
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %43, float noundef %168, float noundef %170)
  %171 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %43)
  store <2 x float> %171, ptr %42, align 4
  %172 = getelementptr inbounds %struct.ImRect, ptr %39, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %172, ptr align 4 %42, i64 8, i1 false), !tbaa.struct !60
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #10
  call void @_ZN6ImRectC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %44)
  %173 = getelementptr inbounds %struct.ImRect, ptr %44, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %173, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !60
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #10
  %174 = load float, ptr %32, align 4, !tbaa !11
  %175 = load float, ptr %17, align 4, !tbaa !11
  %176 = fadd float %174, %175
  %177 = load float, ptr %17, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %46, float noundef %176, float noundef %177)
  %178 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %46)
  store <2 x float> %178, ptr %45, align 4
  %179 = getelementptr inbounds %struct.ImRect, ptr %44, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %179, ptr align 4 %45, i64 8, i1 false), !tbaa.struct !60
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #10
  %180 = load ptr, ptr %30, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.ImPlotItem, ptr %180, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !61
  %183 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %182, float noundef 1.000000e+00)
  store i32 %183, ptr %48, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #10
  %184 = getelementptr inbounds %struct.ImRect, ptr %39, i32 0, i32 0
  %185 = getelementptr inbounds %struct.ImRect, ptr %44, i32 0, i32 1
  call void @_ZN6ImRectC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(8) %184, ptr noundef nonnull align 4 dereferenceable(8) %185)
  %186 = load ptr, ptr %30, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.ImPlotItem, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 4, !tbaa !63
  call void @_ZN5ImGui11KeepAliveIDEj(i32 noundef %188)
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #10
  store i8 0, ptr %50, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %51) #10
  store i8 0, ptr %51, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %52) #10
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ImPlotItemGroup, ptr %189, i32 0, i32 2
  %191 = getelementptr inbounds %struct.ImPlotLegend, ptr %190, i32 0, i32 0
  %192 = load i32, ptr %191, align 8, !tbaa !19
  %193 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %192, i32 noundef 1)
  br i1 %193, label %194, label %195

194:                                              ; preds = %161
  br label %200

195:                                              ; preds = %161
  %196 = load ptr, ptr %30, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.ImPlotItem, ptr %196, i32 0, i32 0
  %198 = load i32, ptr %197, align 4, !tbaa !63
  %199 = call noundef zeroext i1 @_ZN5ImGui14ButtonBehaviorERK6ImRectjPbS3_i(ptr noundef nonnull align 4 dereferenceable(16) %49, i32 noundef %198, ptr noundef %50, ptr noundef %51, i32 noundef 0)
  br label %200

200:                                              ; preds = %195, %194
  %201 = phi i1 [ false, %194 ], [ %199, %195 ]
  %202 = zext i1 %201 to i8
  store i8 %202, ptr %52, align 1, !tbaa !9
  %203 = load i8, ptr %52, align 1, !tbaa !9, !range !15, !noundef !16
  %204 = trunc i8 %203 to i1
  br i1 %204, label %205, label %214

205:                                              ; preds = %200
  %206 = load ptr, ptr %30, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ImPlotItem, ptr %206, i32 0, i32 4
  %208 = load i8, ptr %207, align 4, !tbaa !64, !range !15, !noundef !16
  %209 = trunc i8 %208 to i1
  %210 = xor i1 %209, true
  %211 = load ptr, ptr %30, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.ImPlotItem, ptr %211, i32 0, i32 4
  %213 = zext i1 %210 to i8
  store i8 %213, ptr %212, align 4, !tbaa !64
  br label %214

214:                                              ; preds = %205, %200
  call void @llvm.lifetime.start.p0(i64 1, ptr %53) #10
  %215 = load i8, ptr %50, align 1, !tbaa !9, !range !15, !noundef !16
  %216 = trunc i8 %215 to i1
  br i1 %216, label %217, label %232

217:                                              ; preds = %214
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.ImPlotItemGroup, ptr %218, i32 0, i32 2
  %220 = getelementptr inbounds %struct.ImPlotLegend, ptr %219, i32 0, i32 0
  %221 = load i32, ptr %220, align 8, !tbaa !19
  %222 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %221, i32 noundef 2)
  br i1 %222, label %223, label %230

223:                                              ; preds = %217
  %224 = load ptr, ptr %9, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.ImPlotItemGroup, ptr %224, i32 0, i32 2
  %226 = getelementptr inbounds %struct.ImPlotLegend, ptr %225, i32 0, i32 0
  %227 = load i32, ptr %226, align 8, !tbaa !19
  %228 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %227, i32 noundef 4)
  %229 = xor i1 %228, true
  br label %230

230:                                              ; preds = %223, %217
  %231 = phi i1 [ true, %217 ], [ %229, %223 ]
  br label %232

232:                                              ; preds = %230, %214
  %233 = phi i1 [ false, %214 ], [ %231, %230 ]
  %234 = zext i1 %233 to i8
  store i8 %234, ptr %53, align 1, !tbaa !9
  %235 = load i8, ptr %53, align 1, !tbaa !9, !range !15, !noundef !16
  %236 = trunc i8 %235 to i1
  br i1 %236, label %237, label %251

237:                                              ; preds = %232
  %238 = getelementptr inbounds %struct.ImRect, ptr %39, i32 0, i32 0
  %239 = load ptr, ptr %30, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.ImPlotItem, ptr %239, i32 0, i32 2
  %241 = getelementptr inbounds %struct.ImRect, ptr %240, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %241, ptr align 4 %238, i64 8, i1 false), !tbaa.struct !60
  %242 = getelementptr inbounds %struct.ImRect, ptr %44, i32 0, i32 1
  %243 = load ptr, ptr %30, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.ImPlotItem, ptr %243, i32 0, i32 2
  %245 = getelementptr inbounds %struct.ImRect, ptr %244, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %245, ptr align 4 %242, i64 8, i1 false), !tbaa.struct !60
  %246 = load ptr, ptr %30, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.ImPlotItem, ptr %246, i32 0, i32 5
  store i8 1, ptr %247, align 1, !tbaa !65
  %248 = load i32, ptr %19, align 4, !tbaa !13
  %249 = load i32, ptr %48, align 4, !tbaa !13
  %250 = call noundef i32 @_ZL8ImMixU32jjj(i32 noundef %248, i32 noundef %249, i32 noundef 64)
  store i32 %250, ptr %47, align 4, !tbaa !13
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %254

251:                                              ; preds = %232
  %252 = load i32, ptr %19, align 4, !tbaa !13
  %253 = call noundef i32 @_ZN5ImGui11GetColorU32Ej(i32 noundef %252)
  store i32 %253, ptr %47, align 4, !tbaa !13
  br label %254

254:                                              ; preds = %251, %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #10
  %255 = load i8, ptr %51, align 1, !tbaa !9, !range !15, !noundef !16
  %256 = trunc i8 %255 to i1
  br i1 %256, label %257, label %269

257:                                              ; preds = %254
  %258 = load ptr, ptr %30, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.ImPlotItem, ptr %258, i32 0, i32 4
  %260 = load i8, ptr %259, align 4, !tbaa !64, !range !15, !noundef !16
  %261 = trunc i8 %260 to i1
  br i1 %261, label %262, label %265

262:                                              ; preds = %257
  %263 = load i32, ptr %48, align 4, !tbaa !13
  %264 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %263, float noundef 5.000000e-01)
  br label %267

265:                                              ; preds = %257
  %266 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 5.000000e-01)
  br label %267

267:                                              ; preds = %265, %262
  %268 = phi i32 [ %264, %262 ], [ %266, %265 ]
  store i32 %268, ptr %54, align 4, !tbaa !13
  br label %296

269:                                              ; preds = %254
  %270 = load i8, ptr %50, align 1, !tbaa !9, !range !15, !noundef !16
  %271 = trunc i8 %270 to i1
  br i1 %271, label %272, label %284

272:                                              ; preds = %269
  %273 = load ptr, ptr %30, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.ImPlotItem, ptr %273, i32 0, i32 4
  %275 = load i8, ptr %274, align 4, !tbaa !64, !range !15, !noundef !16
  %276 = trunc i8 %275 to i1
  br i1 %276, label %277, label %280

277:                                              ; preds = %272
  %278 = load i32, ptr %48, align 4, !tbaa !13
  %279 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %278, float noundef 7.500000e-01)
  br label %282

280:                                              ; preds = %272
  %281 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 7.500000e-01)
  br label %282

282:                                              ; preds = %280, %277
  %283 = phi i32 [ %279, %277 ], [ %281, %280 ]
  store i32 %283, ptr %54, align 4, !tbaa !13
  br label %295

284:                                              ; preds = %269
  %285 = load ptr, ptr %30, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.ImPlotItem, ptr %285, i32 0, i32 4
  %287 = load i8, ptr %286, align 4, !tbaa !64, !range !15, !noundef !16
  %288 = trunc i8 %287 to i1
  br i1 %288, label %289, label %291

289:                                              ; preds = %284
  %290 = load i32, ptr %48, align 4, !tbaa !13
  br label %293

291:                                              ; preds = %284
  %292 = load i32, ptr %20, align 4, !tbaa !13
  br label %293

293:                                              ; preds = %291, %289
  %294 = phi i32 [ %290, %289 ], [ %292, %291 ]
  store i32 %294, ptr %54, align 4, !tbaa !13
  br label %295

295:                                              ; preds = %293, %282
  br label %296

296:                                              ; preds = %295, %267
  %297 = load ptr, ptr %15, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.ImRect, ptr %39, i32 0, i32 0
  %299 = getelementptr inbounds %struct.ImRect, ptr %39, i32 0, i32 1
  %300 = load i32, ptr %54, align 4, !tbaa !13
  call void @_ZN10ImDrawList13AddRectFilledERK6ImVec2S2_jfi(ptr noundef nonnull align 8 dereferenceable(196) %297, ptr noundef nonnull align 4 dereferenceable(8) %298, ptr noundef nonnull align 4 dereferenceable(8) %299, i32 noundef %300, float noundef 0.000000e+00, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #10
  %301 = load ptr, ptr %31, align 8, !tbaa !5
  %302 = call noundef ptr @_ZN5ImGui19FindRenderedTextEndEPKcS1_(ptr noundef %301, ptr noundef null)
  store ptr %302, ptr %55, align 8, !tbaa !5
  %303 = load ptr, ptr %31, align 8, !tbaa !5
  %304 = load ptr, ptr %55, align 8, !tbaa !5
  %305 = icmp ne ptr %303, %304
  br i1 %305, label %306, label %322

306:                                              ; preds = %296
  %307 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #10
  %308 = load float, ptr %17, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %57, float noundef %308, float noundef 0.000000e+00)
  %309 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %57)
  store <2 x float> %309, ptr %56, align 4
  %310 = load ptr, ptr %30, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.ImPlotItem, ptr %310, i32 0, i32 4
  %312 = load i8, ptr %311, align 4, !tbaa !64, !range !15, !noundef !16
  %313 = trunc i8 %312 to i1
  br i1 %313, label %314, label %316

314:                                              ; preds = %306
  %315 = load i32, ptr %47, align 4, !tbaa !13
  br label %318

316:                                              ; preds = %306
  %317 = load i32, ptr %20, align 4, !tbaa !13
  br label %318

318:                                              ; preds = %316, %314
  %319 = phi i32 [ %315, %314 ], [ %317, %316 ]
  %320 = load ptr, ptr %31, align 8, !tbaa !5
  %321 = load ptr, ptr %55, align 8, !tbaa !5
  call void @_ZN10ImDrawList7AddTextERK6ImVec2jPKcS4_(ptr noundef nonnull align 8 dereferenceable(196) %307, ptr noundef nonnull align 4 dereferenceable(8) %56, i32 noundef %319, ptr noundef %320, ptr noundef %321)
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #10
  br label %322

322:                                              ; preds = %318, %296
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  br label %323

323:                                              ; preds = %322
  %324 = load i32, ptr %28, align 4, !tbaa !13
  %325 = add nsw i32 %324, 1
  store i32 %325, ptr %28, align 4, !tbaa !13
  br label %110, !llvm.loop !66

326:                                              ; preds = %114
  %327 = load i8, ptr %11, align 1, !tbaa !9, !range !15, !noundef !16
  %328 = trunc i8 %327 to i1
  br i1 %328, label %329, label %333

329:                                              ; preds = %326
  %330 = load i8, ptr %22, align 1, !tbaa !9, !range !15, !noundef !16
  %331 = trunc i8 %330 to i1
  %332 = xor i1 %331, true
  br label %333

333:                                              ; preds = %329, %326
  %334 = phi i1 [ false, %326 ], [ %332, %329 ]
  store i1 %334, ptr %8, align 1
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %335

335:                                              ; preds = %333, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  %336 = load i1, ptr %8, align 1
  ret i1 %336
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZN6ImPlotL16GetStyleColorU32Ei(i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL10ImAlphaU32jf(i32 noundef, float noundef) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorIiE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #9 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef, i32 noundef) #8

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN15ImPlotItemGroup13GetLegendItemEi(ptr noundef nonnull align 8 dereferenceable(124), i32 noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImRectC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #6 align 2

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

declare void @_ZN5ImGui11KeepAliveIDEj(i32 noundef) #5

declare noundef zeroext i1 @_ZN5ImGui14ButtonBehaviorERK6ImRectjPbS3_i(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef, ptr noundef, ptr noundef, i32 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL8ImMixU32jjj(i32 noundef, i32 noundef, i32 noundef) #8

declare noundef i32 @_ZN5ImGui11GetColorU32Ej(i32 noundef) #5

declare noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef, float noundef) #5

declare void @_ZN10ImDrawList13AddRectFilledERK6ImVec2S2_jfi(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) #5

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { "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 #6 = { 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 #7 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #8 = { 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 #9 = { 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 #10 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !14, i64 8}
!20 = !{!"_ZTS15ImPlotItemGroup", !14, i64 0, !21, i64 8, !27, i64 80, !14, i64 120}
!21 = !{!"_ZTS12ImPlotLegend", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !22, i64 16, !23, i64 32, !25, i64 48, !10, i64 64, !10, i64 65, !10, i64 66}
!22 = !{!"_ZTS8ImVectorIiE", !14, i64 0, !14, i64 4, !6, i64 8}
!23 = !{!"_ZTS15ImGuiTextBuffer", !24, i64 0}
!24 = !{!"_ZTS8ImVectorIcE", !14, i64 0, !14, i64 4, !6, i64 8}
!25 = !{!"_ZTS6ImRect", !26, i64 0, !26, i64 8}
!26 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!27 = !{!"_ZTS6ImPoolI10ImPlotItemE", !28, i64 0, !29, i64 16, !14, i64 32, !14, i64 36}
!28 = !{!"_ZTS8ImVectorI10ImPlotItemE", !14, i64 0, !14, i64 4, !6, i64 8}
!29 = !{!"_ZTS12ImGuiStorage", !30, i64 0}
!30 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !14, i64 0, !14, i64 4, !6, i64 8}
!31 = !{!32, !6, i64 1536}
!32 = !{!"_ZTS13ImPlotContext", !33, i64 0, !35, i64 40, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !37, i64 120, !39, i64 176, !41, i64 216, !10, i64 256, !43, i64 260, !44, i64 776, !45, i64 792, !46, i64 808, !22, i64 976, !49, i64 992, !51, i64 1048, !51, i64 1064, !22, i64 1080, !14, i64 1096, !14, i64 1100, !52, i64 1104, !53, i64 1336, !54, i64 1464, !10, i64 1512, !23, i64 1520, !6, i64 1536, !55, i64 1544, !6, i64 1584, !6, i64 1592}
!33 = !{!"_ZTS6ImPoolI10ImPlotPlotE", !34, i64 0, !29, i64 16, !14, i64 32, !14, i64 36}
!34 = !{!"_ZTS8ImVectorI10ImPlotPlotE", !14, i64 0, !14, i64 4, !6, i64 8}
!35 = !{!"_ZTS6ImPoolI13ImPlotSubplotE", !36, i64 0, !29, i64 16, !14, i64 32, !14, i64 36}
!36 = !{!"_ZTS8ImVectorI13ImPlotSubplotE", !14, i64 0, !14, i64 4, !6, i64 8}
!37 = !{!"_ZTS12ImPlotTicker", !38, i64 0, !23, i64 16, !26, i64 32, !26, i64 40, !14, i64 48}
!38 = !{!"_ZTS8ImVectorI10ImPlotTickE", !14, i64 0, !14, i64 4, !6, i64 8}
!39 = !{!"_ZTS26ImPlotAnnotationCollection", !40, i64 0, !23, i64 16, !14, i64 32}
!40 = !{!"_ZTS8ImVectorI16ImPlotAnnotationE", !14, i64 0, !14, i64 4, !6, i64 8}
!41 = !{!"_ZTS19ImPlotTagCollection", !42, i64 0, !23, i64 16, !14, i64 32}
!42 = !{!"_ZTS8ImVectorI9ImPlotTagE", !14, i64 0, !14, i64 4, !6, i64 8}
!43 = !{!"_ZTS11ImPlotStyle", !12, i64 0, !14, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !26, i64 44, !26, i64 52, !26, i64 60, !26, i64 68, !26, i64 76, !26, i64 84, !26, i64 92, !26, i64 100, !26, i64 108, !26, i64 116, !26, i64 124, !26, i64 132, !26, i64 140, !26, i64 148, !26, i64 156, !26, i64 164, !7, i64 172, !14, i64 508, !10, i64 512, !10, i64 513, !10, i64 514}
!44 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !14, i64 0, !14, i64 4, !6, i64 8}
!45 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !14, i64 0, !14, i64 4, !6, i64 8}
!46 = !{!"_ZTS18ImPlotColormapData", !47, i64 0, !22, i64 16, !22, i64 32, !47, i64 48, !22, i64 64, !22, i64 80, !23, i64 96, !22, i64 112, !48, i64 128, !29, i64 144, !14, i64 160}
!47 = !{!"_ZTS8ImVectorIjE", !14, i64 0, !14, i64 4, !6, i64 8}
!48 = !{!"_ZTS8ImVectorIbE", !14, i64 0, !14, i64 4, !6, i64 8}
!49 = !{!"_ZTS2tm", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !50, i64 40, !6, i64 48}
!50 = !{!"long", !7, i64 0}
!51 = !{!"_ZTS8ImVectorIdE", !14, i64 0, !14, i64 4, !6, i64 8}
!52 = !{!"_ZTS18ImPlotNextPlotData", !7, i64 0, !7, i64 24, !7, i64 120, !7, i64 126, !7, i64 136, !7, i64 184}
!53 = !{!"_ZTS18ImPlotNextItemData", !7, i64 0, !12, i64 80, !14, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !10, i64 116, !10, i64 117, !10, i64 118, !10, i64 119, !10, i64 120, !10, i64 121, !14, i64 124}
!54 = !{!"_ZTS14ImPlotInputMap", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !12, i64 44}
!55 = !{!"_ZTS6ImPoolI19ImPlotAlignmentDataE", !56, i64 0, !29, i64 16, !14, i64 32, !14, i64 36}
!56 = !{!"_ZTS8ImVectorI19ImPlotAlignmentDataE", !14, i64 0, !14, i64 4, !6, i64 8}
!57 = !{!22, !6, i64 8}
!58 = !{!26, !12, i64 0}
!59 = !{!26, !12, i64 4}
!60 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!61 = !{!62, !14, i64 4}
!62 = !{!"_ZTS10ImPlotItem", !14, i64 0, !14, i64 4, !25, i64 8, !14, i64 24, !10, i64 28, !10, i64 29, !10, i64 30}
!63 = !{!62, !14, i64 0}
!64 = !{!62, !10, i64 28}
!65 = !{!62, !10, i64 29}
!66 = distinct !{!66, !18}


; 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 }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }

@GImPlot = external dso_local local_unnamed_addr global ptr, align 8

; 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: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

declare noundef float @_ZN5ImGui17GetTextLineHeightEv() local_unnamed_addr #4

declare noundef ptr @_ZN5ImGui19FindRenderedTextEndEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #4

declare <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef, ptr noundef, i1 noundef zeroext, float noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK15ImPlotItemGroup14GetLegendCountEv(ptr noundef nonnull align 8 dereferenceable(124)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN15ImPlotItemGroup14GetLegendLabelEi(ptr noundef nonnull align 8 dereferenceable(124), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ImPlot17LegendSortingCompEPKvS1_(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ImPlot17ShowLegendEntriesER15ImPlotItemGroupRK6ImRectbRK6ImVec2S7_bR10ImDrawList(ptr noundef nonnull align 8 dereferenceable(124) %0, ptr noundef nonnull align 4 dereferenceable(16) %1, i1 noundef zeroext %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr nocapture noundef nonnull readonly align 4 dereferenceable(8) %4, i1 noundef zeroext %5, ptr noundef nonnull align 8 dereferenceable(196) %6) local_unnamed_addr #6 {
  %8 = alloca %struct.ImVec2, align 8
  %9 = alloca %struct.ImVec2, align 8
  %10 = alloca %struct.ImVec2, align 4
  %11 = alloca %struct.ImVec2, align 8
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImRect, align 8
  %14 = alloca %struct.ImVec2, align 4
  %15 = alloca %struct.ImVec2, align 4
  %16 = alloca %struct.ImRect, align 8
  %17 = alloca %struct.ImVec2, align 4
  %18 = alloca %struct.ImRect, align 4
  %19 = alloca i8, align 1
  %20 = alloca i8, align 1
  %21 = alloca %struct.ImVec2, align 8
  %22 = alloca %struct.ImVec2, align 4
  %23 = tail call noundef float @_ZN5ImGui17GetTextLineHeightEv()
  %24 = tail call noundef i32 @_ZN6ImPlotL16GetStyleColorU32Ei(i32 noundef 10)
  %25 = tail call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %24, float noundef 2.500000e-01)
  %26 = tail call noundef i32 @_ZNK15ImPlotItemGroup14GetLegendCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %27 = icmp slt i32 %26, 1
  br i1 %27, label %137, label %28

28:                                               ; preds = %7
  %29 = load ptr, ptr @GImPlot, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 1080
  tail call void @_ZN8ImVectorIiE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %30, i32 noundef %26)
  br label %36

31:                                               ; preds = %36
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = load i32, ptr %32, align 8, !tbaa !9
  %34 = tail call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %33, i32 noundef 64)
  %35 = icmp ne i32 %26, 1
  %or.cond = and i1 %35, %34
  br i1 %or.cond, label %39, label %.lr.ph

36:                                               ; preds = %28, %36
  %.094103 = phi i32 [ 0, %28 ], [ %38, %36 ]
  %37 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEi(ptr noundef nonnull align 8 dereferenceable(16) %30, i32 noundef %.094103)
  store i32 %.094103, ptr %37, align 4, !tbaa !24
  %38 = add nuw nsw i32 %.094103, 1
  %exitcond.not = icmp eq i32 %38, %26
  br i1 %exitcond.not, label %31, label %36, !llvm.loop !25

39:                                               ; preds = %31
  %40 = getelementptr inbounds i8, ptr %29, i64 1536
  store ptr %0, ptr %40, align 8, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %29, i64 1088
  %42 = load ptr, ptr %41, align 8, !tbaa !53
  %43 = zext nneg i32 %26 to i64
  tail call void @qsort(ptr noundef %42, i64 noundef %43, i64 noundef 4, ptr noundef nonnull @_ZN6ImPlot17LegendSortingCompEPKvS1_)
  br label %.lr.ph

.lr.ph:                                           ; preds = %31, %39
  %44 = getelementptr inbounds i8, ptr %4, i64 4
  %45 = fadd float %23, -2.000000e+00
  %46 = getelementptr inbounds i8, ptr %13, i64 8
  %47 = getelementptr inbounds i8, ptr %16, i64 8
  %smax = tail call i32 @llvm.smax.i32(i32 %26, i32 1)
  br label %50

._crit_edge:                                      ; preds = %135
  %48 = xor i1 %.1, true
  %49 = select i1 %2, i1 %48, i1 false
  br label %137

50:                                               ; preds = %.lr.ph, %135
  %.091106 = phi float [ 0.000000e+00, %.lr.ph ], [ %69, %135 ]
  %.092105 = phi i1 [ false, %.lr.ph ], [ %.1, %135 ]
  %.095104 = phi i32 [ 0, %.lr.ph ], [ %136, %135 ]
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEi(ptr noundef nonnull align 8 dereferenceable(16) %30, i32 noundef %.095104)
  %52 = load i32, ptr %51, align 4, !tbaa !24
  %53 = call noundef ptr @_ZN15ImPlotItemGroup13GetLegendItemEi(ptr noundef nonnull align 8 dereferenceable(124) %0, i32 noundef %52)
  %54 = call noundef ptr @_ZN15ImPlotItemGroup14GetLegendLabelEi(ptr noundef nonnull align 8 dereferenceable(124) %0, i32 noundef %52)
  %55 = call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef %54, ptr noundef null, i1 noundef zeroext true, float noundef -1.000000e+00)
  %.sroa.012.0.vec.extract = extractelement <2 x float> %55, i64 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #11
  %56 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %57 = uitofp nneg i32 %.095104 to float
  br i1 %5, label %58, label %63

58:                                               ; preds = %50
  store <2 x float> %56, ptr %9, align 8
  %59 = load float, ptr %44, align 4, !tbaa !54
  %60 = fadd float %23, %59
  %61 = fmul float %60, %57
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef %61)
  %62 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
  br label %68

63:                                               ; preds = %50
  store <2 x float> %56, ptr %11, align 8
  %64 = load float, ptr %4, align 4, !tbaa !55
  %65 = fadd float %23, %64
  %66 = call float @llvm.fmuladd.f32(float %57, float %65, float %.091106)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef %66, float noundef 0.000000e+00)
  %67 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %12)
  br label %68

68:                                               ; preds = %63, %58
  %storemerge = phi <2 x float> [ %67, %63 ], [ %62, %58 ]
  store <2 x float> %storemerge, ptr %8, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #11
  %69 = fadd float %.091106, %.sroa.012.0.vec.extract
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #11
  call void @_ZN6ImRectC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef 2.000000e+00, float noundef 2.000000e+00)
  %70 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %70, ptr %13, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef %45, float noundef %45)
  %71 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store <2 x float> %71, ptr %46, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #11
  call void @_ZN6ImRectC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %16)
  %72 = load i64, ptr %8, align 8
  store i64 %72, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #11
  %73 = fadd float %23, %.sroa.012.0.vec.extract
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %17, float noundef %73, float noundef %23)
  %74 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %17)
  store <2 x float> %74, ptr %47, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #11
  %75 = getelementptr inbounds i8, ptr %53, i64 4
  %76 = load i32, ptr %75, align 4, !tbaa !56
  %77 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %76, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #11
  call void @_ZN6ImRectC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %47)
  %78 = load i32, ptr %53, align 4, !tbaa !58
  call void @_ZN5ImGui11KeepAliveIDEj(i32 noundef %78)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #11
  store i8 0, ptr %19, align 1, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #11
  store i8 0, ptr %20, align 1, !tbaa !59
  %79 = load i32, ptr %32, align 8, !tbaa !9
  %80 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %79, i32 noundef 1)
  br i1 %80, label %.critedge, label %81

81:                                               ; preds = %68
  %82 = load i32, ptr %53, align 4, !tbaa !58
  %83 = call noundef zeroext i1 @_ZN5ImGui14ButtonBehaviorERK6ImRectjPbS3_i(ptr noundef nonnull align 4 dereferenceable(16) %18, i32 noundef %82, ptr noundef nonnull %19, ptr noundef nonnull %20, i32 noundef 0)
  br i1 %83, label %84, label %.critedge

84:                                               ; preds = %81
  %85 = getelementptr inbounds i8, ptr %53, i64 28
  %86 = load i8, ptr %85, align 4, !tbaa !60, !range !61, !noundef !62
  %87 = xor i8 %86, 1
  store i8 %87, ptr %85, align 4, !tbaa !60
  br label %.critedge

.critedge:                                        ; preds = %68, %84, %81
  %88 = load i8, ptr %19, align 1, !tbaa !59, !range !61, !noundef !62
  %89 = trunc nuw i8 %88 to i1
  br i1 %89, label %90, label %.critedge100

90:                                               ; preds = %.critedge
  %91 = load i32, ptr %32, align 8, !tbaa !9
  %92 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %91, i32 noundef 2)
  br i1 %92, label %93, label %.critedge102

93:                                               ; preds = %90
  %94 = load i32, ptr %32, align 8, !tbaa !9
  %95 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %94, i32 noundef 4)
  br i1 %95, label %.critedge100, label %.critedge102

.critedge102:                                     ; preds = %90, %93
  %96 = getelementptr inbounds i8, ptr %53, i64 8
  %97 = load i64, ptr %13, align 8
  store i64 %97, ptr %96, align 4
  %98 = getelementptr inbounds i8, ptr %53, i64 16
  %99 = load i64, ptr %47, align 8
  store i64 %99, ptr %98, align 4
  %100 = getelementptr inbounds i8, ptr %53, i64 29
  store i8 1, ptr %100, align 1, !tbaa !63
  %101 = call noundef i32 @_ZL8ImMixU32jjj(i32 noundef %24, i32 noundef %77, i32 noundef 64)
  br label %103

.critedge100:                                     ; preds = %.critedge, %93
  %102 = call noundef i32 @_ZN5ImGui11GetColorU32Ej(i32 noundef %24)
  br label %103

103:                                              ; preds = %.critedge100, %.critedge102
  %.093 = phi i32 [ %101, %.critedge102 ], [ %102, %.critedge100 ]
  %.1 = phi i1 [ true, %.critedge102 ], [ %.092105, %.critedge100 ]
  %104 = load i8, ptr %20, align 1, !tbaa !59, !range !61, !noundef !62
  %105 = trunc nuw i8 %104 to i1
  br i1 %105, label %106, label %114

106:                                              ; preds = %103
  %107 = getelementptr inbounds i8, ptr %53, i64 28
  %108 = load i8, ptr %107, align 4, !tbaa !60, !range !61, !noundef !62
  %109 = trunc nuw i8 %108 to i1
  br i1 %109, label %110, label %112

110:                                              ; preds = %106
  %111 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %77, float noundef 5.000000e-01)
  br label %127

112:                                              ; preds = %106
  %113 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 5.000000e-01)
  br label %127

114:                                              ; preds = %103
  %115 = load i8, ptr %19, align 1, !tbaa !59, !range !61, !noundef !62
  %116 = trunc nuw i8 %115 to i1
  %117 = getelementptr inbounds i8, ptr %53, i64 28
  %118 = load i8, ptr %117, align 4, !tbaa !60, !range !61, !noundef !62
  %119 = trunc nuw i8 %118 to i1
  br i1 %116, label %120, label %125

120:                                              ; preds = %114
  br i1 %119, label %121, label %123

121:                                              ; preds = %120
  %122 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %77, float noundef 7.500000e-01)
  br label %127

123:                                              ; preds = %120
  %124 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 7.500000e-01)
  br label %127

125:                                              ; preds = %114
  %126 = select i1 %119, i32 %77, i32 %25
  br label %127

127:                                              ; preds = %121, %123, %110, %112, %125
  %.090 = phi i32 [ %126, %125 ], [ %111, %110 ], [ %113, %112 ], [ %122, %121 ], [ %124, %123 ]
  call void @_ZN10ImDrawList13AddRectFilledERK6ImVec2S2_jfi(ptr noundef nonnull align 8 dereferenceable(196) %6, ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %46, i32 noundef %.090, float noundef 0.000000e+00, i32 noundef 0)
  %128 = call noundef ptr @_ZN5ImGui19FindRenderedTextEndEPKcS1_(ptr noundef %54, ptr noundef null)
  %.not = icmp eq ptr %54, %128
  br i1 %.not, label %135, label %129

129:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %22, float noundef %23, float noundef 0.000000e+00)
  %130 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %22)
  store <2 x float> %130, ptr %21, align 8
  %131 = getelementptr inbounds i8, ptr %53, i64 28
  %132 = load i8, ptr %131, align 4, !tbaa !60, !range !61, !noundef !62
  %133 = trunc nuw i8 %132 to i1
  %134 = select i1 %133, i32 %.093, i32 %25
  call void @_ZN10ImDrawList7AddTextERK6ImVec2jPKcS4_(ptr noundef nonnull align 8 dereferenceable(196) %6, ptr noundef nonnull align 4 dereferenceable(8) %21, i32 noundef %134, ptr noundef %54, ptr noundef %128)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #11
  br label %135

135:                                              ; preds = %129, %127
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  %136 = add nuw nsw i32 %.095104, 1
  %exitcond107.not = icmp eq i32 %136, %smax
  br i1 %exitcond107.not, label %._crit_edge, label %50, !llvm.loop !64

137:                                              ; preds = %7, %._crit_edge
  %.0 = phi i1 [ %49, %._crit_edge ], [ %2, %7 ]
  ret i1 %.0
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZN6ImPlotL16GetStyleColorU32Ei(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL10ImAlphaU32jf(i32 noundef, float noundef) local_unnamed_addr #7

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #9

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN15ImPlotItemGroup13GetLegendItemEi(ptr noundef nonnull align 8 dereferenceable(124), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImRectC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #5 align 2

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

declare void @_ZN5ImGui11KeepAliveIDEj(i32 noundef) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN5ImGui14ButtonBehaviorERK6ImRectjPbS3_i(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL8ImMixU32jjj(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #7

declare noundef i32 @_ZN5ImGui11GetColorU32Ej(i32 noundef) local_unnamed_addr #4

declare noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef, float noundef) local_unnamed_addr #4

declare void @_ZN10ImDrawList13AddRectFilledERK6ImVec2S2_jfi(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) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #10

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { 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 #8 = { 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 #9 = { nofree "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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { 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, !11, i64 8}
!10 = !{!"_ZTS15ImPlotItemGroup", !11, i64 0, !12, i64 8, !20, i64 80, !11, i64 120}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS12ImPlotLegend", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !13, i64 16, !14, i64 32, !16, i64 48, !19, i64 64, !19, i64 65, !19, i64 66}
!13 = !{!"_ZTS8ImVectorIiE", !11, i64 0, !11, i64 4, !6, i64 8}
!14 = !{!"_ZTS15ImGuiTextBuffer", !15, i64 0}
!15 = !{!"_ZTS8ImVectorIcE", !11, i64 0, !11, i64 4, !6, i64 8}
!16 = !{!"_ZTS6ImRect", !17, i64 0, !17, i64 8}
!17 = !{!"_ZTS6ImVec2", !18, i64 0, !18, i64 4}
!18 = !{!"float", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTS6ImPoolI10ImPlotItemE", !21, i64 0, !22, i64 16, !11, i64 32, !11, i64 36}
!21 = !{!"_ZTS8ImVectorI10ImPlotItemE", !11, i64 0, !11, i64 4, !6, i64 8}
!22 = !{!"_ZTS12ImGuiStorage", !23, i64 0}
!23 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !11, i64 0, !11, i64 4, !6, i64 8}
!24 = !{!11, !11, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !6, i64 1536}
!28 = !{!"_ZTS13ImPlotContext", !29, i64 0, !31, i64 40, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !33, i64 120, !35, i64 176, !37, i64 216, !19, i64 256, !39, i64 260, !40, i64 776, !41, i64 792, !42, i64 808, !13, i64 976, !45, i64 992, !47, i64 1048, !47, i64 1064, !13, i64 1080, !11, i64 1096, !11, i64 1100, !48, i64 1104, !49, i64 1336, !50, i64 1464, !19, i64 1512, !14, i64 1520, !6, i64 1536, !51, i64 1544, !6, i64 1584, !6, i64 1592}
!29 = !{!"_ZTS6ImPoolI10ImPlotPlotE", !30, i64 0, !22, i64 16, !11, i64 32, !11, i64 36}
!30 = !{!"_ZTS8ImVectorI10ImPlotPlotE", !11, i64 0, !11, i64 4, !6, i64 8}
!31 = !{!"_ZTS6ImPoolI13ImPlotSubplotE", !32, i64 0, !22, i64 16, !11, i64 32, !11, i64 36}
!32 = !{!"_ZTS8ImVectorI13ImPlotSubplotE", !11, i64 0, !11, i64 4, !6, i64 8}
!33 = !{!"_ZTS12ImPlotTicker", !34, i64 0, !14, i64 16, !17, i64 32, !17, i64 40, !11, i64 48}
!34 = !{!"_ZTS8ImVectorI10ImPlotTickE", !11, i64 0, !11, i64 4, !6, i64 8}
!35 = !{!"_ZTS26ImPlotAnnotationCollection", !36, i64 0, !14, i64 16, !11, i64 32}
!36 = !{!"_ZTS8ImVectorI16ImPlotAnnotationE", !11, i64 0, !11, i64 4, !6, i64 8}
!37 = !{!"_ZTS19ImPlotTagCollection", !38, i64 0, !14, i64 16, !11, i64 32}
!38 = !{!"_ZTS8ImVectorI9ImPlotTagE", !11, i64 0, !11, i64 4, !6, i64 8}
!39 = !{!"_ZTS11ImPlotStyle", !18, i64 0, !11, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !18, i64 40, !17, i64 44, !17, i64 52, !17, i64 60, !17, i64 68, !17, i64 76, !17, i64 84, !17, i64 92, !17, i64 100, !17, i64 108, !17, i64 116, !17, i64 124, !17, i64 132, !17, i64 140, !17, i64 148, !17, i64 156, !17, i64 164, !7, i64 172, !11, i64 508, !19, i64 512, !19, i64 513, !19, i64 514}
!40 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !11, i64 0, !11, i64 4, !6, i64 8}
!41 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !11, i64 0, !11, i64 4, !6, i64 8}
!42 = !{!"_ZTS18ImPlotColormapData", !43, i64 0, !13, i64 16, !13, i64 32, !43, i64 48, !13, i64 64, !13, i64 80, !14, i64 96, !13, i64 112, !44, i64 128, !22, i64 144, !11, i64 160}
!43 = !{!"_ZTS8ImVectorIjE", !11, i64 0, !11, i64 4, !6, i64 8}
!44 = !{!"_ZTS8ImVectorIbE", !11, i64 0, !11, i64 4, !6, i64 8}
!45 = !{!"_ZTS2tm", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !46, i64 40, !6, i64 48}
!46 = !{!"long", !7, i64 0}
!47 = !{!"_ZTS8ImVectorIdE", !11, i64 0, !11, i64 4, !6, i64 8}
!48 = !{!"_ZTS18ImPlotNextPlotData", !7, i64 0, !7, i64 24, !7, i64 120, !7, i64 126, !7, i64 136, !7, i64 184}
!49 = !{!"_ZTS18ImPlotNextItemData", !7, i64 0, !18, i64 80, !11, i64 84, !18, i64 88, !18, i64 92, !18, i64 96, !18, i64 100, !18, i64 104, !18, i64 108, !18, i64 112, !19, i64 116, !19, i64 117, !19, i64 118, !19, i64 119, !19, i64 120, !19, i64 121, !11, i64 124}
!50 = !{!"_ZTS14ImPlotInputMap", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !18, i64 44}
!51 = !{!"_ZTS6ImPoolI19ImPlotAlignmentDataE", !52, i64 0, !22, i64 16, !11, i64 32, !11, i64 36}
!52 = !{!"_ZTS8ImVectorI19ImPlotAlignmentDataE", !11, i64 0, !11, i64 4, !6, i64 8}
!53 = !{!13, !6, i64 8}
!54 = !{!17, !18, i64 4}
!55 = !{!17, !18, i64 0}
!56 = !{!57, !11, i64 4}
!57 = !{!"_ZTS10ImPlotItem", !11, i64 0, !11, i64 4, !16, i64 8, !11, i64 24, !19, i64 28, !19, i64 29, !19, i64 30}
!58 = !{!57, !11, i64 0}
!59 = !{!19, !19, i64 0}
!60 = !{!57, !19, i64 28}
!61 = !{i8 0, i8 2}
!62 = !{}
!63 = !{!57, !19, i64 29}
!64 = distinct !{!64, !26}


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