; LLVM IR from hadryansalles/Luz :: deps/imgui/imgui.ll (ZN5ImGui22GetShortcutRoutingDataEi)

; 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.ImGuiKeyRoutingData = type { i16, i16, i8, i8, i32, i32 }
%struct.ImGuiContext = type { i8, i8, %struct.ImGuiIO, %struct.ImGuiPlatformIO, %struct.ImGuiStyle, i32, i32, ptr, float, float, %struct.ImDrawListSharedData, double, i32, i32, i32, i32, i8, i8, i8, i8, i8, ptr, %struct.ImVector.3, %struct.ImVector.3, i32, i32, %struct.ImVector.4, %struct.ImVector.4, %struct.ImVector.4, %struct.ImVector.5, %struct.ImGuiStorage, i32, %struct.ImVec2, i32, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, i32, i32, float, %struct.ImVec2, %struct.ImVec2, i32, i32, i32, i8, i8, float, float, i32, i32, float, i8, i8, i8, i8, i8, i8, i8, i8, %struct.ImVec2, ptr, i32, i32, i8, i8, ptr, i32, float, double, double, double, %struct.ImBitArray, [154 x %struct.ImGuiKeyOwnerData], %struct.ImGuiKeyRoutingTable, i32, i8, i32, i32, i32, i32, i32, [4 x i8], %struct.ImGuiNextItemData, %struct.ImGuiLastItemData, [4 x i8], %struct.ImGuiNextWindowData, i8, i32, %struct.ImVector.8, %struct.ImVector.9, %struct.ImVector.10, %struct.ImVector.11, %struct.ImVector.12, %struct.ImVector.13, %struct.ImVector.14, %struct.ImVector.14, %struct.ImVector.15, i32, %struct.ImVector.16, float, ptr, ptr, ptr, i32, %struct.ImGuiPlatformMonitor, i32, i32, i32, ptr, i32, i32, %struct.ImVector.11, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i64, i8, i8, i8, i8, i8, i8, i8, i8, %struct.ImGuiNavItemData, i8, i8, i8, i32, i32, i32, i32, i32, i32, %struct.ImRect, %struct.ImRect, i32, i32, i32, %struct.ImGuiNavItemData, %struct.ImGuiNavItemData, %struct.ImGuiNavItemData, %struct.ImGuiNavItemData, i32, i32, ptr, ptr, ptr, float, float, i8, %struct.ImVec2, %struct.ImVec2, float, i8, i8, i8, i32, i32, i32, %struct.ImGuiPayload, %struct.ImRect, %struct.ImRect, i32, i32, float, i32, i32, i32, i32, %struct.ImVector.17, [16 x i8], i32, %struct.ImVector.18, ptr, i32, i32, %struct.ImVector.19, %struct.ImPool, %struct.ImVector.21, %struct.ImVector.22, ptr, %struct.ImPool.23, %struct.ImVector.25, %struct.ImVector.26, i32, i32, float, float, i32, i32, i32, float, %struct.ImVec2, %struct.ImGuiInputTextState, %struct.ImGuiInputTextDeactivatedState, %struct.ImFont, i32, i32, i32, i32, float, float, i32, %struct.ImVec4, %struct.ImGuiComboPreviewData, %struct.ImRect, i8, float, float, i8, i8, float, float, float, float, i16, i16, i16, %struct.ImVector.27, %struct.ImVector.29, %struct.ImGuiTypingSelectState, %struct.ImGuiPlatformImeData, %struct.ImGuiPlatformImeData, i32, [4 x i8], %struct.ImGuiDockContext, ptr, i8, float, %struct.ImGuiTextBuffer, %struct.ImVector.32, %struct.ImChunkStream, %struct.ImChunkStream.33, %struct.ImVector.34, i32, [11 x ptr], i8, i32, ptr, %struct.ImGuiTextBuffer, ptr, ptr, float, i8, i32, i32, i32, i32, %struct.ImGuiTextBuffer, %struct.ImGuiTextIndex, i32, i8, i8, i8, i32, i8, i8, i8, i32, float, %struct.ImVec4, %struct.ImGuiMetricsConfig, %struct.ImGuiIDStackTool, %struct.ImGuiDebugAllocInfo, ptr, [60 x float], i32, i32, float, i32, i32, i32, %struct.ImVector.27, [64 x i8] }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, i8, i8, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i16, i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, %struct.ImVec2, [666 x i32], [666 x i8], [16 x float], ptr, %struct.ImVec2, [5 x i8], float, float, i32, i32, i8, i8, i8, i8, i32, [666 x %struct.ImGuiKeyData], i8, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i16], [5 x i16], [5 x i8], [5 x i8], [5 x i8], i8, [5 x float], [5 x float], [5 x %struct.ImVec2], [5 x float], float, i8, i8, i8, i8, i16, %struct.ImVector }
%struct.ImGuiKeyData = type { i8, float, float, float }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImGuiPlatformIO = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVector.0, %struct.ImVector.1 }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImGuiStyle = type { float, float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, i32, float, float, float, float, %struct.ImVec2, float, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, float, float, float, float, float, float, float, float, float, i32, %struct.ImVec2, %struct.ImVec2, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, i8, i8, i8, float, float, [55 x %struct.ImVec4], float, float, float, i32, i32 }
%struct.ImDrawListSharedData = type { %struct.ImVec2, ptr, float, float, float, %struct.ImVec4, i32, %struct.ImVector.2, [48 x %struct.ImVec2], float, [64 x i8], ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImGuiStorage = type { %struct.ImVector.6 }
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImBitArray = type { [5 x i32] }
%struct.ImGuiKeyOwnerData = type <{ i32, i32, i8, i8, [2 x i8] }>
%struct.ImGuiKeyRoutingTable = type { [154 x i16], %struct.ImVector.7, %struct.ImVector.7 }
%struct.ImVector.7 = type { i32, i32, ptr }
%struct.ImGuiNextItemData = type <{ i32, i32, i64, float, i32, i8, i8, [6 x i8] }>
%struct.ImGuiLastItemData = type { i32, i32, i32, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect }
%struct.ImGuiNextWindowData = type <{ i32, i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i32, i8, i8, [2 x i8], %struct.ImRect, [4 x i8], ptr, ptr, float, i32, i32, %struct.ImGuiWindowClass, %struct.ImVec2, [4 x i8] }>
%struct.ImGuiWindowClass = type <{ i32, i32, i32, i32, i32, i32, i32, i8, i8, [2 x i8] }>
%struct.ImVector.8 = type { i32, i32, ptr }
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImVector.12 = type { i32, i32, ptr }
%struct.ImVector.13 = type { i32, i32, ptr }
%struct.ImVector.14 = type { i32, i32, ptr }
%struct.ImVector.15 = type { i32, i32, ptr }
%struct.ImVector.16 = type { i32, i32, ptr }
%struct.ImGuiPlatformMonitor = type { %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, ptr }
%struct.ImVector.11 = type { i32, i32, ptr }
%struct.ImGuiNavItemData = type <{ ptr, i32, i32, %struct.ImRect, i32, [4 x i8], i64, float, float, float, [4 x i8] }>
%struct.ImGuiPayload = type <{ ptr, i32, i32, i32, i32, [33 x i8], i8, i8, [5 x i8] }>
%struct.ImVector.17 = type { i32, i32, ptr }
%struct.ImVector.18 = type { i32, i32, ptr }
%struct.ImVector.19 = type { i32, i32, ptr }
%struct.ImPool = type { %struct.ImVector.20, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.20 = type { i32, i32, ptr }
%struct.ImVector.21 = type { i32, i32, ptr }
%struct.ImVector.22 = type { i32, i32, ptr }
%struct.ImPool.23 = type { %struct.ImVector.24, %struct.ImGuiStorage, i32, i32 }
%struct.ImVector.24 = type { i32, i32, ptr }
%struct.ImVector.25 = type { i32, i32, ptr }
%struct.ImVector.26 = type { i32, i32, ptr }
%struct.ImVec2 = type { float, float }
%struct.ImGuiInputTextState = type <{ ptr, i32, i32, i32, [4 x i8], %struct.ImVector, %struct.ImVector.27, %struct.ImVector.27, i8, [3 x i8], i32, float, %"struct.ImStb::STB_TexteditState", float, i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ImStb::STB_TexteditState" = type { i32, i32, i32, i8, i32, i8, i8, i8, i8, i8, i8, i8, float, %"struct.ImStb::StbUndoState" }
%"struct.ImStb::StbUndoState" = type { [99 x %"struct.ImStb::StbUndoRecord"], [999 x i16], i16, i16, i32, i32 }
%"struct.ImStb::StbUndoRecord" = type { i32, i32, i32, i32 }
%struct.ImGuiInputTextDeactivatedState = type { i32, %struct.ImVector.27 }
%struct.ImFont = type <{ %struct.ImVector.21, float, float, %struct.ImVector, %struct.ImVector.28, ptr, ptr, ptr, i16, i16, i16, i16, float, float, i8, [3 x i8], float, float, float, i32, [2 x i8], [2 x i8] }>
%struct.ImVector.28 = type { i32, i32, ptr }
%struct.ImGuiComboPreviewData = type { %struct.ImRect, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, i32 }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVector.29 = type { i32, i32, ptr }
%struct.ImGuiTypingSelectState = type <{ %struct.ImGuiTypingSelectRequest, [64 x i8], i32, i32, float, i8, [3 x i8] }>
%struct.ImGuiTypingSelectRequest = type { i32, i32, ptr, i8, i8, i8 }
%struct.ImGuiPlatformImeData = type { i8, %struct.ImVec2, float }
%struct.ImGuiDockContext = type <{ %struct.ImGuiStorage, %struct.ImVector.30, %struct.ImVector.31, i8, [7 x i8] }>
%struct.ImVector.30 = type { i32, i32, ptr }
%struct.ImVector.31 = type { i32, i32, ptr }
%struct.ImVector.32 = type { i32, i32, ptr }
%struct.ImChunkStream = type { %struct.ImVector.27 }
%struct.ImChunkStream.33 = type { %struct.ImVector.27 }
%struct.ImVector.34 = type { i32, i32, ptr }
%struct.ImGuiTextBuffer = type { %struct.ImVector.27 }
%struct.ImGuiTextIndex = type <{ %struct.ImVector.12, i32, [4 x i8] }>
%struct.ImVec4 = type { float, float, float, float }
%struct.ImGuiMetricsConfig = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32 }
%struct.ImGuiIDStackTool = type { i32, i32, i32, %struct.ImVector.35, i8, float }
%struct.ImVector.35 = type { i32, i32, ptr }
%struct.ImGuiDebugAllocInfo = type { i32, i32, i16, [6 x %struct.ImGuiDebugAllocEntry] }
%struct.ImGuiDebugAllocEntry = type { i32, i16, i16 }
%struct.ImVector.27 = type { i32, i32, ptr }

@GImGui = external dso_local global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [56 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui22GetShortcutRoutingDataEi = external hidden unnamed_addr constant [66 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5ImGui25ConvertSingleModFlagToKeyEP12ImGuiContext8ImGuiKey(ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5ImGui22GetShortcutRoutingDataEi(i32 noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i16, align 2
  %10 = alloca i32, align 4
  %11 = alloca i16, align 2
  %12 = alloca %struct.ImGuiKeyRoutingData, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %13 = load ptr, ptr @GImGui, align 8, !tbaa !9
  store ptr %13, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %14 = load ptr, ptr %4, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.ImGuiContext, ptr %14, i32 0, i32 77
  store ptr %15, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = and i32 %16, -63489
  store i32 %17, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = and i32 %18, 63488
  store i32 %19, ptr %8, align 4, !tbaa !11
  %20 = load i32, ptr %7, align 4, !tbaa !11
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %26

22:                                               ; preds = %1
  %23 = load ptr, ptr %4, align 8, !tbaa !9
  %24 = load i32, ptr %8, align 4, !tbaa !11
  %25 = call noundef i32 @_ZN5ImGui25ConvertSingleModFlagToKeyEP12ImGuiContext8ImGuiKey(ptr noundef %23, i32 noundef %24)
  store i32 %25, ptr %7, align 4, !tbaa !11
  br label %26

26:                                               ; preds = %22, %1
  %27 = load i32, ptr %7, align 4, !tbaa !11
  %28 = call noundef zeroext i1 @_ZN5ImGui10IsNamedKeyE8ImGuiKey(i32 noundef %27)
  br i1 %28, label %29, label %33

29:                                               ; preds = %26
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = and i32 %30, 2048
  %32 = icmp eq i32 %31, 0
  br label %33

33:                                               ; preds = %29, %26
  %34 = phi i1 [ false, %26 ], [ %32, %29 ]
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  br label %38

36:                                               ; preds = %33
  call void @__assert_fail(ptr noundef @.str.210, ptr noundef @.str.3, i32 noundef 8941, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui22GetShortcutRoutingDataEi) #7
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #6
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.ImGuiKeyRoutingTable, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %7, align 4, !tbaa !11
  %42 = sub nsw i32 %41, 512
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [154 x i16], ptr %40, i64 0, i64 %43
  %45 = load i16, ptr %44, align 2, !tbaa !13
  store i16 %45, ptr %9, align 2, !tbaa !13
  br label %46

46:                                               ; preds = %66, %38
  %47 = load i16, ptr %9, align 2, !tbaa !13
  %48 = sext i16 %47 to i32
  %49 = icmp ne i32 %48, -1
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 2, ptr %10, align 4
  br label %70

51:                                               ; preds = %46
  %52 = load ptr, ptr %5, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.ImGuiKeyRoutingTable, ptr %52, i32 0, i32 1
  %54 = load i16, ptr %9, align 2, !tbaa !13
  %55 = sext i16 %54 to i32
  %56 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN8ImVectorI19ImGuiKeyRoutingDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %53, i32 noundef %55)
  store ptr %56, ptr %6, align 8, !tbaa !9
  %57 = load ptr, ptr %6, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.ImGuiKeyRoutingData, ptr %57, i32 0, i32 1
  %59 = load i16, ptr %58, align 2, !tbaa !15
  %60 = zext i16 %59 to i32
  %61 = load i32, ptr %8, align 4, !tbaa !11
  %62 = icmp eq i32 %60, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %51
  %64 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %64, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %70

65:                                               ; preds = %51
  br label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr %6, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.ImGuiKeyRoutingData, ptr %67, i32 0, i32 0
  %69 = load i16, ptr %68, align 4, !tbaa !17
  store i16 %69, ptr %9, align 2, !tbaa !13
  br label %46, !llvm.loop !18

70:                                               ; preds = %63, %50
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #6
  %71 = load i32, ptr %10, align 4
  switch i32 %71, label %106 [
    i32 2, label %72
  ]

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #6
  %73 = load ptr, ptr %5, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.ImGuiKeyRoutingTable, ptr %73, i32 0, i32 1
  %75 = getelementptr inbounds %struct.ImVector.7, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !20
  %77 = trunc i32 %76 to i16
  store i16 %77, ptr %11, align 2, !tbaa !13
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.ImGuiKeyRoutingTable, ptr %78, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @_ZN19ImGuiKeyRoutingDataC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %12)
  call void @_ZN8ImVectorI19ImGuiKeyRoutingDataE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 4 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.ImGuiKeyRoutingTable, ptr %80, i32 0, i32 1
  %82 = load i16, ptr %11, align 2, !tbaa !13
  %83 = sext i16 %82 to i32
  %84 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN8ImVectorI19ImGuiKeyRoutingDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %81, i32 noundef %83)
  store ptr %84, ptr %6, align 8, !tbaa !9
  %85 = load i32, ptr %8, align 4, !tbaa !11
  %86 = trunc i32 %85 to i16
  %87 = load ptr, ptr %6, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.ImGuiKeyRoutingData, ptr %87, i32 0, i32 1
  store i16 %86, ptr %88, align 2, !tbaa !15
  %89 = load ptr, ptr %5, align 8, !tbaa !9
  %90 = getelementptr inbounds %struct.ImGuiKeyRoutingTable, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %7, align 4, !tbaa !11
  %92 = sub nsw i32 %91, 512
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [154 x i16], ptr %90, i64 0, i64 %93
  %95 = load i16, ptr %94, align 2, !tbaa !13
  %96 = load ptr, ptr %6, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.ImGuiKeyRoutingData, ptr %96, i32 0, i32 0
  store i16 %95, ptr %97, align 4, !tbaa !17
  %98 = load i16, ptr %11, align 2, !tbaa !13
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.ImGuiKeyRoutingTable, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %7, align 4, !tbaa !11
  %102 = sub nsw i32 %101, 512
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [154 x i16], ptr %100, i64 0, i64 %103
  store i16 %98, ptr %104, align 2, !tbaa !13
  %105 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %105, ptr %2, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #6
  br label %106

106:                                              ; preds = %72, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %107 = load ptr, ptr %2, align 8
  ret ptr %107
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "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 = { 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 #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 }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS8ImGuiKey", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !14, i64 2}
!16 = !{!"_ZTS19ImGuiKeyRoutingData", !14, i64 0, !14, i64 2, !7, i64 4, !7, i64 5, !6, i64 8, !6, i64 12}
!17 = !{!16, !14, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !6, i64 312}
!21 = !{!"_ZTS20ImGuiKeyRoutingTable", !7, i64 0, !22, i64 312, !22, i64 328}
!22 = !{!"_ZTS8ImVectorI19ImGuiKeyRoutingDataE", !6, i64 0, !6, i64 4, !10, 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.ImGuiKeyRoutingData = type { i16, i16, i8, i8, i32, i32 }

@GImGui = external dso_local local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [56 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui22GetShortcutRoutingDataEi = external hidden unnamed_addr constant [66 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5ImGui25ConvertSingleModFlagToKeyEP12ImGuiContext8ImGuiKey(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN5ImGui22GetShortcutRoutingDataEi(i32 noundef %0) local_unnamed_addr #3 {
  %2 = alloca %struct.ImGuiKeyRoutingData, align 4
  %3 = load ptr, ptr @GImGui, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 18768
  %5 = and i32 %0, -63489
  %6 = and i32 %0, 63488
  %7 = icmp eq i32 %5, 0
  br i1 %7, label %8, label %10

8:                                                ; preds = %1
  %9 = tail call noundef i32 @_ZN5ImGui25ConvertSingleModFlagToKeyEP12ImGuiContext8ImGuiKey(ptr noundef %3, i32 noundef %6)
  br label %10

10:                                               ; preds = %8, %1
  %.033 = phi i32 [ %9, %8 ], [ %5, %1 ]
  %11 = tail call noundef zeroext i1 @_ZN5ImGui10IsNamedKeyE8ImGuiKey(i32 noundef %.033)
  %12 = and i32 %0, 2048
  %13 = icmp eq i32 %12, 0
  %14 = and i1 %13, %11
  br i1 %14, label %16, label %15

15:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.210, ptr noundef nonnull @.str.3, i32 noundef 8941, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui22GetShortcutRoutingDataEi) #6
  unreachable

16:                                               ; preds = %10
  %17 = add nsw i32 %.033, -512
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [154 x i16], ptr %4, i64 0, i64 %18
  %20 = getelementptr inbounds i8, ptr %3, i64 19080
  br label %21

21:                                               ; preds = %22, %16
  %.032.in = phi ptr [ %19, %16 ], [ %24, %22 ]
  %.032 = load i16, ptr %.032.in, align 2, !tbaa !9
  %.not = icmp eq i16 %.032, -1
  br i1 %.not, label %29, label %22

22:                                               ; preds = %21
  %23 = sext i16 %.032 to i32
  %24 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZN8ImVectorI19ImGuiKeyRoutingDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %23)
  %25 = getelementptr inbounds i8, ptr %24, i64 2
  %26 = load i16, ptr %25, align 2, !tbaa !11
  %27 = zext i16 %26 to i32
  %28 = icmp eq i32 %6, %27
  br i1 %28, label %.loopexit, label %21, !llvm.loop !14

29:                                               ; preds = %21
  %30 = load i32, ptr %20, align 8, !tbaa !16
  %31 = trunc i32 %30 to i16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  call void @_ZN19ImGuiKeyRoutingDataC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %2)
  call void @_ZN8ImVectorI19ImGuiKeyRoutingDataE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  %sext = shl i32 %30, 16
  %32 = ashr exact i32 %sext, 16
  %33 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN8ImVectorI19ImGuiKeyRoutingDataEixEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %32)
  %34 = trunc nuw i32 %6 to i16
  %35 = getelementptr inbounds i8, ptr %33, i64 2
  store i16 %34, ptr %35, align 2, !tbaa !11
  %36 = load i16, ptr %19, align 2, !tbaa !9
  store i16 %36, ptr %33, align 4, !tbaa !19
  store i16 %31, ptr %19, align 2, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %22, %29
  %.1 = phi ptr [ %33, %29 ], [ %24, %22 ]
  ret ptr %.1
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "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 = { 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 #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 = { noreturn nounwind }
attributes #7 = { 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 = !{!"short", !7, i64 0}
!11 = !{!12, !10, i64 2}
!12 = !{!"_ZTS19ImGuiKeyRoutingData", !10, i64 0, !10, i64 2, !7, i64 4, !7, i64 5, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !13, i64 312}
!17 = !{!"_ZTS20ImGuiKeyRoutingTable", !7, i64 0, !18, i64 312, !18, i64 328}
!18 = !{!"_ZTS8ImVectorI19ImGuiKeyRoutingDataE", !13, i64 0, !13, i64 4, !6, i64 8}
!19 = !{!12, !10, i64 0}


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