; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/ImGui/implot_items.ll (ZN6ImPlot17RegisterOrGetItemEPKciPb)

; 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.ImPlotContext = type { %struct.ImPool, %struct.ImPool.121, ptr, ptr, ptr, ptr, ptr, %struct.ImPlotTicker, %struct.ImPlotAnnotationCollection, %struct.ImPlotTagCollection, i8, [3 x i8], %struct.ImPlotStyle, %struct.ImVector.127, %struct.ImVector.128, %struct.ImPlotColormapData, %struct.ImVector.130, %struct.tm, %struct.ImVector.132, %struct.ImVector.132, %struct.ImVector.130, i32, i32, %struct.ImPlotNextPlotData, %struct.ImPlotNextItemData, %struct.ImPlotInputMap, i8, %struct.ImGuiTextBuffer, ptr, %struct.ImPool.133, ptr, ptr }
%struct.ImPool = type { %struct.ImVector, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %struct.ImVector.120 }
%struct.ImVector.120 = type { i32, i32, ptr }
%struct.ImPool.121 = type { %struct.ImVector.122, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.122 = type { i32, i32, ptr }
%struct.ImPlotTicker = type <{ %struct.ImVector.123, %struct.ImGuiTextBuffer, %struct.ImVec2, %struct.ImVec2, i32, [4 x i8] }>
%struct.ImVector.123 = type { i32, i32, ptr }
%struct.ImVec2 = type { float, float }
%struct.ImPlotAnnotationCollection = type <{ %struct.ImVector.125, %struct.ImGuiTextBuffer, i32, [4 x i8] }>
%struct.ImVector.125 = type { i32, i32, ptr }
%struct.ImPlotTagCollection = type <{ %struct.ImVector.126, %struct.ImGuiTextBuffer, i32, [4 x i8] }>
%struct.ImVector.126 = 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.127 = type { i32, i32, ptr }
%struct.ImVector.128 = type { i32, i32, ptr }
%struct.ImPlotColormapData = type <{ %struct.ImVector.129, %struct.ImVector.130, %struct.ImVector.130, %struct.ImVector.129, %struct.ImVector.130, %struct.ImVector.130, %struct.ImGuiTextBuffer, %struct.ImVector.130, %struct.ImVector.131, %struct.ImGuiStorage, i32, [4 x i8] }>
%struct.ImVector.129 = type { i32, i32, ptr }
%struct.ImVector.131 = type { i32, i32, ptr }
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr }
%struct.ImVector.132 = type { i32, i32, ptr }
%struct.ImVector.130 = 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.124 }
%struct.ImVector.124 = type { i32, i32, ptr }
%struct.ImPool.133 = type { %struct.ImVector.134, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.134 = type { i32, i32, ptr }
%struct.ImPlotItem = type <{ i32, i32, %struct.ImRect, i32, i8, i8, i8, i8 }>
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImPlotItemGroup = type <{ i32, [4 x i8], %struct.ImPlotLegend, %struct.ImPool.236, i32, [4 x i8] }>
%struct.ImPlotLegend = type <{ i32, i32, i32, i32, %struct.ImVector.130, %struct.ImGuiTextBuffer, %struct.ImRect, i8, i8, i8, [5 x i8] }>
%struct.ImPool.236 = type { %struct.ImVector.237, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.237 = type { i32, i32, ptr }

@GImPlot = external global ptr, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6ImPlot17RegisterOrGetItemEPKciPb(ptr noundef %0, i32 noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %14 = load ptr, ptr @GImPlot, align 8, !tbaa !5
  store ptr %14, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.ImPlotContext, ptr %15, i32 0, i32 4
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  store ptr %17, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef i32 @_ZN15ImPlotItemGroup9GetItemIDEPKc(ptr noundef nonnull align 8 dereferenceable(124) %18, ptr noundef %19)
  store i32 %20, ptr %10, align 4, !tbaa !9
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %30

23:                                               ; preds = %3
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = load i32, ptr %10, align 4, !tbaa !9
  %26 = call noundef ptr @_ZN15ImPlotItemGroup7GetItemEj(ptr noundef nonnull align 8 dereferenceable(124) %24, i32 noundef %25)
  %27 = icmp eq ptr %26, null
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = zext i1 %27 to i8
  store i8 %29, ptr %28, align 1, !tbaa !45
  br label %30

30:                                               ; preds = %23, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = load i32, ptr %10, align 4, !tbaa !9
  %33 = call noundef ptr @_ZN15ImPlotItemGroup12GetOrAddItemEj(ptr noundef nonnull align 8 dereferenceable(124) %31, i32 noundef %32)
  store ptr %33, ptr %11, align 8, !tbaa !5
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ImPlotItem, ptr %34, i32 0, i32 6
  %36 = load i8, ptr %35, align 2, !tbaa !46, !range !49, !noundef !50
  %37 = trunc i8 %36 to i1
  br i1 %37, label %38, label %40

38:                                               ; preds = %30
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %39, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %80

40:                                               ; preds = %30
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ImPlotItem, ptr %41, i32 0, i32 6
  store i8 1, ptr %42, align 2, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = call noundef i32 @_ZN15ImPlotItemGroup12GetItemIndexEP10ImPlotItem(ptr noundef nonnull align 8 dereferenceable(124) %43, ptr noundef %44)
  store i32 %45, ptr %13, align 4, !tbaa !9
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ImPlotItem, ptr %47, i32 0, i32 0
  store i32 %46, ptr %48, align 4, !tbaa !51
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = call noundef zeroext i1 @_ZL9ImHasFlagIi16ImPlotItemFlags_EbT_T0_(i32 noundef %49, i32 noundef 1)
  br i1 %50, label %75, label %51

51:                                               ; preds = %40
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call noundef ptr @_ZN5ImGui19FindRenderedTextEndEPKcS1_(ptr noundef %52, ptr noundef null)
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = icmp ne ptr %53, %54
  br i1 %55, label %56, label %75

56:                                               ; preds = %51
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ImPlotItemGroup, ptr %57, i32 0, i32 2
  %59 = getelementptr inbounds %struct.ImPlotLegend, ptr %58, i32 0, i32 4
  call void @_ZN8ImVectorIiE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ImPlotItemGroup, ptr %60, i32 0, i32 2
  %62 = getelementptr inbounds %struct.ImPlotLegend, ptr %61, i32 0, i32 5
  %63 = call noundef i32 @_ZNK15ImGuiTextBuffer4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %62)
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.ImPlotItem, ptr %64, i32 0, i32 3
  store i32 %63, ptr %65, align 4, !tbaa !52
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImPlotItemGroup, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.ImPlotLegend, ptr %67, i32 0, i32 5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = call i64 @strlen(ptr noundef %71) #8
  %73 = getelementptr inbounds i8, ptr %70, i64 %72
  %74 = getelementptr inbounds i8, ptr %73, i64 1
  call void @_ZN15ImGuiTextBuffer6appendEPKcS1_(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef %69, ptr noundef %74)
  br label %78

75:                                               ; preds = %51, %40
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ImPlotItem, ptr %76, i32 0, i32 4
  store i8 1, ptr %77, align 4, !tbaa !53
  br label %78

78:                                               ; preds = %75, %56
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %79, ptr %4, align 8
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %80

80:                                               ; preds = %78, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %81 = load ptr, ptr %4, align 8
  ret ptr %81
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK15ImGuiTextBuffer4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

declare void @_ZN15ImGuiTextBuffer6appendEPKcS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

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

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 96}
!12 = !{!"_ZTS13ImPlotContext", !13, i64 0, !17, i64 40, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !19, i64 120, !25, i64 176, !27, i64 216, !29, i64 256, !30, i64 260, !31, i64 776, !32, i64 792, !33, i64 808, !35, i64 976, !37, i64 992, !39, i64 1048, !39, i64 1064, !35, i64 1080, !10, i64 1096, !10, i64 1100, !40, i64 1104, !41, i64 1336, !42, i64 1464, !29, i64 1512, !21, i64 1520, !6, i64 1536, !43, i64 1544, !6, i64 1584, !6, i64 1592}
!13 = !{!"_ZTS6ImPoolI10ImPlotPlotE", !14, i64 0, !15, i64 16, !10, i64 32, !10, i64 36}
!14 = !{!"_ZTS8ImVectorI10ImPlotPlotE", !10, i64 0, !10, i64 4, !6, i64 8}
!15 = !{!"_ZTS12ImGuiStorage", !16, i64 0}
!16 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !10, i64 0, !10, i64 4, !6, i64 8}
!17 = !{!"_ZTS6ImPoolI13ImPlotSubplotE", !18, i64 0, !15, i64 16, !10, i64 32, !10, i64 36}
!18 = !{!"_ZTS8ImVectorI13ImPlotSubplotE", !10, i64 0, !10, i64 4, !6, i64 8}
!19 = !{!"_ZTS12ImPlotTicker", !20, i64 0, !21, i64 16, !23, i64 32, !23, i64 40, !10, i64 48}
!20 = !{!"_ZTS8ImVectorI10ImPlotTickE", !10, i64 0, !10, i64 4, !6, i64 8}
!21 = !{!"_ZTS15ImGuiTextBuffer", !22, i64 0}
!22 = !{!"_ZTS8ImVectorIcE", !10, i64 0, !10, i64 4, !6, i64 8}
!23 = !{!"_ZTS6ImVec2", !24, i64 0, !24, i64 4}
!24 = !{!"float", !7, i64 0}
!25 = !{!"_ZTS26ImPlotAnnotationCollection", !26, i64 0, !21, i64 16, !10, i64 32}
!26 = !{!"_ZTS8ImVectorI16ImPlotAnnotationE", !10, i64 0, !10, i64 4, !6, i64 8}
!27 = !{!"_ZTS19ImPlotTagCollection", !28, i64 0, !21, i64 16, !10, i64 32}
!28 = !{!"_ZTS8ImVectorI9ImPlotTagE", !10, i64 0, !10, i64 4, !6, i64 8}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTS11ImPlotStyle", !24, i64 0, !10, i64 4, !24, i64 8, !24, i64 12, !24, i64 16, !24, i64 20, !24, i64 24, !24, i64 28, !24, i64 32, !24, i64 36, !24, i64 40, !23, i64 44, !23, i64 52, !23, i64 60, !23, i64 68, !23, i64 76, !23, i64 84, !23, i64 92, !23, i64 100, !23, i64 108, !23, i64 116, !23, i64 124, !23, i64 132, !23, i64 140, !23, i64 148, !23, i64 156, !23, i64 164, !7, i64 172, !10, i64 508, !29, i64 512, !29, i64 513, !29, i64 514}
!31 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !10, i64 0, !10, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !10, i64 0, !10, i64 4, !6, i64 8}
!33 = !{!"_ZTS18ImPlotColormapData", !34, i64 0, !35, i64 16, !35, i64 32, !34, i64 48, !35, i64 64, !35, i64 80, !21, i64 96, !35, i64 112, !36, i64 128, !15, i64 144, !10, i64 160}
!34 = !{!"_ZTS8ImVectorIjE", !10, i64 0, !10, i64 4, !6, i64 8}
!35 = !{!"_ZTS8ImVectorIiE", !10, i64 0, !10, i64 4, !6, i64 8}
!36 = !{!"_ZTS8ImVectorIbE", !10, i64 0, !10, i64 4, !6, i64 8}
!37 = !{!"_ZTS2tm", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !38, i64 40, !6, i64 48}
!38 = !{!"long", !7, i64 0}
!39 = !{!"_ZTS8ImVectorIdE", !10, i64 0, !10, i64 4, !6, i64 8}
!40 = !{!"_ZTS18ImPlotNextPlotData", !7, i64 0, !7, i64 24, !7, i64 120, !7, i64 126, !7, i64 136, !7, i64 184}
!41 = !{!"_ZTS18ImPlotNextItemData", !7, i64 0, !24, i64 80, !10, i64 84, !24, i64 88, !24, i64 92, !24, i64 96, !24, i64 100, !24, i64 104, !24, i64 108, !24, i64 112, !29, i64 116, !29, i64 117, !29, i64 118, !29, i64 119, !29, i64 120, !29, i64 121, !10, i64 124}
!42 = !{!"_ZTS14ImPlotInputMap", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !24, i64 44}
!43 = !{!"_ZTS6ImPoolI19ImPlotAlignmentDataE", !44, i64 0, !15, i64 16, !10, i64 32, !10, i64 36}
!44 = !{!"_ZTS8ImVectorI19ImPlotAlignmentDataE", !10, i64 0, !10, i64 4, !6, i64 8}
!45 = !{!29, !29, i64 0}
!46 = !{!47, !29, i64 30}
!47 = !{!"_ZTS10ImPlotItem", !10, i64 0, !10, i64 4, !48, i64 8, !10, i64 24, !29, i64 28, !29, i64 29, !29, i64 30}
!48 = !{!"_ZTS6ImRect", !23, i64 0, !23, i64 8}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!47, !10, i64 0}
!52 = !{!47, !10, i64 24}
!53 = !{!47, !29, i64 28}


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

@GImPlot = external 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6ImPlot17RegisterOrGetItemEPKciPb(ptr noundef %0, i32 noundef %1, ptr noundef writeonly %2) local_unnamed_addr #1 {
  %4 = alloca i32, align 4
  %5 = load ptr, ptr @GImPlot, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 96
  %7 = load ptr, ptr %6, align 8, !tbaa !9
  %8 = tail call noundef i32 @_ZN15ImPlotItemGroup9GetItemIDEPKc(ptr noundef nonnull align 8 dereferenceable(124) %7, ptr noundef %0)
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %13, label %9

9:                                                ; preds = %3
  %10 = tail call noundef ptr @_ZN15ImPlotItemGroup7GetItemEj(ptr noundef nonnull align 8 dereferenceable(124) %7, i32 noundef %8)
  %11 = icmp eq ptr %10, null
  %12 = zext i1 %11 to i8
  store i8 %12, ptr %2, align 1, !tbaa !44
  br label %13

13:                                               ; preds = %9, %3
  %14 = tail call noundef ptr @_ZN15ImPlotItemGroup12GetOrAddItemEj(ptr noundef nonnull align 8 dereferenceable(124) %7, i32 noundef %8)
  %15 = getelementptr inbounds i8, ptr %14, i64 30
  %16 = load i8, ptr %15, align 2, !tbaa !45, !range !48, !noundef !49
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %34, label %18

18:                                               ; preds = %13
  store i8 1, ptr %15, align 2, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %19 = tail call noundef i32 @_ZN15ImPlotItemGroup12GetItemIndexEP10ImPlotItem(ptr noundef nonnull align 8 dereferenceable(124) %7, ptr noundef nonnull %14)
  store i32 %19, ptr %4, align 4, !tbaa !50
  store i32 %8, ptr %14, align 4, !tbaa !51
  %20 = tail call noundef zeroext i1 @_ZL9ImHasFlagIi16ImPlotItemFlags_EbT_T0_(i32 noundef %1, i32 noundef 1)
  br i1 %20, label %31, label %21

21:                                               ; preds = %18
  %22 = tail call noundef ptr @_ZN5ImGui19FindRenderedTextEndEPKcS1_(ptr noundef %0, ptr noundef null)
  %.not29 = icmp eq ptr %22, %0
  br i1 %.not29, label %31, label %23

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %7, i64 24
  call void @_ZN8ImVectorIiE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %25 = getelementptr inbounds i8, ptr %7, i64 40
  %26 = call noundef i32 @_ZNK15ImGuiTextBuffer4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %25)
  %27 = getelementptr inbounds i8, ptr %14, i64 24
  store i32 %26, ptr %27, align 4, !tbaa !52
  %28 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #8
  %29 = getelementptr inbounds i8, ptr %0, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 1
  call void @_ZN15ImGuiTextBuffer6appendEPKcS1_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef %0, ptr noundef nonnull %30)
  br label %33

31:                                               ; preds = %21, %18
  %32 = getelementptr inbounds i8, ptr %14, i64 28
  store i8 1, ptr %32, align 4, !tbaa !53
  br label %33

33:                                               ; preds = %31, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %34

34:                                               ; preds = %13, %33
  ret ptr %14
}

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

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

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

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

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

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

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

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

declare void @_ZN15ImGuiTextBuffer6appendEPKcS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 96}
!10 = !{!"_ZTS13ImPlotContext", !11, i64 0, !16, i64 40, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !18, i64 120, !24, i64 176, !26, i64 216, !28, i64 256, !29, i64 260, !30, i64 776, !31, i64 792, !32, i64 808, !34, i64 976, !36, i64 992, !38, i64 1048, !38, i64 1064, !34, i64 1080, !13, i64 1096, !13, i64 1100, !39, i64 1104, !40, i64 1336, !41, i64 1464, !28, i64 1512, !20, i64 1520, !6, i64 1536, !42, i64 1544, !6, i64 1584, !6, i64 1592}
!11 = !{!"_ZTS6ImPoolI10ImPlotPlotE", !12, i64 0, !14, i64 16, !13, i64 32, !13, i64 36}
!12 = !{!"_ZTS8ImVectorI10ImPlotPlotE", !13, i64 0, !13, i64 4, !6, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS12ImGuiStorage", !15, i64 0}
!15 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !13, i64 0, !13, i64 4, !6, i64 8}
!16 = !{!"_ZTS6ImPoolI13ImPlotSubplotE", !17, i64 0, !14, i64 16, !13, i64 32, !13, i64 36}
!17 = !{!"_ZTS8ImVectorI13ImPlotSubplotE", !13, i64 0, !13, i64 4, !6, i64 8}
!18 = !{!"_ZTS12ImPlotTicker", !19, i64 0, !20, i64 16, !22, i64 32, !22, i64 40, !13, i64 48}
!19 = !{!"_ZTS8ImVectorI10ImPlotTickE", !13, i64 0, !13, i64 4, !6, i64 8}
!20 = !{!"_ZTS15ImGuiTextBuffer", !21, i64 0}
!21 = !{!"_ZTS8ImVectorIcE", !13, i64 0, !13, i64 4, !6, i64 8}
!22 = !{!"_ZTS6ImVec2", !23, i64 0, !23, i64 4}
!23 = !{!"float", !7, i64 0}
!24 = !{!"_ZTS26ImPlotAnnotationCollection", !25, i64 0, !20, i64 16, !13, i64 32}
!25 = !{!"_ZTS8ImVectorI16ImPlotAnnotationE", !13, i64 0, !13, i64 4, !6, i64 8}
!26 = !{!"_ZTS19ImPlotTagCollection", !27, i64 0, !20, i64 16, !13, i64 32}
!27 = !{!"_ZTS8ImVectorI9ImPlotTagE", !13, i64 0, !13, i64 4, !6, i64 8}
!28 = !{!"bool", !7, i64 0}
!29 = !{!"_ZTS11ImPlotStyle", !23, i64 0, !13, i64 4, !23, i64 8, !23, i64 12, !23, i64 16, !23, i64 20, !23, i64 24, !23, i64 28, !23, i64 32, !23, i64 36, !23, i64 40, !22, i64 44, !22, i64 52, !22, i64 60, !22, i64 68, !22, i64 76, !22, i64 84, !22, i64 92, !22, i64 100, !22, i64 108, !22, i64 116, !22, i64 124, !22, i64 132, !22, i64 140, !22, i64 148, !22, i64 156, !22, i64 164, !7, i64 172, !13, i64 508, !28, i64 512, !28, i64 513, !28, i64 514}
!30 = !{!"_ZTS8ImVectorI13ImGuiColorModE", !13, i64 0, !13, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI13ImGuiStyleModE", !13, i64 0, !13, i64 4, !6, i64 8}
!32 = !{!"_ZTS18ImPlotColormapData", !33, i64 0, !34, i64 16, !34, i64 32, !33, i64 48, !34, i64 64, !34, i64 80, !20, i64 96, !34, i64 112, !35, i64 128, !14, i64 144, !13, i64 160}
!33 = !{!"_ZTS8ImVectorIjE", !13, i64 0, !13, i64 4, !6, i64 8}
!34 = !{!"_ZTS8ImVectorIiE", !13, i64 0, !13, i64 4, !6, i64 8}
!35 = !{!"_ZTS8ImVectorIbE", !13, i64 0, !13, i64 4, !6, i64 8}
!36 = !{!"_ZTS2tm", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !37, i64 40, !6, i64 48}
!37 = !{!"long", !7, i64 0}
!38 = !{!"_ZTS8ImVectorIdE", !13, i64 0, !13, i64 4, !6, i64 8}
!39 = !{!"_ZTS18ImPlotNextPlotData", !7, i64 0, !7, i64 24, !7, i64 120, !7, i64 126, !7, i64 136, !7, i64 184}
!40 = !{!"_ZTS18ImPlotNextItemData", !7, i64 0, !23, i64 80, !13, i64 84, !23, i64 88, !23, i64 92, !23, i64 96, !23, i64 100, !23, i64 104, !23, i64 108, !23, i64 112, !28, i64 116, !28, i64 117, !28, i64 118, !28, i64 119, !28, i64 120, !28, i64 121, !13, i64 124}
!41 = !{!"_ZTS14ImPlotInputMap", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !23, i64 44}
!42 = !{!"_ZTS6ImPoolI19ImPlotAlignmentDataE", !43, i64 0, !14, i64 16, !13, i64 32, !13, i64 36}
!43 = !{!"_ZTS8ImVectorI19ImPlotAlignmentDataE", !13, i64 0, !13, i64 4, !6, i64 8}
!44 = !{!28, !28, i64 0}
!45 = !{!46, !28, i64 30}
!46 = !{!"_ZTS10ImPlotItem", !13, i64 0, !13, i64 4, !47, i64 8, !13, i64 24, !28, i64 28, !28, i64 29, !28, i64 30}
!47 = !{!"_ZTS6ImRect", !22, i64 0, !22, i64 8}
!48 = !{i8 0, i8 2}
!49 = !{}
!50 = !{!13, !13, i64 0}
!51 = !{!46, !13, i64 0}
!52 = !{!46, !13, i64 24}
!53 = !{!46, !28, i64 28}


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