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

; 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::Identifier" = type { %"class.juce::String" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::ValueTree" = type { %"class.juce::ReferenceCountedObjectPtr.174", %"class.juce::ListenerList.175" }
%"class.juce::ReferenceCountedObjectPtr.174" = type { ptr }
%"class.juce::ListenerList.175" = type { %"class.juce::Array.176" }
%"class.juce::Array.176" = type { %"class.juce::ArrayAllocationBase.177", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.177" = type <{ %"class.juce::HeapBlock.178", i32, [4 x i8] }>
%"class.juce::HeapBlock.178" = type { ptr }
%"class.juce::var" = type { ptr, %"union.juce::var::ValueUnion" }
%"union.juce::var::ValueUnion" = type { i64 }
%"class.juce::RelativePointPath::StartSubPath" = type { %"class.juce::RelativePointPath::ElementBase.base", %"class.juce::RelativePoint" }
%"class.juce::RelativePointPath::ElementBase.base" = type <{ ptr, i32 }>
%"class.juce::RelativePoint" = type { %"class.juce::RelativeCoordinate", %"class.juce::RelativeCoordinate" }
%"class.juce::RelativeCoordinate" = type { %"class.juce::Expression" }
%"class.juce::Expression" = type { %"class.juce::ReferenceCountedObjectPtr.59" }
%"class.juce::ReferenceCountedObjectPtr.59" = type { ptr }

@_ZN4juce12DrawablePath16ValueTreeWrapper6point1E = external dso_local global %"class.juce::Identifier", align 8
@_ZN4juce12DrawablePath16ValueTreeWrapper7Element19startSubPathElementE = external dso_local global %"class.juce::Identifier", align 8

declare i32 @__gxx_personality_v0(...)

; 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

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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN4juce9ValueTree11setPropertyERKNS_10IdentifierERKNS_3varEPNS_11UndoManagerE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2

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

declare void @_ZN4juce3varC1EONS_6StringE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

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

declare void @_ZN4juce9ValueTreeC1ERKNS_10IdentifierE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce17RelativePointPath12StartSubPath10createTreeEv(ptr dead_on_unwind noalias writable sret(%"class.juce::ValueTree") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.juce::var", align 8
  %7 = alloca %"class.juce::String", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZN4juce9ValueTreeC1ERKNS_10IdentifierE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) @_ZN4juce12DrawablePath16ValueTreeWrapper7Element19startSubPathElementE)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %11 = getelementptr inbounds %"class.juce::RelativePointPath::StartSubPath", ptr %10, i32 0, i32 1
  invoke void @_ZNK4juce13RelativePoint8toStringEv(ptr dead_on_unwind writable sret(%"class.juce::String") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %12 unwind label %17

12:                                               ; preds = %2
  invoke void @_ZN4juce3varC1EONS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %13 unwind label %21

13:                                               ; preds = %12
  %14 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN4juce9ValueTree11setPropertyERKNS_10IdentifierERKNS_3varEPNS_11UndoManagerE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) @_ZN4juce12DrawablePath16ValueTreeWrapper6point1E, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef null)
          to label %15 unwind label %25

15:                                               ; preds = %13
  call void @_ZN4juce3varD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  store i1 true, ptr %5, align 1
  %16 = load i1, ptr %5, align 1
  br i1 %16, label %32, label %31

17:                                               ; preds = %2
  %18 = landingpad { ptr, i32 }
          cleanup
  %19 = extractvalue { ptr, i32 } %18, 0
  store ptr %19, ptr %8, align 8
  %20 = extractvalue { ptr, i32 } %18, 1
  store i32 %20, ptr %9, align 4
  br label %30

21:                                               ; preds = %12
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %8, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %9, align 4
  br label %29

25:                                               ; preds = %13
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %8, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %9, align 4
  call void @_ZN4juce3varD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  br label %29

29:                                               ; preds = %25, %21
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %30

30:                                               ; preds = %29, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  call void @_ZN4juce9ValueTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %33

31:                                               ; preds = %15
  call void @_ZN4juce9ValueTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  br label %32

32:                                               ; preds = %31, %15
  ret void

33:                                               ; preds = %30
  %34 = load ptr, ptr %8, align 8
  %35 = load i32, ptr %9, align 4
  %36 = insertvalue { ptr, i32 } poison, ptr %34, 0
  %37 = insertvalue { ptr, i32 } %36, i32 %35, 1
  resume { ptr, i32 } %37
}

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 = { "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 = { 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::Identifier" = type { %"class.juce::String" }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::ValueTree" = type { %"class.juce::ReferenceCountedObjectPtr.174", %"class.juce::ListenerList.175" }
%"class.juce::ReferenceCountedObjectPtr.174" = type { ptr }
%"class.juce::ListenerList.175" = type { %"class.juce::Array.176" }
%"class.juce::Array.176" = type { %"class.juce::ArrayAllocationBase.177", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.177" = type <{ %"class.juce::HeapBlock.178", i32, [4 x i8] }>
%"class.juce::HeapBlock.178" = type { ptr }
%"class.juce::var" = type { ptr, %"union.juce::var::ValueUnion" }
%"union.juce::var::ValueUnion" = type { i64 }

@_ZN4juce12DrawablePath16ValueTreeWrapper6point1E = external dso_local global %"class.juce::Identifier", align 8
@_ZN4juce12DrawablePath16ValueTreeWrapper7Element19startSubPathElementE = external dso_local global %"class.juce::Identifier", align 8

declare i32 @__gxx_personality_v0(...)

; 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

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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN4juce9ValueTree11setPropertyERKNS_10IdentifierERKNS_3varEPNS_11UndoManagerE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2

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

declare void @_ZN4juce3varC1EONS_6StringE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

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

declare void @_ZN4juce9ValueTreeC1ERKNS_10IdentifierE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4juce17RelativePointPath12StartSubPath10createTreeEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.juce::ValueTree") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.juce::var", align 8
  %4 = alloca %"class.juce::String", align 8
  tail call void @_ZN4juce9ValueTreeC1ERKNS_10IdentifierE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) @_ZN4juce12DrawablePath16ValueTreeWrapper7Element19startSubPathElementE)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  invoke void @_ZNK4juce13RelativePoint8toStringEv(ptr dead_on_unwind nonnull writable sret(%"class.juce::String") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %6 unwind label %10

6:                                                ; preds = %2
  invoke void @_ZN4juce3varC1EONS_6StringE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %7 unwind label %12

7:                                                ; preds = %6
  %8 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN4juce9ValueTree11setPropertyERKNS_10IdentifierERKNS_3varEPNS_11UndoManagerE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) @_ZN4juce12DrawablePath16ValueTreeWrapper6point1E, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef null)
          to label %9 unwind label %14

9:                                                ; preds = %7
  call void @_ZN4juce3varD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  ret void

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

12:                                               ; preds = %6
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %16

14:                                               ; preds = %7
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce3varD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br label %16

16:                                               ; preds = %14, %12
  %.pn = phi { ptr, i32 } [ %15, %14 ], [ %13, %12 ]
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br label %17

17:                                               ; preds = %16, %10
  %.pn.pn = phi { ptr, i32 } [ %.pn, %16 ], [ %11, %10 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @_ZN4juce9ValueTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  resume { ptr, i32 } %.pn.pn
}

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 = { "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 = { 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: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass