; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime/dag.ll (ZN7hipsycl2rt3dag17add_command_groupESt10shared_ptrINS0_8dag_nodeEE)

; 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.__gnu_cxx::__normal_iterator" = 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.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.hipsycl::rt::dag" = type { %"class.sbo::small_vector.15", %"class.sbo::small_vector.15" }
%"class.sbo::small_vector.15" = type { %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::shared_ptr<hipsycl::rt::dag_node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::shared_ptr<hipsycl::rt::dag_node>>>::_Vector_impl" = type { %"struct.sbo::small_buffer_vector_allocator.base.19", %"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::shared_ptr<hipsycl::rt::dag_node>>>::_Vector_impl_data" }
%"struct.sbo::small_buffer_vector_allocator.base.19" = type { [128 x i8], i8, i8 }
%"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::shared_ptr<hipsycl::rt::dag_node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt3dag17add_command_groupESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef %1) #0 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", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.std::weak_ptr", align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %13 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %14 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %13)
  store ptr %14, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %15) #5
  %17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %18) #5
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  br label %21

21:                                               ; preds = %45, %2
  %22 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %22, label %24, label %23

23:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %47

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %25) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  %26 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br i1 %26, label %27, label %44

27:                                               ; preds = %24
  %28 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  %29 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %28)
          to label %30 unwind label %39

30:                                               ; preds = %27
  %31 = load ptr, ptr %29, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 3
  %33 = load ptr, ptr %32, align 8
  %34 = invoke noundef zeroext i1 %33(ptr noundef nonnull align 8 dereferenceable(40) %29)
          to label %35 unwind label %39

35:                                               ; preds = %30
  br i1 %34, label %36, label %43

36:                                               ; preds = %35
  %37 = getelementptr inbounds %"class.hipsycl::rt::dag", ptr %12, i32 0, i32 1
  invoke void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backERKS4_(ptr noundef nonnull align 8 dereferenceable(160) %37, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %38 unwind label %39

38:                                               ; preds = %36
  br label %43

39:                                               ; preds = %36, %30, %27
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %10, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %11, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %49

43:                                               ; preds = %38, %35
  br label %44

44:                                               ; preds = %43, %24
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br label %45

45:                                               ; preds = %44
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %21

47:                                               ; preds = %23
  %48 = getelementptr inbounds %"class.hipsycl::rt::dag", ptr %12, i32 0, i32 0
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backERKS4_(ptr noundef nonnull align 8 dereferenceable(160) %48, ptr noundef nonnull align 8 dereferenceable(16) %1)
  ret void

49:                                               ; preds = %39
  %50 = load ptr, ptr %10, align 8
  %51 = load i32, ptr %11, align 4
  %52 = insertvalue { ptr, i32 } poison, ptr %50, 0
  %53 = insertvalue { ptr, i32 } %52, i32 %51, 1
  resume { ptr, i32 } %53
}

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

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

declare noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt8weak_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 @_ZNKSt6vectorISt8weak_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_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

declare noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backERKS4_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(16)) #0 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.__gnu_cxx::__normal_iterator" = 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.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt3dag17add_command_groupESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.std::weak_ptr", align 8
  %6 = alloca %"class.std::shared_ptr", align 8
  %7 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %8 = tail call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %9 = tail call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %8) #5
  store ptr %9, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %10 = tail call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %8) #5
  store ptr %10, ptr %4, align 8
  %11 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 160
  br label %13

._crit_edge:                                      ; preds = %28, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backERKS4_(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(16) %1)
  ret void

13:                                               ; preds = %.lr.ph, %28
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  %15 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  br i1 %15, label %16, label %28

16:                                               ; preds = %13
  %17 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %18 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %17)
          to label %19 unwind label %26

19:                                               ; preds = %16
  %20 = load ptr, ptr %18, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 24
  %22 = load ptr, ptr %21, align 8
  %23 = invoke noundef zeroext i1 %22(ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %24 unwind label %26

24:                                               ; preds = %19
  br i1 %23, label %25, label %28

25:                                               ; preds = %24
  invoke void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backERKS4_(ptr noundef nonnull align 8 dereferenceable(160) %12, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %28 unwind label %26

26:                                               ; preds = %25, %19, %16
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %27

28:                                               ; preds = %24, %25, %13
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %30, label %13, label %._crit_edge
}

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

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

declare noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt8weak_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 @_ZNKSt6vectorISt8weak_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_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

declare noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE9push_backERKS4_(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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