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

; 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::SystemTrayIconComponent" = type { %"class.juce::Component.base", %"class.juce::ScopedPointer.226" }
%"class.juce::Component.base" = type <{ %"class.juce::MouseListener", %"class.juce::String", %"class.juce::String", ptr, %"class.juce::Rectangle", %"class.juce::ScopedPointer", %"class.juce::ScopedPointer.37", %"class.juce::Array.38", ptr, %"class.juce::MouseCursor", ptr, %"class.juce::ScopedPointer.43", %"class.juce::ScopedPointer.44", %"class.juce::ScopedPointer.45", %"class.juce::ListenerList.46", %"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::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.37" = type { ptr }
%"class.juce::Array.38" = type { %"class.juce::ArrayAllocationBase.39", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.39" = type <{ %"class.juce::HeapBlock.40", i32, [4 x i8] }>
%"class.juce::HeapBlock.40" = type { ptr }
%"class.juce::MouseCursor" = type { ptr }
%"class.juce::ScopedPointer.43" = type { ptr }
%"class.juce::ScopedPointer.44" = type { ptr }
%"class.juce::ScopedPointer.45" = type { ptr }
%"class.juce::ListenerList.46" = type { %"class.juce::Array.47" }
%"class.juce::Array.47" = type { %"class.juce::ArrayAllocationBase.48", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.48" = type <{ %"class.juce::HeapBlock.49", i32, [4 x i8] }>
%"class.juce::HeapBlock.49" = type { ptr }
%"class.juce::NamedValueSet" = type { %"class.juce::Array.52" }
%"class.juce::Array.52" = type { %"class.juce::ArrayAllocationBase.53", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.53" = type <{ %"class.juce::HeapBlock.54", i32, [4 x i8] }>
%"class.juce::HeapBlock.54" = type { ptr }
%"class.juce::WeakReference<juce::Component>::Master" = type { %"class.juce::ReferenceCountedObjectPtr.57" }
%"class.juce::ReferenceCountedObjectPtr.57" = type { ptr }
%union.anon = type { i32 }
%"class.juce::ScopedPointer.226" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #1

declare void @_ZN4juce9Component7repaintEv(ptr noundef nonnull align 8 dereferenceable(197)) #2

declare void @_ZN4juce9Component7toFrontEb(ptr noundef nonnull align 8 dereferenceable(197), i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce23SystemTrayIconComponent12setIconImageERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(208) %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 i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %7 = load ptr, ptr %3, align 8
  %8 = getelementptr inbounds %"class.juce::SystemTrayIconComponent", ptr %7, i32 0, i32 1
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce13ScopedPointerINS_23SystemTrayIconComponent5PimplEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef null)
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = call noundef zeroext i1 @_ZNK4juce5Image7isValidEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %11, label %12, label %34

12:                                               ; preds = %2
  %13 = call noundef zeroext i1 @_ZNK4juce9Component11isOnDesktopEv(ptr noundef nonnull align 8 dereferenceable(197) %7) #7
  br i1 %13, label %18, label %14

14:                                               ; preds = %12
  %15 = load ptr, ptr %7, align 8, !tbaa !9
  %16 = getelementptr inbounds ptr, ptr %15, i64 13
  %17 = load ptr, ptr %16, align 8
  call void %17(ptr noundef nonnull align 8 dereferenceable(197) %7, i32 noundef 0, ptr noundef null)
  br label %18

18:                                               ; preds = %14, %12
  %19 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #8
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = invoke noundef ptr @_ZNK4juce9Component15getWindowHandleEv(ptr noundef nonnull align 8 dereferenceable(197) %7)
          to label %22 unwind label %30

22:                                               ; preds = %18
  %23 = ptrtoint ptr %21 to i64
  invoke void @_ZN4juce23SystemTrayIconComponent5PimplC2ERKNS_5ImageEm(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20, i64 noundef %23)
          to label %24 unwind label %30

24:                                               ; preds = %22
  %25 = getelementptr inbounds %"class.juce::SystemTrayIconComponent", ptr %7, i32 0, i32 1
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce13ScopedPointerINS_23SystemTrayIconComponent5PimplEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef %19)
  %27 = load ptr, ptr %7, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i64 11
  %29 = load ptr, ptr %28, align 8
  call void %29(ptr noundef nonnull align 8 dereferenceable(197) %7, i1 noundef zeroext true)
  call void @_ZN4juce9Component7toFrontEb(ptr noundef nonnull align 8 dereferenceable(197) %7, i1 noundef zeroext false)
  br label %34

30:                                               ; preds = %22, %18
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %5, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %19, i64 noundef 8) #9
  br label %35

34:                                               ; preds = %24, %2
  call void @_ZN4juce9Component7repaintEv(ptr noundef nonnull align 8 dereferenceable(197) %7)
  ret void

35:                                               ; preds = %30
  %36 = load ptr, ptr %5, align 8
  %37 = load i32, ptr %6, align 4
  %38 = insertvalue { ptr, i32 } poison, ptr %36, 0
  %39 = insertvalue { ptr, i32 } %38, i32 %37, 1
  resume { ptr, i32 } %39
}

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

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

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce9Component11isOnDesktopEv(ptr noundef nonnull align 8 dereferenceable(197)) #6

declare noundef ptr @_ZNK4juce9Component15getWindowHandleEv(ptr noundef nonnull align 8 dereferenceable(197)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce23SystemTrayIconComponent5PimplC2ERKNS_5ImageEm(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #3 align 2

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nobuiltin 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 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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}


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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @_ZN4juce9Component7repaintEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #2

declare void @_ZN4juce9Component7toFrontEb(ptr noundef nonnull align 8 dereferenceable(197), i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce23SystemTrayIconComponent12setIconImageERKNS_5ImageE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 200
  %4 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce13ScopedPointerINS_23SystemTrayIconComponent5PimplEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null)
  %5 = tail call noundef zeroext i1 @_ZNK4juce5Image7isValidEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #7
  br i1 %5, label %6, label %24

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

8:                                                ; preds = %6
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 104
  %11 = load ptr, ptr %10, align 8
  tail call void %11(ptr noundef nonnull align 8 dereferenceable(197) %0, i32 noundef 0, ptr noundef null)
  br label %12

12:                                               ; preds = %8, %6
  %13 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #8
  %14 = invoke noundef ptr @_ZNK4juce9Component15getWindowHandleEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
          to label %15 unwind label %22

15:                                               ; preds = %12
  %16 = ptrtoint ptr %14 to i64
  invoke void @_ZN4juce23SystemTrayIconComponent5PimplC2ERKNS_5ImageEm(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %16)
          to label %17 unwind label %22

17:                                               ; preds = %15
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce13ScopedPointerINS_23SystemTrayIconComponent5PimplEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %13)
  %19 = load ptr, ptr %0, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 88
  %21 = load ptr, ptr %20, align 8
  tail call void %21(ptr noundef nonnull align 8 dereferenceable(197) %0, i1 noundef zeroext true)
  tail call void @_ZN4juce9Component7toFrontEb(ptr noundef nonnull align 8 dereferenceable(197) %0, i1 noundef zeroext false)
  br label %24

22:                                               ; preds = %15, %12
  %23 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %13, i64 noundef 8) #9
  resume { ptr, i32 } %23

24:                                               ; preds = %17, %2
  tail call void @_ZN4juce9Component7repaintEv(ptr noundef nonnull align 8 dereferenceable(197) %0)
  ret void
}

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

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

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce9Component11isOnDesktopEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #6

declare noundef ptr @_ZNK4juce9Component15getWindowHandleEv(ptr noundef nonnull align 8 dereferenceable(197)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce23SystemTrayIconComponent5PimplC2ERKNS_5ImageEm(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #3 align 2

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nobuiltin 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 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass