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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.juce::PropertiesFile" = type <{ %"class.juce::PropertySet.base", [7 x i8], %"class.juce::ChangeBroadcaster", %"class.juce::Timer", %"class.juce::File", %"struct.juce::PropertiesFile::Options", i8, i8, [6 x i8] }>
%"class.juce::PropertySet.base" = type <{ ptr, %"class.juce::StringPairArray", ptr, %"class.juce::CriticalSection", i8 }>
%"class.juce::StringPairArray" = type <{ %"class.juce::StringArray", %"class.juce::StringArray", i8, [7 x i8] }>
%"class.juce::StringArray" = type { %"class.juce::Array.55" }
%"class.juce::Array.55" = type { %"class.juce::ArrayAllocationBase.56", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.56" = type <{ %"class.juce::HeapBlock.57", i32, [4 x i8] }>
%"class.juce::HeapBlock.57" = 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::ChangeBroadcaster" = type { ptr, %"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback", %"class.juce::ListenerList.32" }
%"class.juce::ChangeBroadcaster::ChangeBroadcasterCallback" = type { %"class.juce::AsyncUpdater", ptr }
%"class.juce::AsyncUpdater" = type { ptr, %"class.juce::ReferenceCountedObjectPtr" }
%"class.juce::ReferenceCountedObjectPtr" = type { ptr }
%"class.juce::ListenerList.32" = type { %"class.juce::Array.33" }
%"class.juce::Array.33" = type { %"class.juce::ArrayAllocationBase.34", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.34" = type <{ %"class.juce::HeapBlock.35", i32, [4 x i8] }>
%"class.juce::HeapBlock.35" = type { ptr }
%"class.juce::Timer" = type { ptr, i32, i32, ptr, ptr }
%"class.juce::File" = type { %"class.juce::String" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"struct.juce::PropertiesFile::Options" = type { %"class.juce::String", %"class.juce::String", %"class.juce::String", %"class.juce::String", i8, i8, i8, i32, i32, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4juce14PropertiesFile17createProcessLockEv(ptr noundef nonnull align 8 dereferenceable(274) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.juce::PropertiesFile", ptr %7, i32 0, i32 5
  %9 = getelementptr inbounds %"struct.juce::PropertiesFile::Options", ptr %8, i32 0, i32 9
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = icmp ne ptr %10, null
  store i1 false, ptr %4, align 1
  br i1 %11, label %12, label %18

12:                                               ; preds = %1
  %13 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #3
  store ptr %13, ptr %3, align 8
  store i1 true, ptr %4, align 1
  %14 = getelementptr inbounds %"class.juce::PropertiesFile", ptr %7, i32 0, i32 5
  %15 = getelementptr inbounds %"struct.juce::PropertiesFile::Options", ptr %14, i32 0, i32 9
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  invoke void @_ZN4juce16InterProcessLock14ScopedLockTypeC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %13, ptr noundef nonnull align 8 dereferenceable(56) %16)
          to label %17 unwind label %21

17:                                               ; preds = %12
  br label %19

18:                                               ; preds = %1
  br label %19

19:                                               ; preds = %18, %17
  %20 = phi ptr [ %13, %17 ], [ null, %18 ]
  ret ptr %20

21:                                               ; preds = %12
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %5, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %6, align 4
  %25 = load i1, ptr %4, align 1
  br i1 %25, label %26, label %28

26:                                               ; preds = %21
  %27 = load ptr, ptr %3, align 8
  call void @_ZdlPvm(ptr noundef %27, i64 noundef 16) #4
  br label %28

28:                                               ; preds = %26, %21
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %5, align 8
  %31 = load i32, ptr %6, align 4
  %32 = insertvalue { ptr, i32 } poison, ptr %30, 0
  %33 = insertvalue { ptr, i32 } %32, i32 %31, 1
  resume { ptr, i32 } %33
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce16InterProcessLock14ScopedLockTypeC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2 align 2

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { builtin allocsize(0) }
attributes #4 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 264}
!10 = !{!"_ZTSN4juce14PropertiesFileE", !11, i64 0, !20, i64 120, !28, i64 176, !29, i64 208, !32, i64 216, !18, i64 272, !18, i64 273}
!11 = !{!"_ZTSN4juce11PropertySetE", !12, i64 8, !6, i64 64, !19, i64 72, !18, i64 112}
!12 = !{!"_ZTSN4juce15StringPairArrayE", !13, i64 0, !13, i64 24, !18, i64 48}
!13 = !{!"_ZTSN4juce11StringArrayE", !14, i64 0}
!14 = !{!"_ZTSN4juce5ArrayINS_6StringENS_20DummyCriticalSectionELi0EEE", !15, i64 0, !17, i64 16}
!15 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_6StringENS_20DummyCriticalSectionEEE", !16, i64 0, !17, i64 8}
!16 = !{!"_ZTSN4juce9HeapBlockINS_6StringELb0EEE", !6, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN4juce15CriticalSectionE", !7, i64 0}
!20 = !{!"_ZTSN4juce17ChangeBroadcasterE", !21, i64 8, !24, i64 32}
!21 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !22, i64 0, !6, i64 16}
!22 = !{!"_ZTSN4juce12AsyncUpdaterE", !23, i64 8}
!23 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !6, i64 0}
!24 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !25, i64 0}
!25 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !26, i64 0, !17, i64 16}
!26 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !27, i64 0, !17, i64 8}
!27 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !6, i64 0}
!28 = !{!"_ZTSN4juce5TimerE", !17, i64 8, !17, i64 12, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSN4juce4FileE", !30, i64 0}
!30 = !{!"_ZTSN4juce6StringE", !31, i64 0}
!31 = !{!"_ZTSN4juce16CharPointer_UTF8E", !6, i64 0}
!32 = !{!"_ZTSN4juce14PropertiesFile7OptionsE", !30, i64 0, !30, i64 8, !30, i64 16, !30, i64 24, !18, i64 32, !18, i64 33, !18, i64 34, !17, i64 36, !33, i64 40, !6, i64 48}
!33 = !{!"_ZTSN4juce14PropertiesFile13StorageFormatE", !7, i64 0}


; 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"

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4juce14PropertiesFile17createProcessLockEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(274) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 264
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %6, label %4

4:                                                ; preds = %1
  %5 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #3
  invoke void @_ZN4juce16InterProcessLock14ScopedLockTypeC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %5, ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %6 unwind label %8

6:                                                ; preds = %1, %4
  %7 = phi ptr [ %5, %4 ], [ null, %1 ]
  ret ptr %7

8:                                                ; preds = %4
  %9 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %5, i64 noundef 16) #4
  resume { ptr, i32 } %9
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce16InterProcessLock14ScopedLockTypeC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2 align 2

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { builtin allocsize(0) }
attributes #4 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 264}
!6 = !{!"_ZTSN4juce14PropertiesFileE", !7, i64 0, !19, i64 120, !27, i64 176, !28, i64 208, !31, i64 216, !17, i64 272, !17, i64 273}
!7 = !{!"_ZTSN4juce11PropertySetE", !8, i64 8, !13, i64 64, !18, i64 72, !17, i64 112}
!8 = !{!"_ZTSN4juce15StringPairArrayE", !9, i64 0, !9, i64 24, !17, i64 48}
!9 = !{!"_ZTSN4juce11StringArrayE", !10, i64 0}
!10 = !{!"_ZTSN4juce5ArrayINS_6StringENS_20DummyCriticalSectionELi0EEE", !11, i64 0, !16, i64 16}
!11 = !{!"_ZTSN4juce19ArrayAllocationBaseINS_6StringENS_20DummyCriticalSectionEEE", !12, i64 0, !16, i64 8}
!12 = !{!"_ZTSN4juce9HeapBlockINS_6StringELb0EEE", !13, i64 0}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"int", !14, i64 0}
!17 = !{!"bool", !14, i64 0}
!18 = !{!"_ZTSN4juce15CriticalSectionE", !14, i64 0}
!19 = !{!"_ZTSN4juce17ChangeBroadcasterE", !20, i64 8, !23, i64 32}
!20 = !{!"_ZTSN4juce17ChangeBroadcaster25ChangeBroadcasterCallbackE", !21, i64 0, !13, i64 16}
!21 = !{!"_ZTSN4juce12AsyncUpdaterE", !22, i64 8}
!22 = !{!"_ZTSN4juce25ReferenceCountedObjectPtrINS_12AsyncUpdater19AsyncUpdaterMessageEEE", !13, i64 0}
!23 = !{!"_ZTSN4juce12ListenerListINS_14ChangeListenerENS_5ArrayIPS1_NS_20DummyCriticalSectionELi0EEEEE", !24, i64 0}
!24 = !{!"_ZTSN4juce5ArrayIPNS_14ChangeListenerENS_20DummyCriticalSectionELi0EEE", !25, i64 0, !16, i64 16}
!25 = !{!"_ZTSN4juce19ArrayAllocationBaseIPNS_14ChangeListenerENS_20DummyCriticalSectionEEE", !26, i64 0, !16, i64 8}
!26 = !{!"_ZTSN4juce9HeapBlockIPNS_14ChangeListenerELb0EEE", !13, i64 0}
!27 = !{!"_ZTSN4juce5TimerE", !16, i64 8, !16, i64 12, !13, i64 16, !13, i64 24}
!28 = !{!"_ZTSN4juce4FileE", !29, i64 0}
!29 = !{!"_ZTSN4juce6StringE", !30, i64 0}
!30 = !{!"_ZTSN4juce16CharPointer_UTF8E", !13, i64 0}
!31 = !{!"_ZTSN4juce14PropertiesFile7OptionsE", !29, i64 0, !29, i64 8, !29, i64 16, !29, i64 24, !17, i64 32, !17, i64 33, !17, i64 34, !16, i64 36, !32, i64 40, !13, i64 48}
!32 = !{!"_ZTSN4juce14PropertiesFile13StorageFormatE", !14, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass