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

; 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::MemoryBlock" = type { %"class.juce::HeapBlock.38", i64 }
%"class.juce::HeapBlock.38" = type { ptr }
%"class.juce::InterprocessConnection" = type { ptr, %"class.juce::WeakReference<juce::InterprocessConnection>::Master", %"class.juce::CriticalSection", %"class.juce::ScopedPointer.29", %"class.juce::ScopedPointer.30", i8, i8, i32, i32, %"class.juce::ScopedPointer.31" }
%"class.juce::WeakReference<juce::InterprocessConnection>::Master" = type { %"class.juce::ReferenceCountedObjectPtr.28" }
%"class.juce::ReferenceCountedObjectPtr.28" = type { ptr }
%"class.juce::CriticalSection" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.juce::ScopedPointer.29" = type { ptr }
%"class.juce::ScopedPointer.30" = type { ptr }
%"class.juce::ScopedPointer.31" = type { ptr }

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

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) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce6Thread16threadShouldExitEv(ptr noundef nonnull align 8 dereferenceable(285)) #1 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce9ByteOrder15swapIfBigEndianEj(i32 noundef) #2 align 2

declare void @_ZN4juce11MemoryBlockC1Emb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce22InterprocessConnection14deliverDataIntERKNS_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce22InterprocessConnection18readNextMessageIntEv(ptr noundef nonnull align 8 dereferenceable(96) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca [2 x i32], align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.juce::MemoryBlock", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %16 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 3
  %17 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %24

19:                                               ; preds = %1
  %20 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 3
  %21 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %22 = getelementptr inbounds [2 x i32], ptr %4, i64 0, i64 0
  %23 = call noundef i32 @_ZN4juce15StreamingSocket4readEPvib(ptr noundef nonnull align 8 dereferenceable(64) %21, ptr noundef %22, i32 noundef 8, i1 noundef zeroext true)
  br label %29

24:                                               ; preds = %1
  %25 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 4
  %26 = call noundef ptr @_ZNK4juce13ScopedPointerINS_9NamedPipeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %27 = getelementptr inbounds [2 x i32], ptr %4, i64 0, i64 0
  %28 = call noundef i32 @_ZN4juce9NamedPipe4readEPvii(ptr noundef nonnull align 8 dereferenceable(160) %26, ptr noundef %27, i32 noundef 8, i32 noundef -1)
  br label %29

29:                                               ; preds = %24, %19
  %30 = phi i32 [ %23, %19 ], [ %28, %24 ]
  store i32 %30, ptr %5, align 4, !tbaa !9
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = icmp eq i64 %32, 8
  br i1 %33, label %34, label %125

34:                                               ; preds = %29
  %35 = getelementptr inbounds [2 x i32], ptr %4, i64 0, i64 0
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = call noundef i32 @_ZN4juce9ByteOrder15swapIfBigEndianEj(i32 noundef %36) #6
  %38 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 7
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = icmp eq i32 %37, %39
  br i1 %40, label %41, label %125

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %42 = getelementptr inbounds [2 x i32], ptr %4, i64 0, i64 1
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = call noundef i32 @_ZN4juce9ByteOrder15swapIfBigEndianEj(i32 noundef %43) #6
  store i32 %44, ptr %6, align 4, !tbaa !9
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %47, label %121

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %48 = load i32, ptr %6, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  call void @_ZN4juce11MemoryBlockC1Emb(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %49, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %109, %47
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %53, label %111

53:                                               ; preds = %50
  %54 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 9
  %55 = call noundef ptr @_ZNK4juce13ScopedPointerINS_22InterprocessConnection16ConnectionThreadEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %54) #6
  %56 = invoke noundef zeroext i1 @_ZNK4juce6Thread16threadShouldExitEv(ptr noundef nonnull align 8 dereferenceable(285) %55)
          to label %57 unwind label %59

57:                                               ; preds = %53
  br i1 %56, label %58, label %63

58:                                               ; preds = %57
  store i1 false, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %117

59:                                               ; preds = %114, %53
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  br label %120

63:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = invoke noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %64, i32 noundef 65536)
          to label %66 unwind label %92

66:                                               ; preds = %63
  store i32 %65, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %67 = call noundef ptr @_ZNK4juce11MemoryBlock7getDataEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = call noundef ptr @_ZN4juce17addBytesToPointerIviEEPT_S2_T0_(ptr noundef %67, i32 noundef %68) #6
  store ptr %69, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %70 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 3
  %71 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %70) #6
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %80

73:                                               ; preds = %66
  %74 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 3
  %75 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %74) #6
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = invoke noundef i32 @_ZN4juce15StreamingSocket4readEPvib(ptr noundef nonnull align 8 dereferenceable(64) %75, ptr noundef %76, i32 noundef %77, i1 noundef zeroext true)
          to label %79 unwind label %96

79:                                               ; preds = %73
  br label %87

80:                                               ; preds = %66
  %81 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 4
  %82 = call noundef ptr @_ZNK4juce13ScopedPointerINS_9NamedPipeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %81) #6
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = invoke noundef i32 @_ZN4juce9NamedPipe4readEPvii(ptr noundef nonnull align 8 dereferenceable(160) %82, ptr noundef %83, i32 noundef %84, i32 noundef -1)
          to label %86 unwind label %96

86:                                               ; preds = %80
  br label %87

87:                                               ; preds = %86, %79
  %88 = phi i32 [ %78, %79 ], [ %85, %86 ]
  store i32 %88, ptr %14, align 4, !tbaa !9
  %89 = load i32, ptr %14, align 4, !tbaa !9
  %90 = icmp sle i32 %89, 0
  br i1 %90, label %91, label %100

91:                                               ; preds = %87
  store i32 3, ptr %11, align 4
  br label %107

92:                                               ; preds = %63
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %9, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %10, align 4
  br label %110

96:                                               ; preds = %80, %73
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %110

100:                                              ; preds = %87
  %101 = load i32, ptr %14, align 4, !tbaa !9
  %102 = load i32, ptr %8, align 4, !tbaa !9
  %103 = add nsw i32 %102, %101
  store i32 %103, ptr %8, align 4, !tbaa !9
  %104 = load i32, ptr %14, align 4, !tbaa !9
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = sub nsw i32 %105, %104
  store i32 %106, ptr %6, align 4, !tbaa !9
  store i32 0, ptr %11, align 4
  br label %107

107:                                              ; preds = %100, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %108 = load i32, ptr %11, align 4
  switch i32 %108, label %143 [
    i32 0, label %109
    i32 3, label %111
  ]

109:                                              ; preds = %107
  br label %50, !llvm.loop !20

110:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %120

111:                                              ; preds = %107, %50
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = icmp sge i32 %112, 0
  br i1 %113, label %114, label %116

114:                                              ; preds = %111
  invoke void @_ZN4juce22InterprocessConnection14deliverDataIntERKNS_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(96) %15, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %115 unwind label %59

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115, %111
  store i32 0, ptr %11, align 4
  br label %117

117:                                              ; preds = %116, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  %118 = load i32, ptr %11, align 4
  switch i32 %118, label %122 [
    i32 0, label %119
  ]

119:                                              ; preds = %117
  br label %121

120:                                              ; preds = %110, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %138

121:                                              ; preds = %119, %41
  store i32 0, ptr %11, align 4
  br label %122

122:                                              ; preds = %121, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %123 = load i32, ptr %11, align 4
  switch i32 %123, label %136 [
    i32 0, label %124
  ]

124:                                              ; preds = %122
  br label %135

125:                                              ; preds = %34, %29
  %126 = load i32, ptr %5, align 4, !tbaa !9
  %127 = icmp slt i32 %126, 0
  br i1 %127, label %128, label %134

128:                                              ; preds = %125
  %129 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %15, i32 0, i32 3
  %130 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %129) #6
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %133

132:                                              ; preds = %128
  call void @_ZN4juce22InterprocessConnection19deletePipeAndSocketEv(ptr noundef nonnull align 8 dereferenceable(96) %15)
  br label %133

133:                                              ; preds = %132, %128
  call void @_ZN4juce22InterprocessConnection17connectionLostIntEv(ptr noundef nonnull align 8 dereferenceable(96) %15)
  store i1 false, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %136

134:                                              ; preds = %125
  br label %135

135:                                              ; preds = %134, %124
  store i1 true, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %136

136:                                              ; preds = %135, %133, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %137 = load i1, ptr %2, align 1
  ret i1 %137

138:                                              ; preds = %120
  %139 = load ptr, ptr %9, align 8
  %140 = load i32, ptr %10, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142

143:                                              ; preds = %107
  unreachable
}

declare noundef i32 @_ZN4juce15StreamingSocket4readEPvib(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, i32 noundef, i1 noundef zeroext) #4

declare noundef i32 @_ZN4juce9NamedPipe4readEPvii(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef, i32 noundef, i32 noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce17addBytesToPointerIviEEPT_S2_T0_(ptr noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = { "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 "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 76}
!12 = !{!"_ZTSN4juce22InterprocessConnectionE", !13, i64 8, !15, i64 16, !16, i64 56, !17, i64 64, !18, i64 72, !18, i64 73, !10, i64 76, !10, i64 80, !19, i64 88}
!13 = !{!"_ZTSN4juce13WeakReferenceINS_22InterprocessConnectionENS_22ReferenceCountedObjectEE6MasterE", !14, i64 0}
!14 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_22InterprocessConnectionENS_22ReferenceCountedObjectEE13SharedPointerEEE", !6, i64 0}
!15 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!16 = !{!"_ZTSN4juce13ScopedPointerINS_15StreamingSocketEEE", !6, i64 0}
!17 = !{!"_ZTSN4juce13ScopedPointerINS_9NamedPipeEEE", !6, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN4juce13ScopedPointerINS_22InterprocessConnection16ConnectionThreadEEE", !6, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"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::MemoryBlock" = type { %"class.juce::HeapBlock.38", i64 }
%"class.juce::HeapBlock.38" = type { ptr }

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

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) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce6Thread16threadShouldExitEv(ptr noundef nonnull align 8 dereferenceable(285)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce9ByteOrder15swapIfBigEndianEj(i32 noundef) local_unnamed_addr #2 align 2

declare void @_ZN4juce11MemoryBlockC1Emb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce22InterprocessConnection14deliverDataIntERKNS_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce22InterprocessConnection18readNextMessageIntEv(ptr noundef nonnull align 8 dereferenceable(96) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca [2 x i32], align 4
  %3 = alloca %"class.juce::MemoryBlock", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %4 = getelementptr inbounds i8, ptr %0, i64 56
  %5 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %9, label %6

6:                                                ; preds = %1
  %7 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %8 = call noundef i32 @_ZN4juce15StreamingSocket4readEPvib(ptr noundef nonnull align 8 dereferenceable(64) %7, ptr noundef nonnull %2, i32 noundef 8, i1 noundef zeroext true)
  br label %13

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  %11 = tail call noundef ptr @_ZNK4juce13ScopedPointerINS_9NamedPipeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %12 = call noundef i32 @_ZN4juce9NamedPipe4readEPvii(ptr noundef nonnull align 8 dereferenceable(160) %11, ptr noundef nonnull %2, i32 noundef 8, i32 noundef -1)
  br label %13

13:                                               ; preds = %9, %6
  %14 = phi i32 [ %8, %6 ], [ %12, %9 ]
  %15 = icmp eq i32 %14, 8
  br i1 %15, label %16, label %59

16:                                               ; preds = %13
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = call noundef i32 @_ZN4juce9ByteOrder15swapIfBigEndianEj(i32 noundef %17) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 76
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = icmp eq i32 %18, %20
  br i1 %21, label %22, label %.thread

22:                                               ; preds = %16
  %23 = getelementptr inbounds i8, ptr %2, i64 4
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = call noundef i32 @_ZN4juce9ByteOrder15swapIfBigEndianEj(i32 noundef %24) #6
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %27, label %.thread

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %28 = zext nneg i32 %25 to i64
  call void @_ZN4juce11MemoryBlockC1Emb(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %28, i1 noundef zeroext true)
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = getelementptr inbounds i8, ptr %0, i64 64
  br label %31

31:                                               ; preds = %49, %27
  %.026 = phi i32 [ 0, %27 ], [ %52, %49 ]
  %.024 = phi i32 [ %25, %27 ], [ %53, %49 ]
  %32 = icmp sgt i32 %.024, 0
  br i1 %32, label %33, label %56

33:                                               ; preds = %31
  %34 = call noundef ptr @_ZNK4juce13ScopedPointerINS_22InterprocessConnection16ConnectionThreadEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #6
  %35 = call noundef zeroext i1 @_ZNK4juce6Thread16threadShouldExitEv(ptr noundef nonnull align 8 dereferenceable(285) %34)
  br i1 %35, label %.critedge, label %38

36:                                               ; preds = %56
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %58

38:                                               ; preds = %33
  %39 = call noundef i32 @_ZN4juce4jminIiEET_S1_S1_(i32 noundef %.024, i32 noundef 65536)
  %40 = call noundef ptr @_ZNK4juce11MemoryBlock7getDataEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  %41 = call noundef ptr @_ZN4juce17addBytesToPointerIviEEPT_S2_T0_(ptr noundef %40, i32 noundef %.026) #6
  %42 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %.not36 = icmp eq ptr %42, null
  br i1 %.not36, label %46, label %43

43:                                               ; preds = %38
  %44 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %45 = invoke noundef i32 @_ZN4juce15StreamingSocket4readEPvib(ptr noundef nonnull align 8 dereferenceable(64) %44, ptr noundef %41, i32 noundef %39, i1 noundef zeroext true)
          to label %49 unwind label %54

46:                                               ; preds = %38
  %47 = call noundef ptr @_ZNK4juce13ScopedPointerINS_9NamedPipeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %48 = invoke noundef i32 @_ZN4juce9NamedPipe4readEPvii(ptr noundef nonnull align 8 dereferenceable(160) %47, ptr noundef %41, i32 noundef %39, i32 noundef -1)
          to label %49 unwind label %54

49:                                               ; preds = %46, %43
  %50 = phi i32 [ %45, %43 ], [ %48, %46 ]
  %51 = icmp slt i32 %50, 1
  %52 = add nuw nsw i32 %50, %.026
  %53 = sub nsw i32 %.024, %50
  br i1 %51, label %56, label %31

54:                                               ; preds = %46, %43
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %58

56:                                               ; preds = %49, %31
  invoke void @_ZN4juce22InterprocessConnection14deliverDataIntERKNS_11MemoryBlockE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %57 unwind label %36

57:                                               ; preds = %56
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  br label %.thread

58:                                               ; preds = %54, %36
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %55, %54 ]
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn

.critedge:                                        ; preds = %33
  call void @_ZN4juce11MemoryBlockD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  br label %.thread

59:                                               ; preds = %13
  %60 = icmp slt i32 %14, 0
  br i1 %60, label %61, label %.thread

61:                                               ; preds = %59
  %62 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %.not35 = icmp eq ptr %62, null
  br i1 %.not35, label %64, label %63

63:                                               ; preds = %61
  call void @_ZN4juce22InterprocessConnection19deletePipeAndSocketEv(ptr noundef nonnull align 8 dereferenceable(96) %0)
  br label %64

64:                                               ; preds = %63, %61
  call void @_ZN4juce22InterprocessConnection17connectionLostIntEv(ptr noundef nonnull align 8 dereferenceable(96) %0)
  br label %.thread

.thread:                                          ; preds = %16, %59, %22, %57, %.critedge, %64
  %.3 = phi i1 [ false, %64 ], [ false, %.critedge ], [ true, %57 ], [ true, %22 ], [ true, %59 ], [ true, %16 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret i1 %.3
}

declare noundef i32 @_ZN4juce15StreamingSocket4readEPvib(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #4

declare noundef i32 @_ZN4juce9NamedPipe4readEPvii(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce17addBytesToPointerIviEEPT_S2_T0_(ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = { "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 "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 76}
!10 = !{!"_ZTSN4juce22InterprocessConnectionE", !11, i64 8, !14, i64 16, !15, i64 56, !16, i64 64, !17, i64 72, !17, i64 73, !6, i64 76, !6, i64 80, !18, i64 88}
!11 = !{!"_ZTSN4juce13WeakReferenceINS_22InterprocessConnectionENS_22ReferenceCountedObjectEE6MasterE", !12, i64 0}
!12 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_13WeakReferenceINS_22InterprocessConnectionENS_22ReferenceCountedObjectEE13SharedPointerEEE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!15 = !{!"_ZTSN4juce13ScopedPointerINS_15StreamingSocketEEE", !13, i64 0}
!16 = !{!"_ZTSN4juce13ScopedPointerINS_9NamedPipeEEE", !13, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN4juce13ScopedPointerINS_22InterprocessConnection16ConnectionThreadEEE", !13, i64 0}


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