; 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::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::TreeView" = type <{ %"class.juce::Component.base", [3 x i8], %"class.juce::SettableTooltipClient", %"class.juce::FileDragAndDropTarget", %"class.juce::DragAndDropTarget", %"class.juce::ScopedPointer.283", %"class.juce::CriticalSection", ptr, %"class.juce::ScopedPointer.284", %"class.juce::ScopedPointer.285", i32, i8, i8, i8, i8, i8, [7 x i8] }>
%"class.juce::Component.base" = 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 }>
%"class.juce::MouseListener" = type { ptr }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"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" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%union.anon = type { i32 }
%"class.juce::SettableTooltipClient" = type { %"class.juce::TooltipClient", %"class.juce::String" }
%"class.juce::TooltipClient" = type { ptr }
%"class.juce::FileDragAndDropTarget" = type { ptr }
%"class.juce::DragAndDropTarget" = type { ptr }
%"class.juce::ScopedPointer.283" = type { ptr }
%"class.juce::CriticalSection" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.juce::ScopedPointer.284" = type { ptr }
%"class.juce::ScopedPointer.285" = type { ptr }

@.str.172 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.231 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce8TreeView18clearSelectedItemsEv(ptr noundef nonnull align 8 dereferenceable(313)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce8Viewport15setViewPositionEii(ptr noundef nonnull align 8 dereferenceable(1224), i32 noundef, i32 noundef) #2 align 2

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

; Function Attrs: nounwind
declare noundef ptr @_ZNK4juce10XmlElement14getChildByNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #1

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #1

declare noundef ptr @_ZNK4juce10XmlElement25getNextElementWithTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

declare noundef i32 @_ZNK4juce10XmlElement15getIntAttributeENS_9StringRefEi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce8TreeView20restoreOpennessStateERKNS_10XmlElementEb(ptr noundef nonnull align 8 dereferenceable(313) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i1 noundef zeroext %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.juce::StringRef", align 8
  %8 = alloca %"class.juce::StringRef", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.juce::StringRef", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.juce::StringRef", align 8
  %13 = alloca %"class.juce::StringRef", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = zext i1 %2 to i8
  store i8 %14, ptr %6, align 1, !tbaa !9
  %15 = load ptr, ptr %4, align 8
  %16 = getelementptr inbounds %"class.juce::TreeView", ptr %15, i32 0, i32 7
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %59

19:                                               ; preds = %3
  %20 = getelementptr inbounds %"class.juce::TreeView", ptr %15, i32 0, i32 7
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce12TreeViewItem20restoreOpennessStateERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(73) %21, ptr noundef nonnull align 8 dereferenceable(32) %22)
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef @.str.208) #6
  %24 = call noundef zeroext i1 @_ZNK4juce10XmlElement12hasAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef %7) #6
  br i1 %24, label %25, label %33

25:                                               ; preds = %19
  %26 = getelementptr inbounds %"class.juce::TreeView", ptr %15, i32 0, i32 5
  %27 = call noundef ptr @_ZNK4juce13ScopedPointerINS_8TreeView12TreeViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  %28 = getelementptr inbounds %"class.juce::TreeView", ptr %15, i32 0, i32 5
  %29 = call noundef ptr @_ZNK4juce13ScopedPointerINS_8TreeView12TreeViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  %30 = call noundef i32 @_ZNK4juce8Viewport16getViewPositionXEv(ptr noundef nonnull align 8 dereferenceable(1224) %29) #6
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.208) #6
  %32 = call noundef i32 @_ZNK4juce10XmlElement15getIntAttributeENS_9StringRefEi(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef %8, i32 noundef 0)
  call void @_ZN4juce8Viewport15setViewPositionEii(ptr noundef nonnull align 8 dereferenceable(1224) %27, i32 noundef %30, i32 noundef %32)
  br label %33

33:                                               ; preds = %25, %19
  %34 = load i8, ptr %6, align 1, !tbaa !9, !range !47, !noundef !48
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %58

36:                                               ; preds = %33
  call void @_ZN4juce8TreeView18clearSelectedItemsEv(ptr noundef nonnull align 8 dereferenceable(313) %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef @.str.231) #6
  %38 = call noundef ptr @_ZNK4juce10XmlElement14getChildByNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef %10) #6
  store ptr %38, ptr %9, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %54, %36
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %57

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %44 = getelementptr inbounds %"class.juce::TreeView", ptr %15, i32 0, i32 7
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.172) #6
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef %12) #6
  %48 = call noundef ptr @_ZN4juce12TreeViewItem28findItemFromIdentifierStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(73) %45, ptr noundef nonnull align 8 dereferenceable(8) %47)
  store ptr %48, ptr %11, align 8, !tbaa !5
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %53

51:                                               ; preds = %43
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN4juce12TreeViewItem11setSelectedEbbNS_16NotificationTypeE(ptr noundef nonnull align 8 dereferenceable(73) %52, i1 noundef zeroext true, i1 noundef zeroext false, i32 noundef 1)
  br label %53

53:                                               ; preds = %51, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str.231) #6
  %56 = call noundef ptr @_ZNK4juce10XmlElement25getNextElementWithTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef %13)
  store ptr %56, ptr %9, align 8, !tbaa !5
  br label %39, !llvm.loop !49

57:                                               ; preds = %42
  br label %58

58:                                               ; preds = %57, %33
  br label %59

59:                                               ; preds = %58, %3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce12TreeViewItem20restoreOpennessStateERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(73), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce10XmlElement12hasAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { "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 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 280}
!12 = !{!"_ZTSN4juce8TreeViewE", !13, i64 0, !39, i64 200, !41, i64 216, !42, i64 224, !43, i64 232, !44, i64 240, !6, i64 280, !45, i64 288, !46, i64 296, !19, i64 304, !10, i64 308, !10, i64 309, !10, i64 310, !10, i64 311, !10, i64 312}
!13 = !{!"_ZTSN4juce9ComponentE", !14, i64 0, !15, i64 8, !15, i64 16, !6, i64 24, !17, i64 32, !20, i64 48, !21, i64 56, !22, i64 64, !6, i64 88, !25, i64 96, !6, i64 104, !26, i64 112, !27, i64 120, !28, i64 128, !29, i64 136, !33, i64 160, !37, i64 184, !7, i64 192, !7, i64 196}
!14 = !{!"_ZTSN4juce13MouseListenerE"}
!15 = !{!"_ZTSN4juce6StringE", !16, i64 0}
!16 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!17 = !{!"_ZTSN4juce9RectangleIiEE", !18, i64 0, !19, i64 8, !19, i64 12}
!18 = !{!"_ZTSN4juce5PointIiEE", !19, i64 0, !19, i64 4}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !6, i64 0}
!21 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !6, i64 0}
!22 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !23, i64 0, !19, i64 16}
!23 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !24, i64 0, !19, i64 8}
!24 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !6, i64 0}
!25 = !{!"_ZTSN4juce11MouseCursorE", !6, i64 0}
!26 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !6, i64 0}
!27 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !6, i64 0}
!28 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !6, i64 0}
!29 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !30, i64 0}
!30 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !31, i64 0, !19, i64 16}
!31 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !32, i64 0, !19, i64 8}
!32 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !6, i64 0}
!33 = !{!"_ZTSN4juce13NamedValueSetE", !34, i64 0}
!34 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !35, i64 0, !19, i64 16}
!35 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !36, i64 0, !19, i64 8}
!36 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !6, i64 0}
!37 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !38, i64 0}
!38 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!39 = !{!"_ZTSN4juce21SettableTooltipClientE", !40, i64 0, !15, i64 8}
!40 = !{!"_ZTSN4juce13TooltipClientE"}
!41 = !{!"_ZTSN4juce21FileDragAndDropTargetE"}
!42 = !{!"_ZTSN4juce17DragAndDropTargetE"}
!43 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView12TreeViewportEEE", !6, i64 0}
!44 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!45 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20InsertPointHighlightEEE", !6, i64 0}
!46 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20TargetGroupHighlightEEE", !6, i64 0}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}


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

@.str.172 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.231 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce8Viewport15setViewPositionEii(ptr noundef nonnull align 8 dereferenceable(1224), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: nounwind
declare noundef ptr @_ZNK4juce10XmlElement14getChildByNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0

declare noundef ptr @_ZNK4juce10XmlElement25getNextElementWithTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

declare noundef i32 @_ZNK4juce10XmlElement15getIntAttributeENS_9StringRefEi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce8TreeView20restoreOpennessStateERKNS_10XmlElementEb(ptr noundef nonnull align 8 dereferenceable(313) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i1 noundef zeroext %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %"class.juce::StringRef", align 8
  %5 = alloca %"class.juce::StringRef", align 8
  %6 = alloca %"class.juce::StringRef", align 8
  %7 = alloca %"class.juce::StringRef", align 8
  %8 = alloca %"class.juce::StringRef", align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 280
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %.loopexit, label %11

11:                                               ; preds = %3
  tail call void @_ZN4juce12TreeViewItem20restoreOpennessStateERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(73) %10, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.208) #5
  %12 = call noundef zeroext i1 @_ZNK4juce10XmlElement12hasAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %4) #5
  br i1 %12, label %13, label %19

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 232
  %15 = call noundef ptr @_ZNK4juce13ScopedPointerINS_8TreeView12TreeViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %16 = call noundef ptr @_ZNK4juce13ScopedPointerINS_8TreeView12TreeViewportEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %17 = call noundef i32 @_ZNK4juce8Viewport16getViewPositionXEv(ptr noundef nonnull align 8 dereferenceable(1224) %16) #5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.208) #5
  %18 = call noundef i32 @_ZNK4juce10XmlElement15getIntAttributeENS_9StringRefEi(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %5, i32 noundef 0)
  call void @_ZN4juce8Viewport15setViewPositionEii(ptr noundef nonnull align 8 dereferenceable(1224) %15, i32 noundef %17, i32 noundef %18)
  br label %19

19:                                               ; preds = %13, %11
  br i1 %2, label %20, label %.loopexit

20:                                               ; preds = %19
  call void @_ZN4juce8TreeView18clearSelectedItemsEv(ptr noundef nonnull align 8 dereferenceable(313) %0)
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull @.str.231) #5
  %21 = call noundef ptr @_ZNK4juce10XmlElement14getChildByNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %6) #5
  %.not1214 = icmp eq ptr %21, null
  br i1 %.not1214, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %20, %26
  %.015 = phi ptr [ %27, %26 ], [ %21, %20 ]
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @.str.172) #5
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce10XmlElement18getStringAttributeENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %.015, ptr noundef nonnull %7) #5
  %24 = call noundef ptr @_ZN4juce12TreeViewItem28findItemFromIdentifierStringERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(73) %22, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %.not13 = icmp eq ptr %24, null
  br i1 %.not13, label %26, label %25

25:                                               ; preds = %.lr.ph
  call void @_ZN4juce12TreeViewItem11setSelectedEbbNS_16NotificationTypeE(ptr noundef nonnull align 8 dereferenceable(73) %24, i1 noundef zeroext true, i1 noundef zeroext false, i32 noundef 1)
  br label %26

26:                                               ; preds = %25, %.lr.ph
  call void @_ZN4juce9StringRefC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.231) #5
  %27 = call noundef ptr @_ZNK4juce10XmlElement25getNextElementWithTagNameENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(32) %.015, ptr noundef nonnull %8)
  %.not12 = icmp eq ptr %27, null
  br i1 %.not12, label %.loopexit, label %.lr.ph, !llvm.loop !45

.loopexit:                                        ; preds = %26, %20, %19, %3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce12TreeViewItem20restoreOpennessStateERKNS_10XmlElementE(ptr noundef nonnull align 8 dereferenceable(73), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 280}
!6 = !{!"_ZTSN4juce8TreeViewE", !7, i64 0, !36, i64 200, !38, i64 216, !39, i64 224, !40, i64 232, !41, i64 240, !11, i64 280, !42, i64 288, !43, i64 296, !16, i64 304, !44, i64 308, !44, i64 309, !44, i64 310, !44, i64 311, !44, i64 312}
!7 = !{!"_ZTSN4juce9ComponentE", !8, i64 0, !9, i64 8, !9, i64 16, !11, i64 24, !14, i64 32, !17, i64 48, !18, i64 56, !19, i64 64, !11, i64 88, !22, i64 96, !11, i64 104, !23, i64 112, !24, i64 120, !25, i64 128, !26, i64 136, !30, i64 160, !34, i64 184, !12, i64 192, !12, i64 196}
!8 = !{!"_ZTSN4juce13MouseListenerE"}
!9 = !{!"_ZTSN4juce6StringE", !10, i64 0}
!10 = !{!"_ZTSN4juce16CharPointer_UTF8E", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN4juce9RectangleIiEE", !15, i64 0, !16, i64 8, !16, i64 12}
!15 = !{!"_ZTSN4juce5PointIiEE", !16, i64 0, !16, i64 4}
!16 = !{!"int", !12, i64 0}
!17 = !{!"_ZTSN4juce13ScopedPointerINS_9Component10PositionerEEE", !11, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_15AffineTransformEEE", !11, i64 0}
!19 = !{!"_ZTSN4juce5ArrayIPNS_9ComponentENS_20DummyCriticalSectionELi0EEE", !20, i64 0, !16, i64 16}
!20 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_9ComponentENS_20DummyCriticalSectionEEE", !21, i64 0, !16, i64 8}
!21 = !{!"_ZTSN4juce9HeapBlockIPNS_9ComponentELb0EEE", !11, i64 0}
!22 = !{!"_ZTSN4juce11MouseCursorE", !11, i64 0}
!23 = !{!"_ZTSN4juce13ScopedPointerINS_20CachedComponentImageEEE", !11, i64 0}
!24 = !{!"_ZTSN4juce13ScopedPointerINS_9Component17MouseListenerListEEE", !11, i64 0}
!25 = !{!"_ZTSN4juce13ScopedPointerINS_5ArrayIPNS_11KeyListenerENS_20DummyCriticalSectionELi0EEEEE", !11, i64 0}
!26 = !{!"_ZTSN4juce12ListenerListINS_17ComponentListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !27, i64 0}
!27 = !{!"_ZTSN4juce5ArrayIPNS_17ComponentListenerENS_20DummyCriticalSectionELi0EEE", !28, i64 0, !16, i64 16}
!28 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_17ComponentListenerENS_20DummyCriticalSectionEEE", !29, i64 0, !16, i64 8}
!29 = !{!"_ZTSN4juce9HeapBlockIPNS_17ComponentListenerELb0EEE", !11, i64 0}
!30 = !{!"_ZTSN4juce13NamedValueSetE", !31, i64 0}
!31 = !{!"_ZTSN4juce5ArrayINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionELi0EEE", !32, i64 0, !16, i64 16}
!32 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_13NamedValueSet10NamedValueENS_20DummyCriticalSectionEEE", !33, i64 0, !16, i64 8}
!33 = !{!"_ZTSN4juce9HeapBlockINS_13NamedValueSet10NamedValueELb0EEE", !11, i64 0}
!34 = !{!"_ZTSN4juce13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE6MasterE", !35, i64 0}
!35 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_9ComponentENS_22ReferenceCountedObjectEE13SharedPointerEEE", !11, i64 0}
!36 = !{!"_ZTSN4juce21SettableTooltipClientE", !37, i64 0, !9, i64 8}
!37 = !{!"_ZTSN4juce13TooltipClientE"}
!38 = !{!"_ZTSN4juce21FileDragAndDropTargetE"}
!39 = !{!"_ZTSN4juce17DragAndDropTargetE"}
!40 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView12TreeViewportEEE", !11, i64 0}
!41 = !{!"_ZTSN4juce15CriticalSectionE", !12, i64 0}
!42 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20InsertPointHighlightEEE", !11, i64 0}
!43 = !{!"_ZTSN4juce13ScopedPointerINS_8TreeView20TargetGroupHighlightEEE", !11, i64 0}
!44 = !{!"bool", !12, i64 0}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}


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