; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime/dag_node.ll (ZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_E)

; 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.12" = type { %"class.std::__shared_ptr.13" }
%"class.std::__shared_ptr.13" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.24" = type { 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.anon = type { i8 }
%"class.__gnu_cxx::__normal_iterator.20" = type { ptr }
%class.anon.33 = type { i8 }
%"class.hipsycl::rt::dag_node" = type { %"class.hipsycl::rt::execution_hints", %"class.sbo::small_vector", %"class.hipsycl::rt::device_id", ptr, ptr, i64, %"class.std::shared_ptr.4", %"class.std::unique_ptr", %"class.std::unique_ptr", %"struct.std::atomic", %"struct.std::atomic", i8, %"struct.std::atomic", ptr }
%"class.hipsycl::rt::execution_hints" = type <{ %"class.hipsycl::rt::hints::bind_to_device", [4 x i8], %"class.hipsycl::rt::hints::bind_to_device_group", %"class.hipsycl::rt::hints::prefer_execution_lane", %"class.hipsycl::rt::hints::node_group", %"class.hipsycl::rt::hints::coarse_grained_synchronization", [7 x i8], %"class.hipsycl::rt::hints::prefer_executor", %"class.hipsycl::rt::hints::request_instrumentation_submission_timestamp", %"class.hipsycl::rt::hints::request_instrumentation_start_timestamp", %"class.hipsycl::rt::hints::request_instrumentation_finish_timestamp", %"class.hipsycl::rt::hints::instant_execution", [4 x i8] }>
%"class.hipsycl::rt::hints::bind_to_device" = type { %"class.hipsycl::rt::hints::execution_hint", %"class.hipsycl::rt::device_id" }
%"class.hipsycl::rt::hints::execution_hint" = type { i8 }
%"class.hipsycl::rt::hints::bind_to_device_group" = type { %"class.hipsycl::rt::hints::execution_hint", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::hints::prefer_execution_lane" = type { %"class.hipsycl::rt::hints::execution_hint", i64 }
%"class.hipsycl::rt::hints::node_group" = type { %"class.hipsycl::rt::hints::execution_hint", i64 }
%"class.hipsycl::rt::hints::coarse_grained_synchronization" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::prefer_executor" = type { %"class.hipsycl::rt::hints::execution_hint", ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.hipsycl::rt::hints::request_instrumentation_submission_timestamp" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::request_instrumentation_start_timestamp" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::request_instrumentation_finish_timestamp" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::instant_execution" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.sbo::small_vector" = type { %"class.std::vector.2" }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl" = type { %"struct.sbo::small_buffer_vector_allocator.base", %"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl_data" }
%"struct.sbo::small_buffer_vector_allocator.base" = type { [128 x i8], i8, i8 }
%"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.std::shared_ptr.4" = type { %"class.std::__shared_ptr.5" }
%"class.std::__shared_ptr.5" = type { ptr, %"class.std::__shared_count" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }

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

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

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

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 void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.12") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_E(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::weak_ptr", align 8
  %10 = alloca %"class.std::shared_ptr.12", align 8
  %11 = alloca %class.anon, align 1
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %16 = alloca %"class.std::weak_ptr", align 8
  %17 = alloca %"class.std::shared_ptr.12", align 8
  %18 = alloca %"class.std::shared_ptr.12", align 8
  %19 = alloca %"class.std::shared_ptr.12", align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca %"class.std::shared_ptr.12", align 8
  %24 = alloca %"class.std::shared_ptr.12", align 8
  %25 = alloca %"class.std::shared_ptr.12", align 8
  %26 = alloca %"class.std::weak_ptr", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %31 = alloca %class.anon.33, align 1
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %35 = alloca %"class.std::weak_ptr", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %36 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %37 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  store ptr %37, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %38) #7
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %6, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %41) #7
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %7, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  br label %44

44:                                               ; preds = %55, %2
  %45 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %45, label %47, label %46

46:                                               ; preds = %44
  store i32 2, ptr %8, align 4
  br label %57

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %48) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  %49 = call noundef zeroext i1 @_ZSteqIN7hipsycl2rt8dag_nodeES2_EbRKSt10shared_ptrIT_ERKS3_IT0_E(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br i1 %49, label %50, label %51

50:                                               ; preds = %47
  store i32 1, ptr %8, align 4
  br label %52

51:                                               ; preds = %47
  store i32 0, ptr %8, align 4
  br label %52

52:                                               ; preds = %51, %50
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  %53 = load i32, ptr %8, align 4
  switch i32 %53, label %57 [
    i32 0, label %54
  ]

54:                                               ; preds = %52
  br label %55

55:                                               ; preds = %54
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %44

57:                                               ; preds = %52, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %58 = load i32, ptr %8, align 4
  switch i32 %58, label %165 [
    i32 2, label %59
    i32 1, label %154
  ]

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %60 = call noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
  %61 = call noundef i64 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE3EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217) %60)
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %63 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  store ptr %63, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %64) #7
  %66 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %14, i32 0, i32 0
  store ptr %65, ptr %66, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %67) #7
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %15, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  br label %70

70:                                               ; preds = %93, %59
  %71 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %71, label %73, label %72

72:                                               ; preds = %70
  store i32 4, ptr %8, align 4
  br label %95

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %74) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8 %17, ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  %75 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br i1 %75, label %76, label %86

76:                                               ; preds = %73
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = invoke noundef zeroext i1 @"_ZZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_EENK3$_0clES3_S3_i"(ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef %18, ptr noundef %19, i32 noundef %77)
          to label %79 unwind label %81

79:                                               ; preds = %76
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  br i1 %78, label %80, label %85

80:                                               ; preds = %79
  store i32 1, ptr %8, align 4
  br label %87

81:                                               ; preds = %76
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %20, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %21, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %159

85:                                               ; preds = %79
  br label %86

86:                                               ; preds = %85, %73
  store i32 0, ptr %8, align 4
  br label %87

87:                                               ; preds = %86, %80
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  %88 = load i32, ptr %8, align 4
  switch i32 %88, label %90 [
    i32 0, label %89
  ]

89:                                               ; preds = %87
  store i32 0, ptr %8, align 4
  br label %90

90:                                               ; preds = %89, %87
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  %91 = load i32, ptr %8, align 4
  switch i32 %91, label %95 [
    i32 0, label %92
  ]

92:                                               ; preds = %90
  br label %93

93:                                               ; preds = %92
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %70

95:                                               ; preds = %90, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %96 = load i32, ptr %8, align 4
  switch i32 %96, label %152 [
    i32 4, label %97
  ]

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !11
  br label %98

98:                                               ; preds = %124, %97
  %99 = load i64, ptr %22, align 8, !tbaa !11
  %100 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  %101 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(160) %100) #7
  %102 = icmp ult i64 %99, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %98
  store i32 6, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %127

104:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  %105 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  %106 = load i64, ptr %22, align 8, !tbaa !11
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEEixEm(ptr noundef nonnull align 8 dereferenceable(160) %105, i64 noundef %106) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8 %23, ptr noundef nonnull align 8 dereferenceable(16) %107) #7
  %108 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  br i1 %108, label %109, label %123

109:                                              ; preds = %104
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = invoke noundef zeroext i1 @"_ZZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_EENK3$_0clES3_S3_i"(ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef %24, ptr noundef %25, i32 noundef %110)
          to label %112 unwind label %118

112:                                              ; preds = %109
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  br i1 %111, label %113, label %122

113:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 16, i1 false)
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #7
  %114 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  %115 = load i64, ptr %22, align 8, !tbaa !11
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEEixEm(ptr noundef nonnull align 8 dereferenceable(160) %114, i64 noundef %115) #7
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef nonnull align 8 dereferenceable(16) %26) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  br label %122

118:                                              ; preds = %109
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %20, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %21, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %159

122:                                              ; preds = %113, %112
  br label %123

123:                                              ; preds = %122, %104
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  br label %124

124:                                              ; preds = %123
  %125 = load i64, ptr %22, align 8, !tbaa !11
  %126 = add i64 %125, 1
  store i64 %126, ptr %22, align 8, !tbaa !11
  br label %98, !llvm.loop !13

127:                                              ; preds = %103
  %128 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %129 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  %130 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %129) #7
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %29, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  %132 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  %133 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %132) #7
  %134 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %30, i32 0, i32 0
  store ptr %133, ptr %134, align 8
  %135 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %29, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %30, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8
  %139 = call ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS6_N3sbo29small_buffer_vector_allocatorIS6_Lm8ES6_EEEEEZNS5_15add_requirementESt10shared_ptrIS5_EE3$_1ET_SH_SH_T0_"(ptr %136, ptr %138)
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %28, i32 0, i32 0
  store ptr %139, ptr %140, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEC2IPS5_vEERKNS0_IT_SC_EE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %141 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  %142 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %141) #7
  %143 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %33, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEC2IPS5_vEERKNS0_IT_SC_EE(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #7
  %144 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.20", ptr %27, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8
  %146 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.20", ptr %32, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8
  %148 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPKS4_S8_EESD_(ptr noundef nonnull align 8 dereferenceable(160) %128, ptr %145, ptr %147)
  %149 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.24", ptr %34, i32 0, i32 0
  store ptr %148, ptr %149, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  %150 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %36, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2IS2_vEERKSt10shared_ptrIT_E(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  invoke void @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(160) %150, ptr noundef nonnull align 8 dereferenceable(16) %35)
          to label %151 unwind label %155

151:                                              ; preds = %127
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %35) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #7
  store i32 0, ptr %8, align 4
  br label %152

152:                                              ; preds = %151, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  %153 = load i32, ptr %8, align 4
  switch i32 %153, label %165 [
    i32 0, label %154
    i32 1, label %154
  ]

154:                                              ; preds = %152, %152, %57
  ret void

155:                                              ; preds = %127
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %20, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %21, align 4
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %35) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #7
  br label %159

159:                                              ; preds = %155, %118, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %20, align 8
  %162 = load i32, ptr %21, align 4
  %163 = insertvalue { ptr, i32 } poison, ptr %161, 0
  %164 = insertvalue { ptr, i32 } %163, i32 %162, 1
  resume { ptr, i32 } %164

165:                                              ; preds = %152, %57
  unreachable
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN7hipsycl2rt8dag_nodeES2_EbRKSt10shared_ptrIT_ERKS3_IT0_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

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

declare noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv() #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_EENK3$_0clES3_S3_i"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, i32 noundef) #5 align 2

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS6_N3sbo29small_buffer_vector_allocatorIS6_Lm8ES6_EEEEEZNS5_15add_requirementESt10shared_ptrIS5_EE3$_1ET_SH_SH_T0_"(ptr, ptr) #5

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 #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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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.12" = type { %"class.std::__shared_ptr.13" }
%"class.std::__shared_ptr.13" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.24" = type { 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.anon = type { i8 }
%"class.__gnu_cxx::__normal_iterator.20" = 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 uwtable
declare dso_local void @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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 void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.12") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_E(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %5 = alloca %"class.std::weak_ptr", align 8
  %6 = alloca %"class.std::shared_ptr.12", align 8
  %7 = alloca %class.anon, align 1
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %10 = alloca %"class.std::weak_ptr", align 8
  %11 = alloca %"class.std::shared_ptr.12", align 8
  %12 = alloca %"class.std::shared_ptr.12", align 8
  %13 = alloca %"class.std::shared_ptr.12", align 8
  %14 = alloca %"class.std::shared_ptr.12", align 8
  %15 = alloca %"class.std::shared_ptr.12", align 8
  %16 = alloca %"class.std::shared_ptr.12", align 8
  %17 = alloca %"class.std::weak_ptr", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.24", align 8
  %22 = alloca %"class.std::weak_ptr", align 8
  %23 = getelementptr inbounds i8, ptr %0, i64 136
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %24 = tail call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  store ptr %24, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %25 = tail call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  store ptr %25, ptr %4, align 8
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %29
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.12") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  %28 = call noundef zeroext i1 @_ZSteqIN7hipsycl2rt8dag_nodeES2_EbRKSt10shared_ptrIT_ERKS3_IT0_E(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br i1 %28, label %32, label %29

29:                                               ; preds = %.lr.ph
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br i1 %31, label %.lr.ph, label %._crit_edge

32:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %73

._crit_edge:                                      ; preds = %29, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  %33 = call noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv()
  %34 = call noundef i64 @_ZNK7hipsycl2rt8settings3getILNS0_7settingE3EEENS0_13setting_traitIXT_EE4typeEv(ptr noundef nonnull align 8 dereferenceable(217) %33)
  %35 = trunc i64 %34 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %36 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  store ptr %36, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %37 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  store ptr %37, ptr %9, align 8
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %38, label %.lr.ph32, label %._crit_edge33

.lr.ph32:                                         ; preds = %._crit_edge, %.critedge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %39) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.12") align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  %40 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br i1 %40, label %41, label %.critedge

41:                                               ; preds = %.lr.ph32
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  %42 = invoke noundef zeroext i1 @"_ZZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_EENK3$_0clES3_S3_i"(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull %12, ptr noundef nonnull %13, i32 noundef %35)
          to label %43 unwind label %44

43:                                               ; preds = %41
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  br i1 %42, label %48, label %.critedge

44:                                               ; preds = %41
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %76

.critedge:                                        ; preds = %43, %.lr.ph32
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %47, label %.lr.ph32, label %._crit_edge33

48:                                               ; preds = %43
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %72

._crit_edge33:                                    ; preds = %.critedge, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %49 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  %.not = icmp eq i64 %49, 0
  br i1 %.not, label %._crit_edge37, label %.lr.ph36

._crit_edge37:                                    ; preds = %67, %._crit_edge33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %50 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  %51 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  %52 = call ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS6_N3sbo29small_buffer_vector_allocatorIS6_Lm8ES6_EEEEEZNS5_15add_requirementESt10shared_ptrIS5_EE3$_1ET_SH_SH_T0_"(ptr %50, ptr %51)
  store ptr %52, ptr %19, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEC2IPS5_vEERKNS0_IT_SC_EE(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %53 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  store ptr %53, ptr %21, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEC2IPS5_vEERKNS0_IT_SC_EE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %54 = load ptr, ptr %18, align 8
  %55 = load ptr, ptr %20, align 8
  %56 = call ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPKS4_S8_EESD_(ptr noundef nonnull align 8 dereferenceable(160) %23, ptr %54, ptr %55)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2IS2_vEERKSt10shared_ptrIT_E(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  invoke void @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(160) %23, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %71 unwind label %74

.lr.ph36:                                         ; preds = %._crit_edge33, %67
  %.02434 = phi i64 [ %68, %67 ], [ 0, %._crit_edge33 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEEixEm(ptr noundef nonnull align 8 dereferenceable(160) %23, i64 noundef %.02434) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.12") align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %57) #7
  %58 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  br i1 %58, label %59, label %67

59:                                               ; preds = %.lr.ph36
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  %60 = invoke noundef zeroext i1 @"_ZZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_EENK3$_0clES3_S3_i"(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull %15, ptr noundef nonnull %16, i32 noundef %35)
          to label %61 unwind label %65

61:                                               ; preds = %59
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  br i1 %60, label %62, label %67

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false)
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEEixEm(ptr noundef nonnull align 8 dereferenceable(160) %23, i64 noundef %.02434) #7
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  br label %67

65:                                               ; preds = %59
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  br label %76

67:                                               ; preds = %61, %62, %.lr.ph36
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  %68 = add nuw i64 %.02434, 1
  %69 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(160) %23) #7
  %70 = icmp ult i64 %68, %69
  br i1 %70, label %.lr.ph36, label %._crit_edge37, !llvm.loop !5

71:                                               ; preds = %._crit_edge37
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  br label %72

72:                                               ; preds = %48, %71
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  br label %73

73:                                               ; preds = %32, %72
  ret void

74:                                               ; preds = %._crit_edge37
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  br label %76

76:                                               ; preds = %74, %65, %44
  %.pn = phi { ptr, i32 } [ %66, %65 ], [ %75, %74 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  resume { ptr, i32 } %.pn
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN7hipsycl2rt8dag_nodeES2_EbRKSt10shared_ptrIT_ERKS3_IT0_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

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

declare noundef nonnull align 8 dereferenceable(217) ptr @_ZN7hipsycl2rt11application12get_settingsEv() local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZZN7hipsycl2rt8dag_node15add_requirementESt10shared_ptrIS1_EENK3$_0clES3_S3_i"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS6_N3sbo29small_buffer_vector_allocatorIS6_Lm8ES6_EEEEEZNS5_15add_requirementESt10shared_ptrIS5_EE3$_1ET_SH_SH_T0_"(ptr, ptr) local_unnamed_addr #5

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 #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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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"}


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