; 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::Rectangle.148" = type { %"class.juce::Point.35", float, float }
%"class.juce::Point.35" = type { float, float }
%"class.juce::RelativeRectangleLocalScope" = type { %"class.juce::Expression::Scope", ptr }
%"class.juce::Expression::Scope" = type { ptr }
%"class.juce::RelativeRectangle" = type { %"class.juce::RelativeCoordinate", %"class.juce::RelativeCoordinate", %"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 }

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
define dso_local void @_ZNK4juce17RelativeRectangle7resolveEPKNS_10Expression5ScopeE(ptr dead_on_unwind noalias writable sret(%"class.juce::Rectangle.148") align 4 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.juce::RelativeRectangleLocalScope", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %23

17:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  call void @_ZN4juce27RelativeRectangleLocalScopeC2ERKNS_17RelativeRectangleE(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(32) %14)
  invoke void @_ZNK4juce17RelativeRectangle7resolveEPKNS_10Expression5ScopeE(ptr dead_on_unwind writable sret(%"class.juce::Rectangle.148") align 4 %0, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %7)
          to label %18 unwind label %19

18:                                               ; preds = %17
  call void @_ZN4juce10Expression5ScopeD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  br label %50

19:                                               ; preds = %17
  %20 = landingpad { ptr, i32 }
          cleanup
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %8, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %9, align 4
  call void @_ZN4juce10Expression5ScopeD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  br label %51

23:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %24 = getelementptr inbounds %"class.juce::RelativeRectangle", ptr %14, i32 0, i32 0
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef %25)
  store double %26, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %27 = getelementptr inbounds %"class.juce::RelativeRectangle", ptr %14, i32 0, i32 1
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef %28)
  store double %29, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %30 = getelementptr inbounds %"class.juce::RelativeRectangle", ptr %14, i32 0, i32 2
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef %31)
  store double %32, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %33 = getelementptr inbounds %"class.juce::RelativeRectangle", ptr %14, i32 0, i32 3
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef %34)
  store double %35, ptr %13, align 8, !tbaa !9
  %36 = load double, ptr %10, align 8, !tbaa !9
  %37 = fptrunc double %36 to float
  %38 = load double, ptr %12, align 8, !tbaa !9
  %39 = fptrunc double %38 to float
  %40 = load double, ptr %11, align 8, !tbaa !9
  %41 = load double, ptr %10, align 8, !tbaa !9
  %42 = fsub double %40, %41
  %43 = call noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef 0.000000e+00, double noundef %42)
  %44 = fptrunc double %43 to float
  %45 = load double, ptr %13, align 8, !tbaa !9
  %46 = load double, ptr %12, align 8, !tbaa !9
  %47 = fsub double %45, %46
  %48 = call noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef 0.000000e+00, double noundef %47)
  %49 = fptrunc double %48 to float
  call void @_ZN4juce9RectangleIfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %0, float noundef %37, float noundef %39, float noundef %44, float noundef %49) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %50

50:                                               ; preds = %23, %18
  ret void

51:                                               ; preds = %19
  %52 = load ptr, ptr %8, align 8
  %53 = load i32, ptr %9, 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 uwtable
declare dso_local noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef, double noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce9RectangleIfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce27RelativeRectangleLocalScopeC2ERKNS_17RelativeRectangleE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #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 = !{!"double", !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"

%"class.juce::Rectangle.148" = type { %"class.juce::Point.35", float, float }
%"class.juce::Point.35" = type { float, float }
%"class.juce::RelativeRectangleLocalScope" = type { %"class.juce::Expression::Scope", ptr }
%"class.juce::Expression::Scope" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
define dso_local void @_ZNK4juce17RelativeRectangle7resolveEPKNS_10Expression5ScopeE(ptr dead_on_unwind noalias writable sret(%"class.juce::Rectangle.148") align 4 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.juce::RelativeRectangleLocalScope", align 8
  %5 = icmp eq ptr %2, null
  br i1 %5, label %6, label %25

6:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @_ZN4juce27RelativeRectangleLocalScopeC2ERKNS_17RelativeRectangleE(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %7 = invoke noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %4)
          to label %.noexc unwind label %23

.noexc:                                           ; preds = %6
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = invoke noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %4)
          to label %.noexc13 unwind label %23

.noexc13:                                         ; preds = %.noexc
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = invoke noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull %4)
          to label %.noexc14 unwind label %23

.noexc14:                                         ; preds = %.noexc13
  %12 = getelementptr inbounds i8, ptr %1, i64 24
  %13 = invoke noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %4)
          to label %14 unwind label %23

14:                                               ; preds = %.noexc14
  %15 = fptrunc double %7 to float
  %16 = fptrunc double %11 to float
  %17 = fsub double %9, %7
  %18 = call noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef 0.000000e+00, double noundef %17), !noalias !5
  %19 = fptrunc double %18 to float
  %20 = fsub double %13, %11
  %21 = call noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef 0.000000e+00, double noundef %20), !noalias !5
  %22 = fptrunc double %21 to float
  call void @_ZN4juce9RectangleIfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %0, float noundef %15, float noundef %16, float noundef %19, float noundef %22) #4
  call void @_ZN4juce10Expression5ScopeD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br label %41

23:                                               ; preds = %.noexc14, %.noexc13, %.noexc, %6
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce10Expression5ScopeD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  resume { ptr, i32 } %24

25:                                               ; preds = %3
  %26 = tail call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %2)
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = tail call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull %2)
  %29 = getelementptr inbounds i8, ptr %1, i64 16
  %30 = tail call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull %2)
  %31 = getelementptr inbounds i8, ptr %1, i64 24
  %32 = tail call noundef double @_ZNK4juce18RelativeCoordinate7resolveEPKNS_10Expression5ScopeE(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull %2)
  %33 = fptrunc double %26 to float
  %34 = fptrunc double %30 to float
  %35 = fsub double %28, %26
  %36 = tail call noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef 0.000000e+00, double noundef %35)
  %37 = fptrunc double %36 to float
  %38 = fsub double %32, %30
  %39 = tail call noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef 0.000000e+00, double noundef %38)
  %40 = fptrunc double %39 to float
  tail call void @_ZN4juce9RectangleIfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %0, float noundef %33, float noundef %34, float noundef %37, float noundef %40) #4
  br label %41

41:                                               ; preds = %25, %14
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN4juce4jmaxIdEET_S1_S1_(double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4juce9RectangleIfEC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce27RelativeRectangleLocalScopeC2ERKNS_17RelativeRectangleE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #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 = distinct !{!6, !7, !"_ZNK4juce17RelativeRectangle7resolveEPKNS_10Expression5ScopeE: argument 0"}
!7 = distinct !{!7, !"_ZNK4juce17RelativeRectangle7resolveEPKNS_10Expression5ScopeE"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InlinerPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass