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

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

declare i32 @__gxx_personality_v0(...)

declare noundef ptr @_ZN4juce14MessageManager11getInstanceEv() #0

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce14MessageManager22isThisTheMessageThreadEv(ptr noundef nonnull align 8 dereferenceable(72)) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce17AudioPluginFormat25createPluginInstanceAsyncERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(89) %1, double noundef %2, i32 noundef %3, ptr noundef %4) #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store double %2, ptr %8, align 8, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  %13 = load ptr, ptr %6, align 8
  %14 = call noundef ptr @_ZN4juce14MessageManager11getInstanceEv()
  %15 = call noundef zeroext i1 @_ZNK4juce14MessageManager22isThisTheMessageThreadEv(ptr noundef nonnull align 8 dereferenceable(72) %14) #5
  br i1 %15, label %16, label %21

16:                                               ; preds = %5
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load double, ptr %8, align 8, !tbaa !9
  %19 = load i32, ptr %9, align 4, !tbaa !11
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN4juce17AudioPluginFormat35createPluginInstanceOnMessageThreadERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(89) %17, double noundef %18, i32 noundef %19, ptr noundef %20)
  br label %29

21:                                               ; preds = %5
  %22 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 144) #6
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load double, ptr %8, align 8, !tbaa !9
  %25 = load i32, ptr %9, align 4, !tbaa !11
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZZN4juce17AudioPluginFormat25createPluginInstanceAsyncERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackEEN21InvokeOnMessageThreadC2EPS0_S3_diS5_(ptr noundef nonnull align 8 dereferenceable(144) %22, ptr noundef %13, ptr noundef nonnull align 8 dereferenceable(89) %23, double noundef %24, i32 noundef %25, ptr noundef %26)
          to label %27 unwind label %30

27:                                               ; preds = %21
  %28 = call noundef zeroext i1 @_ZN4juce14MessageManager11MessageBase4postEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
  br label %29

29:                                               ; preds = %27, %16
  ret void

30:                                               ; preds = %21
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %11, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %22, i64 noundef 144) #7
  br label %34

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce17AudioPluginFormat35createPluginInstanceOnMessageThreadERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(89), double noundef, i32 noundef, ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZN4juce17AudioPluginFormat25createPluginInstanceAsyncERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackEEN21InvokeOnMessageThreadC2EPS0_S3_diS5_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef, ptr noundef nonnull align 8 dereferenceable(89), double noundef, i32 noundef, ptr noundef) unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZN4juce14MessageManager11MessageBase4postEv(ptr noundef nonnull align 8 dereferenceable(16)) #0

attributes #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 = { 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 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, 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(...)

declare noundef ptr @_ZN4juce14MessageManager11getInstanceEv() local_unnamed_addr #0

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce14MessageManager22isThisTheMessageThreadEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce17AudioPluginFormat25createPluginInstanceAsyncERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(89) %1, double noundef %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = tail call noundef ptr @_ZN4juce14MessageManager11getInstanceEv()
  %7 = tail call noundef zeroext i1 @_ZNK4juce14MessageManager22isThisTheMessageThreadEv(ptr noundef nonnull align 8 dereferenceable(72) %6) #5
  br i1 %7, label %8, label %9

8:                                                ; preds = %5
  tail call void @_ZN4juce17AudioPluginFormat35createPluginInstanceOnMessageThreadERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(89) %1, double noundef %2, i32 noundef %3, ptr noundef %4)
  br label %13

9:                                                ; preds = %5
  %10 = tail call noalias noundef nonnull dereferenceable(144) ptr @_Znwm(i64 noundef 144) #6
  invoke void @_ZZN4juce17AudioPluginFormat25createPluginInstanceAsyncERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackEEN21InvokeOnMessageThreadC2EPS0_S3_diS5_(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(89) %1, double noundef %2, i32 noundef %3, ptr noundef %4)
          to label %11 unwind label %14

11:                                               ; preds = %9
  %12 = tail call noundef zeroext i1 @_ZN4juce14MessageManager11MessageBase4postEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  br label %13

13:                                               ; preds = %11, %8
  ret void

14:                                               ; preds = %9
  %15 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %10, i64 noundef 144) #7
  resume { ptr, i32 } %15
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce17AudioPluginFormat35createPluginInstanceOnMessageThreadERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(89), double noundef, i32 noundef, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZN4juce17AudioPluginFormat25createPluginInstanceAsyncERKNS_17PluginDescriptionEdiPNS0_31InstantiationCompletionCallbackEEN21InvokeOnMessageThreadC2EPS0_S3_diS5_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef, ptr noundef nonnull align 8 dereferenceable(89), double noundef, i32 noundef, ptr noundef) unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZN4juce14MessageManager11MessageBase4postEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

attributes #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 = { 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 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { 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)"}


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