; LLVM IR from Razakhel/RaZ :: extern/implot (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.30, %struct.ImPool.32, ptr, ptr, ptr, ptr, ptr, %struct.ImPlotTicker, %struct.ImPlotAnnotationCollection, %struct.ImPlotTagCollection, i8, [3 x i8], %struct.ImPlotStyle, %struct.ImVector.3, %struct.ImVector.4, %struct.ImPlotColormapData, %struct.ImVector.7, %struct.tm, %struct.ImVector.38, %struct.ImVector.38, %struct.ImVector.7, i32, i32, %struct.ImPlotNextPlotData, %struct.ImPlotNextItemData, %struct.ImPlotInputMap, i8, %struct.ImGuiTextBuffer, ptr, %struct.ImPool.39, ptr, ptr }
%struct.ImPool.30 = type { %struct.ImVector.31, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.31 = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %struct.ImVector.2 }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImPool.32 = type { %struct.ImVector.33, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.33 = type { i32, i32, ptr }
%struct.ImPlotTicker = type <{ %struct.ImVector.34, %struct.ImGuiTextBuffer, %struct.ImVec2, %struct.ImVec2, i32, [4 x i8] }>
%struct.ImVector.34 = type { i32, i32, ptr }
%struct.ImPlotAnnotationCollection = type <{ %struct.ImVector.35, %struct.ImGuiTextBuffer, i32, [4 x i8] }>
%struct.ImVector.35 = type { i32, i32, ptr }
%struct.ImPlotTagCollection = type <{ %struct.ImVector.36, %struct.ImGuiTextBuffer, i32, [4 x i8] }>
%struct.ImVector.36 = 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.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImPlotColormapData = type <{ %struct.ImVector.6, %struct.ImVector.7, %struct.ImVector.7, %struct.ImVector.6, %struct.ImVector.7, %struct.ImVector.7, %struct.ImGuiTextBuffer, %struct.ImVector.7, %struct.ImVector.37, %struct.ImGuiStorage, i32, [4 x i8] }>
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.37 = type { i32, i32, ptr }
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr }
%struct.ImVector.38 = type { i32, i32, ptr }
%struct.ImVector.7 = 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.20 }
%struct.ImVector.20 = type { i32, i32, ptr }
%struct.ImPool.39 = type { %struct.ImVector.40, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.40 = type { i32, i32, ptr }
%struct.ImPlotItemGroup = type <{ i32, [4 x i8], %struct.ImPlotLegend, %struct.ImPool.42, i32, [4 x i8] }>
%struct.ImPlotLegend = type <{ i32, i32, i32, i32, %struct.ImVector.7, %struct.ImGuiTextBuffer, %struct.ImRect, i8, i8, i8, [5 x i8] }>
%struct.ImPool.42 = type { %struct.ImVector.43, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.43 = 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 i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca float, align 4
  %32 = alloca %struct.ImVec2, 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.ImRect, align 4
  %39 = alloca %struct.ImVec2, align 4
  %40 = alloca %struct.ImVec2, align 4
  %41 = alloca %struct.ImVec2, align 4
  %42 = alloca %struct.ImVec2, align 4
  %43 = alloca %struct.ImRect, align 4
  %44 = alloca %struct.ImVec2, align 4
  %45 = alloca %struct.ImVec2, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca %struct.ImRect, align 4
  %49 = alloca i8, align 1
  %50 = alloca i8, align 1
  %51 = alloca i8, align 1
  %52 = alloca i8, align 1
  %53 = alloca i32, align 4
  %54 = alloca ptr, align 8
  %55 = alloca %struct.ImVec2, align 4
  %56 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  %57 = zext i1 %2 to i8
  store i8 %57, ptr %11, align 1, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  %58 = zext i1 %5 to i8
  store i8 %58, 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
  %59 = call noundef float @_ZN5ImGui17GetTextLineHeightEv()
  store float %59, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %60 = load float, ptr %16, align 4, !tbaa !11
  store float %60, 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
  %61 = call noundef i32 @_ZN6ImPlotL16GetStyleColorU32Ei(i32 noundef 10)
  store i32 %61, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  %62 = load i32, ptr %19, align 4, !tbaa !13
  %63 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %62, float noundef 2.500000e-01)
  store i32 %63, 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
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = call noundef i32 @_ZNK15ImPlotItemGroup14GetLegendCountEv(ptr noundef nonnull align 8 dereferenceable(124) %64)
  store i32 %65, ptr %23, align 4, !tbaa !13
  %66 = load i32, ptr %23, align 4, !tbaa !13
  %67 = icmp slt i32 %66, 1
  br i1 %67, label %68, label %71

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

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

76:                                               ; preds = %86, %71
  %77 = load i32, ptr %26, align 4, !tbaa !13
  %78 = load i32, ptr %23, align 4, !tbaa !13
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  br label %89

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

86:                                               ; preds = %81
  %87 = load i32, ptr %26, align 4, !tbaa !13
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %26, align 4, !tbaa !13
  br label %76, !llvm.loop !17

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

95:                                               ; preds = %89
  %96 = load i32, ptr %23, align 4, !tbaa !13
  %97 = icmp sgt i32 %96, 1
  br i1 %97, label %98, label %107

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

107:                                              ; preds = %98, %95, %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  store i32 0, ptr %27, align 4, !tbaa !13
  br label %108

108:                                              ; preds = %321, %107
  %109 = load i32, ptr %27, align 4, !tbaa !13
  %110 = load i32, ptr %23, align 4, !tbaa !13
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  br label %324

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

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

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

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

192:                                              ; preds = %159
  br label %198

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

198:                                              ; preds = %193, %192
  %199 = phi i1 [ false, %192 ], [ %197, %193 ]
  %200 = zext i1 %199 to i8
  store i8 %200, ptr %51, align 1, !tbaa !9
  %201 = load i8, ptr %51, align 1, !tbaa !9, !range !15, !noundef !16
  %202 = trunc i8 %201 to i1
  br i1 %202, label %203, label %212

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

212:                                              ; preds = %203, %198
  call void @llvm.lifetime.start.p0(i64 1, ptr %52) #10
  %213 = load i8, ptr %49, align 1, !tbaa !9, !range !15, !noundef !16
  %214 = trunc i8 %213 to i1
  br i1 %214, label %215, label %230

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

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

228:                                              ; preds = %221, %215
  %229 = phi i1 [ true, %215 ], [ %227, %221 ]
  br label %230

230:                                              ; preds = %228, %212
  %231 = phi i1 [ false, %212 ], [ %229, %228 ]
  %232 = zext i1 %231 to i8
  store i8 %232, ptr %52, align 1, !tbaa !9
  %233 = load i8, ptr %52, align 1, !tbaa !9, !range !15, !noundef !16
  %234 = trunc i8 %233 to i1
  br i1 %234, label %235, label %249

235:                                              ; preds = %230
  %236 = getelementptr inbounds %struct.ImRect, ptr %38, i32 0, i32 0
  %237 = load ptr, ptr %29, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.ImPlotItem, ptr %237, i32 0, i32 2
  %239 = getelementptr inbounds %struct.ImRect, ptr %238, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %239, ptr align 4 %236, i64 8, i1 false), !tbaa.struct !60
  %240 = getelementptr inbounds %struct.ImRect, ptr %43, i32 0, i32 1
  %241 = load ptr, ptr %29, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.ImPlotItem, ptr %241, i32 0, i32 2
  %243 = getelementptr inbounds %struct.ImRect, ptr %242, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %243, ptr align 4 %240, i64 8, i1 false), !tbaa.struct !60
  %244 = load ptr, ptr %29, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.ImPlotItem, ptr %244, i32 0, i32 5
  store i8 1, ptr %245, align 1, !tbaa !65
  %246 = load i32, ptr %19, align 4, !tbaa !13
  %247 = load i32, ptr %47, align 4, !tbaa !13
  %248 = call noundef i32 @_ZL8ImMixU32jjj(i32 noundef %246, i32 noundef %247, i32 noundef 64)
  store i32 %248, ptr %46, align 4, !tbaa !13
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %252

249:                                              ; preds = %230
  %250 = load i32, ptr %19, align 4, !tbaa !13
  %251 = call noundef i32 @_ZN5ImGui11GetColorU32Ej(i32 noundef %250)
  store i32 %251, ptr %46, align 4, !tbaa !13
  br label %252

252:                                              ; preds = %249, %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #10
  %253 = load i8, ptr %50, align 1, !tbaa !9, !range !15, !noundef !16
  %254 = trunc i8 %253 to i1
  br i1 %254, label %255, label %267

255:                                              ; preds = %252
  %256 = load ptr, ptr %29, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.ImPlotItem, ptr %256, i32 0, i32 4
  %258 = load i8, ptr %257, align 4, !tbaa !64, !range !15, !noundef !16
  %259 = trunc i8 %258 to i1
  br i1 %259, label %260, label %263

260:                                              ; preds = %255
  %261 = load i32, ptr %47, align 4, !tbaa !13
  %262 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %261, float noundef 5.000000e-01)
  br label %265

263:                                              ; preds = %255
  %264 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 5.000000e-01)
  br label %265

265:                                              ; preds = %263, %260
  %266 = phi i32 [ %262, %260 ], [ %264, %263 ]
  store i32 %266, ptr %53, align 4, !tbaa !13
  br label %294

267:                                              ; preds = %252
  %268 = load i8, ptr %49, align 1, !tbaa !9, !range !15, !noundef !16
  %269 = trunc i8 %268 to i1
  br i1 %269, label %270, label %282

270:                                              ; preds = %267
  %271 = load ptr, ptr %29, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.ImPlotItem, ptr %271, i32 0, i32 4
  %273 = load i8, ptr %272, align 4, !tbaa !64, !range !15, !noundef !16
  %274 = trunc i8 %273 to i1
  br i1 %274, label %275, label %278

275:                                              ; preds = %270
  %276 = load i32, ptr %47, align 4, !tbaa !13
  %277 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %276, float noundef 7.500000e-01)
  br label %280

278:                                              ; preds = %270
  %279 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 7.500000e-01)
  br label %280

280:                                              ; preds = %278, %275
  %281 = phi i32 [ %277, %275 ], [ %279, %278 ]
  store i32 %281, ptr %53, align 4, !tbaa !13
  br label %293

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

287:                                              ; preds = %282
  %288 = load i32, ptr %47, align 4, !tbaa !13
  br label %291

289:                                              ; preds = %282
  %290 = load i32, ptr %20, align 4, !tbaa !13
  br label %291

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

293:                                              ; preds = %291, %280
  br label %294

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

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

312:                                              ; preds = %304
  %313 = load i32, ptr %46, align 4, !tbaa !13
  br label %316

314:                                              ; preds = %304
  %315 = load i32, ptr %20, align 4, !tbaa !13
  br label %316

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

320:                                              ; preds = %316, %294
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #10
  call void @llvm.lifetime.end.p0(i64 4, 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 1, ptr %49) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  br label %321

321:                                              ; preds = %320
  %322 = load i32, ptr %27, align 4, !tbaa !13
  %323 = add nsw i32 %322, 1
  store i32 %323, ptr %27, align 4, !tbaa !13
  br label %108, !llvm.loop !66

324:                                              ; preds = %112
  %325 = load i8, ptr %11, align 1, !tbaa !9, !range !15, !noundef !16
  %326 = trunc i8 %325 to i1
  br i1 %326, label %327, label %331

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

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

333:                                              ; preds = %331, %68
  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
  %334 = load i1, ptr %8, align 1
  ret i1 %334
}

; 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 %138, 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
  %.092101 = 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 %.092101)
  store i32 %.092101, ptr %37, align 4, !tbaa !24
  %38 = add nuw nsw i32 %.092101, 1
  %exitcond.not = icmp eq i32 %38, %26
  br i1 %exitcond.not, label %31, label %36, !llvm.loop !25

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

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

._crit_edge:                                      ; preds = %136
  %49 = xor i1 %.1, true
  %50 = select i1 %2, i1 %49, i1 false
  br label %138

51:                                               ; preds = %.lr.ph, %136
  %.089104 = phi float [ 0.000000e+00, %.lr.ph ], [ %70, %136 ]
  %.090103 = phi i1 [ false, %.lr.ph ], [ %.1, %136 ]
  %.093102 = phi i32 [ 0, %.lr.ph ], [ %137, %136 ]
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEi(ptr noundef nonnull align 8 dereferenceable(16) %30, i32 noundef %.093102)
  %53 = load i32, ptr %52, align 4, !tbaa !24
  %54 = call noundef ptr @_ZN15ImPlotItemGroup13GetLegendItemEi(ptr noundef nonnull align 8 dereferenceable(124) %0, i32 noundef %53)
  %55 = call noundef ptr @_ZN15ImPlotItemGroup14GetLegendLabelEi(ptr noundef nonnull align 8 dereferenceable(124) %0, i32 noundef %53)
  %56 = call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef %55, ptr noundef null, i1 noundef zeroext true, float noundef -1.000000e+00)
  %.sroa.012.0.vec.extract = extractelement <2 x float> %56, 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
  %57 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %58 = uitofp nneg i32 %.093102 to float
  br i1 %5, label %59, label %64

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

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

69:                                               ; preds = %64, %59
  %storemerge = phi <2 x float> [ %68, %64 ], [ %63, %59 ]
  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
  %70 = fadd float %.089104, %.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)
  %71 = 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> %71, 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 %46, float noundef %46)
  %72 = 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> %72, ptr %47, 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)
  %73 = load i64, ptr %8, align 8
  store i64 %73, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #11
  %74 = fadd float %23, %.sroa.012.0.vec.extract
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %17, float noundef %74, float noundef %23)
  %75 = 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> %75, ptr %48, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #11
  %76 = getelementptr inbounds i8, ptr %54, i64 4
  %77 = load i32, ptr %76, align 4, !tbaa !56
  %78 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %77, 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) %48)
  %79 = load i32, ptr %54, align 4, !tbaa !58
  call void @_ZN5ImGui11KeepAliveIDEj(i32 noundef %79)
  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
  %80 = load i32, ptr %32, align 8, !tbaa !9
  %81 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %80, i32 noundef 1)
  br i1 %81, label %.critedge, label %82

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

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

.critedge:                                        ; preds = %69, %85, %82
  %89 = load i8, ptr %19, align 1, !tbaa !59, !range !61, !noundef !62
  %90 = trunc nuw i8 %89 to i1
  br i1 %90, label %91, label %.critedge98

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

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

.critedge100:                                     ; preds = %91, %94
  %97 = getelementptr inbounds i8, ptr %54, i64 8
  %98 = load i64, ptr %13, align 8
  store i64 %98, ptr %97, align 4
  %99 = getelementptr inbounds i8, ptr %54, i64 16
  %100 = load i64, ptr %48, align 8
  store i64 %100, ptr %99, align 4
  %101 = getelementptr inbounds i8, ptr %54, i64 29
  store i8 1, ptr %101, align 1, !tbaa !63
  %102 = call noundef i32 @_ZL8ImMixU32jjj(i32 noundef %24, i32 noundef %78, i32 noundef 64)
  br label %104

.critedge98:                                      ; preds = %.critedge, %94
  %103 = call noundef i32 @_ZN5ImGui11GetColorU32Ej(i32 noundef %24)
  br label %104

104:                                              ; preds = %.critedge98, %.critedge100
  %.091 = phi i32 [ %102, %.critedge100 ], [ %103, %.critedge98 ]
  %.1 = phi i1 [ true, %.critedge100 ], [ %.090103, %.critedge98 ]
  %105 = load i8, ptr %20, align 1, !tbaa !59, !range !61, !noundef !62
  %106 = trunc nuw i8 %105 to i1
  br i1 %106, label %107, label %115

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

111:                                              ; preds = %107
  %112 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %78, float noundef 5.000000e-01)
  br label %128

113:                                              ; preds = %107
  %114 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 5.000000e-01)
  br label %128

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

121:                                              ; preds = %115
  br i1 %120, label %122, label %124

122:                                              ; preds = %121
  %123 = call noundef i32 @_ZL10ImAlphaU32jf(i32 noundef %78, float noundef 7.500000e-01)
  br label %128

124:                                              ; preds = %121
  %125 = call noundef i32 @_ZN5ImGui11GetColorU32Eif(i32 noundef 1, float noundef 7.500000e-01)
  br label %128

126:                                              ; preds = %115
  %127 = select i1 %120, i32 %78, i32 %25
  br label %128

128:                                              ; preds = %122, %124, %111, %113, %126
  %.088 = phi i32 [ %127, %126 ], [ %112, %111 ], [ %114, %113 ], [ %123, %122 ], [ %125, %124 ]
  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) %47, i32 noundef %.088, float noundef 0.000000e+00, i32 noundef 0)
  %129 = call noundef ptr @_ZN5ImGui19FindRenderedTextEndEPKcS1_(ptr noundef %55, ptr noundef null)
  %.not = icmp eq ptr %55, %129
  br i1 %.not, label %136, label %130

130:                                              ; preds = %128
  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)
  %131 = 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> %131, ptr %21, align 8
  %132 = getelementptr inbounds i8, ptr %54, i64 28
  %133 = load i8, ptr %132, align 4, !tbaa !60, !range !61, !noundef !62
  %134 = trunc nuw i8 %133 to i1
  %135 = select i1 %134, i32 %.091, i32 %25
  call void @_ZN10ImDrawList7AddTextERK6ImVec2jPKcS4_(ptr noundef nonnull align 8 dereferenceable(196) %6, ptr noundef nonnull align 4 dereferenceable(8) %21, i32 noundef %135, ptr noundef %55, ptr noundef %129)
  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 %136

136:                                              ; preds = %130, %128
  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
  %137 = add nuw nsw i32 %.093102, 1
  %exitcond105.not = icmp eq i32 %137, %smax
  br i1 %exitcond105.not, label %._crit_edge, label %51, !llvm.loop !64

138:                                              ; preds = %7, %._crit_edge
  %.0 = phi i1 [ %50, %._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