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

%"struct.juce::StretchableLayoutManager::ItemLayoutProperties" = type { i32, i32, double, double, double }

; 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 nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce24StretchableLayoutManager10getInfoForEi(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4juce24StretchableLayoutManager13getItemLayoutEiRdS1_S1_(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #2 align 2 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %14 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %15 = load i32, ptr %8, align 4, !tbaa !9
  %16 = call noundef ptr @_ZNK4juce24StretchableLayoutManager10getInfoForEi(ptr noundef nonnull align 8 dereferenceable(28) %14, i32 noundef %15)
  store ptr %16, ptr %12, align 8, !tbaa !5
  %17 = load ptr, ptr %12, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %32

19:                                               ; preds = %5
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %20, i32 0, i32 2
  %22 = load double, ptr %21, align 8, !tbaa !11
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  store double %22, ptr %23, align 8, !tbaa !14
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %24, i32 0, i32 3
  %26 = load double, ptr %25, align 8, !tbaa !15
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  store double %26, ptr %27, align 8, !tbaa !14
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.juce::StretchableLayoutManager::ItemLayoutProperties", ptr %28, i32 0, i32 4
  %30 = load double, ptr %29, align 8, !tbaa !16
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  store double %30, ptr %31, align 8, !tbaa !14
  store i1 true, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %33

32:                                               ; preds = %5
  store i32 0, ptr %13, align 4
  br label %33

33:                                               ; preds = %32, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %34 = load i32, ptr %13, align 4
  switch i32 %34, label %38 [
    i32 0, label %35
    i32 1, label %36
  ]

35:                                               ; preds = %33
  store i1 false, ptr %6, align 1
  br label %36

36:                                               ; preds = %35, %33
  %37 = load i1, ptr %6, align 1
  ret i1 %37

38:                                               ; preds = %33
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN4juce24StretchableLayoutManager20ItemLayoutPropertiesE", !10, i64 0, !10, i64 4, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"double", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 16}
!16 = !{!12, !13, i64 24}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4juce24StretchableLayoutManager10getInfoForEi(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK4juce24StretchableLayoutManager13getItemLayoutEiRdS1_S1_(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef %1, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %3, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %4) local_unnamed_addr #0 align 2 {
  %6 = tail call noundef ptr @_ZNK4juce24StretchableLayoutManager10getInfoForEi(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef %1)
  %.not = icmp ne ptr %6, null
  br i1 %.not, label %7, label %14

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %6, i64 8
  %9 = load double, ptr %8, align 8, !tbaa !5
  store double %9, ptr %2, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %6, i64 16
  %11 = load double, ptr %10, align 8, !tbaa !12
  store double %11, ptr %3, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %6, i64 24
  %13 = load double, ptr %12, align 8, !tbaa !13
  store double %13, ptr %4, align 8, !tbaa !11
  br label %14

14:                                               ; preds = %5, %7
  ret i1 %.not
}

attributes #0 = { 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" }

!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, !10, i64 8}
!6 = !{!"_ZTSN4juce24StretchableLayoutManager20ItemLayoutPropertiesE", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !10, i64 24}


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