; 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::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::TreeViewItem" = type <{ ptr, ptr, ptr, %"class.juce::OwnedArray.338", i32, i32, i32, i32, i32, i32, i8, [7 x i8] }>
%"class.juce::OwnedArray.338" = type { %"class.juce::ArrayAllocationBase.339", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.339" = type <{ %"class.juce::HeapBlock.340", i32, [4 x i8] }>
%"class.juce::HeapBlock.340" = type { ptr }

@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; 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: nounwind
declare noundef zeroext i1 @_ZNK4juce6String10startsWithENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0

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

declare void @_ZN4juceplEPKcRKNS_6StringE(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN4juceplENS_6StringEPKc(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

declare void @_ZNK4juce6String9substringEi(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4juce12TreeViewItem28findItemFromIdentifierStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(73) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.juce::String", align 8
  %7 = alloca %"class.juce::String", align 8
  %8 = alloca %"class.juce::String", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.juce::StringRef", align 8
  %13 = alloca %"class.juce::String", align 8
  %14 = alloca %"class.juce::String", align 8
  %15 = alloca %"class.juce::String", align 8
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  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 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = getelementptr inbounds ptr, ptr %20, i64 3
  %22 = load ptr, ptr %21, align 8
  call void %22(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %8, ptr noundef nonnull align 8 dereferenceable(73) %19)
  invoke void @_ZN4juceL31escapeSlashesInTreeViewItemNameERKNS_6StringE(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %23 unwind label %28

23:                                               ; preds = %2
  invoke void @_ZN4juceplEPKcRKNS_6StringE(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %6, ptr noundef @.str.8, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %24 unwind label %32

24:                                               ; preds = %23
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  br i1 %26, label %27, label %37

27:                                               ; preds = %24
  store ptr %19, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %97

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %9, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %10, align 4
  br label %36

32:                                               ; preds = %23
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %9, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %10, align 4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %36

36:                                               ; preds = %32, %28
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %100

37:                                               ; preds = %24
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @_ZN4juce6StringC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  invoke void @_ZN4juceplENS_6StringEPKc(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %13, ptr noundef %14, ptr noundef @.str.8)
          to label %39 unwind label %55

39:                                               ; preds = %37
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %40 = call noundef zeroext i1 @_ZNK4juce6String10startsWithENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef %12) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br i1 %40, label %41, label %96

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call noundef i32 @_ZNK4juce6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  invoke void @_ZNK4juce6String9substringEi(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef %43)
          to label %44 unwind label %59

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  %45 = call noundef zeroext i1 @_ZNK4juce12TreeViewItem6isOpenEv(ptr noundef nonnull align 8 dereferenceable(73) %19) #6
  %46 = zext i1 %45 to i8
  store i8 %46, ptr %16, align 1, !tbaa !11
  invoke void @_ZN4juce12TreeViewItem7setOpenEb(ptr noundef nonnull align 8 dereferenceable(73) %19, i1 noundef zeroext true)
          to label %47 unwind label %63

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %48 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %19, i32 0, i32 3
  %49 = call noundef i32 @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %48) #6
  store i32 %49, ptr %17, align 4, !tbaa !13
  br label %50

50:                                               ; preds = %84, %47
  %51 = load i32, ptr %17, align 4, !tbaa !13
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr %17, align 4, !tbaa !13
  %53 = icmp sge i32 %52, 0
  br i1 %53, label %67, label %54

54:                                               ; preds = %50
  store i32 2, ptr %11, align 4
  br label %85

55:                                               ; preds = %37
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %99

59:                                               ; preds = %41
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  br label %95

63:                                               ; preds = %87, %44
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %9, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %10, align 4
  br label %94

67:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %68 = getelementptr inbounds %"class.juce::TreeViewItem", ptr %19, i32 0, i32 3
  %69 = load i32, ptr %17, align 4, !tbaa !13
  %70 = call noundef ptr @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %68, i32 noundef %69) #6
  %71 = invoke noundef ptr @_ZN4juce12TreeViewItem28findItemFromIdentifierStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(73) %70, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %72 unwind label %77

72:                                               ; preds = %67
  store ptr %71, ptr %18, align 8, !tbaa !5
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %81

75:                                               ; preds = %72
  %76 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %76, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %82

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %94

81:                                               ; preds = %72
  store i32 0, ptr %11, align 4
  br label %82

82:                                               ; preds = %81, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  %83 = load i32, ptr %11, align 4
  switch i32 %83, label %85 [
    i32 0, label %84
  ]

84:                                               ; preds = %82
  br label %50, !llvm.loop !15

85:                                               ; preds = %82, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  %86 = load i32, ptr %11, align 4
  switch i32 %86, label %91 [
    i32 2, label %87
  ]

87:                                               ; preds = %85
  %88 = load i8, ptr %16, align 1, !tbaa !11, !range !17, !noundef !18
  %89 = trunc i8 %88 to i1
  invoke void @_ZN4juce12TreeViewItem7setOpenEb(ptr noundef nonnull align 8 dereferenceable(73) %19, i1 noundef zeroext %89)
          to label %90 unwind label %63

90:                                               ; preds = %87
  store i32 0, ptr %11, align 4
  br label %91

91:                                               ; preds = %90, %85
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %92 = load i32, ptr %11, align 4
  switch i32 %92, label %97 [
    i32 0, label %93
  ]

93:                                               ; preds = %91
  br label %96

94:                                               ; preds = %77, %63
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br label %95

95:                                               ; preds = %94, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %99

96:                                               ; preds = %93, %39
  store ptr null, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %97

97:                                               ; preds = %96, %91, %27
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %98 = load ptr, ptr %3, align 8
  ret ptr %98

99:                                               ; preds = %95, %55
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %100

100:                                              ; preds = %99, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %9, align 8
  %103 = load i32, ptr %10, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

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

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

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

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

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

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{i8 0, i8 2}
!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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }

@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; 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: nounwind
declare noundef zeroext i1 @_ZNK4juce6String10startsWithENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0

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

declare void @_ZN4juceplEPKcRKNS_6StringE(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

declare void @_ZN4juceplENS_6StringEPKc(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

declare void @_ZNK4juce6String9substringEi(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4juce12TreeViewItem28findItemFromIdentifierStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(73) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::String", align 8
  %4 = alloca %"class.juce::String", align 8
  %5 = alloca %"class.juce::String", align 8
  %6 = alloca %"class.juce::StringRef", align 8
  %7 = alloca %"class.juce::String", align 8
  %8 = alloca %"class.juce::String", align 8
  %9 = alloca %"class.juce::String", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %10 = load ptr, ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 24
  %12 = load ptr, ptr %11, align 8
  call void %12(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %5, ptr noundef nonnull align 8 dereferenceable(73) %0)
  invoke void @_ZN4juceL31escapeSlashesInTreeViewItemNameERKNS_6StringE(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %13 unwind label %16

13:                                               ; preds = %2
  invoke void @_ZN4juceplEPKcRKNS_6StringE(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %3, ptr noundef nonnull @.str.8, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %14 unwind label %18

14:                                               ; preds = %13
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %15 = call noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  br i1 %15, label %50, label %21

16:                                               ; preds = %2
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %20

18:                                               ; preds = %13
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br label %20

20:                                               ; preds = %18, %16
  %.pn = phi { ptr, i32 } [ %19, %18 ], [ %17, %16 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %52

21:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN4juce6StringC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  invoke void @_ZN4juceplENS_6StringEPKc(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %7, ptr noundef nonnull %8, ptr noundef nonnull @.str.8)
          to label %22 unwind label %34

22:                                               ; preds = %21
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %23 = call noundef zeroext i1 @_ZNK4juce6String10startsWithENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %6) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br i1 %23, label %24, label %50

24:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %25 = call noundef i32 @_ZNK4juce6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  invoke void @_ZNK4juce6String9substringEi(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %25)
          to label %26 unwind label %36

26:                                               ; preds = %24
  %27 = call noundef zeroext i1 @_ZNK4juce12TreeViewItem6isOpenEv(ptr noundef nonnull align 8 dereferenceable(73) %0) #6
  invoke void @_ZN4juce12TreeViewItem7setOpenEb(ptr noundef nonnull align 8 dereferenceable(73) %0, i1 noundef zeroext true)
          to label %28 unwind label %38

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  %30 = call noundef i32 @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %29) #6
  br label %31

31:                                               ; preds = %43, %28
  %.016 = phi i32 [ %30, %28 ], [ %32, %43 ]
  %32 = add nsw i32 %.016, -1
  %33 = icmp slt i32 %.016, 1
  br i1 %33, label %46, label %40

34:                                               ; preds = %21
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %51

36:                                               ; preds = %24
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %49

38:                                               ; preds = %46, %26
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %48

40:                                               ; preds = %31
  %41 = call noundef ptr @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %29, i32 noundef %32) #6
  %42 = invoke noundef ptr @_ZN4juce12TreeViewItem28findItemFromIdentifierStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(73) %41, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %43 unwind label %44

43:                                               ; preds = %40
  %.not = icmp eq ptr %42, null
  br i1 %.not, label %31, label %.critedge, !llvm.loop !8

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

46:                                               ; preds = %31
  invoke void @_ZN4juce12TreeViewItem7setOpenEb(ptr noundef nonnull align 8 dereferenceable(73) %0, i1 noundef zeroext %27)
          to label %47 unwind label %38

47:                                               ; preds = %46
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %50

48:                                               ; preds = %44, %38
  %.pn32 = phi { ptr, i32 } [ %39, %38 ], [ %45, %44 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %49

49:                                               ; preds = %48, %36
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %48 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %51

.critedge:                                        ; preds = %43
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %50

50:                                               ; preds = %22, %47, %.critedge, %14
  %.3 = phi ptr [ %0, %14 ], [ %42, %.critedge ], [ null, %47 ], [ null, %22 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret ptr %.3

51:                                               ; preds = %49, %34
  %.pn32.pn.pn = phi { ptr, i32 } [ %.pn32.pn, %49 ], [ %35, %34 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br label %52

52:                                               ; preds = %51, %20
  %.pn32.pn.pn.pn = phi { ptr, i32 } [ %.pn32.pn.pn, %51 ], [ %.pn, %20 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn32.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce12TreeViewItem6isOpenEv(ptr noundef nonnull align 8 dereferenceable(73)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce10OwnedArrayINS_12TreeViewItemENS_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_12TreeViewItemENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #5 align 2

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

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

!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"}


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