; 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::RelativePointPath::CubicTo" = type { %"class.juce::RelativePointPath::ElementBase.base", [3 x %"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 }

@_ZTVN4juce17RelativePointPath7CubicToE = external dso_local unnamed_addr constant { [8 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17RelativePointPath11ElementBaseC2ENS0_11ElementTypeE(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce17RelativePointPath7CubicToC2ERKNS_13RelativePointES4_S4_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) unnamed_addr #3 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 ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  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
  %11 = load ptr, ptr %5, align 8
  call void @_ZN4juce17RelativePointPath11ElementBaseC2ENS0_11ElementTypeE(ptr noundef nonnull align 8 dereferenceable(12) %11, i32 noundef 5)
  store ptr getelementptr inbounds inrange(-16, 48) ({ [8 x ptr] }, ptr @_ZTVN4juce17RelativePointPath7CubicToE, i32 0, i32 0, i32 2), ptr %11, align 8, !tbaa !9
  %12 = getelementptr inbounds %"class.juce::RelativePointPath::CubicTo", ptr %11, i32 0, i32 1
  %13 = getelementptr inbounds [3 x %"class.juce::RelativePoint"], ptr %12, i32 0, i32 0
  %14 = getelementptr inbounds %"class.juce::RelativePoint", ptr %13, i64 3
  br label %15

15:                                               ; preds = %17, %4
  %16 = phi ptr [ %13, %4 ], [ %18, %17 ]
  invoke void @_ZN4juce13RelativePointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %17 unwind label %36

17:                                               ; preds = %15
  %18 = getelementptr inbounds %"class.juce::RelativePoint", ptr %16, i64 1
  %19 = icmp eq ptr %18, %14
  br i1 %19, label %20, label %15

20:                                               ; preds = %17
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.juce::RelativePointPath::CubicTo", ptr %11, i32 0, i32 1
  %23 = getelementptr inbounds [3 x %"class.juce::RelativePoint"], ptr %22, i64 0, i64 0
  %24 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %25 unwind label %46

25:                                               ; preds = %20
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.juce::RelativePointPath::CubicTo", ptr %11, i32 0, i32 1
  %28 = getelementptr inbounds [3 x %"class.juce::RelativePoint"], ptr %27, i64 0, i64 1
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %30 unwind label %46

30:                                               ; preds = %25
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.juce::RelativePointPath::CubicTo", ptr %11, i32 0, i32 1
  %33 = getelementptr inbounds [3 x %"class.juce::RelativePoint"], ptr %32, i64 0, i64 2
  %34 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %35 unwind label %46

35:                                               ; preds = %30
  ret void

36:                                               ; preds = %15
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %9, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %10, align 4
  %40 = icmp eq ptr %13, %16
  br i1 %40, label %45, label %41

41:                                               ; preds = %41, %36
  %42 = phi ptr [ %16, %36 ], [ %43, %41 ]
  %43 = getelementptr inbounds %"class.juce::RelativePoint", ptr %42, i64 -1
  call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %43) #4
  %44 = icmp eq ptr %43, %13
  br i1 %44, label %45, label %41

45:                                               ; preds = %41, %36
  br label %57

46:                                               ; preds = %30, %25, %20
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  %50 = getelementptr inbounds [3 x %"class.juce::RelativePoint"], ptr %12, i32 0, i32 0
  %51 = getelementptr inbounds %"class.juce::RelativePoint", ptr %50, i64 3
  br label %52

52:                                               ; preds = %52, %46
  %53 = phi ptr [ %51, %46 ], [ %54, %52 ]
  %54 = getelementptr inbounds %"class.juce::RelativePoint", ptr %53, i64 -1
  call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %54) #4
  %55 = icmp eq ptr %54, %50
  br i1 %55, label %56, label %52

56:                                               ; preds = %52
  br label %57

57:                                               ; preds = %56, %45
  call void @_ZN4juce17RelativePointPath11ElementBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %11) #4
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %9, align 8
  %60 = load i32, ptr %10, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17RelativePointPath11ElementBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #2 align 2

declare void @_ZN4juce13RelativePointC1Ev(ptr)

attributes #0 = { 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 #1 = { inlinehint 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 #2 = { 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 = { 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 = !{!"vtable pointer", !8, 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"

@_ZTVN4juce17RelativePointPath7CubicToE = external dso_local unnamed_addr constant { [8 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17RelativePointPath11ElementBaseC2ENS0_11ElementTypeE(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce17RelativePointPath7CubicToC2ERKNS_13RelativePointES4_S4_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN4juce17RelativePointPath11ElementBaseC2ENS0_11ElementTypeE(ptr noundef nonnull align 8 dereferenceable(12) %0, i32 noundef 5)
  store ptr getelementptr inbounds inrange(-16, 48) (i8, ptr @_ZTVN4juce17RelativePointPath7CubicToE, i64 16), ptr %0, align 8, !tbaa !5
  %.ptr10 = getelementptr inbounds i8, ptr %0, i64 16
  invoke void @_ZN4juce13RelativePointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr10)
          to label %5 unwind label %14

5:                                                ; preds = %4
  %.ptr.ptr.1 = getelementptr inbounds i8, ptr %0, i64 32
  invoke void @_ZN4juce13RelativePointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr.ptr.1)
          to label %6 unwind label %.preheader.preheader

6:                                                ; preds = %5
  %.ptr.ptr.2 = getelementptr inbounds i8, ptr %0, i64 48
  invoke void @_ZN4juce13RelativePointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr.ptr.2)
          to label %7 unwind label %.preheader.preheader

7:                                                ; preds = %6
  %8 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %.ptr10, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %9 unwind label %.loopexit.loopexit

9:                                                ; preds = %7
  %10 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %.ptr.ptr.1, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %11 unwind label %.loopexit.loopexit

11:                                               ; preds = %9
  %12 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %.ptr.ptr.2, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %13 unwind label %.loopexit.loopexit

13:                                               ; preds = %11
  ret void

14:                                               ; preds = %4
  %lpad.thr_comm.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.preheader.preheader:                             ; preds = %5, %6
  %.idx.lcssa.ph = phi i64 [ 48, %6 ], [ 32, %5 ]
  %lpad.thr_comm = landingpad { ptr, i32 }
          cleanup
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.idx11 = phi i64 [ %.add12, %.preheader ], [ %.idx.lcssa.ph, %.preheader.preheader ]
  %.add12 = add nsw i64 %.idx11, -16
  %.ptr14 = getelementptr inbounds i8, ptr %0, i64 %.add12
  tail call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr14) #4
  %15 = icmp eq i64 %.add12, 16
  br i1 %15, label %.loopexit, label %.preheader

.loopexit.loopexit:                               ; preds = %11, %9, %7
  %16 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr.ptr.2) #4
  tail call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr.ptr.1) #4
  tail call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr10) #4
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader, %14, %.loopexit.loopexit
  %.pn = phi { ptr, i32 } [ %lpad.thr_comm.split-lp, %14 ], [ %16, %.loopexit.loopexit ], [ %lpad.thr_comm, %.preheader ]
  tail call void @_ZN4juce17RelativePointPath11ElementBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %0) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce17RelativePointPath11ElementBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #2 align 2

declare void @_ZN4juce13RelativePointC1Ev(ptr) local_unnamed_addr

attributes #0 = { 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 #1 = { inlinehint 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 #2 = { 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass