; LLVM IR from xhub/reshop :: gui/external/imgui/imgui.ll (ZN5ImGui15GetKeyChordNameEi)

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

@GImGui = external dso_local global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.195 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [7 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: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14ImFormatStringPcmPKcz(ptr noundef, i64 noundef, ptr noundef, ...) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5ImGui15GetKeyChordNameEi(i32 noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %6 = load ptr, ptr @GImGui, align 8, !tbaa !9
  store ptr %6, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = and i32 %7, -61441
  store i32 %8, ptr %4, align 4, !tbaa !11
  %9 = load i32, ptr %4, align 4, !tbaa !11
  %10 = call noundef zeroext i1 @_ZN5ImGui10IsLRModKeyE8ImGuiKey(i32 noundef %9)
  br i1 %10, label %11, label %17

11:                                               ; preds = %1
  %12 = load i32, ptr %4, align 4, !tbaa !11
  %13 = call noundef i32 @_ZL17GetModForLRModKey8ImGuiKey(i32 noundef %12)
  %14 = xor i32 %13, -1
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = and i32 %15, %14
  store i32 %16, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %11, %1
  %18 = load ptr, ptr %3, align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.ImGuiContext, ptr %18, i32 0, i32 297
  %20 = getelementptr inbounds [64 x i8], ptr %19, i64 0, i64 0
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = and i32 %21, 4096
  %23 = icmp ne i32 %22, 0
  %24 = zext i1 %23 to i64
  %25 = select i1 %23, ptr @.str.196, ptr @.str.14
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = and i32 %26, 8192
  %28 = icmp ne i32 %27, 0
  %29 = zext i1 %28 to i64
  %30 = select i1 %28, ptr @.str.197, ptr @.str.14
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = and i32 %31, 16384
  %33 = icmp ne i32 %32, 0
  %34 = zext i1 %33 to i64
  %35 = select i1 %33, ptr @.str.198, ptr @.str.14
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = and i32 %36, 32768
  %38 = icmp ne i32 %37, 0
  %39 = zext i1 %38 to i64
  %40 = select i1 %38, ptr @.str.199, ptr @.str.14
  %41 = load i32, ptr %4, align 4, !tbaa !11
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %46, label %43

43:                                               ; preds = %17
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %49

46:                                               ; preds = %43, %17
  %47 = load i32, ptr %4, align 4, !tbaa !11
  %48 = call noundef ptr @_ZN5ImGui10GetKeyNameE8ImGuiKey(i32 noundef %47)
  br label %50

49:                                               ; preds = %43
  br label %50

50:                                               ; preds = %49, %46
  %51 = phi ptr [ %48, %46 ], [ @.str.14, %49 ]
  %52 = call noundef i32 (ptr, i64, ptr, ...) @_Z14ImFormatStringPcmPKcz(ptr noundef %20, i64 noundef 64, ptr noundef @.str.195, ptr noundef %25, ptr noundef %30, ptr noundef %35, ptr noundef %40, ptr noundef %51)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %53 = load i32, ptr %4, align 4, !tbaa !11
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %71

55:                                               ; preds = %50
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %71

58:                                               ; preds = %55
  %59 = load ptr, ptr %3, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.ImGuiContext, ptr %59, i32 0, i32 297
  %61 = getelementptr inbounds [64 x i8], ptr %60, i64 0, i64 0
  %62 = call i64 @strlen(ptr noundef %61) #6
  store i64 %62, ptr %5, align 8, !tbaa !13
  %63 = icmp ne i64 %62, 0
  br i1 %63, label %64, label %70

64:                                               ; preds = %58
  %65 = load ptr, ptr %3, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.ImGuiContext, ptr %65, i32 0, i32 297
  %67 = load i64, ptr %5, align 8, !tbaa !13
  %68 = sub i64 %67, 1
  %69 = getelementptr inbounds [64 x i8], ptr %66, i64 0, i64 %68
  store i8 0, ptr %69, align 1, !tbaa !15
  br label %70

70:                                               ; preds = %64, %58
  br label %71

71:                                               ; preds = %70, %55, %50
  %72 = load ptr, ptr %3, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.ImGuiContext, ptr %72, i32 0, i32 297
  %74 = getelementptr inbounds [64 x i8], ptr %73, i64 0, i64 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret ptr %74
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17GetModForLRModKey8ImGuiKey(i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5ImGui10GetKeyNameE8ImGuiKey(i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"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 = !{!"long", !7, i64 0}
!15 = !{!7, !7, i64 0}


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

@GImGui = external dso_local local_unnamed_addr global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.195 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [7 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14ImFormatStringPcmPKcz(ptr noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN5ImGui15GetKeyChordNameEi(i32 noundef %0) local_unnamed_addr #2 {
  %2 = load ptr, ptr @GImGui, align 8, !tbaa !5
  %3 = and i32 %0, -61441
  %4 = tail call noundef zeroext i1 @_ZN5ImGui10IsLRModKeyE8ImGuiKey(i32 noundef %3)
  br i1 %4, label %5, label %9

5:                                                ; preds = %1
  %6 = tail call noundef i32 @_ZL17GetModForLRModKey8ImGuiKey(i32 noundef %3)
  %7 = xor i32 %6, -1
  %8 = and i32 %7, %0
  br label %9

9:                                                ; preds = %5, %1
  %.0 = phi i32 [ %8, %5 ], [ %0, %1 ]
  %10 = getelementptr inbounds i8, ptr %2, i64 10408
  %11 = and i32 %.0, 4096
  %.not = icmp eq i32 %11, 0
  %12 = select i1 %.not, ptr @.str.14, ptr @.str.196
  %13 = and i32 %.0, 8192
  %.not21 = icmp eq i32 %13, 0
  %14 = select i1 %.not21, ptr @.str.14, ptr @.str.197
  %15 = and i32 %.0, 16384
  %.not22 = icmp eq i32 %15, 0
  %16 = select i1 %.not22, ptr @.str.14, ptr @.str.198
  %17 = and i32 %.0, 32768
  %.not23 = icmp eq i32 %17, 0
  %18 = select i1 %.not23, ptr @.str.14, ptr @.str.199
  %19 = icmp ne i32 %3, 0
  %20 = icmp eq i32 %.0, 0
  %or.cond = or i1 %19, %20
  br i1 %or.cond, label %21, label %23

21:                                               ; preds = %9
  %22 = tail call noundef ptr @_ZN5ImGui10GetKeyNameE8ImGuiKey(i32 noundef %3)
  br label %23

23:                                               ; preds = %9, %21
  %24 = phi ptr [ %22, %21 ], [ @.str.14, %9 ]
  %25 = tail call noundef i32 (ptr, i64, ptr, ...) @_Z14ImFormatStringPcmPKcz(ptr noundef nonnull %10, i64 noundef 64, ptr noundef nonnull @.str.195, ptr noundef nonnull %12, ptr noundef nonnull %14, ptr noundef nonnull %16, ptr noundef nonnull %18, ptr noundef %24)
  %26 = icmp eq i32 %3, 0
  %27 = icmp ne i32 %.0, 0
  %or.cond3 = and i1 %26, %27
  br i1 %or.cond3, label %28, label %33

28:                                               ; preds = %23
  %29 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %10) #4
  %.not24 = icmp eq i64 %29, 0
  br i1 %.not24, label %33, label %30

30:                                               ; preds = %28
  %31 = add i64 %29, -1
  %32 = getelementptr inbounds [64 x i8], ptr %10, i64 0, i64 %31
  store i8 0, ptr %32, align 1, !tbaa !9
  br label %33

33:                                               ; preds = %28, %30, %23
  ret ptr %10
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17GetModForLRModKey8ImGuiKey(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5ImGui10GetKeyNameE8ImGuiKey(i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 #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 = { 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 #3 = { 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 #4 = { 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 = !{!7, !7, i64 0}


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