; 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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::MouseEvent" = type <{ %"class.juce::Point.35", i32, i32, %"class.juce::ModifierKeys", float, ptr, ptr, %"class.juce::Time", %"class.juce::Time", %"class.juce::MouseInputSource", %"class.juce::Point.35", i8, i8, [6 x i8] }>
%"class.juce::ModifierKeys" = type { i32 }
%"class.juce::Time" = type { i64 }
%"class.juce::MouseInputSource" = type { ptr }
%"class.juce::Point.35" = type { float, float }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4juce10TextEditor7getTextEv(ptr dead_on_unwind noalias writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(600)) #3 align 2

; Function Attrs: nounwind
declare noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce10TextEditor11moveCaretToEib(ptr noundef nonnull align 8 dereferenceable(600), i32 noundef, i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce10TextEditor14getTextIndexAtEii(ptr noundef nonnull align 8 dereferenceable(600), i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce10TextEditor16mouseDoubleClickERKNS_10MouseEventE(ptr noundef nonnull align 8 dereferenceable(600) %0, ptr noundef nonnull align 8 dereferenceable(74) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.juce::String", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.juce::MouseEvent", ptr %17, i32 0, i32 1
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"class.juce::MouseEvent", ptr %20, i32 0, i32 2
  %22 = load i32, ptr %21, align 4, !tbaa !18
  %23 = call noundef i32 @_ZN4juce10TextEditor14getTextIndexAtEii(ptr noundef nonnull align 8 dereferenceable(600) %16, i32 noundef %19, i32 noundef %22)
  store i32 %23, ptr %5, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !19
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK4juce10MouseEvent17getNumberOfClicksEv(ptr noundef nonnull align 8 dereferenceable(74) %24) #4
  %26 = icmp sgt i32 %25, 3
  br i1 %26, label %27, label %29

27:                                               ; preds = %2
  %28 = call noundef i32 @_ZNK4juce10TextEditor16getTotalNumCharsEv(ptr noundef nonnull align 8 dereferenceable(600) %16)
  store i32 %28, ptr %5, align 4, !tbaa !19
  br label %126

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @_ZNK4juce10TextEditor7getTextEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %7, ptr noundef nonnull align 8 dereferenceable(600) %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %30 = invoke noundef i32 @_ZNK4juce10TextEditor16getTotalNumCharsEv(ptr noundef nonnull align 8 dereferenceable(600) %16)
          to label %31 unwind label %47

31:                                               ; preds = %29
  store i32 %30, ptr %8, align 4, !tbaa !19
  br label %32

32:                                               ; preds = %55, %31
  %33 = load i32, ptr %5, align 4, !tbaa !19
  %34 = load i32, ptr %8, align 4, !tbaa !19
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %36, label %56

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %37 = load i32, ptr %5, align 4, !tbaa !19
  %38 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %37) #4
  store i32 %38, ptr %11, align 4, !tbaa !20
  %39 = load i32, ptr %11, align 4, !tbaa !20
  %40 = call noundef zeroext i1 @_ZN4juce18CharacterFunctions15isLetterOrDigitEw(i32 noundef signext %39) #4
  br i1 %40, label %44, label %41

41:                                               ; preds = %36
  %42 = load i32, ptr %11, align 4, !tbaa !20
  %43 = icmp sgt i32 %42, 128
  br i1 %43, label %44, label %51

44:                                               ; preds = %41, %36
  %45 = load i32, ptr %5, align 4, !tbaa !19
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %5, align 4, !tbaa !19
  br label %52

47:                                               ; preds = %29
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %129

51:                                               ; preds = %41
  store i32 3, ptr %12, align 4
  br label %53

52:                                               ; preds = %44
  store i32 0, ptr %12, align 4
  br label %53

53:                                               ; preds = %52, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %54 = load i32, ptr %12, align 4
  switch i32 %54, label %134 [
    i32 0, label %55
    i32 3, label %56
  ]

55:                                               ; preds = %53
  br label %32, !llvm.loop !22

56:                                               ; preds = %53, %32
  %57 = load i32, ptr %5, align 4, !tbaa !19
  store i32 %57, ptr %6, align 4, !tbaa !19
  br label %58

58:                                               ; preds = %77, %56
  %59 = load i32, ptr %6, align 4, !tbaa !19
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %61, label %78

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %62 = load i32, ptr %6, align 4, !tbaa !19
  %63 = sub nsw i32 %62, 1
  %64 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %63) #4
  store i32 %64, ptr %13, align 4, !tbaa !20
  %65 = load i32, ptr %13, align 4, !tbaa !20
  %66 = call noundef zeroext i1 @_ZN4juce18CharacterFunctions15isLetterOrDigitEw(i32 noundef signext %65) #4
  br i1 %66, label %70, label %67

67:                                               ; preds = %61
  %68 = load i32, ptr %13, align 4, !tbaa !20
  %69 = icmp sgt i32 %68, 128
  br i1 %69, label %70, label %73

70:                                               ; preds = %67, %61
  %71 = load i32, ptr %6, align 4, !tbaa !19
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr %6, align 4, !tbaa !19
  br label %74

73:                                               ; preds = %67
  store i32 5, ptr %12, align 4
  br label %75

74:                                               ; preds = %70
  store i32 0, ptr %12, align 4
  br label %75

75:                                               ; preds = %74, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %76 = load i32, ptr %12, align 4
  switch i32 %76, label %134 [
    i32 0, label %77
    i32 5, label %78
  ]

77:                                               ; preds = %75
  br label %58, !llvm.loop !24

78:                                               ; preds = %75, %58
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = call noundef i32 @_ZNK4juce10MouseEvent17getNumberOfClicksEv(ptr noundef nonnull align 8 dereferenceable(74) %79) #4
  %81 = icmp sgt i32 %80, 2
  br i1 %81, label %82, label %125

82:                                               ; preds = %78
  br label %83

83:                                               ; preds = %102, %82
  %84 = load i32, ptr %5, align 4, !tbaa !19
  %85 = load i32, ptr %8, align 4, !tbaa !19
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %87, label %103

87:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %88 = load i32, ptr %5, align 4, !tbaa !19
  %89 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %88) #4
  store i32 %89, ptr %14, align 4, !tbaa !20
  %90 = load i32, ptr %14, align 4, !tbaa !20
  %91 = icmp ne i32 %90, 13
  br i1 %91, label %92, label %98

92:                                               ; preds = %87
  %93 = load i32, ptr %14, align 4, !tbaa !20
  %94 = icmp ne i32 %93, 10
  br i1 %94, label %95, label %98

95:                                               ; preds = %92
  %96 = load i32, ptr %5, align 4, !tbaa !19
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %5, align 4, !tbaa !19
  br label %99

98:                                               ; preds = %92, %87
  store i32 7, ptr %12, align 4
  br label %100

99:                                               ; preds = %95
  store i32 0, ptr %12, align 4
  br label %100

100:                                              ; preds = %99, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %101 = load i32, ptr %12, align 4
  switch i32 %101, label %134 [
    i32 0, label %102
    i32 7, label %103
  ]

102:                                              ; preds = %100
  br label %83, !llvm.loop !25

103:                                              ; preds = %100, %83
  br label %104

104:                                              ; preds = %123, %103
  %105 = load i32, ptr %6, align 4, !tbaa !19
  %106 = icmp sgt i32 %105, 0
  br i1 %106, label %107, label %124

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %108 = load i32, ptr %6, align 4, !tbaa !19
  %109 = sub nsw i32 %108, 1
  %110 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %109) #4
  store i32 %110, ptr %15, align 4, !tbaa !20
  %111 = load i32, ptr %15, align 4, !tbaa !20
  %112 = icmp ne i32 %111, 13
  br i1 %112, label %113, label %119

113:                                              ; preds = %107
  %114 = load i32, ptr %15, align 4, !tbaa !20
  %115 = icmp ne i32 %114, 10
  br i1 %115, label %116, label %119

116:                                              ; preds = %113
  %117 = load i32, ptr %6, align 4, !tbaa !19
  %118 = add nsw i32 %117, -1
  store i32 %118, ptr %6, align 4, !tbaa !19
  br label %120

119:                                              ; preds = %113, %107
  store i32 9, ptr %12, align 4
  br label %121

120:                                              ; preds = %116
  store i32 0, ptr %12, align 4
  br label %121

121:                                              ; preds = %120, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  %122 = load i32, ptr %12, align 4
  switch i32 %122, label %134 [
    i32 0, label %123
    i32 9, label %124
  ]

123:                                              ; preds = %121
  br label %104, !llvm.loop !26

124:                                              ; preds = %121, %104
  br label %125

125:                                              ; preds = %124, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %126

126:                                              ; preds = %125, %27
  %127 = load i32, ptr %5, align 4, !tbaa !19
  call void @_ZN4juce10TextEditor11moveCaretToEib(ptr noundef nonnull align 8 dereferenceable(600) %16, i32 noundef %127, i1 noundef zeroext false)
  %128 = load i32, ptr %6, align 4, !tbaa !19
  call void @_ZN4juce10TextEditor11moveCaretToEib(ptr noundef nonnull align 8 dereferenceable(600) %16, i32 noundef %128, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void

129:                                              ; preds = %47
  %130 = load ptr, ptr %9, align 8
  %131 = load i32, ptr %10, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133

134:                                              ; preds = %121, %100, %75, %53
  unreachable
}

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN4juce18CharacterFunctions15isLetterOrDigitEw(i32 noundef signext) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !13, i64 8}
!10 = !{!"_ZTSN4juce10MouseEventE", !11, i64 0, !13, i64 8, !13, i64 12, !14, i64 16, !12, i64 20, !6, i64 24, !6, i64 32, !15, i64 40, !15, i64 48, !17, i64 56, !11, i64 64, !7, i64 72, !7, i64 73}
!11 = !{!"_ZTSN4juce5PointIfEE", !12, i64 0, !12, i64 4}
!12 = !{!"float", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN4juce12ModifierKeysE", !13, i64 0}
!15 = !{!"_ZTSN4juce4TimeE", !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = !{!"_ZTSN4juce16MouseInputSourceE", !6, i64 0}
!18 = !{!10, !13, i64 12}
!19 = !{!13, !13, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"wchar_t", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}


; 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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4juce10TextEditor7getTextEv(ptr dead_on_unwind noalias writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(600)) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4juce10TextEditor14getTextIndexAtEii(ptr noundef nonnull align 8 dereferenceable(600), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce10TextEditor16mouseDoubleClickERKNS_10MouseEventE(ptr noundef nonnull align 8 dereferenceable(600) %0, ptr noundef nonnull align 8 dereferenceable(74) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::String", align 8
  %4 = getelementptr inbounds i8, ptr %1, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 12
  %7 = load i32, ptr %6, align 4, !tbaa !17
  %8 = tail call noundef i32 @_ZN4juce10TextEditor14getTextIndexAtEii(ptr noundef nonnull align 8 dereferenceable(600) %0, i32 noundef %5, i32 noundef %7)
  %9 = tail call noundef i32 @_ZNK4juce10MouseEvent17getNumberOfClicksEv(ptr noundef nonnull align 8 dereferenceable(74) %1) #5
  %10 = icmp sgt i32 %9, 3
  br i1 %10, label %11, label %13

11:                                               ; preds = %2
  %12 = tail call noundef i32 @_ZNK4juce10TextEditor16getTotalNumCharsEv(ptr noundef nonnull align 8 dereferenceable(600) %0)
  br label %42

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @_ZNK4juce10TextEditor7getTextEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %3, ptr noundef nonnull align 8 dereferenceable(600) %0)
  %14 = call noundef i32 @_ZNK4juce10TextEditor16getTotalNumCharsEv(ptr noundef nonnull align 8 dereferenceable(600) %0)
  %smax = call i32 @llvm.smax.i32(i32 %8, i32 %14)
  br label %15

15:                                               ; preds = %16, %13
  %.0 = phi i32 [ %8, %13 ], [ %20, %16 ]
  %exitcond.not = icmp eq i32 %.0, %smax
  br i1 %exitcond.not, label %21, label %16

16:                                               ; preds = %15
  %17 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %.0) #5
  %18 = call noundef zeroext i1 @_ZN4juce18CharacterFunctions15isLetterOrDigitEw(i32 noundef signext %17) #5
  %19 = icmp sgt i32 %17, 128
  %or.cond = or i1 %18, %19
  %20 = add i32 %.0, 1
  br i1 %or.cond, label %15, label %21

21:                                               ; preds = %16, %15
  %.0.lcssa = phi i32 [ %.0, %16 ], [ %smax, %15 ]
  br label %22

22:                                               ; preds = %24, %21
  %.040 = phi i32 [ %.0.lcssa, %21 ], [ %25, %24 ]
  %23 = icmp sgt i32 %.040, 0
  br i1 %23, label %24, label %29

24:                                               ; preds = %22
  %25 = add nsw i32 %.040, -1
  %26 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %25) #5
  %27 = call noundef zeroext i1 @_ZN4juce18CharacterFunctions15isLetterOrDigitEw(i32 noundef signext %26) #5
  %28 = icmp sgt i32 %26, 128
  %or.cond3 = or i1 %27, %28
  br i1 %or.cond3, label %22, label %29

29:                                               ; preds = %24, %22
  %30 = call noundef i32 @_ZNK4juce10MouseEvent17getNumberOfClicksEv(ptr noundef nonnull align 8 dereferenceable(74) %1) #5
  %31 = icmp sgt i32 %30, 2
  br i1 %31, label %.preheader, label %.thread57

.preheader:                                       ; preds = %29
  %32 = icmp slt i32 %.0.lcssa, %14
  br i1 %32, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %.preheader, %34
  %.361 = phi i32 [ %35, %34 ], [ %.0.lcssa, %.preheader ]
  %33 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %.361) #5
  switch i32 %33, label %34 [
    i32 13, label %.thread
    i32 10, label %.thread
  ]

34:                                               ; preds = %.lr.ph
  %35 = add nsw i32 %.361, 1
  %36 = icmp slt i32 %35, %14
  br i1 %36, label %.lr.ph, label %.thread

.thread:                                          ; preds = %34, %.lr.ph, %.lr.ph, %.preheader
  %.3.lcssa = phi i32 [ %.0.lcssa, %.preheader ], [ %.361, %.lr.ph ], [ %.361, %.lr.ph ], [ %14, %34 ]
  br label %37

37:                                               ; preds = %39, %.thread
  %.343 = phi i32 [ %.040, %.thread ], [ %40, %39 ]
  %38 = icmp sgt i32 %.343, 0
  br i1 %38, label %39, label %.thread57

39:                                               ; preds = %37
  %40 = add nsw i32 %.343, -1
  %41 = call noundef signext i32 @_ZNK4juce6StringixEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %40) #5
  switch i32 %41, label %37 [
    i32 13, label %.thread57
    i32 10, label %.thread57
  ]

.thread57:                                        ; preds = %39, %39, %37, %29
  %.545 = phi i32 [ %.040, %29 ], [ %.343, %37 ], [ %.343, %39 ], [ %.343, %39 ]
  %.6 = phi i32 [ %.0.lcssa, %29 ], [ %.3.lcssa, %37 ], [ %.3.lcssa, %39 ], [ %.3.lcssa, %39 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %42

42:                                               ; preds = %.thread57, %11
  %.646 = phi i32 [ 0, %11 ], [ %.545, %.thread57 ]
  %.7 = phi i32 [ %12, %11 ], [ %.6, %.thread57 ]
  call void @_ZN4juce10TextEditor11moveCaretToEib(ptr noundef nonnull align 8 dereferenceable(600) %0, i32 noundef %.7, i1 noundef zeroext false)
  call void @_ZN4juce10TextEditor11moveCaretToEib(ptr noundef nonnull align 8 dereferenceable(600) %0, i32 noundef %.646, i1 noundef zeroext true)
  ret void
}

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN4juce18CharacterFunctions15isLetterOrDigitEw(i32 noundef signext) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !11, i64 8}
!6 = !{!"_ZTSN4juce10MouseEventE", !7, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !8, i64 20, !13, i64 24, !13, i64 32, !14, i64 40, !14, i64 48, !16, i64 56, !7, i64 64, !9, i64 72, !9, i64 73}
!7 = !{!"_ZTSN4juce5PointIfEE", !8, i64 0, !8, i64 4}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTSN4juce12ModifierKeysE", !11, i64 0}
!13 = !{!"any pointer", !9, i64 0}
!14 = !{!"_ZTSN4juce4TimeE", !15, i64 0}
!15 = !{!"long long", !9, i64 0}
!16 = !{!"_ZTSN4juce16MouseInputSourceE", !13, i64 0}
!17 = !{!6, !11, i64 12}


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