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

@_ZTVN4juce17RelativePointPath11QuadraticToE = 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 @_ZN4juce17RelativePointPath11QuadraticToC2ERKNS_13RelativePointES4_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  call void @_ZN4juce17RelativePointPath11ElementBaseC2ENS0_11ElementTypeE(ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef 4)
  store ptr getelementptr inbounds inrange(-16, 48) ({ [8 x ptr] }, ptr @_ZTVN4juce17RelativePointPath11QuadraticToE, i32 0, i32 0, i32 2), ptr %9, align 8, !tbaa !9
  %10 = getelementptr inbounds %"class.juce::RelativePointPath::QuadraticTo", ptr %9, i32 0, i32 1
  %11 = getelementptr inbounds [2 x %"class.juce::RelativePoint"], ptr %10, i32 0, i32 0
  %12 = getelementptr inbounds %"class.juce::RelativePoint", ptr %11, i64 2
  br label %13

13:                                               ; preds = %15, %3
  %14 = phi ptr [ %11, %3 ], [ %16, %15 ]
  invoke void @_ZN4juce13RelativePointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %15 unwind label %29

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

18:                                               ; preds = %15
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"class.juce::RelativePointPath::QuadraticTo", ptr %9, i32 0, i32 1
  %21 = getelementptr inbounds [2 x %"class.juce::RelativePoint"], ptr %20, i64 0, i64 0
  %22 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %23 unwind label %39

23:                                               ; preds = %18
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.juce::RelativePointPath::QuadraticTo", ptr %9, i32 0, i32 1
  %26 = getelementptr inbounds [2 x %"class.juce::RelativePoint"], ptr %25, i64 0, i64 1
  %27 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %28 unwind label %39

28:                                               ; preds = %23
  ret void

29:                                               ; preds = %13
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %7, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %8, align 4
  %33 = icmp eq ptr %11, %14
  br i1 %33, label %38, label %34

34:                                               ; preds = %34, %29
  %35 = phi ptr [ %14, %29 ], [ %36, %34 ]
  %36 = getelementptr inbounds %"class.juce::RelativePoint", ptr %35, i64 -1
  call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #4
  %37 = icmp eq ptr %36, %11
  br i1 %37, label %38, label %34

38:                                               ; preds = %34, %29
  br label %50

39:                                               ; preds = %23, %18
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  %43 = getelementptr inbounds [2 x %"class.juce::RelativePoint"], ptr %10, i32 0, i32 0
  %44 = getelementptr inbounds %"class.juce::RelativePoint", ptr %43, i64 2
  br label %45

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

49:                                               ; preds = %45
  br label %50

50:                                               ; preds = %49, %38
  call void @_ZN4juce17RelativePointPath11ElementBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %9) #4
  br label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr %7, align 8
  %53 = load i32, ptr %8, align 4
  %54 = insertvalue { ptr, i32 } poison, ptr %52, 0
  %55 = insertvalue { ptr, i32 } %54, i32 %53, 1
  resume { ptr, i32 } %55
}

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

@_ZTVN4juce17RelativePointPath11QuadraticToE = 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 @_ZN4juce17RelativePointPath11QuadraticToC2ERKNS_13RelativePointES4_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2) 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 4)
  store ptr getelementptr inbounds inrange(-16, 48) (i8, ptr @_ZTVN4juce17RelativePointPath11QuadraticToE, i64 16), ptr %0, align 8, !tbaa !5
  %.ptr9 = getelementptr inbounds i8, ptr %0, i64 16
  invoke void @_ZN4juce13RelativePointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr9)
          to label %5 unwind label %.thread

.thread:                                          ; preds = %3
  %4 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

5:                                                ; preds = %3
  %.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
  %7 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4juce13RelativePointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %.ptr9, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %8 unwind label %.loopexit.loopexit

8:                                                ; preds = %6
  %9 = 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 %10 unwind label %.loopexit.loopexit

10:                                               ; preds = %8
  ret void

.preheader.preheader:                             ; preds = %5
  %11 = landingpad { ptr, i32 }
          cleanup
  %.ptr13 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN4juce13RelativePointD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr13) #4
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %8, %6
  %12 = landingpad { ptr, i32 }
          cleanup
  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) %.ptr9) #4
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %.thread, %.loopexit.loopexit
  %.pn = phi { ptr, i32 } [ %12, %.loopexit.loopexit ], [ %4, %.thread ], [ %11, %.preheader.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: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass