; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode (juce_gui_basics)

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

%"class.juce::KeyPressMappingSet" = type { %"class.juce::KeyListener", %"class.juce::ChangeBroadcaster", %"class.juce::FocusChangeListener", ptr, %"class.juce::OwnedArray.138", %"class.juce::OwnedArray.143" }
%"class.juce::KeyListener" = type { ptr }
%"class.juce::ChangeBroadcaster" = type { ptr, %"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback", %"class.juce::ListenerList.39" }
%"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback" = type { %"class.juce::AsyncUpdater", ptr }
%"class.juce::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr.15" }
%"class.juce::ReferenceCountedObjectPtr.15" = type { ptr }
%"class.juce::ListenerList.39" = type { %"class.juce::Array.40" }
%"class.juce::Array.40" = type { %"class.juce::ArrayAllocationBase.41", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.41" = type <{ %"class.juce::HeapBlock.42", i32, [4 x i8] }>
%"class.juce::HeapBlock.42" = type { ptr }
%"class.juce::FocusChangeListener" = type { ptr }
%"class.juce::OwnedArray.138" = type { %"class.juce::ArrayAllocationBase.139", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.139" = type <{ %"class.juce::HeapBlock.140", i32, [4 x i8] }>
%"class.juce::HeapBlock.140" = type { ptr }
%"class.juce::OwnedArray.143" = type { %"class.juce::ArrayAllocationBase.144", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.144" = type <{ %"class.juce::HeapBlock.145", i32, [4 x i8] }>
%"class.juce::HeapBlock.145" = type { ptr }
%"struct.juce::KeyPressMappingSet::CommandMapping" = type <{ i32, [4 x i8], %"class.juce::Array.104", i8, [7 x i8] }>
%"class.juce::Array.104" = type { %"class.juce::ArrayAllocationBase.105", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.105" = type <{ %"class.juce::HeapBlock.106", i32, [4 x i8] }>
%"class.juce::HeapBlock.106" = type { ptr }
%"struct.juce::ApplicationCommandInfo" = type <{ i32, [4 x i8], %"class.juce::String", %"class.juce::String", %"class.juce::String", %"class.juce::Array.104", i32, [4 x i8] }>
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce8KeyPress7isValidEv(ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE3addERKS1_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

declare void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56)) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce25ApplicationCommandManager15getCommandForIDEi(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce18KeyPressMappingSet11addKeyPressEiRKNS_8KeyPressEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  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
  store i32 %3, ptr %8, align 4, !tbaa !9
  %13 = load ptr, ptr %5, align 8
  br label %14

14:                                               ; preds = %4
  br label %15

15:                                               ; preds = %14
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = call noundef i32 @_ZNK4juce18KeyPressMappingSet22findCommandForKeyPressERKNS_8KeyPressE(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 4 dereferenceable(12) %16) #7
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = icmp ne i32 %17, %18
  br i1 %19, label %20, label %83

20:                                               ; preds = %15
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZNK4juce8KeyPress7isValidEv(ptr noundef nonnull align 4 dereferenceable(12) %21) #7
  br i1 %22, label %23, label %82

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %24 = getelementptr inbounds %"class.juce::KeyPressMappingSet", ptr %13, i32 0, i32 4
  %25 = call noundef i32 @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %24) #7
  store i32 %25, ptr %9, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %47, %23
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr %9, align 4, !tbaa !9
  %29 = icmp sge i32 %28, 0
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 4, ptr %10, align 4
  br label %48

31:                                               ; preds = %26
  %32 = getelementptr inbounds %"class.juce::KeyPressMappingSet", ptr %13, i32 0, i32 4
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = call noundef ptr @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %32, i32 noundef %33) #7
  %35 = getelementptr inbounds %"struct.juce::KeyPressMappingSet::CommandMapping", ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !11
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = icmp eq i32 %36, %37
  br i1 %38, label %39, label %47

39:                                               ; preds = %31
  %40 = getelementptr inbounds %"class.juce::KeyPressMappingSet", ptr %13, i32 0, i32 4
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = call noundef ptr @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %40, i32 noundef %41) #7
  %43 = getelementptr inbounds %"struct.juce::KeyPressMappingSet::CommandMapping", ptr %42, i32 0, i32 2
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE6insertEiRKS1_(ptr noundef nonnull align 8 dereferenceable(20) %43, i32 noundef %44, ptr noundef nonnull align 4 dereferenceable(12) %45)
  %46 = getelementptr inbounds i8, ptr %13, i64 8
  call void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56) %46)
  store i32 1, ptr %10, align 4
  br label %48

47:                                               ; preds = %31
  br label %26, !llvm.loop !17

48:                                               ; preds = %39, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %49 = load i32, ptr %10, align 4
  switch i32 %49, label %84 [
    i32 4, label %50
    i32 1, label %83
  ]

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %51 = getelementptr inbounds %"class.juce::KeyPressMappingSet", ptr %13, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = call noundef ptr @_ZNK4juce25ApplicationCommandManager15getCommandForIDEi(ptr noundef nonnull align 8 dereferenceable(88) %52, i32 noundef %53) #7
  store ptr %54, ptr %11, align 8, !tbaa !5
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %77

57:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %58 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
  call void @llvm.memset.p0.i64(ptr align 16 %58, i8 0, i64 40, i1 false)
  call void @_ZN4juce18KeyPressMappingSet14CommandMappingC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %58) #7
  store ptr %58, ptr %12, align 8, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.juce::KeyPressMappingSet::CommandMapping", ptr %60, i32 0, i32 0
  store i32 %59, ptr %61, align 8, !tbaa !11
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.juce::KeyPressMappingSet::CommandMapping", ptr %62, i32 0, i32 2
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE3addERKS1_(ptr noundef nonnull align 8 dereferenceable(20) %63, ptr noundef nonnull align 4 dereferenceable(12) %64)
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.juce::ApplicationCommandInfo", ptr %65, i32 0, i32 6
  %67 = load i32, ptr %66, align 8, !tbaa !37
  %68 = and i32 %67, 4
  %69 = icmp ne i32 %68, 0
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.juce::KeyPressMappingSet::CommandMapping", ptr %70, i32 0, i32 3
  %72 = zext i1 %69 to i8
  store i8 %72, ptr %71, align 8, !tbaa !41
  %73 = getelementptr inbounds %"class.juce::KeyPressMappingSet", ptr %13, i32 0, i32 4
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = call noundef ptr @_ZN4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE3addEPS2_(ptr noundef nonnull align 8 dereferenceable(20) %73, ptr noundef %74) #7
  %76 = getelementptr inbounds i8, ptr %13, i64 8
  call void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56) %76)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %81

77:                                               ; preds = %50
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %82

82:                                               ; preds = %81, %20
  br label %83

83:                                               ; preds = %82, %48, %15
  ret void

84:                                               ; preds = %48
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce18KeyPressMappingSet22findCommandForKeyPressERKNS_8KeyPressE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE6insertEiRKS1_(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef, ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18KeyPressMappingSet14CommandMappingC2Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE3addEPS2_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }

!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, !10, i64 0}
!12 = !{!"_ZTSN4juce18KeyPressMappingSet14CommandMappingE", !10, i64 0, !13, i64 8, !16, i64 32}
!13 = !{!"_ZTSN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EEE", !14, i64 0, !10, i64 16}
!14 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_8KeyPressENS_20DummyCriticalSectionEEE", !15, i64 0, !10, i64 8}
!15 = !{!"_ZTSN4juce9HeapBlockINS_8KeyPressELb0EEE", !6, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 72}
!20 = !{!"_ZTSN4juce18KeyPressMappingSetE", !21, i64 0, !22, i64 8, !30, i64 64, !6, i64 72, !31, i64 80, !34, i64 104}
!21 = !{!"_ZTSN4juce11KeyListenerE"}
!22 = !{!"_ZTSN4juce17ChangeBroadcasterE", !23, i64 8, !26, i64 32}
!23 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !24, i64 0, !6, i64 16}
!24 = !{!"_ZTSN4juce12AsyncUpdaterE", !25, i64 8}
!25 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !6, i64 0}
!26 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !27, i64 0}
!27 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !28, i64 0, !10, i64 16}
!28 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !29, i64 0, !10, i64 8}
!29 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !6, i64 0}
!30 = !{!"_ZTSN4juce19FocusChangeListenerE"}
!31 = !{!"_ZTSN4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEEE", !32, i64 0, !10, i64 16}
!32 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEEE", !33, i64 0, !10, i64 8}
!33 = !{!"_ZTSN4juce9HeapBlockIPNS_18KeyPressMappingSet14CommandMappingELb0EEE", !6, i64 0}
!34 = !{!"_ZTSN4juce10OwnedArrayINS_18KeyPressMappingSet12KeyPressTimeENS_20DummyCriticalSectionEEE", !35, i64 0, !10, i64 16}
!35 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_18KeyPressMappingSet12KeyPressTimeENS_20DummyCriticalSectionEEE", !36, i64 0, !10, i64 8}
!36 = !{!"_ZTSN4juce9HeapBlockIPNS_18KeyPressMappingSet12KeyPressTimeELb0EEE", !6, i64 0}
!37 = !{!38, !10, i64 56}
!38 = !{!"_ZTSN4juce22ApplicationCommandInfoE", !10, i64 0, !39, i64 8, !39, i64 16, !39, i64 24, !13, i64 32, !10, i64 56}
!39 = !{!"_ZTSN4juce6StringE", !40, i64 0}
!40 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!41 = !{!12, !16, i64 32}


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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce8KeyPress7isValidEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE3addERKS1_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

declare void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce18KeyPressMappingSet11addKeyPressEiRKNS_8KeyPressEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef %3) local_unnamed_addr #2 align 2 {
  %5 = tail call noundef i32 @_ZNK4juce18KeyPressMappingSet22findCommandForKeyPressERKNS_8KeyPressE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 4 dereferenceable(12) %2) #6
  %.not = icmp eq i32 %5, %1
  br i1 %.not, label %36, label %6

6:                                                ; preds = %4
  %7 = tail call noundef zeroext i1 @_ZNK4juce8KeyPress7isValidEv(ptr noundef nonnull align 4 dereferenceable(12) %2) #6
  br i1 %7, label %8, label %36

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  %10 = tail call noundef i32 @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %9) #6
  br label %11

11:                                               ; preds = %13, %8
  %.0 = phi i32 [ %10, %8 ], [ %14, %13 ]
  %12 = icmp sgt i32 %.0, 0
  br i1 %12, label %13, label %21

13:                                               ; preds = %11
  %14 = add nsw i32 %.0, -1
  %15 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %9, i32 noundef %14) #6
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = icmp eq i32 %16, %1
  br i1 %17, label %18, label %11, !llvm.loop !15

18:                                               ; preds = %13
  %19 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %9, i32 noundef %14) #6
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  tail call void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE6insertEiRKS1_(ptr noundef nonnull align 8 dereferenceable(20) %20, i32 noundef %3, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br label %.sink.split

21:                                               ; preds = %11
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %24 = tail call noundef ptr @_ZNK4juce25ApplicationCommandManager15getCommandForIDEi(ptr noundef nonnull align 8 dereferenceable(88) %23, i32 noundef %1) #6
  %.not23 = icmp eq ptr %24, null
  br i1 %.not23, label %36, label %25

25:                                               ; preds = %21
  %26 = tail call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %26, i8 0, i64 40, i1 false)
  tail call void @_ZN4juce18KeyPressMappingSet14CommandMappingC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %26) #6
  store i32 %1, ptr %26, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  tail call void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE3addERKS1_(ptr noundef nonnull align 8 dereferenceable(20) %27, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %28 = getelementptr inbounds i8, ptr %24, i64 56
  %29 = load i32, ptr %28, align 8, !tbaa !35
  %30 = getelementptr inbounds i8, ptr %26, i64 32
  %31 = trunc i32 %29 to i8
  %32 = lshr i8 %31, 2
  %33 = and i8 %32, 1
  store i8 %33, ptr %30, align 8, !tbaa !39
  %34 = tail call noundef ptr @_ZN4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE3addEPS2_(ptr noundef nonnull align 8 dereferenceable(20) %9, ptr noundef nonnull %26) #6
  br label %.sink.split

.sink.split:                                      ; preds = %25, %18
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56) %35)
  br label %36

36:                                               ; preds = %.sink.split, %21, %6, %4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce18KeyPressMappingSet22findCommandForKeyPressERKNS_8KeyPressE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EE6insertEiRKS1_(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18KeyPressMappingSet14CommandMappingC2Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEE3addEPS2_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) local_unnamed_addr #1 align 2

attributes #0 = { nobuiltin allocsize(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 #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 = { "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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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, !7, i64 0}
!6 = !{!"_ZTSN4juce18KeyPressMappingSet14CommandMappingE", !7, i64 0, !10, i64 8, !14, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4juce5ArrayINS_8KeyPressENS_20DummyCriticalSectionELi0EEE", !11, i64 0, !7, i64 16}
!11 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_8KeyPressENS_20DummyCriticalSectionEEE", !12, i64 0, !7, i64 8}
!12 = !{!"_ZTSN4juce9HeapBlockINS_8KeyPressELb0EEE", !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !13, i64 72}
!18 = !{!"_ZTSN4juce18KeyPressMappingSetE", !19, i64 0, !20, i64 8, !28, i64 64, !13, i64 72, !29, i64 80, !32, i64 104}
!19 = !{!"_ZTSN4juce11KeyListenerE"}
!20 = !{!"_ZTSN4juce17ChangeBroadcasterE", !21, i64 8, !24, i64 32}
!21 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !22, i64 0, !13, i64 16}
!22 = !{!"_ZTSN4juce12AsyncUpdaterE", !23, i64 8}
!23 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !13, i64 0}
!24 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !25, i64 0}
!25 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !26, i64 0, !7, i64 16}
!26 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !27, i64 0, !7, i64 8}
!27 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !13, i64 0}
!28 = !{!"_ZTSN4juce19FocusChangeListenerE"}
!29 = !{!"_ZTSN4juce10OwnedArrayINS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEEE", !30, i64 0, !7, i64 16}
!30 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_18KeyPressMappingSet14CommandMappingENS_20DummyCriticalSectionEEE", !31, i64 0, !7, i64 8}
!31 = !{!"_ZTSN4juce9HeapBlockIPNS_18KeyPressMappingSet14CommandMappingELb0EEE", !13, i64 0}
!32 = !{!"_ZTSN4juce10OwnedArrayINS_18KeyPressMappingSet12KeyPressTimeENS_20DummyCriticalSectionEEE", !33, i64 0, !7, i64 16}
!33 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_18KeyPressMappingSet12KeyPressTimeENS_20DummyCriticalSectionEEE", !34, i64 0, !7, i64 8}
!34 = !{!"_ZTSN4juce9HeapBlockIPNS_18KeyPressMappingSet12KeyPressTimeELb0EEE", !13, i64 0}
!35 = !{!36, !7, i64 56}
!36 = !{!"_ZTSN4juce22ApplicationCommandInfoE", !7, i64 0, !37, i64 8, !37, i64 16, !37, i64 24, !10, i64 32, !7, i64 56}
!37 = !{!"_ZTSN4juce6StringE", !38, i64 0}
!38 = !{!"_ZTSN4juce16CharPointer_UTF8E", !13, i64 0}
!39 = !{!6, !14, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass