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

@_ZTIN4juce9ComponentE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN4juce33DirectoryContentsDisplayComponentE = external dso_local constant { ptr, ptr }, align 8

; 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 i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2 align 2

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce9Component9getBottomEv(ptr noundef nonnull align 8 dereferenceable(197)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce14LookAndFeel_V226layoutFileBrowserComponentERNS_20FileBrowserComponentEPNS_33DirectoryContentsDisplayComponentEPNS_20FilePreviewComponentEPNS_8ComboBoxEPNS_10TextEditorEPNS_6ButtonE(ptr noundef nonnull align 8 dereferenceable(304) %0, ptr noundef nonnull align 8 dereferenceable(2137) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) unnamed_addr #2 align 2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 8, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %24) #4
  %26 = sub nsw i32 %25, 8
  %27 = sub nsw i32 %26, 8
  store i32 %27, ptr %16, align 4, !tbaa !9
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %45

30:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %31 = load i32, ptr %16, align 4, !tbaa !9
  %32 = sdiv i32 %31, 3
  store i32 %32, ptr %17, align 4, !tbaa !9
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = load i32, ptr %16, align 4, !tbaa !9
  %35 = add nsw i32 8, %34
  %36 = load i32, ptr %17, align 4, !tbaa !9
  %37 = sub nsw i32 %35, %36
  %38 = load i32, ptr %17, align 4, !tbaa !9
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %39) #4
  call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %33, i32 noundef %37, i32 noundef 0, i32 noundef %38, i32 noundef %40)
  %41 = load i32, ptr %17, align 4, !tbaa !9
  %42 = add nsw i32 %41, 4
  %43 = load i32, ptr %16, align 4, !tbaa !9
  %44 = sub nsw i32 %43, %42
  store i32 %44, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %45

45:                                               ; preds = %30, %7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 4, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 22, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 30, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 50, ptr %21, align 4, !tbaa !9
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = load i32, ptr %18, align 4, !tbaa !9
  %48 = load i32, ptr %16, align 4, !tbaa !9
  %49 = sub nsw i32 %48, 50
  %50 = sub nsw i32 %49, 6
  call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %46, i32 noundef 8, i32 noundef %47, i32 noundef %50, i32 noundef 22)
  %51 = load ptr, ptr %14, align 8, !tbaa !5
  %52 = load i32, ptr %16, align 4, !tbaa !9
  %53 = add nsw i32 8, %52
  %54 = sub nsw i32 %53, 50
  %55 = load i32, ptr %18, align 4, !tbaa !9
  call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %51, i32 noundef %54, i32 noundef %55, i32 noundef 50, i32 noundef 22)
  %56 = load i32, ptr %18, align 4, !tbaa !9
  %57 = add nsw i32 %56, 26
  store i32 %57, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = icmp eq ptr %58, null
  br i1 %59, label %62, label %60

60:                                               ; preds = %45
  %61 = call ptr @__dynamic_cast(ptr %58, ptr @_ZTIN4juce33DirectoryContentsDisplayComponentE, ptr @_ZTIN4juce9ComponentE, i64 -2) #4
  br label %63

62:                                               ; preds = %45
  br label %63

63:                                               ; preds = %62, %60
  %64 = phi ptr [ %61, %60 ], [ null, %62 ]
  store ptr %64, ptr %22, align 8, !tbaa !5
  %65 = load ptr, ptr %22, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %79

67:                                               ; preds = %63
  %68 = load ptr, ptr %22, align 8, !tbaa !5
  %69 = load i32, ptr %18, align 4, !tbaa !9
  %70 = load i32, ptr %16, align 4, !tbaa !9
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %71) #4
  %73 = load i32, ptr %18, align 4, !tbaa !9
  %74 = sub nsw i32 %72, %73
  %75 = sub nsw i32 %74, 30
  call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %68, i32 noundef 8, i32 noundef %69, i32 noundef %70, i32 noundef %75)
  %76 = load ptr, ptr %22, align 8, !tbaa !5
  %77 = call noundef i32 @_ZNK4juce9Component9getBottomEv(ptr noundef nonnull align 8 dereferenceable(197) %76) #4
  %78 = add nsw i32 %77, 4
  store i32 %78, ptr %18, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %67, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = load i32, ptr %18, align 4, !tbaa !9
  %82 = load i32, ptr %16, align 4, !tbaa !9
  %83 = sub nsw i32 %82, 50
  call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %80, i32 noundef 58, i32 noundef %81, i32 noundef %83, i32 noundef 22)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  ret void
}

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 willreturn memory(read) }
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 = !{!"int", !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"

@_ZTIN4juce9ComponentE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN4juce33DirectoryContentsDisplayComponentE = external dso_local constant { ptr, ptr }, align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce14LookAndFeel_V226layoutFileBrowserComponentERNS_20FileBrowserComponentEPNS_33DirectoryContentsDisplayComponentEPNS_20FilePreviewComponentEPNS_8ComboBoxEPNS_10TextEditorEPNS_6ButtonE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(304) %0, ptr noundef nonnull align 8 dereferenceable(2137) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) unnamed_addr #1 align 2 {
  %8 = tail call noundef i32 @_ZNK4juce9Component8getWidthEv(ptr noundef nonnull align 8 dereferenceable(197) %1) #3
  %9 = add nsw i32 %8, -16
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %16, label %10

10:                                               ; preds = %7
  %11 = add nsw i32 %8, -8
  %12 = sdiv i32 %9, 3
  %13 = sub i32 %11, %12
  %14 = tail call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %1) #3
  tail call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %3, i32 noundef %13, i32 noundef 0, i32 noundef %12, i32 noundef %14)
  %.neg34 = add i32 %8, -20
  %15 = sub i32 %.neg34, %12
  br label %16

16:                                               ; preds = %10, %7
  %.0 = phi i32 [ %15, %10 ], [ %9, %7 ]
  %17 = add nsw i32 %.0, -56
  tail call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %4, i32 noundef 8, i32 noundef 4, i32 noundef %17, i32 noundef 22)
  %18 = add nsw i32 %.0, -42
  tail call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %6, i32 noundef %18, i32 noundef 4, i32 noundef 50, i32 noundef 22)
  %19 = icmp eq ptr %2, null
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %16
  %21 = tail call ptr @__dynamic_cast(ptr nonnull %2, ptr nonnull @_ZTIN4juce33DirectoryContentsDisplayComponentE, ptr nonnull @_ZTIN4juce9ComponentE, i64 -2) #3
  %.not32 = icmp eq ptr %21, null
  br i1 %.not32, label %.thread, label %22

22:                                               ; preds = %20
  %23 = tail call noundef i32 @_ZNK4juce9Component9getHeightEv(ptr noundef nonnull align 8 dereferenceable(197) %1) #3
  %24 = add nsw i32 %23, -60
  tail call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %21, i32 noundef 8, i32 noundef 30, i32 noundef %.0, i32 noundef %24)
  %25 = tail call noundef i32 @_ZNK4juce9Component9getBottomEv(ptr noundef nonnull align 8 dereferenceable(197) %21) #3
  %26 = add nsw i32 %25, 4
  br label %.thread

.thread:                                          ; preds = %16, %22, %20
  %.028 = phi i32 [ %26, %22 ], [ 30, %20 ], [ 30, %16 ]
  %27 = add nsw i32 %.0, -50
  tail call void @_ZN4juce9Component9setBoundsEiiii(ptr noundef nonnull align 8 dereferenceable(197) %5, i32 noundef 58, i32 noundef %.028, i32 noundef %27, i32 noundef 22)
  ret void
}

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" }
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 nofree nounwind willreturn memory(read) }
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)"}


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