; LLVM IR from hipacc/hipacc :: lib/Runtime/OpenCL.ll (Z16hipaccCopyMemoryRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_i)

; 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::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl" }
%"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl" = type { %"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.65 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [167 x i8], align 1
@__PRETTY_FUNCTION__._Z16hipaccCopyMemoryRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_i = external hidden unnamed_addr constant [75 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.18") align 8, ptr noundef nonnull align 8 dereferenceable(144)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19__checkOpenCLErrorsiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16hipaccCopyMemoryRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_i(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca [3 x i64], align 16
  %10 = alloca [3 x i64], align 16
  %11 = alloca %"class.std::vector.18", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector.18", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::vector.18", align 8
  %20 = alloca %"class.std::vector.18", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %25 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZN13HipaccContext11getInstanceEv()
  store ptr %25, ptr %8, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = getelementptr inbounds ptr, ptr %28, i64 4
  %30 = load ptr, ptr %29, align 8
  %31 = call noundef i64 %30(ptr noundef nonnull align 8 dereferenceable(8) %27)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds ptr, ptr %34, i64 4
  %36 = load ptr, ptr %35, align 8
  %37 = call noundef i64 %36(ptr noundef nonnull align 8 dereferenceable(8) %33)
  %38 = icmp eq i64 %31, %37
  br i1 %38, label %39, label %68

39:                                               ; preds = %3
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = getelementptr inbounds ptr, ptr %42, i64 5
  %44 = load ptr, ptr %43, align 8
  %45 = call noundef i64 %44(ptr noundef nonnull align 8 dereferenceable(8) %41)
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %46) #7
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds ptr, ptr %48, i64 5
  %50 = load ptr, ptr %49, align 8
  %51 = call noundef i64 %50(ptr noundef nonnull align 8 dereferenceable(8) %47)
  %52 = icmp eq i64 %45, %51
  br i1 %52, label %53, label %68

53:                                               ; preds = %39
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %54) #7
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds ptr, ptr %56, i64 8
  %58 = load ptr, ptr %57, align 8
  %59 = call noundef i64 %58(ptr noundef nonnull align 8 dereferenceable(8) %55)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #7
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds ptr, ptr %62, i64 8
  %64 = load ptr, ptr %63, align 8
  %65 = call noundef i64 %64(ptr noundef nonnull align 8 dereferenceable(8) %61)
  %66 = icmp eq i64 %59, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %53
  br label %68

68:                                               ; preds = %67, %53, %39, %3
  %69 = phi i1 [ false, %53 ], [ false, %39 ], [ false, %3 ], [ true, %67 ]
  br i1 %69, label %70, label %71

70:                                               ; preds = %68
  br label %73

71:                                               ; preds = %68
  call void @__assert_fail(ptr noundef @.str.119, ptr noundef @.str.65, i32 noundef 658, ptr noundef @__PRETTY_FUNCTION__._Z16hipaccCopyMemoryRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_i) #8
  unreachable

72:                                               ; No predecessors!
  br label %73

73:                                               ; preds = %72, %70
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %74) #7
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = getelementptr inbounds ptr, ptr %76, i64 9
  %78 = load ptr, ptr %77, align 8
  %79 = call noundef i32 %78(ptr noundef nonnull align 8 dereferenceable(8) %75)
  %80 = icmp sge i32 %79, 3
  br i1 %80, label %81, label %156

81:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %82) #7
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds ptr, ptr %84, i64 4
  %86 = load ptr, ptr %85, align 8
  %87 = call noundef i64 %86(ptr noundef nonnull align 8 dereferenceable(8) %83)
  store i64 %87, ptr %10, align 8, !tbaa !13
  %88 = getelementptr inbounds i64, ptr %10, i64 1
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %89) #7
  %91 = load ptr, ptr %90, align 8, !tbaa !11
  %92 = getelementptr inbounds ptr, ptr %91, i64 5
  %93 = load ptr, ptr %92, align 8
  %94 = call noundef i64 %93(ptr noundef nonnull align 8 dereferenceable(8) %90)
  store i64 %94, ptr %88, align 8, !tbaa !13
  %95 = getelementptr inbounds i64, ptr %10, i64 2
  store i64 1, ptr %95, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind writable sret(%"class.std::vector.18") align 8 %11, ptr noundef nonnull align 8 dereferenceable(144) %96)
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %98) #7
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %101) #7
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds ptr, ptr %103, i64 2
  %105 = load ptr, ptr %104, align 8
  %106 = invoke noundef ptr %105(ptr noundef nonnull align 8 dereferenceable(8) %102)
          to label %107 unwind label %133

107:                                              ; preds = %81
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %108) #7
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  %111 = getelementptr inbounds ptr, ptr %110, i64 2
  %112 = load ptr, ptr %111, align 8
  %113 = invoke noundef ptr %112(ptr noundef nonnull align 8 dereferenceable(8) %109)
          to label %114 unwind label %133

114:                                              ; preds = %107
  %115 = getelementptr inbounds [3 x i64], ptr %9, i64 0, i64 0
  %116 = getelementptr inbounds [3 x i64], ptr %9, i64 0, i64 0
  %117 = getelementptr inbounds [3 x i64], ptr %10, i64 0, i64 0
  %118 = invoke i32 @clEnqueueCopyImage(ptr noundef %100, ptr noundef %106, ptr noundef %113, ptr noundef %115, ptr noundef %116, ptr noundef %117, i32 noundef 0, ptr noundef null, ptr noundef null)
          to label %119 unwind label %133

119:                                              ; preds = %114
  store i32 %118, ptr %7, align 4, !tbaa !9
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind writable sret(%"class.std::vector.18") align 8 %14, ptr noundef nonnull align 8 dereferenceable(144) %120)
  %121 = load i32, ptr %6, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %122) #7
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = invoke i32 @clFinish(ptr noundef %124)
          to label %126 unwind label %137

126:                                              ; preds = %119
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = or i32 %127, %125
  store i32 %128, ptr %7, align 4, !tbaa !9
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  %129 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.120, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %130 unwind label %141

130:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.65, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %131 unwind label %145

131:                                              ; preds = %130
  invoke void @_Z19__checkOpenCLErrorsiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(i32 noundef %129, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef 669)
          to label %132 unwind label %149

132:                                              ; preds = %131
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  br label %236

133:                                              ; preds = %114, %107, %81
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %12, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %13, align 4
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %155

137:                                              ; preds = %119
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %12, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %13, align 4
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %155

141:                                              ; preds = %126
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %12, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %13, align 4
  br label %154

145:                                              ; preds = %130
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %12, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %13, align 4
  br label %153

149:                                              ; preds = %131
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %12, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %153

153:                                              ; preds = %149, %145
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %154

154:                                              ; preds = %153, %141
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %155

155:                                              ; preds = %154, %137, %133
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  br label %237

156:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind writable sret(%"class.std::vector.18") align 8 %19, ptr noundef nonnull align 8 dereferenceable(144) %157)
  %158 = load i32, ptr %6, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %159) #7
  %161 = load ptr, ptr %160, align 8, !tbaa !5
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %162) #7
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = getelementptr inbounds ptr, ptr %164, i64 2
  %166 = load ptr, ptr %165, align 8
  %167 = invoke noundef ptr %166(ptr noundef nonnull align 8 dereferenceable(8) %163)
          to label %168 unwind label %214

168:                                              ; preds = %156
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %169) #7
  %171 = load ptr, ptr %170, align 8, !tbaa !11
  %172 = getelementptr inbounds ptr, ptr %171, i64 2
  %173 = load ptr, ptr %172, align 8
  %174 = invoke noundef ptr %173(ptr noundef nonnull align 8 dereferenceable(8) %170)
          to label %175 unwind label %214

175:                                              ; preds = %168
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %176) #7
  %178 = load ptr, ptr %177, align 8, !tbaa !11
  %179 = getelementptr inbounds ptr, ptr %178, i64 6
  %180 = load ptr, ptr %179, align 8
  %181 = invoke noundef i64 %180(ptr noundef nonnull align 8 dereferenceable(8) %177)
          to label %182 unwind label %214

182:                                              ; preds = %175
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %183) #7
  %185 = load ptr, ptr %184, align 8, !tbaa !11
  %186 = getelementptr inbounds ptr, ptr %185, i64 5
  %187 = load ptr, ptr %186, align 8
  %188 = invoke noundef i64 %187(ptr noundef nonnull align 8 dereferenceable(8) %184)
          to label %189 unwind label %214

189:                                              ; preds = %182
  %190 = mul i64 %181, %188
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %191) #7
  %193 = load ptr, ptr %192, align 8, !tbaa !11
  %194 = getelementptr inbounds ptr, ptr %193, i64 8
  %195 = load ptr, ptr %194, align 8
  %196 = invoke noundef i64 %195(ptr noundef nonnull align 8 dereferenceable(8) %192)
          to label %197 unwind label %214

197:                                              ; preds = %189
  %198 = mul i64 %190, %196
  %199 = invoke i32 @clEnqueueCopyBuffer(ptr noundef %161, ptr noundef %167, ptr noundef %174, i64 noundef 0, i64 noundef 0, i64 noundef %198, i32 noundef 0, ptr noundef null, ptr noundef null)
          to label %200 unwind label %214

200:                                              ; preds = %197
  store i32 %199, ptr %7, align 4, !tbaa !9
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind writable sret(%"class.std::vector.18") align 8 %20, ptr noundef nonnull align 8 dereferenceable(144) %201)
  %202 = load i32, ptr %6, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %203) #7
  %205 = load ptr, ptr %204, align 8, !tbaa !5
  %206 = invoke i32 @clFinish(ptr noundef %205)
          to label %207 unwind label %218

207:                                              ; preds = %200
  %208 = load i32, ptr %7, align 4, !tbaa !9
  %209 = or i32 %208, %206
  store i32 %209, ptr %7, align 4, !tbaa !9
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  %210 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.121, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %211 unwind label %222

211:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.65, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %212 unwind label %226

212:                                              ; preds = %211
  invoke void @_Z19__checkOpenCLErrorsiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(i32 noundef %210, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %23, i32 noundef 676)
          to label %213 unwind label %230

213:                                              ; preds = %212
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %236

214:                                              ; preds = %197, %189, %182, %175, %168, %156
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %12, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %13, align 4
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  br label %237

218:                                              ; preds = %200
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %12, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %13, align 4
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  br label %237

222:                                              ; preds = %207
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %12, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %13, align 4
  br label %235

226:                                              ; preds = %211
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %12, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %13, align 4
  br label %234

230:                                              ; preds = %212
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %12, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %234

234:                                              ; preds = %230, %226
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %235

235:                                              ; preds = %234, %222
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %237

236:                                              ; preds = %213, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  ret void

237:                                              ; preds = %235, %218, %214, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %238

238:                                              ; preds = %237
  %239 = load ptr, ptr %12, align 8
  %240 = load i32, ptr %13, align 4
  %241 = insertvalue { ptr, i32 } poison, ptr %239, 0
  %242 = insertvalue { ptr, i32 } %241, i32 %240, 1
  resume { ptr, i32 } %242
}

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

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

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

declare i32 @clEnqueueCopyImage(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #6

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

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

declare i32 @clFinish(ptr noundef) #6

declare i32 @clEnqueueCopyBuffer(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, 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.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl" }
%"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl" = type { %"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<_cl_command_queue *, std::allocator<_cl_command_queue *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.65 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [167 x i8], align 1
@__PRETTY_FUNCTION__._Z16hipaccCopyMemoryRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_i = external hidden unnamed_addr constant [75 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.18") align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19__checkOpenCLErrorsiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16hipaccCopyMemoryRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_i(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca [3 x i64], align 16
  %5 = alloca [3 x i64], align 16
  %6 = alloca %"class.std::vector.18", align 8
  %7 = alloca %"class.std::vector.18", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::vector.18", align 8
  %13 = alloca %"class.std::vector.18", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZN13HipaccContext11getInstanceEv()
  %19 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 32
  %22 = load ptr, ptr %21, align 8
  %23 = tail call noundef i64 %22(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %24 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 32
  %27 = load ptr, ptr %26, align 8
  %28 = tail call noundef i64 %27(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %29 = icmp eq i64 %23, %28
  br i1 %29, label %30, label %.critedge

30:                                               ; preds = %3
  %31 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 40
  %34 = load ptr, ptr %33, align 8
  %35 = tail call noundef i64 %34(ptr noundef nonnull align 8 dereferenceable(8) %31)
  %36 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 40
  %39 = load ptr, ptr %38, align 8
  %40 = tail call noundef i64 %39(ptr noundef nonnull align 8 dereferenceable(8) %36)
  %41 = icmp eq i64 %35, %40
  br i1 %41, label %42, label %.critedge

42:                                               ; preds = %30
  %43 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 64
  %46 = load ptr, ptr %45, align 8
  %47 = tail call noundef i64 %46(ptr noundef nonnull align 8 dereferenceable(8) %43)
  %48 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 64
  %51 = load ptr, ptr %50, align 8
  %52 = tail call noundef i64 %51(ptr noundef nonnull align 8 dereferenceable(8) %48)
  %53 = icmp eq i64 %47, %52
  br i1 %53, label %54, label %.critedge

.critedge:                                        ; preds = %30, %3, %42
  tail call void @__assert_fail(ptr noundef nonnull @.str.119, ptr noundef nonnull @.str.65, i32 noundef 658, ptr noundef nonnull @__PRETTY_FUNCTION__._Z16hipaccCopyMemoryRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_i) #8
  unreachable

54:                                               ; preds = %42
  %55 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 72
  %58 = load ptr, ptr %57, align 8
  %59 = tail call noundef i32 %58(ptr noundef nonnull align 8 dereferenceable(8) %55)
  %60 = icmp sgt i32 %59, 2
  br i1 %60, label %61, label %112

61:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %62 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 32
  %65 = load ptr, ptr %64, align 8
  %66 = tail call noundef i64 %65(ptr noundef nonnull align 8 dereferenceable(8) %62)
  store i64 %66, ptr %5, align 16, !tbaa !8
  %67 = getelementptr inbounds i8, ptr %5, i64 8
  %68 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 40
  %71 = load ptr, ptr %70, align 8
  %72 = tail call noundef i64 %71(ptr noundef nonnull align 8 dereferenceable(8) %68)
  store i64 %72, ptr %67, align 8, !tbaa !8
  %73 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 1, ptr %73, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.18") align 8 %6, ptr noundef nonnull align 8 dereferenceable(144) %18)
  %74 = sext i32 %2 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %74) #7
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 16
  %80 = load ptr, ptr %79, align 8
  %81 = invoke noundef ptr %80(ptr noundef nonnull align 8 dereferenceable(8) %77)
          to label %82 unwind label %99

82:                                               ; preds = %61
  %83 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i64 16
  %86 = load ptr, ptr %85, align 8
  %87 = invoke noundef ptr %86(ptr noundef nonnull align 8 dereferenceable(8) %83)
          to label %88 unwind label %99

88:                                               ; preds = %82
  %89 = invoke i32 @clEnqueueCopyImage(ptr noundef %76, ptr noundef %81, ptr noundef %87, ptr noundef nonnull %4, ptr noundef nonnull %4, ptr noundef nonnull %5, i32 noundef 0, ptr noundef null, ptr noundef null)
          to label %90 unwind label %99

90:                                               ; preds = %88
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.18") align 8 %7, ptr noundef nonnull align 8 dereferenceable(144) %18)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %74) #7
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = invoke i32 @clFinish(ptr noundef %92)
          to label %94 unwind label %101

94:                                               ; preds = %90
  %95 = or i32 %93, %89
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.120, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %96 unwind label %103

96:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.65, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %97 unwind label %105

97:                                               ; preds = %96
  invoke void @_Z19__checkOpenCLErrorsiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(i32 noundef %95, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 669)
          to label %98 unwind label %107

98:                                               ; preds = %97
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %170

99:                                               ; preds = %88, %82, %61
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  br label %111

101:                                              ; preds = %90
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %111

103:                                              ; preds = %94
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %110

105:                                              ; preds = %96
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %109

107:                                              ; preds = %97
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %109

109:                                              ; preds = %107, %105
  %.pn37 = phi { ptr, i32 } [ %108, %107 ], [ %106, %105 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %110

110:                                              ; preds = %109, %103
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %109 ], [ %104, %103 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %111

111:                                              ; preds = %110, %101, %99
  %.pn37.pn.pn = phi { ptr, i32 } [ %.pn37.pn, %110 ], [ %102, %101 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %171

112:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.18") align 8 %12, ptr noundef nonnull align 8 dereferenceable(144) %18)
  %113 = sext i32 %2 to i64
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %113) #7
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 16
  %119 = load ptr, ptr %118, align 8
  %120 = invoke noundef ptr %119(ptr noundef nonnull align 8 dereferenceable(8) %116)
          to label %121 unwind label %158

121:                                              ; preds = %112
  %122 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds i8, ptr %123, i64 16
  %125 = load ptr, ptr %124, align 8
  %126 = invoke noundef ptr %125(ptr noundef nonnull align 8 dereferenceable(8) %122)
          to label %127 unwind label %158

127:                                              ; preds = %121
  %128 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds i8, ptr %129, i64 48
  %131 = load ptr, ptr %130, align 8
  %132 = invoke noundef i64 %131(ptr noundef nonnull align 8 dereferenceable(8) %128)
          to label %133 unwind label %158

133:                                              ; preds = %127
  %134 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i64 40
  %137 = load ptr, ptr %136, align 8
  %138 = invoke noundef i64 %137(ptr noundef nonnull align 8 dereferenceable(8) %134)
          to label %139 unwind label %158

139:                                              ; preds = %133
  %140 = call noundef ptr @_ZNKSt19__shared_ptr_accessI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 64
  %143 = load ptr, ptr %142, align 8
  %144 = invoke noundef i64 %143(ptr noundef nonnull align 8 dereferenceable(8) %140)
          to label %145 unwind label %158

145:                                              ; preds = %139
  %146 = mul i64 %138, %132
  %147 = mul i64 %146, %144
  %148 = invoke i32 @clEnqueueCopyBuffer(ptr noundef %115, ptr noundef %120, ptr noundef %126, i64 noundef 0, i64 noundef 0, i64 noundef %147, i32 noundef 0, ptr noundef null, ptr noundef null)
          to label %149 unwind label %158

149:                                              ; preds = %145
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  call void @_ZN13HipaccContext18get_command_queuesEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.18") align 8 %13, ptr noundef nonnull align 8 dereferenceable(144) %18)
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17_cl_command_queueSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %113) #7
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  %152 = invoke i32 @clFinish(ptr noundef %151)
          to label %153 unwind label %160

153:                                              ; preds = %149
  %154 = or i32 %152, %148
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.121, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %155 unwind label %162

155:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.65, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %156 unwind label %164

156:                                              ; preds = %155
  invoke void @_Z19__checkOpenCLErrorsiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(i32 noundef %154, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 676)
          to label %157 unwind label %166

157:                                              ; preds = %156
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %170

158:                                              ; preds = %145, %139, %133, %127, %121, %112
  %159 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  br label %171

160:                                              ; preds = %149
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP17_cl_command_queueSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  br label %171

162:                                              ; preds = %153
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %169

164:                                              ; preds = %155
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %168

166:                                              ; preds = %156
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %168

168:                                              ; preds = %166, %164
  %.pn = phi { ptr, i32 } [ %167, %166 ], [ %165, %164 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %169

169:                                              ; preds = %168, %162
  %.pn.pn = phi { ptr, i32 } [ %.pn, %168 ], [ %163, %162 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %171

170:                                              ; preds = %157, %98
  ret void

171:                                              ; preds = %169, %160, %158, %111
  %.pn37.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn, %111 ], [ %.pn.pn, %169 ], [ %161, %160 ], [ %159, %158 ]
  resume { ptr, i32 } %.pn37.pn.pn.pn
}

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

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

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

declare i32 @clEnqueueCopyImage(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

declare i32 @clFinish(ptr noundef) local_unnamed_addr #6

declare i32 @clEnqueueCopyBuffer(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass