; 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::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%"class.juce::KeyPress" = type { i32, %"class.juce::ModifierKeys", i32 }
%"class.juce::ModifierKeys" = type { i32 }
%"class.juce::Component" = type <{ %"class.juce::MouseListener", %"class.juce::String", %"class.juce::String", ptr, %"class.juce::Rectangle", %"class.juce::ScopedPointer", %"class.juce::ScopedPointer.0", %"class.juce::Array", ptr, %"class.juce::MouseCursor", ptr, %"class.juce::ScopedPointer.1", %"class.juce::ScopedPointer.2", %"class.juce::ScopedPointer.3", %"class.juce::ListenerList", %"class.juce::NamedValueSet", %"class.juce::WeakReference<juce::Component>::Master", %union.anon, i8, [3 x i8] }>
%"class.juce::MouseListener" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::Rectangle" = type { %"class.juce::Point", i32, i32 }
%"class.juce::Point" = type { i32, i32 }
%"class.juce::ScopedPointer" = type { ptr }
%"class.juce::ScopedPointer.0" = type { ptr }
%"class.juce::Array" = type { %"class.juce::ArrayAllocationBase", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase" = type <{ %"class.juce::HeapBlock", i32, [4 x i8] }>
%"class.juce::HeapBlock" = type { ptr }
%"class.juce::MouseCursor" = type { ptr }
%"class.juce::ScopedPointer.1" = type { ptr }
%"class.juce::ScopedPointer.2" = type { ptr }
%"class.juce::ScopedPointer.3" = type { ptr }
%"class.juce::ListenerList" = type { %"class.juce::Array.4" }
%"class.juce::Array.4" = type { %"class.juce::ArrayAllocationBase.5", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.5" = type <{ %"class.juce::HeapBlock.6", i32, [4 x i8] }>
%"class.juce::HeapBlock.6" = type { ptr }
%"class.juce::NamedValueSet" = type { %"class.juce::Array.9" }
%"class.juce::Array.9" = type { %"class.juce::ArrayAllocationBase.10", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.10" = type <{ %"class.juce::HeapBlock.11", i32, [4 x i8] }>
%"class.juce::HeapBlock.11" = type { ptr }
%"class.juce::WeakReference<juce::Component>::Master" = type { %"class.juce::ReferenceCountedObjectPtr" }
%union.anon = type { i32 }

declare i32 @__gxx_personality_v0(...)

; 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
declare dso_local void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component26moveKeyboardFocusToSiblingEb(ptr noundef nonnull align 8 dereferenceable(197), i1 noundef zeroext) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce9Component28getCurrentlyFocusedComponentEv() #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce9Component18getParentComponentEv(ptr noundef nonnull align 8 dereferenceable(197)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4juce13ComponentPeer20getTargetForKeyPressEv(ptr noundef nonnull align 8 dereferenceable(77)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce13ComponentPeer14handleKeyPressERKNS_8KeyPressE(ptr noundef nonnull align 8 dereferenceable(77) %0, ptr noundef nonnull align 4 dereferenceable(12) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.juce::WeakReference", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca %"class.juce::KeyPress", align 4
  %18 = alloca %"class.juce::ModifierKeys", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %20 = call noundef ptr @_ZN4juce13ComponentPeer20getTargetForKeyPressEv(ptr noundef nonnull align 8 dereferenceable(77) %19)
  store ptr %20, ptr %7, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %140, %2
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 2, ptr %8, align 4
  br label %144

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %26)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.juce::Component", ptr %27, i32 0, i32 13
  %29 = call noundef ptr @_ZNK4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEcvPS5_Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  store ptr %29, ptr %10, align 8, !tbaa !5
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %73

32:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %33) #4
  store i32 %34, ptr %11, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %69, %32
  %36 = load i32, ptr %11, align 4, !tbaa !11
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %11, align 4, !tbaa !11
  %38 = icmp sge i32 %37, 0
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 5, ptr %8, align 4
  br label %70

40:                                               ; preds = %35
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load i32, ptr %11, align 4, !tbaa !11
  %43 = invoke noundef ptr @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %41, i32 noundef %42)
          to label %44 unwind label %60

44:                                               ; preds = %40
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %43, align 8, !tbaa !13
  %48 = getelementptr inbounds ptr, ptr %47, i64 2
  %49 = load ptr, ptr %48, align 8
  %50 = invoke noundef zeroext i1 %49(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(12) %45, ptr noundef %46)
          to label %51 unwind label %60

51:                                               ; preds = %44
  %52 = zext i1 %50 to i8
  store i8 %52, ptr %6, align 1, !tbaa !9
  %53 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %54 = trunc i8 %53 to i1
  br i1 %54, label %57, label %55

55:                                               ; preds = %51
  %56 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null) #4
  br i1 %56, label %57, label %64

57:                                               ; preds = %55, %51
  %58 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %59 = trunc i8 %58 to i1
  store i1 %59, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %70

60:                                               ; preds = %64, %44, %40
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %12, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %143

64:                                               ; preds = %55
  %65 = load i32, ptr %11, align 4, !tbaa !11
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %66) #4
  %68 = invoke noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %65, i32 noundef %67)
          to label %69 unwind label %60

69:                                               ; preds = %64
  store i32 %68, ptr %11, align 4, !tbaa !11
  br label %35, !llvm.loop !17

70:                                               ; preds = %57, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %71 = load i32, ptr %8, align 4
  switch i32 %71, label %74 [
    i32 5, label %72
  ]

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72, %25
  store i32 0, ptr %8, align 4
  br label %74

74:                                               ; preds = %73, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %75 = load i32, ptr %8, align 4
  switch i32 %75, label %137 [
    i32 0, label %76
  ]

76:                                               ; preds = %74
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = load ptr, ptr %77, align 8, !tbaa !13
  %80 = getelementptr inbounds ptr, ptr %79, i64 28
  %81 = load ptr, ptr %80, align 8
  %82 = invoke noundef zeroext i1 %81(ptr noundef nonnull align 8 dereferenceable(197) %77, ptr noundef nonnull align 4 dereferenceable(12) %78)
          to label %83 unwind label %90

83:                                               ; preds = %76
  %84 = zext i1 %82 to i8
  store i8 %84, ptr %6, align 1, !tbaa !9
  %85 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %86 = trunc i8 %85 to i1
  br i1 %86, label %89, label %87

87:                                               ; preds = %83
  %88 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null) #4
  br i1 %88, label %89, label %94

89:                                               ; preds = %87, %83
  store i32 2, ptr %8, align 4
  br label %137

90:                                               ; preds = %76
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %12, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %13, align 4
  br label %143

94:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %95 = call noundef ptr @_ZN4juce9Component28getCurrentlyFocusedComponentEv() #4
  store ptr %95, ptr %14, align 8, !tbaa !5
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %133

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = call noundef zeroext i1 @_ZNK4juce8KeyPresseqEi(ptr noundef nonnull align 4 dereferenceable(12) %99, i32 noundef 9) #4
  %101 = zext i1 %100 to i8
  store i8 %101, ptr %15, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #4
  call void @_ZN4juce12ModifierKeysC1Ei(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 noundef 1) #4
  call void @_ZN4juce8KeyPressC1EiNS_12ModifierKeysEw(ptr noundef nonnull align 4 dereferenceable(12) %17, i32 noundef 9, ptr noundef %18, i32 noundef signext 0) #4
  %103 = call noundef zeroext i1 @_ZNK4juce8KeyPresseqERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %102, ptr noundef nonnull align 4 dereferenceable(12) %17) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #4
  %104 = zext i1 %103 to i8
  store i8 %104, ptr %16, align 1, !tbaa !9
  %105 = load i8, ptr %15, align 1, !tbaa !9, !range !15, !noundef !16
  %106 = trunc i8 %105 to i1
  br i1 %106, label %110, label %107

107:                                              ; preds = %98
  %108 = load i8, ptr %16, align 1, !tbaa !9, !range !15, !noundef !16
  %109 = trunc i8 %108 to i1
  br i1 %109, label %110, label %129

110:                                              ; preds = %107, %98
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = load i8, ptr %15, align 1, !tbaa !9, !range !15, !noundef !16
  %113 = trunc i8 %112 to i1
  invoke void @_ZN4juce9Component26moveKeyboardFocusToSiblingEb(ptr noundef nonnull align 8 dereferenceable(197) %111, i1 noundef zeroext %113)
          to label %114 unwind label %124

114:                                              ; preds = %110
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = call noundef ptr @_ZN4juce9Component28getCurrentlyFocusedComponentEv() #4
  %117 = icmp ne ptr %115, %116
  %118 = zext i1 %117 to i8
  store i8 %118, ptr %6, align 1, !tbaa !9
  %119 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %120 = trunc i8 %119 to i1
  br i1 %120, label %123, label %121

121:                                              ; preds = %114
  %122 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null) #4
  br i1 %122, label %123, label %128

123:                                              ; preds = %121, %114
  store i32 2, ptr %8, align 4
  br label %130

124:                                              ; preds = %110
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %12, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %143

128:                                              ; preds = %121
  br label %129

129:                                              ; preds = %128, %107
  store i32 0, ptr %8, align 4
  br label %130

130:                                              ; preds = %129, %123
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  %131 = load i32, ptr %8, align 4
  switch i32 %131, label %134 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %133

133:                                              ; preds = %132, %94
  store i32 0, ptr %8, align 4
  br label %134

134:                                              ; preds = %133, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %135 = load i32, ptr %8, align 4
  switch i32 %135, label %137 [
    i32 0, label %136
  ]

136:                                              ; preds = %134
  store i32 0, ptr %8, align 4
  br label %137

137:                                              ; preds = %136, %134, %89, %74
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %138 = load i32, ptr %8, align 4
  switch i32 %138, label %144 [
    i32 0, label %139
  ]

139:                                              ; preds = %137
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = call noundef ptr @_ZNK4juce9Component18getParentComponentEv(ptr noundef nonnull align 8 dereferenceable(197) %141) #4
  store ptr %142, ptr %7, align 8, !tbaa !5
  br label %21, !llvm.loop !19

143:                                              ; preds = %124, %90, %60
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  br label %151

144:                                              ; preds = %137, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %145 = load i32, ptr %8, align 4
  switch i32 %145, label %149 [
    i32 2, label %146
  ]

146:                                              ; preds = %144
  %147 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %148 = trunc i8 %147 to i1
  store i1 %148, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %149

149:                                              ; preds = %146, %144
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  %150 = load i1, ptr %3, align 1
  ret i1 %150

151:                                              ; preds = %143
  %152 = load ptr, ptr %12, align 8
  %153 = load i32, ptr %13, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

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

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

declare void @_ZN4juce8KeyPressC1EiNS_12ModifierKeysEw(ptr, i32, ptr, i32)

declare void @_ZN4juce12ModifierKeysC1Ei(ptr, i32)

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 = { 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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


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

%"class.juce::WeakReference" = type { %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%"class.juce::KeyPress" = type { i32, %"class.juce::ModifierKeys", i32 }
%"class.juce::ModifierKeys" = type { i32 }

declare i32 @__gxx_personality_v0(...)

; 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
declare dso_local void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component26moveKeyboardFocusToSiblingEb(ptr noundef nonnull align 8 dereferenceable(197), i1 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce9Component28getCurrentlyFocusedComponentEv() local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce9Component18getParentComponentEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4juce13ComponentPeer20getTargetForKeyPressEv(ptr noundef nonnull align 8 dereferenceable(77)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce13ComponentPeer14handleKeyPressERKNS_8KeyPressE(ptr noundef nonnull align 8 dereferenceable(77) %0, ptr noundef nonnull align 4 dereferenceable(12) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::WeakReference", align 8
  %4 = alloca %"class.juce::KeyPress", align 4
  %5 = alloca %"class.juce::ModifierKeys", align 4
  %6 = tail call noundef ptr @_ZN4juce13ComponentPeer20getTargetForKeyPressEv(ptr noundef nonnull align 8 dereferenceable(77) %0)
  %.not111 = icmp eq ptr %6, null
  br i1 %.not111, label %.thread98, label %.lr.ph114

.lr.ph114:                                        ; preds = %2, %.thread91
  %.048112 = phi ptr [ %49, %.thread91 ], [ %6, %2 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %.048112)
  %7 = getelementptr inbounds i8, ptr %.048112, i64 128
  %8 = call noundef ptr @_ZNK4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEcvPS5_Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %.not61 = icmp eq ptr %8, null
  br i1 %.not61, label %select.unfold, label %9

9:                                                ; preds = %.lr.ph114
  %10 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %8) #4
  %11 = icmp slt i32 %10, 1
  br i1 %11, label %select.unfold, label %.lr.ph

.lr.ph:                                           ; preds = %9, %23
  %.in = phi i32 [ %25, %23 ], [ %10, %9 ]
  %12 = add nsw i32 %.in, -1
  %13 = call noundef ptr @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %8, i32 noundef %12)
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8
  %17 = invoke noundef zeroext i1 %16(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull %.048112)
          to label %18 unwind label %21

18:                                               ; preds = %.lr.ph
  br i1 %17, label %.thread84, label %19

19:                                               ; preds = %18
  %20 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null) #4
  br i1 %20, label %.thread84, label %23

21:                                               ; preds = %.lr.ph
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %51

23:                                               ; preds = %19
  %24 = call noundef i32 @_ZNK4juce5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %8) #4
  %25 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %12, i32 noundef %24)
  %26 = icmp slt i32 %25, 1
  br i1 %26, label %select.unfold, label %.lr.ph, !llvm.loop !8

select.unfold:                                    ; preds = %23, %9, %.lr.ph114
  %27 = load ptr, ptr %.048112, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 224
  %29 = load ptr, ptr %28, align 8
  %30 = invoke noundef zeroext i1 %29(ptr noundef nonnull align 8 dereferenceable(197) %.048112, ptr noundef nonnull align 4 dereferenceable(12) %1)
          to label %31 unwind label %34

31:                                               ; preds = %select.unfold
  br i1 %30, label %.thread84, label %32

32:                                               ; preds = %31
  %33 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null) #4
  br i1 %33, label %.thread84, label %36

34:                                               ; preds = %select.unfold
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %51

36:                                               ; preds = %32
  %37 = call noundef ptr @_ZN4juce9Component28getCurrentlyFocusedComponentEv() #4
  %.not62 = icmp eq ptr %37, null
  br i1 %.not62, label %.thread91, label %38

38:                                               ; preds = %36
  %39 = call noundef zeroext i1 @_ZNK4juce8KeyPresseqEi(ptr noundef nonnull align 4 dereferenceable(12) %1, i32 noundef 9) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #4
  call void @_ZN4juce12ModifierKeysC1Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 1) #4
  call void @_ZN4juce8KeyPressC1EiNS_12ModifierKeysEw(ptr noundef nonnull align 4 dereferenceable(12) %4, i32 noundef 9, ptr noundef nonnull %5, i32 noundef signext 0) #4
  %40 = call noundef zeroext i1 @_ZNK4juce8KeyPresseqERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %4) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #4
  %brmerge = or i1 %39, %40
  br i1 %brmerge, label %41, label %.thread91

41:                                               ; preds = %38
  invoke void @_ZN4juce9Component26moveKeyboardFocusToSiblingEb(ptr noundef nonnull align 8 dereferenceable(197) %37, i1 noundef zeroext %39)
          to label %42 unwind label %44

42:                                               ; preds = %41
  %43 = call noundef ptr @_ZN4juce9Component28getCurrentlyFocusedComponentEv() #4
  %.not108 = icmp eq ptr %37, %43
  br i1 %.not108, label %46, label %.thread84

44:                                               ; preds = %41
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %51

46:                                               ; preds = %42
  %47 = call noundef zeroext i1 @_ZNK4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEEeqEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null) #4
  br i1 %47, label %50, label %.thread91

.thread84:                                        ; preds = %32, %31, %42, %19, %18
  %48 = phi i1 [ %17, %18 ], [ %17, %19 ], [ true, %42 ], [ false, %32 ], [ true, %31 ]
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.thread98

.thread91:                                        ; preds = %36, %38, %46
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %49 = call noundef ptr @_ZNK4juce9Component18getParentComponentEv(ptr noundef nonnull align 8 dereferenceable(197) %.048112) #4
  %.not = icmp eq ptr %49, null
  br i1 %.not, label %.thread98, label %.lr.ph114, !llvm.loop !10

50:                                               ; preds = %46
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.thread98

51:                                               ; preds = %44, %34, %21
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %35, %34 ], [ %22, %21 ]
  call void @_ZN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

.thread98:                                        ; preds = %.thread91, %2, %.thread84, %50
  %52 = phi i1 [ false, %50 ], [ %48, %.thread84 ], [ false, %2 ], [ false, %.thread91 ]
  ret i1 %52
}

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

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

declare void @_ZN4juce8KeyPressC1EiNS_12ModifierKeysEw(ptr, i32, ptr, i32) local_unnamed_addr

declare void @_ZN4juce12ModifierKeysC1Ei(ptr, i32) local_unnamed_addr

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 = { 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 }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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