; 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::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::GenericScopedLock.17" = type { ptr }
%"class.juce::IPAddress" = type { [4 x i8] }
%"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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 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_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce22InterprocessConnection20getConnectedHostNameEv(ptr dead_on_unwind noalias writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.juce::GenericScopedLock.17", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.juce::IPAddress", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %9 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %8, i32 0, i32 2
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  %10 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %8, i32 0, i32 4
  %11 = call noundef ptr @_ZNK4juce13ScopedPointerINS_9NamedPipeEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %18

13:                                               ; preds = %2
  %14 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %8, i32 0, i32 3
  %15 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %13
  call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  store i32 1, ptr %6, align 4
  br label %31

18:                                               ; preds = %13, %2
  %19 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %8, i32 0, i32 3
  %20 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %30

22:                                               ; preds = %18
  %23 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %8, i32 0, i32 3
  %24 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  %25 = call noundef zeroext i1 @_ZNK4juce15StreamingSocket7isLocalEv(ptr noundef nonnull align 8 dereferenceable(64) %24) #6
  br i1 %25, label %30, label %26

26:                                               ; preds = %22
  %27 = getelementptr inbounds %"class.juce::InterprocessConnection", ptr %8, i32 0, i32 3
  %28 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce15StreamingSocket11getHostNameEv(ptr noundef nonnull align 8 dereferenceable(64) %28) #6
  call void @_ZN4juce6StringC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %29) #6
  store i32 1, ptr %6, align 4
  br label %31

30:                                               ; preds = %22, %18
  store i32 0, ptr %6, align 4
  br label %31

31:                                               ; preds = %30, %26, %17
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %32 = load i32, ptr %6, align 4
  switch i32 %32, label %37 [
    i32 0, label %33
    i32 1, label %36
  ]

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %34 = call i32 @_ZN4juce9IPAddress5localEv() #6
  %35 = getelementptr inbounds %"class.juce::IPAddress", ptr %7, i32 0, i32 0
  store i32 %34, ptr %35, align 1
  call void @_ZNK4juce9IPAddress8toStringEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 1 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %36

36:                                               ; preds = %33, %31
  ret void

37:                                               ; preds = %31
  unreachable
}

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

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

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

; Function Attrs: nounwind
declare i32 @_ZN4juce9IPAddress5localEv() #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = { "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"}


; 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::GenericScopedLock.17" = type { ptr }
%"class.juce::IPAddress" = type { [4 x i8] }

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 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_15StreamingSocketEEcvPS1_Ev(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_9NamedPipeEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce22InterprocessConnection20getConnectedHostNameEv(ptr dead_on_unwind noalias writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %"class.juce::GenericScopedLock.17", align 8
  %4 = alloca %"class.juce::IPAddress", align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  %6 = getelementptr inbounds i8, ptr %1, i64 64
  %7 = call noundef ptr @_ZNK4juce13ScopedPointerINS_9NamedPipeEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %14

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %1, i64 56
  %11 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %9
  call void @_ZN4juce6StringC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %23

14:                                               ; preds = %9, %2
  %15 = getelementptr inbounds i8, ptr %1, i64 56
  %16 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %.not = icmp eq ptr %16, null
  br i1 %.not, label %24, label %17

17:                                               ; preds = %14
  %18 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %19 = call noundef zeroext i1 @_ZNK4juce15StreamingSocket7isLocalEv(ptr noundef nonnull align 8 dereferenceable(64) %18) #6
  br i1 %19, label %24, label %20

20:                                               ; preds = %17
  %21 = call noundef ptr @_ZNK4juce13ScopedPointerINS_15StreamingSocketEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4juce15StreamingSocket11getHostNameEv(ptr noundef nonnull align 8 dereferenceable(64) %21) #6
  call void @_ZN4juce6StringC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %23

23:                                               ; preds = %20, %13
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %26

24:                                               ; preds = %17, %14
  call void @_ZN4juce17GenericScopedLockINS_15CriticalSectionEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %25 = call i32 @_ZN4juce9IPAddress5localEv() #6
  store i32 %25, ptr %4, align 4
  call void @_ZNK4juce9IPAddress8toStringEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %0, ptr noundef nonnull align 1 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %26

26:                                               ; preds = %23, %24
  ret void
}

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

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

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

; Function Attrs: nounwind
declare i32 @_ZN4juce9IPAddress5localEv() local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = { "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)"}


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