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

; 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::ScopedPointer.43" = type { ptr }
%"class.juce::UndoManager" = type <{ %"class.juce::ChangeBroadcaster", %"class.juce::OwnedArray.38", %"class.juce::OwnedArray.38", %"class.juce::String", i32, i32, i32, i32, i8, i8, [6 x i8] }>
%"class.juce::ChangeBroadcaster" = type { ptr, %"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback", %"class.juce::ListenerList.32" }
%"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback" = type { %"class.juce::AsyncUpdater", ptr }
%"class.juce::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%"class.juce::ListenerList.32" = type { %"class.juce::Array.33" }
%"class.juce::Array.33" = type { %"class.juce::ArrayAllocationBase.34", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.34" = type <{ %"class.juce::HeapBlock.35", i32, [4 x i8] }>
%"class.juce::HeapBlock.35" = type { ptr }
%"class.juce::OwnedArray.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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"struct.juce::UndoManager::ActionSet" = type { %"class.juce::OwnedArray.44", %"class.juce::String", %"class.juce::Time" }
%"class.juce::OwnedArray.44" = type { %"class.juce::ArrayAllocationBase.45", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.45" = type <{ %"class.juce::HeapBlock.46", i32, [4 x i8] }>
%"class.juce::HeapBlock.46" = type { ptr }
%"class.juce::Time" = type { i64 }

declare i32 @__gxx_personality_v0(...)

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

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

declare void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56)) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce11UndoManager7performEPNS_14UndoableActionE(ptr noundef nonnull align 8 dereferenceable(130) %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.juce::ScopedPointer.43", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %127

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4juce13ScopedPointerINS_14UndoableActionEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %17) #7
  %18 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 9
  %19 = load i8, ptr %18, align 1, !tbaa !9, !range !26, !noundef !27
  %20 = trunc i8 %19 to i1
  br i1 %20, label %21, label %25

21:                                               ; preds = %16
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %22
  br label %24

24:                                               ; preds = %23
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %123

25:                                               ; preds = %16
  %26 = call noundef ptr @_ZNK4juce13ScopedPointerINS_14UndoableActionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %27 = load ptr, ptr %26, align 8, !tbaa !28
  %28 = getelementptr inbounds ptr, ptr %27, i64 2
  %29 = load ptr, ptr %28, align 8
  %30 = invoke noundef zeroext i1 %29(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %31 unwind label %72

31:                                               ; preds = %25
  br i1 %30, label %32, label %122

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %33 = call noundef ptr @_ZNK4juce11UndoManager13getCurrentSetEv(ptr noundef nonnull align 8 dereferenceable(130) %13) #7
  store ptr %33, ptr %10, align 8, !tbaa !5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %82

36:                                               ; preds = %32
  %37 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 8
  %38 = load i8, ptr %37, align 8, !tbaa !30, !range !26, !noundef !27
  %39 = trunc i8 %38 to i1
  br i1 %39, label %82, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.juce::UndoManager::ActionSet", ptr %41, i32 0, i32 0
  %43 = call noundef ptr @_ZNK4juce10OwnedArrayINS_14UndoableActionENS_20DummyCriticalSectionEE7getLastEv(ptr noundef nonnull align 8 dereferenceable(20) %42) #7
  store ptr %43, ptr %11, align 8, !tbaa !5
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %81

46:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = call noundef ptr @_ZNK4juce13ScopedPointerINS_14UndoableActionEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %49 = load ptr, ptr %47, align 8, !tbaa !28
  %50 = getelementptr inbounds ptr, ptr %49, i64 5
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef ptr %51(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef %48)
          to label %53 unwind label %76

53:                                               ; preds = %46
  store ptr %52, ptr %12, align 8, !tbaa !5
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %80

56:                                               ; preds = %53
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce13ScopedPointerINS_14UndoableActionEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %57)
          to label %59 unwind label %76

59:                                               ; preds = %56
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = load ptr, ptr %60, align 8, !tbaa !28
  %62 = getelementptr inbounds ptr, ptr %61, i64 4
  %63 = load ptr, ptr %62, align 8
  %64 = invoke noundef i32 %63(ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %65 unwind label %76

65:                                               ; preds = %59
  %66 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 4
  %67 = load i32, ptr %66, align 8, !tbaa !31
  %68 = sub nsw i32 %67, %64
  store i32 %68, ptr %66, align 8, !tbaa !31
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.juce::UndoManager::ActionSet", ptr %69, i32 0, i32 0
  invoke void @_ZN4juce10OwnedArrayINS_14UndoableActionENS_20DummyCriticalSectionEE10removeLastEib(ptr noundef nonnull align 8 dereferenceable(20) %70, i32 noundef 1, i1 noundef zeroext true)
          to label %71 unwind label %76

71:                                               ; preds = %65
  br label %80

72:                                               ; preds = %25
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  br label %126

76:                                               ; preds = %65, %59, %56, %46
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %121

80:                                               ; preds = %71, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %81

81:                                               ; preds = %80, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %103

82:                                               ; preds = %36, %32
  %83 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
          to label %84 unwind label %95

84:                                               ; preds = %82
  %85 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 3
  invoke void @_ZN4juce11UndoManager9ActionSetC2ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40) %83, ptr noundef nonnull align 8 dereferenceable(8) %85)
          to label %86 unwind label %99

86:                                               ; preds = %84
  store ptr %83, ptr %10, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 1
  %88 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 7
  %89 = load i32, ptr %88, align 4, !tbaa !32
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = call noundef ptr @_ZN4juce10OwnedArrayINS_11UndoManager9ActionSetENS_20DummyCriticalSectionEE6insertEiPS2_(ptr noundef nonnull align 8 dereferenceable(20) %87, i32 noundef %89, ptr noundef %90) #7
  %92 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 7
  %93 = load i32, ptr %92, align 4, !tbaa !32
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %92, align 4, !tbaa !32
  br label %103

95:                                               ; preds = %119, %118, %109, %103, %82
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %8, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %9, align 4
  br label %121

99:                                               ; preds = %84
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %8, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %83, i64 noundef 40) #9
  br label %121

103:                                              ; preds = %86, %81
  %104 = call noundef ptr @_ZNK4juce13ScopedPointerINS_14UndoableActionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %105 = load ptr, ptr %104, align 8, !tbaa !28
  %106 = getelementptr inbounds ptr, ptr %105, i64 4
  %107 = load ptr, ptr %106, align 8
  %108 = invoke noundef i32 %107(ptr noundef nonnull align 8 dereferenceable(8) %104)
          to label %109 unwind label %95

109:                                              ; preds = %103
  %110 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 4
  %111 = load i32, ptr %110, align 8, !tbaa !31
  %112 = add nsw i32 %111, %108
  store i32 %112, ptr %110, align 8, !tbaa !31
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.juce::UndoManager::ActionSet", ptr %113, i32 0, i32 0
  %115 = call noundef ptr @_ZN4juce13ScopedPointerINS_14UndoableActionEE7releaseEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %116 = call noundef ptr @_ZN4juce10OwnedArrayINS_14UndoableActionENS_20DummyCriticalSectionEE3addEPS1_(ptr noundef nonnull align 8 dereferenceable(20) %114, ptr noundef %115) #7
  %117 = getelementptr inbounds %"class.juce::UndoManager", ptr %13, i32 0, i32 8
  store i8 0, ptr %117, align 8, !tbaa !30
  invoke void @_ZN4juce11UndoManager29moveFutureTransactionsToStashEv(ptr noundef nonnull align 8 dereferenceable(130) %13)
          to label %118 unwind label %95

118:                                              ; preds = %109
  invoke void @_ZN4juce11UndoManager29dropOldTransactionsIfTooLargeEv(ptr noundef nonnull align 8 dereferenceable(130) %13)
          to label %119 unwind label %95

119:                                              ; preds = %118
  invoke void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %120 unwind label %95

120:                                              ; preds = %119
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %123

121:                                              ; preds = %99, %95, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %126

122:                                              ; preds = %31
  store i32 0, ptr %7, align 4
  br label %123

123:                                              ; preds = %122, %120, %24
  call void @_ZN4juce13ScopedPointerINS_14UndoableActionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %124 = load i32, ptr %7, align 4
  switch i32 %124, label %135 [
    i32 0, label %125
    i32 1, label %128
  ]

125:                                              ; preds = %123
  br label %127

126:                                              ; preds = %121, %72
  call void @_ZN4juce13ScopedPointerINS_14UndoableActionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %130

127:                                              ; preds = %125, %2
  store i1 false, ptr %3, align 1
  br label %128

128:                                              ; preds = %127, %123
  %129 = load i1, ptr %3, align 1
  ret i1 %129

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

135:                                              ; preds = %123
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce11UndoManager13getCurrentSetEv(ptr noundef nonnull align 8 dereferenceable(130)) #6 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11UndoManager9ActionSetC2ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 = { 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 = { 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 #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, !25, i64 129}
!10 = !{!"_ZTSN4juce11UndoManagerE", !11, i64 0, !20, i64 56, !20, i64 80, !23, i64 104, !19, i64 112, !19, i64 116, !19, i64 120, !19, i64 124, !25, i64 128, !25, i64 129}
!11 = !{!"_ZTSN4juce17ChangeBroadcasterE", !12, i64 8, !15, i64 32}
!12 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !13, i64 0, !6, i64 16}
!13 = !{!"_ZTSN4juce12AsyncUpdaterE", !14, i64 8}
!14 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !6, i64 0}
!15 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !16, i64 0}
!16 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !17, i64 0, !19, i64 16}
!17 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !18, i64 0, !19, i64 8}
!18 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !6, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSN4juce10OwnedArrayINS_11UndoManager9ActionSetENS_20DummyCriticalSectionEEE", !21, i64 0, !19, i64 16}
!21 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_11UndoManager9ActionSetENS_20DummyCriticalSectionEEE", !22, i64 0, !19, i64 8}
!22 = !{!"_ZTSN4juce9HeapBlockIPNS_11UndoManager9ActionSetELb0EEE", !6, i64 0}
!23 = !{!"_ZTSN4juce6StringE", !24, i64 0}
!24 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !8, i64 0}
!30 = !{!10, !25, i64 128}
!31 = !{!10, !19, i64 112}
!32 = !{!10, !19, i64 124}


; 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::ScopedPointer.43" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce11UndoManager7performEPNS_14UndoableActionE(ptr noundef nonnull align 8 dereferenceable(130) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::ScopedPointer.43", align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %73, label %4

4:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN4juce13ScopedPointerINS_14UndoableActionEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %1) #6
  %5 = getelementptr inbounds i8, ptr %0, i64 129
  %6 = load i8, ptr %5, align 1, !tbaa !5, !range !25, !noundef !26
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %.thread, label %8

8:                                                ; preds = %4
  %9 = call noundef ptr @_ZNK4juce13ScopedPointerINS_14UndoableActionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %10 = load ptr, ptr %9, align 8, !tbaa !27
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = load ptr, ptr %11, align 8
  %13 = invoke noundef zeroext i1 %12(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %14 unwind label %40

14:                                               ; preds = %8
  br i1 %13, label %15, label %71

15:                                               ; preds = %14
  %16 = call noundef ptr @_ZNK4juce11UndoManager13getCurrentSetEv(ptr noundef nonnull align 8 dereferenceable(130) %0) #6
  %.not26 = icmp eq ptr %16, null
  br i1 %.not26, label %44, label %17

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %0, i64 128
  %19 = load i8, ptr %18, align 8, !tbaa !29, !range !25, !noundef !26
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %44, label %21

21:                                               ; preds = %17
  %22 = call noundef ptr @_ZNK4juce10OwnedArrayINS_14UndoableActionENS_20DummyCriticalSectionEE7getLastEv(ptr noundef nonnull align 8 dereferenceable(20) %16) #6
  %.not27 = icmp eq ptr %22, null
  br i1 %.not27, label %56, label %23

23:                                               ; preds = %21
  %24 = call noundef ptr @_ZNK4juce13ScopedPointerINS_14UndoableActionEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %25 = load ptr, ptr %22, align 8, !tbaa !27
  %26 = getelementptr inbounds i8, ptr %25, i64 40
  %27 = load ptr, ptr %26, align 8
  %28 = invoke noundef ptr %27(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef %24)
          to label %29 unwind label %42

29:                                               ; preds = %23
  %.not28 = icmp eq ptr %28, null
  br i1 %.not28, label %56, label %30

30:                                               ; preds = %29
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce13ScopedPointerINS_14UndoableActionEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %28)
  %32 = load ptr, ptr %22, align 8, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %32, i64 32
  %34 = load ptr, ptr %33, align 8
  %35 = invoke noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %36 unwind label %42

36:                                               ; preds = %30
  %37 = getelementptr inbounds i8, ptr %0, i64 112
  %38 = load i32, ptr %37, align 8, !tbaa !30
  %39 = sub nsw i32 %38, %35
  store i32 %39, ptr %37, align 8, !tbaa !30
  invoke void @_ZN4juce10OwnedArrayINS_14UndoableActionENS_20DummyCriticalSectionEE10removeLastEib(ptr noundef nonnull align 8 dereferenceable(20) %16, i32 noundef 1, i1 noundef zeroext true)
          to label %56 unwind label %42

40:                                               ; preds = %8
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %72

42:                                               ; preds = %36, %30, %23
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %72

44:                                               ; preds = %17, %15
  %45 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #7
          to label %46 unwind label %54

46:                                               ; preds = %44
  %47 = getelementptr inbounds i8, ptr %0, i64 104
  call void @_ZN4juce11UndoManager9ActionSetC2ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40) %45, ptr noundef nonnull align 8 dereferenceable(8) %47)
  %48 = getelementptr inbounds i8, ptr %0, i64 56
  %49 = getelementptr inbounds i8, ptr %0, i64 124
  %50 = load i32, ptr %49, align 4, !tbaa !31
  %51 = call noundef ptr @_ZN4juce10OwnedArrayINS_11UndoManager9ActionSetENS_20DummyCriticalSectionEE6insertEiPS2_(ptr noundef nonnull align 8 dereferenceable(20) %48, i32 noundef %50, ptr noundef nonnull %45) #6
  %52 = load i32, ptr %49, align 4, !tbaa !31
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %49, align 4, !tbaa !31
  br label %56

54:                                               ; preds = %70, %69, %62, %56, %44
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %72

56:                                               ; preds = %21, %36, %29, %46
  %.017 = phi ptr [ %45, %46 ], [ %16, %29 ], [ %16, %36 ], [ %16, %21 ]
  %57 = call noundef ptr @_ZNK4juce13ScopedPointerINS_14UndoableActionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %58 = load ptr, ptr %57, align 8, !tbaa !27
  %59 = getelementptr inbounds i8, ptr %58, i64 32
  %60 = load ptr, ptr %59, align 8
  %61 = invoke noundef i32 %60(ptr noundef nonnull align 8 dereferenceable(8) %57)
          to label %62 unwind label %54

62:                                               ; preds = %56
  %63 = getelementptr inbounds i8, ptr %0, i64 112
  %64 = load i32, ptr %63, align 8, !tbaa !30
  %65 = add nsw i32 %64, %61
  store i32 %65, ptr %63, align 8, !tbaa !30
  %66 = call noundef ptr @_ZN4juce13ScopedPointerINS_14UndoableActionEE7releaseEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %67 = call noundef ptr @_ZN4juce10OwnedArrayINS_14UndoableActionENS_20DummyCriticalSectionEE3addEPS1_(ptr noundef nonnull align 8 dereferenceable(20) %.017, ptr noundef %66) #6
  %68 = getelementptr inbounds i8, ptr %0, i64 128
  store i8 0, ptr %68, align 8, !tbaa !29
  invoke void @_ZN4juce11UndoManager29moveFutureTransactionsToStashEv(ptr noundef nonnull align 8 dereferenceable(130) %0)
          to label %69 unwind label %54

69:                                               ; preds = %62
  invoke void @_ZN4juce11UndoManager29dropOldTransactionsIfTooLargeEv(ptr noundef nonnull align 8 dereferenceable(130) %0)
          to label %70 unwind label %54

70:                                               ; preds = %69
  invoke void @_ZN4juce17ChangeBroadcaster17sendChangeMessageEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
          to label %.thread unwind label %54

.thread:                                          ; preds = %4, %70
  %.0.ph = xor i1 %7, true
  call void @_ZN4juce13ScopedPointerINS_14UndoableActionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %73

71:                                               ; preds = %14
  call void @_ZN4juce13ScopedPointerINS_14UndoableActionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %73

72:                                               ; preds = %42, %54, %40
  %.pn.pn = phi { ptr, i32 } [ %41, %40 ], [ %55, %54 ], [ %43, %42 ]
  call void @_ZN4juce13ScopedPointerINS_14UndoableActionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn

73:                                               ; preds = %2, %71, %.thread
  %.1 = phi i1 [ %.0.ph, %.thread ], [ false, %71 ], [ false, %2 ]
  ret i1 %.1
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce11UndoManager9ActionSetC2ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce11UndoManager29moveFutureTransactionsToStashEv(ptr noundef nonnull align 8 dereferenceable(130)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce11UndoManager29dropOldTransactionsIfTooLargeEv(ptr noundef nonnull align 8 dereferenceable(130)) local_unnamed_addr #3 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 }
attributes #7 = { builtin allocsize(0) }

!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, !24, i64 129}
!6 = !{!"_ZTSN4juce11UndoManagerE", !7, i64 0, !19, i64 56, !19, i64 80, !22, i64 104, !18, i64 112, !18, i64 116, !18, i64 120, !18, i64 124, !24, i64 128, !24, i64 129}
!7 = !{!"_ZTSN4juce17ChangeBroadcasterE", !8, i64 8, !14, i64 32}
!8 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !9, i64 0, !11, i64 16}
!9 = !{!"_ZTSN4juce12AsyncUpdaterE", !10, i64 8}
!10 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !15, i64 0}
!15 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !16, i64 0, !18, i64 16}
!16 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !17, i64 0, !18, i64 8}
!17 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !11, i64 0}
!18 = !{!"int", !12, i64 0}
!19 = !{!"_ZTSN4juce10OwnedArrayINS_11UndoManager9ActionSetENS_20DummyCriticalSectionEEE", !20, i64 0, !18, i64 16}
!20 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_11UndoManager9ActionSetENS_20DummyCriticalSectionEEE", !21, i64 0, !18, i64 8}
!21 = !{!"_ZTSN4juce9HeapBlockIPNS_11UndoManager9ActionSetELb0EEE", !11, i64 0}
!22 = !{!"_ZTSN4juce6StringE", !23, i64 0}
!23 = !{!"_ZTSN4juce16CharPointer_UTF8E", !11, i64 0}
!24 = !{!"bool", !12, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !13, i64 0}
!29 = !{!6, !24, i64 128}
!30 = !{!6, !18, i64 112}
!31 = !{!6, !18, i64 124}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass