; 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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::StringArray" = type { %"class.juce::Array.25" }
%"class.juce::Array.25" = type { %"class.juce::ArrayAllocationBase.26", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.26" = type <{ %"class.juce::HeapBlock.27", i32, [4 x i8] }>
%"class.juce::HeapBlock.27" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::TextDiff" = type { %"class.juce::Array.30" }
%"class.juce::Array.30" = type { %"class.juce::ArrayAllocationBase.31", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.31" = type <{ %"class.juce::HeapBlock.32", i32, [4 x i8] }>
%"class.juce::HeapBlock.32" = type { ptr }
%"class.juce::CodeDocument" = type { %"class.juce::OwnedArray", %"class.juce::Array.8", %"class.juce::UndoManager", i32, i32, i32, [4 x i8], %"class.juce::ListenerList.18", %"class.juce::String" }
%"class.juce::OwnedArray" = 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::Array.8" = type { %"class.juce::ArrayAllocationBase.9", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.9" = type <{ %"class.juce::HeapBlock.10", i32, [4 x i8] }>
%"class.juce::HeapBlock.10" = type { ptr }
%"class.juce::UndoManager" = type <{ %"class.juce::ChangeBroadcaster", %"class.juce::OwnedArray.13", %"class.juce::OwnedArray.13", %"class.juce::String", i32, i32, i32, i32, i8, i8, [6 x i8] }>
%"class.juce::ChangeBroadcaster" = type { ptr, %"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback", %"class.juce::ListenerList" }
%"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" = type { %"class.juce::Array" }
%"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::OwnedArray.13" = type { %"class.juce::ArrayAllocationBase.14", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.14" = type <{ %"class.juce::HeapBlock.15", i32, [4 x i8] }>
%"class.juce::HeapBlock.15" = type { ptr }
%"class.juce::ListenerList.18" = type { %"class.juce::Array.19" }
%"class.juce::Array.19" = type { %"class.juce::ArrayAllocationBase.20", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.20" = type <{ %"class.juce::HeapBlock.21", i32, [4 x i8] }>
%"class.juce::HeapBlock.21" = type { ptr }
%"struct.juce::TextDiff::Change" = type { %"class.juce::String", i32, i32 }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce12CodeDocument12applyChangesERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.juce::String", align 8
  %6 = alloca %"class.juce::StringArray", align 8
  %7 = alloca %"class.juce::StringRef", align 8
  %8 = alloca %"class.juce::StringRef", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.juce::TextDiff", align 8
  %12 = alloca %"class.juce::String", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @_ZN4juce11StringArray9fromLinesENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::StringArray") align 8 %6, ptr noundef %7)
  %17 = getelementptr inbounds %"class.juce::CodeDocument", ptr %15, i32 0, i32 8
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  invoke void @_ZNK4juce11StringArray14joinIntoStringENS_9StringRefEii(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef %8, i32 noundef 0, i32 noundef -1)
          to label %18 unwind label %27

18:                                               ; preds = %2
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  invoke void @_ZNK4juce12CodeDocument13getAllContentEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %12, ptr noundef nonnull align 8 dereferenceable(232) %15)
          to label %19 unwind label %31

19:                                               ; preds = %18
  invoke void @_ZN4juce8TextDiffC1ERKNS_6StringES3_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %20 unwind label %35

20:                                               ; preds = %19
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %70, %20
  %22 = load i32, ptr %13, align 4, !tbaa !9
  %23 = getelementptr inbounds %"class.juce::TextDiff", ptr %11, i32 0, i32 0
  %24 = call noundef i32 @_ZNK4juce5ArrayINS_8TextDiff6ChangeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %23) #5
  %25 = icmp slt i32 %22, %24
  br i1 %25, label %40, label %26

26:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %73

27:                                               ; preds = %2
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %9, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %10, align 4
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  br label %75

31:                                               ; preds = %18
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %9, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %10, align 4
  br label %39

35:                                               ; preds = %19
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %9, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %10, align 4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br label %39

39:                                               ; preds = %35, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %74

40:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %41 = getelementptr inbounds %"class.juce::TextDiff", ptr %11, i32 0, i32 0
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4juce5ArrayINS_8TextDiff6ChangeENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %41, i32 noundef %42) #5
  store ptr %43, ptr %14, align 8, !tbaa !5
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = call noundef zeroext i1 @_ZNK4juce8TextDiff6Change10isDeletionEv(ptr noundef nonnull align 8 dereferenceable(16) %44) #5
  br i1 %45, label %46, label %62

46:                                               ; preds = %40
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.juce::TextDiff::Change", ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 8, !tbaa !11
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.juce::TextDiff::Change", ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.juce::TextDiff::Change", ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 4, !tbaa !15
  %56 = add nsw i32 %52, %55
  invoke void @_ZN4juce12CodeDocument6removeEiib(ptr noundef nonnull align 8 dereferenceable(232) %15, i32 noundef %49, i32 noundef %56, i1 noundef zeroext true)
          to label %57 unwind label %58

57:                                               ; preds = %46
  br label %69

58:                                               ; preds = %62, %46
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %9, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @_ZN4juce8TextDiffD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br label %74

62:                                               ; preds = %40
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.juce::TextDiff::Change", ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.juce::TextDiff::Change", ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 8, !tbaa !11
  invoke void @_ZN4juce12CodeDocument6insertERKNS_6StringEib(ptr noundef nonnull align 8 dereferenceable(232) %15, ptr noundef nonnull align 8 dereferenceable(8) %64, i32 noundef %67, i1 noundef zeroext true)
          to label %68 unwind label %58

68:                                               ; preds = %62
  br label %69

69:                                               ; preds = %68, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %13, align 4, !tbaa !9
  br label %21, !llvm.loop !16

73:                                               ; preds = %26
  call void @_ZN4juce8TextDiffD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void

74:                                               ; preds = %58, %39
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br label %75

75:                                               ; preds = %74, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %9, align 8
  %78 = load i32, ptr %10, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80
}

declare void @_ZN4juce11StringArray9fromLinesENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::StringArray") align 8, ptr noundef) #3

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

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

declare void @_ZN4juce8TextDiffC1ERKNS_6StringES3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce8TextDiffD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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, !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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN4juce8TextDiff6ChangeE", !13, i64 0, !10, i64 8, !10, i64 12}
!13 = !{!"_ZTSN4juce6StringE", !14, i64 0}
!14 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!15 = !{!12, !10, i64 12}
!16 = distinct !{!16, !17}
!17 = !{!"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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::StringArray" = type { %"class.juce::Array.25" }
%"class.juce::Array.25" = type { %"class.juce::ArrayAllocationBase.26", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.26" = type <{ %"class.juce::HeapBlock.27", i32, [4 x i8] }>
%"class.juce::HeapBlock.27" = type { ptr }
%"class.juce::StringRef" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::TextDiff" = type { %"class.juce::Array.30" }
%"class.juce::Array.30" = type { %"class.juce::ArrayAllocationBase.31", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.31" = type <{ %"class.juce::HeapBlock.32", i32, [4 x i8] }>
%"class.juce::HeapBlock.32" = type { ptr }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce12CodeDocument12applyChangesERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::String", align 8
  %4 = alloca %"class.juce::StringArray", align 8
  %5 = alloca %"class.juce::StringRef", align 8
  %6 = alloca %"class.juce::StringRef", align 8
  %7 = alloca %"class.juce::TextDiff", align 8
  %8 = alloca %"class.juce::String", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %1) #5
  call void @_ZN4juce11StringArray9fromLinesENS_9StringRefE(ptr dead_on_unwind nonnull writable sret(%"class.juce::StringArray") align 8 %4, ptr noundef nonnull %5)
  %9 = getelementptr inbounds i8, ptr %0, i64 224
  call void @_ZN4juce9StringRefC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  invoke void @_ZNK4juce11StringArray14joinIntoStringENS_9StringRefEii(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %6, i32 noundef 0, i32 noundef -1)
          to label %10 unwind label %15

10:                                               ; preds = %2
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  invoke void @_ZNK4juce12CodeDocument13getAllContentEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %8, ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %11 unwind label %17

11:                                               ; preds = %10
  invoke void @_ZN4juce8TextDiffC1ERKNS_6StringES3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %12 unwind label %19

12:                                               ; preds = %11
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %13 = call noundef i32 @_ZNK4juce5ArrayINS_8TextDiff6ChangeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %7) #5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %33, %12
  call void @_ZN4juce8TextDiffD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret void

15:                                               ; preds = %2
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce11StringArrayD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %38

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %21

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

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %37

.lr.ph:                                           ; preds = %12, %33
  %.01220 = phi i32 [ %34, %33 ], [ 0, %12 ]
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4juce5ArrayINS_8TextDiff6ChangeENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef %.01220) #5
  %23 = call noundef zeroext i1 @_ZNK4juce8TextDiff6Change10isDeletionEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  %24 = getelementptr inbounds i8, ptr %22, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !5
  br i1 %23, label %26, label %32

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds i8, ptr %22, i64 12
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = add nsw i32 %28, %25
  invoke void @_ZN4juce12CodeDocument6removeEiib(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef %25, i32 noundef %29, i1 noundef zeroext true)
          to label %33 unwind label %30

30:                                               ; preds = %32, %26
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce8TextDiffD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %37

32:                                               ; preds = %.lr.ph
  invoke void @_ZN4juce12CodeDocument6insertERKNS_6StringEib(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef %25, i1 noundef zeroext true)
          to label %33 unwind label %30

33:                                               ; preds = %32, %26
  %34 = add nuw nsw i32 %.01220, 1
  %35 = call noundef i32 @_ZNK4juce5ArrayINS_8TextDiff6ChangeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %7) #5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !14

37:                                               ; preds = %30, %21
  %.pn17 = phi { ptr, i32 } [ %31, %30 ], [ %.pn, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br label %38

38:                                               ; preds = %37, %15
  %.pn17.pn = phi { ptr, i32 } [ %.pn17, %37 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn17.pn
}

declare void @_ZN4juce11StringArray9fromLinesENS_9StringRefE(ptr dead_on_unwind writable sret(%"class.juce::StringArray") align 8, ptr noundef) local_unnamed_addr #3

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

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

declare void @_ZN4juce8TextDiffC1ERKNS_6StringES3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce8TextDiffD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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, !12, i64 8}
!6 = !{!"_ZTSN4juce8TextDiff6ChangeE", !7, i64 0, !12, i64 8, !12, i64 12}
!7 = !{!"_ZTSN4juce6StringE", !8, i64 0}
!8 = !{!"_ZTSN4juce16CharPointer_UTF8E", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!6, !12, i64 12}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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