; 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::MemoryOutputStream" = type { %"class.juce::OutputStream", ptr, %"class.juce::MemoryBlock", ptr, i64, i64, i64 }
%"class.juce::OutputStream" = type { ptr, %"class.juce::String" }
%"class.juce::MemoryBlock" = type { %"class.juce::HeapBlock.24", i64 }
%"class.juce::HeapBlock.24" = 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 }
%"class.juce::CodeDocumentLine" = type <{ %"class.juce::String", i32, i32, i32, [4 x i8] }>

; 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 @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce12CodeDocument14getTextBetweenERKNS0_8PositionES3_(ptr dead_on_unwind noalias writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %1, ptr noundef nonnull align 8 dereferenceable(21) %2, ptr noundef nonnull align 8 dereferenceable(21) %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.juce::MemoryOutputStream", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.juce::String", align 8
  %22 = alloca %"class.juce::String", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %24) #6
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %26) #6
  %28 = icmp sle i32 %25, %27
  br i1 %28, label %29, label %30

29:                                               ; preds = %4
  call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %162

30:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef i32 @_ZNK4juce12CodeDocument8Position13getLineNumberEv(ptr noundef nonnull align 8 dereferenceable(21) %31) #6
  store i32 %32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call noundef i32 @_ZNK4juce12CodeDocument8Position13getLineNumberEv(ptr noundef nonnull align 8 dereferenceable(21) %33) #6
  store i32 %34, ptr %10, align 4, !tbaa !9
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = icmp eq i32 %35, %36
  br i1 %37, label %38, label %55

38:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %39 = getelementptr inbounds %"class.juce::CodeDocument", ptr %23, i32 0, i32 0
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = call noundef ptr @_ZNK4juce10OwnedArrayINS_16CodeDocumentLineENS_20DummyCriticalSectionEEixEi(ptr noundef nonnull align 8 dereferenceable(20) %39, i32 noundef %40) #6
  store ptr %41, ptr %11, align 8, !tbaa !5
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %51

44:                                               ; preds = %38
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.juce::CodeDocumentLine", ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %47) #6
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %49) #6
  call void @_ZNK4juce6String9substringEii(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %46, i32 noundef %48, i32 noundef %50)
  store i32 1, ptr %12, align 4
  br label %52

51:                                               ; preds = %38
  store i32 0, ptr %12, align 4
  br label %52

52:                                               ; preds = %51, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %53 = load i32, ptr %12, align 4
  switch i32 %53, label %161 [
    i32 0, label %54
  ]

54:                                               ; preds = %52
  call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  store i32 1, ptr %12, align 4
  br label %161

55:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 72, ptr %13) #6
  call void @_ZN4juce18MemoryOutputStreamC1Em(ptr noundef nonnull align 8 dereferenceable(72) %13, i64 noundef 256)
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %56) #6
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %58) #6
  %60 = sub nsw i32 %57, %59
  %61 = add nsw i32 %60, 4
  %62 = sext i32 %61 to i64
  invoke void @_ZN4juce18MemoryOutputStream11preallocateEm(ptr noundef nonnull align 8 dereferenceable(72) %13, i64 noundef %62)
          to label %63 unwind label %78

63:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %64 = getelementptr inbounds %"class.juce::CodeDocument", ptr %23, i32 0, i32 0
  %65 = call noundef i32 @_ZNK4juce10OwnedArrayINS_16CodeDocumentLineENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %64) #6
  %66 = sub nsw i32 %65, 1
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = invoke noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %66, i32 noundef %67)
          to label %69 unwind label %82

69:                                               ; preds = %63
  store i32 %68, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = invoke noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 0, i32 noundef %70)
          to label %72 unwind label %86

72:                                               ; preds = %69
  store i32 %71, ptr %17, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %152, %72
  %74 = load i32, ptr %17, align 4, !tbaa !9
  %75 = load i32, ptr %16, align 4, !tbaa !9
  %76 = icmp sle i32 %74, %75
  br i1 %76, label %90, label %77

77:                                               ; preds = %73
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %157

78:                                               ; preds = %55
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %14, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %15, align 4
  br label %160

82:                                               ; preds = %157, %63
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %14, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %15, align 4
  br label %159

86:                                               ; preds = %69
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %14, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %15, align 4
  br label %156

90:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %91 = getelementptr inbounds %"class.juce::CodeDocument", ptr %23, i32 0, i32 0
  %92 = load i32, ptr %17, align 4, !tbaa !9
  %93 = call noundef ptr @_ZNK4juce10OwnedArrayINS_16CodeDocumentLineENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %91, i32 noundef %92) #6
  store ptr %93, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.juce::CodeDocumentLine", ptr %94, i32 0, i32 2
  %96 = load i32, ptr %95, align 4, !tbaa !11
  store i32 %96, ptr %19, align 4, !tbaa !9
  %97 = load i32, ptr %17, align 4, !tbaa !9
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = icmp eq i32 %97, %98
  br i1 %99, label %100, label %119

100:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %101) #6
  store i32 %102, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %103 = load ptr, ptr %18, align 8, !tbaa !5
  %104 = getelementptr inbounds %"class.juce::CodeDocumentLine", ptr %103, i32 0, i32 0
  %105 = load i32, ptr %20, align 4, !tbaa !9
  %106 = load i32, ptr %19, align 4, !tbaa !9
  invoke void @_ZNK4juce6String9substringEii(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %21, ptr noundef nonnull align 8 dereferenceable(8) %104, i32 noundef %105, i32 noundef %106)
          to label %107 unwind label %110

107:                                              ; preds = %100
  %108 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %109 unwind label %114

109:                                              ; preds = %107
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %151

110:                                              ; preds = %100
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %14, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %15, align 4
  br label %118

114:                                              ; preds = %107
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %14, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %15, align 4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br label %118

118:                                              ; preds = %114, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %155

119:                                              ; preds = %90
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = icmp eq i32 %120, %121
  br i1 %122, label %123, label %141

123:                                              ; preds = %119
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %124) #6
  store i32 %125, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %126 = load ptr, ptr %18, align 8, !tbaa !5
  %127 = getelementptr inbounds %"class.juce::CodeDocumentLine", ptr %126, i32 0, i32 0
  %128 = load i32, ptr %19, align 4, !tbaa !9
  invoke void @_ZNK4juce6String9substringEii(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %22, ptr noundef nonnull align 8 dereferenceable(8) %127, i32 noundef 0, i32 noundef %128)
          to label %129 unwind label %132

129:                                              ; preds = %123
  %130 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %131 unwind label %136

131:                                              ; preds = %129
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %150

132:                                              ; preds = %123
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %14, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %15, align 4
  br label %140

136:                                              ; preds = %129
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %14, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %15, align 4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %140

140:                                              ; preds = %136, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %155

141:                                              ; preds = %119
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  %143 = getelementptr inbounds %"class.juce::CodeDocumentLine", ptr %142, i32 0, i32 0
  %144 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %143)
          to label %145 unwind label %146

145:                                              ; preds = %141
  br label %150

146:                                              ; preds = %141
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %14, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %15, align 4
  br label %155

150:                                              ; preds = %145, %131
  br label %151

151:                                              ; preds = %150, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %17, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %17, align 4, !tbaa !9
  br label %73, !llvm.loop !15

155:                                              ; preds = %146, %140, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %156

156:                                              ; preds = %155, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %159

157:                                              ; preds = %77
  invoke void @_ZNK4juce18MemoryOutputStream6toUTF8Ev(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %13)
          to label %158 unwind label %82

158:                                              ; preds = %157
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @_ZN4juce18MemoryOutputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %13) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %13) #6
  br label %161

159:                                              ; preds = %156, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %160

160:                                              ; preds = %159, %78
  call void @_ZN4juce18MemoryOutputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %13) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %163

161:                                              ; preds = %158, %54, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %162

162:                                              ; preds = %161, %29
  ret void

163:                                              ; preds = %160
  %164 = load ptr, ptr %14, align 8
  %165 = load i32, ptr %15, align 4
  %166 = insertvalue { ptr, i32 } poison, ptr %164, 0
  %167 = insertvalue { ptr, i32 } %166, i32 %165, 1
  resume { ptr, i32 } %167
}

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

declare void @_ZN4juce18MemoryOutputStreamC1Em(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) unnamed_addr #5

declare void @_ZN4juce18MemoryOutputStream11preallocateEm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) #5

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #5

declare void @_ZNK4juce18MemoryOutputStream6toUTF8Ev(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #5

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 12}
!12 = !{!"_ZTSN4juce16CodeDocumentLineE", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!13 = !{!"_ZTSN4juce6StringE", !14, i64 0}
!14 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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::MemoryOutputStream" = type { %"class.juce::OutputStream", ptr, %"class.juce::MemoryBlock", ptr, i64, i64, i64 }
%"class.juce::OutputStream" = type { ptr, %"class.juce::String" }
%"class.juce::MemoryBlock" = type { %"class.juce::HeapBlock.24", i64 }
%"class.juce::HeapBlock.24" = 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 @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce12CodeDocument14getTextBetweenERKNS0_8PositionES3_(ptr dead_on_unwind noalias writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %1, ptr noundef nonnull align 8 dereferenceable(21) %2, ptr noundef nonnull align 8 dereferenceable(21) %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.juce::MemoryOutputStream", align 8
  %6 = alloca %"class.juce::String", align 8
  %7 = alloca %"class.juce::String", align 8
  %8 = tail call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %3) #6
  %9 = tail call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %2) #6
  %.not = icmp sgt i32 %8, %9
  br i1 %.not, label %11, label %10

10:                                               ; preds = %4
  tail call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %69

11:                                               ; preds = %4
  %12 = tail call noundef i32 @_ZNK4juce12CodeDocument8Position13getLineNumberEv(ptr noundef nonnull align 8 dereferenceable(21) %2) #6
  %13 = tail call noundef i32 @_ZNK4juce12CodeDocument8Position13getLineNumberEv(ptr noundef nonnull align 8 dereferenceable(21) %3) #6
  %14 = icmp eq i32 %12, %13
  br i1 %14, label %15, label %20

15:                                               ; preds = %11
  %16 = tail call noundef ptr @_ZNK4juce10OwnedArrayINS_16CodeDocumentLineENS_20DummyCriticalSectionEEixEi(ptr noundef nonnull align 8 dereferenceable(20) %1, i32 noundef %12) #6
  %.not53 = icmp eq ptr %16, null
  br i1 %.not53, label %.critedge, label %17

17:                                               ; preds = %15
  %18 = tail call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %2) #6
  %19 = tail call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %3) #6
  tail call void @_ZNK4juce6String9substringEii(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef %18, i32 noundef %19)
  br label %69

.critedge:                                        ; preds = %15
  tail call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %69

20:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #6
  call void @_ZN4juce18MemoryOutputStreamC1Em(ptr noundef nonnull align 8 dereferenceable(72) %5, i64 noundef 256)
  %21 = call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %3) #6
  %22 = call noundef i32 @_ZNK4juce12CodeDocument8Position11getPositionEv(ptr noundef nonnull align 8 dereferenceable(21) %2) #6
  %23 = add i32 %21, 4
  %24 = sub i32 %23, %22
  %25 = sext i32 %24 to i64
  invoke void @_ZN4juce18MemoryOutputStream11preallocateEm(ptr noundef nonnull align 8 dereferenceable(72) %5, i64 noundef %25)
          to label %26 unwind label %31

26:                                               ; preds = %20
  %27 = call noundef i32 @_ZNK4juce10OwnedArrayINS_16CodeDocumentLineENS_20DummyCriticalSectionEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %1) #6
  %28 = add nsw i32 %27, -1
  %29 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %28, i32 noundef %13)
  %30 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 0, i32 noundef %12)
  %.not4654 = icmp sgt i32 %30, %29
  br i1 %.not4654, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %65, %26
  invoke void @_ZNK4juce18MemoryOutputStream6toUTF8Ev(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %5)
          to label %67 unwind label %33

31:                                               ; preds = %20
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %68

33:                                               ; preds = %._crit_edge
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %68

.lr.ph:                                           ; preds = %26, %65
  %.03655 = phi i32 [ %66, %65 ], [ %30, %26 ]
  %35 = call noundef ptr @_ZNK4juce10OwnedArrayINS_16CodeDocumentLineENS_20DummyCriticalSectionEE12getUncheckedEi(ptr noundef nonnull align 8 dereferenceable(20) %1, i32 noundef %.03655) #6
  %36 = icmp eq i32 %.03655, %12
  br i1 %36, label %37, label %49

37:                                               ; preds = %.lr.ph
  %38 = getelementptr inbounds i8, ptr %35, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  invoke void @_ZNK4juce6String9substringEii(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef %40, i32 noundef %39)
          to label %41 unwind label %44

41:                                               ; preds = %37
  %42 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %43 unwind label %46

43:                                               ; preds = %41
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %65

44:                                               ; preds = %37
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %41
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %48

48:                                               ; preds = %46, %44
  %.pn48 = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %68

49:                                               ; preds = %.lr.ph
  %50 = icmp eq i32 %.03655, %13
  br i1 %50, label %51, label %61

51:                                               ; preds = %49
  %52 = call noundef i32 @_ZNK4juce12CodeDocument8Position14getIndexInLineEv(ptr noundef nonnull align 8 dereferenceable(21) %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  invoke void @_ZNK4juce6String9substringEii(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef 0, i32 noundef %52)
          to label %53 unwind label %56

53:                                               ; preds = %51
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %55 unwind label %58

55:                                               ; preds = %53
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %65

56:                                               ; preds = %51
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

58:                                               ; preds = %53
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %60

60:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %68

61:                                               ; preds = %49
  %62 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %35)
          to label %65 unwind label %63

63:                                               ; preds = %61
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %68

65:                                               ; preds = %55, %61, %43
  %66 = add i32 %.03655, 1
  %exitcond.not = icmp eq i32 %.03655, %29
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

67:                                               ; preds = %._crit_edge
  call void @_ZN4juce18MemoryOutputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  br label %69

68:                                               ; preds = %33, %63, %60, %48, %31
  %.pn48.pn.pn.pn = phi { ptr, i32 } [ %32, %31 ], [ %34, %33 ], [ %.pn48, %48 ], [ %.pn, %60 ], [ %64, %63 ]
  call void @_ZN4juce18MemoryOutputStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn48.pn.pn.pn

69:                                               ; preds = %17, %.critedge, %67, %10
  ret void
}

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

declare void @_ZN4juce18MemoryOutputStreamC1Em(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) unnamed_addr #5

declare void @_ZN4juce18MemoryOutputStream11preallocateEm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jucelsERNS_12OutputStreamERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

declare void @_ZNK4juce18MemoryOutputStream6toUTF8Ev(ptr dead_on_unwind writable sret(%"class.juce::String") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #5

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !12, i64 12}
!6 = !{!"_ZTSN4juce16CodeDocumentLineE", !7, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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