; 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.ImPlotLegend = type <{ i32, i32, i32, i32, %struct.ImVector.10, %struct.ImGuiTextBuffer, %struct.ImRect, i8, i8, i8, [5 x i8] }>
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImGuiTextBuffer = type { %struct.ImVector.24 }
%struct.ImVector.24 = type { i32, i32, ptr }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }

@.str.97 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

declare noundef zeroext i1 @_ZN5ImGui13CheckboxFlagsEPKcPjj(ptr noundef, ptr noundef, i32 noundef) #3

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) #3

declare noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ImPlot21ShowLegendContextMenuER12ImPlotLegendb(ptr noundef nonnull align 8 dereferenceable(67) %0, i1 noundef zeroext %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca float, align 4
  %6 = alloca i8, align 1
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.ImVec2, align 4
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 4
  %11 = alloca %struct.ImVec2, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImVec2, align 4
  %14 = alloca %struct.ImVec2, align 4
  %15 = alloca %struct.ImVec2, align 4
  %16 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %17 = zext i1 %1 to i8
  store i8 %17, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %18 = call noundef float @_ZN5ImGui14GetFrameHeightEv()
  store float %18, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  %19 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef @.str.97, ptr noundef %4)
  br i1 %19, label %20, label %21

20:                                               ; preds = %2
  store i8 1, ptr %6, align 1, !tbaa !9
  br label %21

21:                                               ; preds = %20, %2
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.ImPlotLegend, ptr %22, i32 0, i32 9
  %24 = load i8, ptr %23, align 2, !tbaa !13, !range !21, !noundef !22
  %25 = trunc i8 %24 to i1
  br i1 %25, label %26, label %30

26:                                               ; preds = %21
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ImPlotLegend, ptr %27, i32 0, i32 0
  %29 = call noundef zeroext i1 @_ZN5ImGui13CheckboxFlagsEPKcPjj(ptr noundef @.str.98, ptr noundef %28, i32 noundef 16)
  br label %30

30:                                               ; preds = %26, %21
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ImPlotLegend, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !23
  %34 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %33, i32 noundef 32)
  %35 = call noundef zeroext i1 @_ZN5ImGui11RadioButtonEPKcb(ptr noundef @.str.99, i1 noundef zeroext %34)
  br i1 %35, label %36, label %41

36:                                               ; preds = %30
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ImPlotLegend, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !23
  %40 = or i32 %39, 32
  store i32 %40, ptr %38, align 8, !tbaa !23
  br label %41

41:                                               ; preds = %36, %30
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ImPlotLegend, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !23
  %45 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %44, i32 noundef 32)
  %46 = xor i1 %45, true
  %47 = call noundef zeroext i1 @_ZN5ImGui11RadioButtonEPKcb(ptr noundef @.str.100, i1 noundef zeroext %46)
  br i1 %47, label %48, label %53

48:                                               ; preds = %41
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ImPlotLegend, ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !23
  %52 = and i32 %51, -33
  store i32 %52, ptr %50, align 8, !tbaa !23
  br label %53

53:                                               ; preds = %48, %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 2.000000e+00, float noundef 2.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef 14, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %54 = load float, ptr %5, align 4, !tbaa !11
  %55 = fmul float 1.500000e+00, %54
  %56 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %55, float noundef %56)
  %57 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.101, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br i1 %57, label %58, label %61

58:                                               ; preds = %53
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ImPlotLegend, ptr %59, i32 0, i32 2
  store i32 5, ptr %60, align 8, !tbaa !24
  br label %61

61:                                               ; preds = %58, %53
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %62 = load float, ptr %5, align 4, !tbaa !11
  %63 = fmul float 1.500000e+00, %62
  %64 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %63, float noundef %64)
  %65 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.102, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br i1 %65, label %66, label %69

66:                                               ; preds = %61
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ImPlotLegend, ptr %67, i32 0, i32 2
  store i32 1, ptr %68, align 8, !tbaa !24
  br label %69

69:                                               ; preds = %66, %61
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %70 = load float, ptr %5, align 4, !tbaa !11
  %71 = fmul float 1.500000e+00, %70
  %72 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef %71, float noundef %72)
  %73 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.103, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br i1 %73, label %74, label %77

74:                                               ; preds = %69
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImPlotLegend, ptr %75, i32 0, i32 2
  store i32 9, ptr %76, align 8, !tbaa !24
  br label %77

77:                                               ; preds = %74, %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %78 = load float, ptr %5, align 4, !tbaa !11
  %79 = fmul float 1.500000e+00, %78
  %80 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %79, float noundef %80)
  %81 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.104, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br i1 %81, label %82, label %85

82:                                               ; preds = %77
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ImPlotLegend, ptr %83, i32 0, i32 2
  store i32 4, ptr %84, align 8, !tbaa !24
  br label %85

85:                                               ; preds = %82, %77
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %86 = load float, ptr %5, align 4, !tbaa !11
  %87 = fmul float 1.500000e+00, %86
  %88 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef %87, float noundef %88)
  %89 = call noundef zeroext i1 @_ZN5ImGui15InvisibleButtonEPKcRK6ImVec2i(ptr noundef @.str.105, ptr noundef nonnull align 4 dereferenceable(8) %12, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br i1 %89, label %90, label %91

90:                                               ; preds = %85
  br label %91

91:                                               ; preds = %90, %85
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %92 = load float, ptr %5, align 4, !tbaa !11
  %93 = fmul float 1.500000e+00, %92
  %94 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef %93, float noundef %94)
  %95 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.106, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br i1 %95, label %96, label %99

96:                                               ; preds = %91
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ImPlotLegend, ptr %97, i32 0, i32 2
  store i32 8, ptr %98, align 8, !tbaa !24
  br label %99

99:                                               ; preds = %96, %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %100 = load float, ptr %5, align 4, !tbaa !11
  %101 = fmul float 1.500000e+00, %100
  %102 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef %101, float noundef %102)
  %103 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.107, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br i1 %103, label %104, label %107

104:                                              ; preds = %99
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ImPlotLegend, ptr %105, i32 0, i32 2
  store i32 6, ptr %106, align 8, !tbaa !24
  br label %107

107:                                              ; preds = %104, %99
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %108 = load float, ptr %5, align 4, !tbaa !11
  %109 = fmul float 1.500000e+00, %108
  %110 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef %109, float noundef %110)
  %111 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.108, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br i1 %111, label %112, label %115

112:                                              ; preds = %107
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ImPlotLegend, ptr %113, i32 0, i32 2
  store i32 2, ptr %114, align 8, !tbaa !24
  br label %115

115:                                              ; preds = %112, %107
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %116 = load float, ptr %5, align 4, !tbaa !11
  %117 = fmul float 1.500000e+00, %116
  %118 = load float, ptr %5, align 4, !tbaa !11
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef %117, float noundef %118)
  %119 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.109, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br i1 %119, label %120, label %123

120:                                              ; preds = %115
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ImPlotLegend, ptr %121, i32 0, i32 2
  store i32 10, ptr %122, align 8, !tbaa !24
  br label %123

123:                                              ; preds = %120, %115
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 1)
  %124 = load i8, ptr %6, align 1, !tbaa !9, !range !21, !noundef !22
  %125 = trunc i8 %124 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i1 %125
}

declare noundef float @_ZN5ImGui14GetFrameHeightEv() #3

declare noundef zeroext i1 @_ZN5ImGui11RadioButtonEPKcb(ptr noundef, i1 noundef zeroext) #3

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

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) #3

declare noundef zeroext i1 @_ZN5ImGui15InvisibleButtonEPKcRK6ImVec2i(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) #3

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 66}
!14 = !{!"_ZTS12ImPlotLegend", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !16, i64 16, !17, i64 32, !19, i64 48, !10, i64 64, !10, i64 65, !10, i64 66}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS8ImVectorIiE", !15, i64 0, !15, i64 4, !6, i64 8}
!17 = !{!"_ZTS15ImGuiTextBuffer", !18, i64 0}
!18 = !{!"_ZTS8ImVectorIcE", !15, i64 0, !15, i64 4, !6, i64 8}
!19 = !{!"_ZTS6ImRect", !20, i64 0, !20, i64 8}
!20 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!14, !15, i64 0}
!24 = !{!14, !15, i64 8}


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

%struct.ImVec2 = type { float, float }

@.str.97 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

declare noundef zeroext i1 @_ZN5ImGui13CheckboxFlagsEPKcPjj(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ImPlot21ShowLegendContextMenuER12ImPlotLegendb(ptr noundef nonnull align 8 dereferenceable(67) %0, i1 noundef zeroext %1) local_unnamed_addr #4 {
  %3 = alloca i8, align 1
  %4 = alloca %struct.ImVec2, align 4
  %5 = alloca %struct.ImVec2, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.ImVec2, align 4
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 4
  %11 = alloca %struct.ImVec2, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImVec2, align 4
  %14 = zext i1 %1 to i8
  store i8 %14, ptr %3, align 1, !tbaa !5
  %15 = tail call noundef float @_ZN5ImGui14GetFrameHeightEv()
  %16 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef nonnull @.str.97, ptr noundef nonnull %3)
  %17 = getelementptr inbounds i8, ptr %0, i64 66
  %18 = load i8, ptr %17, align 2, !tbaa !9, !range !19, !noundef !20
  %19 = trunc nuw i8 %18 to i1
  br i1 %19, label %20, label %22

20:                                               ; preds = %2
  %21 = call noundef zeroext i1 @_ZN5ImGui13CheckboxFlagsEPKcPjj(ptr noundef nonnull @.str.98, ptr noundef nonnull %0, i32 noundef 16)
  br label %22

22:                                               ; preds = %20, %2
  %23 = load i32, ptr %0, align 8, !tbaa !21
  %24 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %23, i32 noundef 32)
  %25 = call noundef zeroext i1 @_ZN5ImGui11RadioButtonEPKcb(ptr noundef nonnull @.str.99, i1 noundef zeroext %24)
  br i1 %25, label %26, label %29

26:                                               ; preds = %22
  %27 = load i32, ptr %0, align 8, !tbaa !21
  %28 = or i32 %27, 32
  store i32 %28, ptr %0, align 8, !tbaa !21
  br label %29

29:                                               ; preds = %26, %22
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %30 = load i32, ptr %0, align 8, !tbaa !21
  %31 = call noundef zeroext i1 @_ZL9ImHasFlagIi18ImPlotLegendFlags_EbT_T0_(i32 noundef %30, i32 noundef 32)
  %32 = xor i1 %31, true
  %33 = call noundef zeroext i1 @_ZN5ImGui11RadioButtonEPKcb(ptr noundef nonnull @.str.100, i1 noundef zeroext %32)
  br i1 %33, label %34, label %37

34:                                               ; preds = %29
  %35 = load i32, ptr %0, align 8, !tbaa !21
  %36 = and i32 %35, -33
  store i32 %36, ptr %0, align 8, !tbaa !21
  br label %37

37:                                               ; preds = %34, %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef 2.000000e+00, float noundef 2.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef 14, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %38 = fmul float %15, 1.500000e+00
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef %38, float noundef %15)
  %39 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.101, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %39, label %40, label %42

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 5, ptr %41, align 8, !tbaa !22
  br label %42

42:                                               ; preds = %40, %37
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef %38, float noundef %15)
  %43 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.102, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br i1 %43, label %44, label %46

44:                                               ; preds = %42
  %45 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 1, ptr %45, align 8, !tbaa !22
  br label %46

46:                                               ; preds = %44, %42
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %38, float noundef %15)
  %47 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.103, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br i1 %47, label %48, label %50

48:                                               ; preds = %46
  %49 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 9, ptr %49, align 8, !tbaa !22
  br label %50

50:                                               ; preds = %48, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %38, float noundef %15)
  %51 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.104, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br i1 %51, label %52, label %54

52:                                               ; preds = %50
  %53 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 4, ptr %53, align 8, !tbaa !22
  br label %54

54:                                               ; preds = %52, %50
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %38, float noundef %15)
  %55 = call noundef zeroext i1 @_ZN5ImGui15InvisibleButtonEPKcRK6ImVec2i(ptr noundef nonnull @.str.105, ptr noundef nonnull align 4 dereferenceable(8) %9, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef %38, float noundef %15)
  %56 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.106, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br i1 %56, label %57, label %59

57:                                               ; preds = %54
  %58 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 8, ptr %58, align 8, !tbaa !22
  br label %59

59:                                               ; preds = %57, %54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %38, float noundef %15)
  %60 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.107, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br i1 %60, label %61, label %63

61:                                               ; preds = %59
  %62 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 6, ptr %62, align 8, !tbaa !22
  br label %63

63:                                               ; preds = %61, %59
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef %38, float noundef %15)
  %64 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.108, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br i1 %64, label %65, label %67

65:                                               ; preds = %63
  %66 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 2, ptr %66, align 8, !tbaa !22
  br label %67

67:                                               ; preds = %65, %63
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef %38, float noundef %15)
  %68 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.109, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br i1 %68, label %69, label %71

69:                                               ; preds = %67
  %70 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 10, ptr %70, align 8, !tbaa !22
  br label %71

71:                                               ; preds = %69, %67
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 1)
  ret i1 %16
}

declare noundef float @_ZN5ImGui14GetFrameHeightEv() local_unnamed_addr #3

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

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

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN5ImGui15InvisibleButtonEPKcRK6ImVec2i(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) local_unnamed_addr #3

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) local_unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 66}
!10 = !{!"_ZTS12ImPlotLegend", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !14, i64 32, !16, i64 48, !6, i64 64, !6, i64 65, !6, i64 66}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS8ImVectorIiE", !11, i64 0, !11, i64 4, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTS15ImGuiTextBuffer", !15, i64 0}
!15 = !{!"_ZTS8ImVectorIcE", !11, i64 0, !11, i64 4, !13, i64 8}
!16 = !{!"_ZTS6ImRect", !17, i64 0, !17, i64 8}
!17 = !{!"_ZTS6ImVec2", !18, i64 0, !18, i64 4}
!18 = !{!"float", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!10, !11, i64 0}
!22 = !{!10, !11, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass