; 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::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.77 }
%union.anon.77 = type { i32 }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }

@_ZN4juce7Colours5whiteE = external global %"class.juce::Colour", align 1
@.str.184 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.185 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: nounwind
declare void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #0

declare void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZNK4juce6Colour9withAlphaEf(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1, ptr noundef nonnull align 1 dereferenceable(4), float noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4juce14LookAndFeel_V118createSliderButtonERNS_6SliderEb(ptr noundef nonnull align 8 dereferenceable(328) %0, ptr noundef nonnull align 8 dereferenceable(224) %1, i1 noundef zeroext %2) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca %"class.juce::String", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.juce::Colour", align 1
  %12 = alloca i1, align 1
  %13 = alloca %"class.juce::String", align 8
  %14 = alloca %"class.juce::Colour", align 1
  %15 = alloca i1, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  %16 = zext i1 %2 to i8
  store i8 %16, ptr %7, align 1, !tbaa !9
  %17 = load ptr, ptr %5, align 8
  %18 = load i8, ptr %7, align 1, !tbaa !9, !range !11, !noundef !12
  %19 = trunc i8 %18 to i1
  br i1 %19, label %20, label %36

20:                                               ; preds = %3
  %21 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 432) #6
  store i1 true, ptr %12, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.184)
          to label %22 unwind label %24

22:                                               ; preds = %20
  call void @_ZNK4juce6Colour9withAlphaEf(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1 %11, ptr noundef nonnull align 1 dereferenceable(4) @_ZN4juce7Colours5whiteE, float noundef 0x3FE99999A0000000) #7
  invoke void @_ZN4juce11ArrowButtonC1ERKNS_6StringEfNS_6ColourE(ptr noundef nonnull align 8 dereferenceable(432) %21, ptr noundef nonnull align 8 dereferenceable(8) %8, float noundef 7.500000e-01, ptr noundef %11)
          to label %23 unwind label %28

23:                                               ; preds = %22
  store i1 false, ptr %12, align 1
  store ptr %21, ptr %4, align 8
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %11) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %52

24:                                               ; preds = %20
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %9, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %10, align 4
  br label %32

28:                                               ; preds = %22
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %9, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %10, align 4
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %11) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %32

32:                                               ; preds = %28, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %33 = load i1, ptr %12, align 1
  br i1 %33, label %34, label %35

34:                                               ; preds = %32
  call void @_ZdlPvm(ptr noundef %21, i64 noundef 432) #8
  br label %35

35:                                               ; preds = %34, %32
  br label %54

36:                                               ; preds = %3
  %37 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 432) #6
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str.185)
          to label %38 unwind label %40

38:                                               ; preds = %36
  call void @_ZNK4juce6Colour9withAlphaEf(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1 %14, ptr noundef nonnull align 1 dereferenceable(4) @_ZN4juce7Colours5whiteE, float noundef 0x3FE99999A0000000) #7
  invoke void @_ZN4juce11ArrowButtonC1ERKNS_6StringEfNS_6ColourE(ptr noundef nonnull align 8 dereferenceable(432) %37, ptr noundef nonnull align 8 dereferenceable(8) %13, float noundef 2.500000e-01, ptr noundef %14)
          to label %39 unwind label %44

39:                                               ; preds = %38
  store i1 false, ptr %15, align 1
  store ptr %37, ptr %4, align 8
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %14) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %52

40:                                               ; preds = %36
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %9, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %10, align 4
  br label %48

44:                                               ; preds = %38
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %9, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %10, align 4
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %14) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %48

48:                                               ; preds = %44, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %49 = load i1, ptr %15, align 1
  br i1 %49, label %50, label %51

50:                                               ; preds = %48
  call void @_ZdlPvm(ptr noundef %37, i64 noundef 432) #8
  br label %51

51:                                               ; preds = %50, %48
  br label %54

52:                                               ; preds = %39, %23
  %53 = load ptr, ptr %4, align 8
  ret ptr %53

54:                                               ; preds = %51, %35
  %55 = load ptr, ptr %9, align 8
  %56 = load i32, ptr %10, align 4
  %57 = insertvalue { ptr, i32 } poison, ptr %55, 0
  %58 = insertvalue { ptr, i32 } %57, i32 %56, 1
  resume { ptr, i32 } %58
}

declare void @_ZN4juce11ArrowButtonC1ERKNS_6StringEfNS_6ColourE(ptr, ptr, float, ptr)

attributes #0 = { 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 #1 = { nobuiltin 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 = { "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 #5 = { 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 #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; 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::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.77 }
%union.anon.77 = type { i32 }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }

@_ZN4juce7Colours5whiteE = external global %"class.juce::Colour", align 1
@.str.184 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.185 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #0

declare void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZNK4juce6Colour9withAlphaEf(ptr dead_on_unwind writable sret(%"class.juce::Colour") align 1, ptr noundef nonnull align 1 dereferenceable(4), float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN4juce14LookAndFeel_V118createSliderButtonERNS_6SliderEb(ptr nocapture noundef nonnull readnone align 8 dereferenceable(328) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(224) %1, i1 noundef zeroext %2) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.juce::String", align 8
  %5 = alloca %"class.juce::Colour", align 1
  %6 = alloca %"class.juce::String", align 8
  %7 = alloca %"class.juce::Colour", align 1
  %8 = tail call noalias noundef nonnull dereferenceable(432) ptr @_Znwm(i64 noundef 432) #6
  br i1 %2, label %9, label %17

9:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.184)
          to label %10 unwind label %12

10:                                               ; preds = %9
  call void @_ZNK4juce6Colour9withAlphaEf(ptr dead_on_unwind nonnull writable sret(%"class.juce::Colour") align 1 %5, ptr noundef nonnull align 1 dereferenceable(4) @_ZN4juce7Colours5whiteE, float noundef 0x3FE99999A0000000) #7
  invoke void @_ZN4juce11ArrowButtonC1ERKNS_6StringEfNS_6ColourE(ptr noundef nonnull align 8 dereferenceable(432) %8, ptr noundef nonnull align 8 dereferenceable(8) %4, float noundef 7.500000e-01, ptr noundef nonnull %5)
          to label %11 unwind label %14

11:                                               ; preds = %10
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %5) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %25

12:                                               ; preds = %9
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %16

14:                                               ; preds = %10
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %5) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br label %16

16:                                               ; preds = %14, %12
  %.pn11 = phi { ptr, i32 } [ %15, %14 ], [ %13, %12 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %26

17:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  invoke void @_ZN4juce6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull @.str.185)
          to label %18 unwind label %20

18:                                               ; preds = %17
  call void @_ZNK4juce6Colour9withAlphaEf(ptr dead_on_unwind nonnull writable sret(%"class.juce::Colour") align 1 %7, ptr noundef nonnull align 1 dereferenceable(4) @_ZN4juce7Colours5whiteE, float noundef 0x3FE99999A0000000) #7
  invoke void @_ZN4juce11ArrowButtonC1ERKNS_6StringEfNS_6ColourE(ptr noundef nonnull align 8 dereferenceable(432) %8, ptr noundef nonnull align 8 dereferenceable(8) %6, float noundef 2.500000e-01, ptr noundef nonnull %7)
          to label %19 unwind label %22

19:                                               ; preds = %18
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %7) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %25

20:                                               ; preds = %17
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %24

22:                                               ; preds = %18
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6ColourD1Ev(ptr noundef nonnull align 1 dereferenceable(4) %7) #7
  call void @_ZN4juce6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %24

24:                                               ; preds = %22, %20
  %.pn = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %26

25:                                               ; preds = %19, %11
  ret ptr %8

26:                                               ; preds = %24, %16
  %.pn11.pn = phi { ptr, i32 } [ %.pn11, %16 ], [ %.pn, %24 ]
  call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 432) #8
  resume { ptr, i32 } %.pn11.pn
}

declare void @_ZN4juce11ArrowButtonC1ERKNS_6StringEfNS_6ColourE(ptr, ptr, float, ptr) local_unnamed_addr

attributes #0 = { 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 #1 = { nobuiltin 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 = { "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 #5 = { 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 #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass