; LLVM IR from software-mansion/react-native-audio-api :: packages/react-native-audio-api/common/cpp/audioapi/core (AudioNode)

; 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.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.std::__detail::_Node_iterator.79" = type { %"struct.std::__detail::_Node_iterator_base.80" }
%"struct.std::__detail::_Node_iterator_base.80" = type { ptr }
%"class.audioapi::AudioNode" = type { ptr, %"class.std::enable_shared_from_this", ptr, %"class.std::shared_ptr", i32, i32, i32, i32, i32, %"class.std::unordered_set", %"class.std::unordered_set.2", i32, i8, i8, i64, %"class.std::vector" }
%"class.std::enable_shared_from_this" = type { %"class.std::weak_ptr" }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_set.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.9 = external hidden unnamed_addr constant [144 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN8audioapi9AudioNode13processInputsERKSt10shared_ptrINS_8AudioBusEEib = external hidden unnamed_addr constant [107 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 zeroext i1 @_ZNK8audioapi9AudioNode9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(224)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8audioapi9AudioNode13processInputsERKSt10shared_ptrINS_8AudioBusEEib(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %3, i1 noundef zeroext %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::__detail::_Node_iterator.79", align 8
  %16 = alloca %"struct.std::__detail::_Node_iterator.79", align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %20 = zext i1 %4 to i8
  store i8 %20, ptr %10, align 1, !tbaa !11
  %21 = load ptr, ptr %7, align 8
  store i1 false, ptr %11, align 1
  %22 = getelementptr inbounds %"class.audioapi::AudioNode", ptr %21, i32 0, i32 3
  call void @_ZNSt10shared_ptrIN8audioapi8AudioBusEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  %23 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #5
  invoke void @_ZN8audioapi8AudioBus4zeroEv(ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %24 unwind label %36

24:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %25 = getelementptr inbounds %"class.audioapi::AudioNode", ptr %21, i32 0, i32 9
  %26 = call ptr @_ZNSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %25) #5
  %27 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.79", ptr %15, i32 0, i32 0
  %28 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.80", ptr %27, i32 0, i32 0
  store ptr %26, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %29 = getelementptr inbounds %"class.audioapi::AudioNode", ptr %21, i32 0, i32 9
  %30 = call ptr @_ZNSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %29) #5
  %31 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.79", ptr %16, i32 0, i32 0
  %32 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.80", ptr %31, i32 0, i32 0
  store ptr %30, ptr %32, align 8
  br label %33

33:                                               ; preds = %86, %24
  %34 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIPN8audioapi9AudioNodeELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  br i1 %34, label %40, label %35

35:                                               ; preds = %33
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %89

36:                                               ; preds = %5
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %12, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %13, align 4
  br label %93

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIPN8audioapi9AudioNodeELb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  store ptr %42, ptr %18, align 8, !tbaa !5
  %43 = load ptr, ptr %18, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %40
  br label %48

46:                                               ; preds = %40
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.9, i32 noundef 167, ptr noundef @__PRETTY_FUNCTION__._ZN8audioapi9AudioNode13processInputsERKSt10shared_ptrINS_8AudioBusEEib) #6
  unreachable

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %45
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZNK8audioapi9AudioNode9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(224) %49)
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 4, ptr %17, align 4
  br label %83

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %53 = load ptr, ptr %18, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %57 = trunc i8 %56 to i1
  %58 = load ptr, ptr %53, align 8, !tbaa !15
  %59 = getelementptr inbounds ptr, ptr %58, i64 3
  %60 = load ptr, ptr %59, align 8
  invoke void %60(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %19, ptr noundef nonnull align 8 dereferenceable(224) %53, ptr noundef nonnull align 8 dereferenceable(16) %54, i32 noundef %55, i1 noundef zeroext %57)
          to label %61 unwind label %74

61:                                               ; preds = %52
  %62 = getelementptr inbounds %"class.audioapi::AudioNode", ptr %21, i32 0, i32 15
  invoke void @_ZNSt6vectorISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %63 unwind label %78

63:                                               ; preds = %61
  %64 = load i32, ptr %14, align 4, !tbaa !9
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  %66 = invoke noundef i32 @_ZNK8audioapi8AudioBus19getNumberOfChannelsEv(ptr noundef nonnull align 8 dereferenceable(40) %65)
          to label %67 unwind label %78

67:                                               ; preds = %63
  %68 = icmp slt i32 %64, %66
  br i1 %68, label %69, label %82

69:                                               ; preds = %67
  %70 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  %71 = invoke noundef i32 @_ZNK8audioapi8AudioBus19getNumberOfChannelsEv(ptr noundef nonnull align 8 dereferenceable(40) %70)
          to label %72 unwind label %78

72:                                               ; preds = %69
  store i32 %71, ptr %14, align 4, !tbaa !9
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN8audioapi8AudioBusEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  br label %82

74:                                               ; preds = %52
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %12, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %13, align 4
  br label %88

78:                                               ; preds = %69, %63, %61
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %12, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %13, align 4
  call void @_ZNSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  br label %88

82:                                               ; preds = %72, %67
  call void @_ZNSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  store i32 0, ptr %17, align 4
  br label %83

83:                                               ; preds = %82, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %84 = load i32, ptr %17, align 4
  switch i32 %84, label %99 [
    i32 0, label %85
    i32 4, label %86
  ]

85:                                               ; preds = %83
  br label %86

86:                                               ; preds = %85, %83
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIPN8audioapi9AudioNodeELb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %33, !llvm.loop !17

88:                                               ; preds = %78, %74
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %93

89:                                               ; preds = %35
  store i1 true, ptr %11, align 1
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %90 = load i1, ptr %11, align 1
  br i1 %90, label %92, label %91

91:                                               ; preds = %89
  call void @_ZNSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  br label %92

92:                                               ; preds = %91, %89
  ret void

93:                                               ; preds = %88, %36
  call void @_ZNSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr %12, align 8
  %96 = load i32, ptr %13, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98

99:                                               ; preds = %83
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

declare void @_ZN8audioapi8AudioBus4zeroEv(ptr noundef nonnull align 8 dereferenceable(40)) #4

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

declare noundef i32 @_ZNK8audioapi8AudioBus19getNumberOfChannelsEv(ptr noundef nonnull align 8 dereferenceable(40)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN8audioapi8AudioBusEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

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 = { noreturn 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 = { "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 }
attributes #6 = { noreturn 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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; 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.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.std::__detail::_Node_iterator.79" = type { %"struct.std::__detail::_Node_iterator_base.80" }
%"struct.std::__detail::_Node_iterator_base.80" = type { ptr }

@.str.9 = external hidden unnamed_addr constant [144 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN8audioapi9AudioNode13processInputsERKSt10shared_ptrINS_8AudioBusEEib = external hidden unnamed_addr constant [107 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8audioapi9AudioNode9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8audioapi9AudioNode13processInputsERKSt10shared_ptrINS_8AudioBusEEib(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %3, i1 noundef zeroext %4) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"struct.std::__detail::_Node_iterator.79", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator.79", align 8
  %8 = alloca %"class.std::shared_ptr", align 8
  %9 = getelementptr inbounds i8, ptr %1, i64 32
  tail call void @_ZNSt10shared_ptrIN8audioapi8AudioBusEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  %10 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #5
  invoke void @_ZN8audioapi8AudioBus4zeroEv(ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %11 unwind label %17

11:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %12 = getelementptr inbounds i8, ptr %1, i64 72
  %13 = tail call ptr @_ZNSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #5
  store ptr %13, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %14 = tail call ptr @_ZNSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #5
  store ptr %14, ptr %7, align 8
  %15 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIPN8audioapi9AudioNodeELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11
  %16 = getelementptr inbounds i8, ptr %1, i64 200
  br label %19

._crit_edge:                                      ; preds = %45, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  ret void

17:                                               ; preds = %5
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %49

19:                                               ; preds = %.lr.ph, %45
  %.017 = phi i32 [ 0, %.lr.ph ], [ %.2, %45 ]
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIPN8audioapi9AudioNodeELb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %.not = icmp eq ptr %21, null
  br i1 %.not, label %22, label %23

22:                                               ; preds = %19
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.9, i32 noundef 167, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8audioapi9AudioNode13processInputsERKSt10shared_ptrINS_8AudioBusEEib) #6
  unreachable

23:                                               ; preds = %19
  %24 = call noundef zeroext i1 @_ZNK8audioapi9AudioNode9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(224) %21)
  br i1 %24, label %25, label %45

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %26 = load ptr, ptr %21, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  %28 = load ptr, ptr %27, align 8
  invoke void %28(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %8, ptr noundef nonnull align 8 dereferenceable(224) %21, ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %3, i1 noundef zeroext %4)
          to label %29 unwind label %40

29:                                               ; preds = %25
  invoke void @_ZNSt6vectorISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %30 unwind label %42

30:                                               ; preds = %29
  %31 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  %32 = invoke noundef i32 @_ZNK8audioapi8AudioBus19getNumberOfChannelsEv(ptr noundef nonnull align 8 dereferenceable(40) %31)
          to label %33 unwind label %42

33:                                               ; preds = %30
  %34 = icmp slt i32 %.017, %32
  br i1 %34, label %35, label %44

35:                                               ; preds = %33
  %36 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  %37 = invoke noundef i32 @_ZNK8audioapi8AudioBus19getNumberOfChannelsEv(ptr noundef nonnull align 8 dereferenceable(40) %36)
          to label %38 unwind label %42

38:                                               ; preds = %35
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN8audioapi8AudioBusEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br label %44

40:                                               ; preds = %25
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %48

42:                                               ; preds = %35, %30, %29
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br label %48

44:                                               ; preds = %38, %33
  %.1 = phi i32 [ %37, %38 ], [ %.017, %33 ]
  call void @_ZNSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %45

45:                                               ; preds = %23, %44
  %.2 = phi i32 [ %.1, %44 ], [ %.017, %23 ]
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIPN8audioapi9AudioNodeELb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %47 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIPN8audioapi9AudioNodeELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %47, label %19, label %._crit_edge, !llvm.loop !11

48:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %49

49:                                               ; preds = %48, %17
  %.pn.pn = phi { ptr, i32 } [ %.pn, %48 ], [ %18, %17 ]
  call void @_ZNSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

declare void @_ZN8audioapi8AudioBus4zeroEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

declare noundef i32 @_ZNK8audioapi8AudioBus19getNumberOfChannelsEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

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

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

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

attributes #0 = { mustprogress 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 = { noreturn 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 = { "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 }
attributes #6 = { noreturn 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 = !{!"vtable pointer", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass