; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode (juce_audio_processors)

; 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::AudioProcessor::BusesLayout" = type { %"class.juce::Array.51", %"class.juce::Array.51" }
%"class.juce::Array.51" = type { %"class.juce::ArrayAllocationBase.52", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.52" = type <{ %"class.juce::HeapBlock.53", i32, [4 x i8] }>
%"class.juce::HeapBlock.53" = type { ptr }
%"class.juce::AudioChannelSet" = type { %"class.juce::BigInteger" }
%"class.juce::BigInteger" = type <{ %"class.juce::HeapBlock.50", [4 x i32], i64, i32, i8, [3 x i8] }>
%"class.juce::HeapBlock.50" = type { ptr }
%"class.juce::AudioProcessor::Bus" = type { ptr, %"class.juce::String", %"class.juce::AudioChannelSet", %"class.juce::AudioChannelSet", %"class.juce::AudioChannelSet", i8, i32 }
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce14AudioProcessor11getBusCountEb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce14AudioProcessor14audioIOChangedEbb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext, i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce14AudioProcessor11BusesLayouteqERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4juce14AudioProcessor14getBusesLayoutEv(ptr dead_on_unwind noalias writable sret(%"struct.juce::AudioProcessor::BusesLayout") align 8, ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce14AudioProcessor11BusesLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce14AudioProcessor15applyBusLayoutsERKNS0_11BusesLayoutE(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.juce::AudioProcessor::BusesLayout", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.juce::AudioChannelSet", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.juce::AudioChannelSet", align 8
  %22 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #5
  call void @_ZNK4juce14AudioProcessor14getBusesLayoutEv(ptr dead_on_unwind writable sret(%"struct.juce::AudioProcessor::BusesLayout") align 8 %6, ptr noundef nonnull align 8 dereferenceable(256) %23)
  %25 = call noundef zeroext i1 @_ZNK4juce14AudioProcessor11BusesLayouteqERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @_ZN4juce14AudioProcessor11BusesLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #5
  br i1 %25, label %26, label %27

26:                                               ; preds = %2
  store i1 true, ptr %3, align 1
  br label %123

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %28 = call noundef i32 @_ZNK4juce14AudioProcessor11getBusCountEb(ptr noundef nonnull align 8 dereferenceable(256) %23, i1 noundef zeroext true) #5
  store i32 %28, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %29 = call noundef i32 @_ZNK4juce14AudioProcessor11getBusCountEb(ptr noundef nonnull align 8 dereferenceable(256) %23, i1 noundef zeroext false) #5
  store i32 %29, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %30 = call noundef i32 @_ZNK4juce14AudioProcessor24getTotalNumInputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %23) #5
  store i32 %30, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %31 = call noundef i32 @_ZNK4juce14AudioProcessor25getTotalNumOutputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %23) #5
  store i32 %31, ptr %10, align 4, !tbaa !9
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.juce::AudioProcessor::BusesLayout", ptr %32, i32 0, i32 0
  %34 = call noundef i32 @_ZNK4juce5ArrayINS_15AudioChannelSetENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %33) #5
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = icmp ne i32 %34, %35
  br i1 %36, label %43, label %37

37:                                               ; preds = %27
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.juce::AudioProcessor::BusesLayout", ptr %38, i32 0, i32 1
  %40 = call noundef i32 @_ZNK4juce5ArrayINS_15AudioChannelSetENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %39) #5
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = icmp ne i32 %40, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %37, %27
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %121

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %73, %44
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %76

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = call noundef ptr @_ZN4juce14AudioProcessor6getBusEbi(ptr noundef nonnull align 8 dereferenceable(256) %23, i1 noundef zeroext true, i32 noundef %51) #5
  store ptr %52, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i32, ptr %12, align 4, !tbaa !9
  call void @_ZNK4juce14AudioProcessor11BusesLayout13getChannelSetEbi(ptr dead_on_unwind writable sret(%"class.juce::AudioChannelSet") align 8 %15, ptr noundef nonnull align 8 dereferenceable(48) %53, i1 noundef zeroext true, i32 noundef %54) #5
  store ptr %15, ptr %14, align 8, !tbaa !5
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.juce::AudioProcessor::Bus", ptr %56, i32 0, i32 2
  %58 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %57, ptr noundef nonnull align 8 dereferenceable(40) %55)
          to label %59 unwind label %68

59:                                               ; preds = %50
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZNK4juce15AudioChannelSet10isDisabledEv(ptr noundef nonnull align 8 dereferenceable(40) %60) #5
  br i1 %61, label %72, label %62

62:                                               ; preds = %59
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.juce::AudioProcessor::Bus", ptr %64, i32 0, i32 4
  %66 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %65, ptr noundef nonnull align 8 dereferenceable(40) %63)
          to label %67 unwind label %68

67:                                               ; preds = %62
  br label %72

68:                                               ; preds = %62, %50
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %16, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %17, align 4
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %122

72:                                               ; preds = %67, %59
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %12, align 4, !tbaa !9
  br label %45, !llvm.loop !11

76:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %105, %76
  %78 = load i32, ptr %18, align 4, !tbaa !9
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %108

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %83 = load i32, ptr %18, align 4, !tbaa !9
  %84 = call noundef ptr @_ZN4juce14AudioProcessor6getBusEbi(ptr noundef nonnull align 8 dereferenceable(256) %23, i1 noundef zeroext false, i32 noundef %83) #5
  store ptr %84, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #5
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load i32, ptr %18, align 4, !tbaa !9
  call void @_ZNK4juce14AudioProcessor11BusesLayout13getChannelSetEbi(ptr dead_on_unwind writable sret(%"class.juce::AudioChannelSet") align 8 %21, ptr noundef nonnull align 8 dereferenceable(48) %85, i1 noundef zeroext false, i32 noundef %86) #5
  store ptr %21, ptr %20, align 8, !tbaa !5
  %87 = load ptr, ptr %20, align 8, !tbaa !5
  %88 = load ptr, ptr %19, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.juce::AudioProcessor::Bus", ptr %88, i32 0, i32 2
  %90 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %89, ptr noundef nonnull align 8 dereferenceable(40) %87)
          to label %91 unwind label %100

91:                                               ; preds = %82
  %92 = load ptr, ptr %20, align 8, !tbaa !5
  %93 = call noundef zeroext i1 @_ZNK4juce15AudioChannelSet10isDisabledEv(ptr noundef nonnull align 8 dereferenceable(40) %92) #5
  br i1 %93, label %104, label %94

94:                                               ; preds = %91
  %95 = load ptr, ptr %20, align 8, !tbaa !5
  %96 = load ptr, ptr %19, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.juce::AudioProcessor::Bus", ptr %96, i32 0, i32 4
  %98 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %97, ptr noundef nonnull align 8 dereferenceable(40) %95)
          to label %99 unwind label %100

99:                                               ; preds = %94
  br label %104

100:                                              ; preds = %94, %82
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %16, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %17, align 4
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %122

104:                                              ; preds = %99, %91
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %18, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %18, align 4, !tbaa !9
  br label %77, !llvm.loop !13

108:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #5
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = call noundef i32 @_ZNK4juce14AudioProcessor24getTotalNumInputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %23) #5
  %111 = icmp ne i32 %109, %110
  br i1 %111, label %116, label %112

112:                                              ; preds = %108
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = call noundef i32 @_ZNK4juce14AudioProcessor25getTotalNumOutputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %23) #5
  %115 = icmp ne i32 %113, %114
  br label %116

116:                                              ; preds = %112, %108
  %117 = phi i1 [ true, %108 ], [ %115, %112 ]
  %118 = zext i1 %117 to i8
  store i8 %118, ptr %22, align 1, !tbaa !14
  %119 = load i8, ptr %22, align 1, !tbaa !14, !range !16, !noundef !17
  %120 = trunc i8 %119 to i1
  call void @_ZN4juce14AudioProcessor14audioIOChangedEbb(ptr noundef nonnull align 8 dereferenceable(256) %23, i1 noundef zeroext false, i1 noundef zeroext %120)
  store i1 true, ptr %3, align 1
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  br label %121

121:                                              ; preds = %116, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %123

122:                                              ; preds = %100, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %125

123:                                              ; preds = %121, %26
  %124 = load i1, ptr %3, align 1
  ret i1 %124

125:                                              ; preds = %122
  %126 = load ptr, ptr %16, align 8
  %127 = load i32, ptr %17, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce14AudioProcessor11BusesLayout13getChannelSetEbi(ptr dead_on_unwind noalias writable sret(%"class.juce::AudioChannelSet") align 8, ptr noundef nonnull align 8 dereferenceable(48), i1 noundef zeroext, i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce14AudioProcessor6getBusEbi(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext, i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce15AudioChannelSet10isDisabledEv(ptr noundef nonnull align 8 dereferenceable(40)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #5 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}


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

%"struct.juce::AudioProcessor::BusesLayout" = type { %"class.juce::Array.51", %"class.juce::Array.51" }
%"class.juce::Array.51" = type { %"class.juce::ArrayAllocationBase.52", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.52" = type <{ %"class.juce::HeapBlock.53", i32, [4 x i8] }>
%"class.juce::HeapBlock.53" = type { ptr }
%"class.juce::AudioChannelSet" = type { %"class.juce::BigInteger" }
%"class.juce::BigInteger" = type <{ %"class.juce::HeapBlock.50", [4 x i32], i64, i32, i8, [3 x i8] }>
%"class.juce::HeapBlock.50" = type { ptr }

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce14AudioProcessor11getBusCountEb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce14AudioProcessor14audioIOChangedEbb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce14AudioProcessor11BusesLayouteqERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4juce14AudioProcessor14getBusesLayoutEv(ptr dead_on_unwind noalias writable sret(%"struct.juce::AudioProcessor::BusesLayout") align 8, ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4juce14AudioProcessor11BusesLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4juce14AudioProcessor15applyBusLayoutsERKNS0_11BusesLayoutE(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.juce::AudioProcessor::BusesLayout", align 8
  %4 = alloca %"class.juce::AudioChannelSet", align 8
  %5 = alloca %"class.juce::AudioChannelSet", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  call void @_ZNK4juce14AudioProcessor14getBusesLayoutEv(ptr dead_on_unwind nonnull writable sret(%"struct.juce::AudioProcessor::BusesLayout") align 8 %3, ptr noundef nonnull align 8 dereferenceable(256) %0)
  %6 = call noundef zeroext i1 @_ZNK4juce14AudioProcessor11BusesLayouteqERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @_ZN4juce14AudioProcessor11BusesLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  br i1 %6, label %49, label %7

7:                                                ; preds = %2
  %8 = call noundef i32 @_ZNK4juce14AudioProcessor11getBusCountEb(ptr noundef nonnull align 8 dereferenceable(256) %0, i1 noundef zeroext true) #5
  %9 = call noundef i32 @_ZNK4juce14AudioProcessor11getBusCountEb(ptr noundef nonnull align 8 dereferenceable(256) %0, i1 noundef zeroext false) #5
  %10 = call noundef i32 @_ZNK4juce14AudioProcessor24getTotalNumInputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %0) #5
  %11 = call noundef i32 @_ZNK4juce14AudioProcessor25getTotalNumOutputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %0) #5
  %12 = call noundef i32 @_ZNK4juce5ArrayINS_15AudioChannelSetENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %1) #5
  %.not = icmp eq i32 %12, %8
  br i1 %.not, label %13, label %49

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %1, i64 24
  %15 = call noundef i32 @_ZNK4juce5ArrayINS_15AudioChannelSetENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %14) #5
  %.not39 = icmp eq i32 %15, %9
  br i1 %.not39, label %.preheader42, label %49

.preheader42:                                     ; preds = %13
  %16 = icmp sgt i32 %8, 0
  br i1 %16, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %28, %.preheader42
  %17 = icmp sgt i32 %9, 0
  br i1 %17, label %.lr.ph45, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader42, %28
  %.03343 = phi i32 [ %29, %28 ], [ 0, %.preheader42 ]
  %18 = call noundef ptr @_ZN4juce14AudioProcessor6getBusEbi(ptr noundef nonnull align 8 dereferenceable(256) %0, i1 noundef zeroext true, i32 noundef %.03343) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #5
  call void @_ZNK4juce14AudioProcessor11BusesLayout13getChannelSetEbi(ptr dead_on_unwind nonnull writable sret(%"class.juce::AudioChannelSet") align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) %1, i1 noundef zeroext true, i32 noundef %.03343) #5
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  %20 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %21 unwind label %26

21:                                               ; preds = %.lr.ph
  %22 = call noundef zeroext i1 @_ZNK4juce15AudioChannelSet10isDisabledEv(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  br i1 %22, label %28, label %23

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %18, i64 96
  %25 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %28 unwind label %26

26:                                               ; preds = %23, %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  br label %48

28:                                               ; preds = %23, %21
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  %29 = add nuw nsw i32 %.03343, 1
  %exitcond.not = icmp eq i32 %29, %8
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %41, %.preheader
  %30 = call noundef i32 @_ZNK4juce14AudioProcessor24getTotalNumInputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %0) #5
  %.not40 = icmp eq i32 %10, %30
  br i1 %.not40, label %43, label %46

.lr.ph45:                                         ; preds = %.preheader, %41
  %.03444 = phi i32 [ %42, %41 ], [ 0, %.preheader ]
  %31 = call noundef ptr @_ZN4juce14AudioProcessor6getBusEbi(ptr noundef nonnull align 8 dereferenceable(256) %0, i1 noundef zeroext false, i32 noundef %.03444) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  call void @_ZNK4juce14AudioProcessor11BusesLayout13getChannelSetEbi(ptr dead_on_unwind nonnull writable sret(%"class.juce::AudioChannelSet") align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) %1, i1 noundef zeroext false, i32 noundef %.03444) #5
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %32, ptr noundef nonnull align 8 dereferenceable(40) %5)
          to label %34 unwind label %39

34:                                               ; preds = %.lr.ph45
  %35 = call noundef zeroext i1 @_ZNK4juce15AudioChannelSet10isDisabledEv(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  br i1 %35, label %41, label %36

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %31, i64 96
  %38 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %37, ptr noundef nonnull align 8 dereferenceable(40) %5)
          to label %41 unwind label %39

39:                                               ; preds = %36, %.lr.ph45
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  br label %48

41:                                               ; preds = %36, %34
  call void @_ZN4juce15AudioChannelSetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  %42 = add nuw nsw i32 %.03444, 1
  %exitcond46.not = icmp eq i32 %42, %9
  br i1 %exitcond46.not, label %._crit_edge, label %.lr.ph45, !llvm.loop !7

43:                                               ; preds = %._crit_edge
  %44 = call noundef i32 @_ZNK4juce14AudioProcessor25getTotalNumOutputChannelsEv(ptr noundef nonnull align 8 dereferenceable(256) %0) #5
  %45 = icmp ne i32 %11, %44
  br label %46

46:                                               ; preds = %43, %._crit_edge
  %47 = phi i1 [ true, %._crit_edge ], [ %45, %43 ]
  call void @_ZN4juce14AudioProcessor14audioIOChangedEbb(ptr noundef nonnull align 8 dereferenceable(256) %0, i1 noundef zeroext false, i1 noundef zeroext %47)
  br label %49

48:                                               ; preds = %39, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %40, %39 ]
  resume { ptr, i32 } %.pn

49:                                               ; preds = %46, %13, %7, %2
  %.1 = phi i1 [ true, %2 ], [ true, %46 ], [ false, %13 ], [ false, %7 ]
  ret i1 %.1
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK4juce14AudioProcessor11BusesLayout13getChannelSetEbi(ptr dead_on_unwind noalias writable sret(%"class.juce::AudioChannelSet") align 8, ptr noundef nonnull align 8 dereferenceable(48), i1 noundef zeroext, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4juce14AudioProcessor6getBusEbi(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4juce15AudioChannelSet10isDisabledEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN4juce15AudioChannelSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce5ArrayINS_15AudioChannelSetENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #1 align 2

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass