; LLVM IR from hipacc/hipacc :: tools (cl_bandwidth_test)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl" }
%"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl" = type { %"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_istringstream" = type { %"class.std::basic_istream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"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 }
%"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 }

@.str.70 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.141 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [51 x i8], align 1
@optarg = external global ptr, align 8
@.str.143 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [19 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 uwtable
declare dso_local void @_Z29hipaccInitPlatformsAndDevicesm16cl_platform_name(i64 noundef, i32 noundef) #2

; 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: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z19hipaccGetAllDevicesv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.8") align 8) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z36hipaccCreateContextsAndCommandQueuesb(i1 noundef zeroext) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z25hipaccCopyBufferBenchmarkRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_ib(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5usagePPc(ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #7 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::__cxx11::basic_istringstream", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector.8", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::shared_ptr", align 8
  %19 = alloca %"class.std::shared_ptr", align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca float, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  store i64 4294967295, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 31, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  store i64 67108864, ptr %9, align 8, !tbaa !11
  br label %23

23:                                               ; preds = %124, %2
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = call i32 @getopt(i32 noundef %24, ptr noundef %25, ptr noundef @.str.141) #10
  store i32 %26, ptr %6, align 4, !tbaa !5
  %27 = icmp ne i32 %26, -1
  br i1 %27, label %28, label %125

28:                                               ; preds = %23
  %29 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %29, label %120 [
    i32 104, label %30
    i32 100, label %34
    i32 112, label %64
    i32 115, label %100
  ]

30:                                               ; preds = %28
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.142)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  call void @_Z5usagePPc(ptr noundef %33)
  call void @exit(i32 noundef 0) #11
  unreachable

34:                                               ; preds = %28
  %35 = load ptr, ptr @optarg, align 8, !tbaa !9
  %36 = call i32 @strncmp(ptr noundef %35, ptr noundef @.str.143, i64 noundef 3) #12
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %34
  store i64 8, ptr %7, align 8, !tbaa !11
  br label %63

39:                                               ; preds = %34
  %40 = load ptr, ptr @optarg, align 8, !tbaa !9
  %41 = call i32 @strncmp(ptr noundef %40, ptr noundef @.str.144, i64 noundef 3) #12
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %39
  store i64 2, ptr %7, align 8, !tbaa !11
  br label %62

44:                                               ; preds = %39
  %45 = load ptr, ptr @optarg, align 8, !tbaa !9
  %46 = call i32 @strncmp(ptr noundef %45, ptr noundef @.str.145, i64 noundef 3) #12
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  store i64 4, ptr %7, align 8, !tbaa !11
  br label %61

49:                                               ; preds = %44
  %50 = load ptr, ptr @optarg, align 8, !tbaa !9
  %51 = call i32 @strncmp(ptr noundef %50, ptr noundef @.str.146, i64 noundef 3) #12
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  store i64 4294967295, ptr %7, align 8, !tbaa !11
  br label %60

54:                                               ; preds = %49
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.147)
  %56 = load ptr, ptr @optarg, align 8, !tbaa !9
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef %56)
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef @.str.148)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %60

60:                                               ; preds = %54, %53
  br label %61

61:                                               ; preds = %60, %48
  br label %62

62:                                               ; preds = %61, %43
  br label %63

63:                                               ; preds = %62, %38
  br label %124

64:                                               ; preds = %28
  %65 = load ptr, ptr @optarg, align 8, !tbaa !9
  %66 = call i32 @strncmp(ptr noundef %65, ptr noundef @.str.70, i64 noundef 3) #12
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  store i32 1, ptr %8, align 4, !tbaa !13
  br label %99

69:                                               ; preds = %64
  %70 = load ptr, ptr @optarg, align 8, !tbaa !9
  %71 = call i32 @strncmp(ptr noundef %70, ptr noundef @.str.149, i64 noundef 3) #12
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  store i32 2, ptr %8, align 4, !tbaa !13
  br label %98

74:                                               ; preds = %69
  %75 = load ptr, ptr @optarg, align 8, !tbaa !9
  %76 = call i32 @strncmp(ptr noundef %75, ptr noundef @.str.72, i64 noundef 3) #12
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  store i32 4, ptr %8, align 4, !tbaa !13
  br label %97

79:                                               ; preds = %74
  %80 = load ptr, ptr @optarg, align 8, !tbaa !9
  %81 = call i32 @strncmp(ptr noundef %80, ptr noundef @.str.150, i64 noundef 3) #12
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %79
  store i32 8, ptr %8, align 4, !tbaa !13
  br label %96

84:                                               ; preds = %79
  %85 = load ptr, ptr @optarg, align 8, !tbaa !9
  %86 = call i32 @strncmp(ptr noundef %85, ptr noundef @.str.74, i64 noundef 3) #12
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %84
  store i32 16, ptr %8, align 4, !tbaa !13
  br label %95

89:                                               ; preds = %84
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.151)
  %91 = load ptr, ptr @optarg, align 8, !tbaa !9
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef %91)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @.str.148)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %95

95:                                               ; preds = %89, %88
  br label %96

96:                                               ; preds = %95, %83
  br label %97

97:                                               ; preds = %96, %78
  br label %98

98:                                               ; preds = %97, %73
  br label %99

99:                                               ; preds = %98, %68
  br label %124

100:                                              ; preds = %28
  call void @llvm.lifetime.start.p0(i64 384, ptr %10) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #10
  %101 = load ptr, ptr @optarg, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef %101, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %102 unwind label %106

102:                                              ; preds = %100
  invoke void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 8)
          to label %103 unwind label %110

103:                                              ; preds = %102
  %104 = invoke noundef nonnull align 8 dereferenceable(120) ptr @_ZStrsINSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEERmEOT_S8_OT0_(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %105 unwind label %114

105:                                              ; preds = %103
  call void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr %10) #10
  br label %124

106:                                              ; preds = %100
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %13, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %14, align 4
  br label %119

110:                                              ; preds = %102
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %13, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %14, align 4
  br label %118

114:                                              ; preds = %103
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %13, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %14, align 4
  call void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #10
  br label %118

118:                                              ; preds = %114, %110
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  br label %119

119:                                              ; preds = %118, %106
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr %10) #10
  br label %257

120:                                              ; preds = %28
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.152)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %123 = load ptr, ptr %5, align 8, !tbaa !9
  call void @_Z5usagePPc(ptr noundef %123)
  call void @exit(i32 noundef 1) #11
  unreachable

124:                                              ; preds = %105, %99, %63
  br label %23, !llvm.loop !15

125:                                              ; preds = %23
  %126 = load i64, ptr %7, align 8, !tbaa !11
  %127 = load i32, ptr %8, align 4, !tbaa !13
  call void @_Z29hipaccInitPlatformsAndDevicesm16cl_platform_name(i64 noundef %126, i32 noundef %127)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #10
  call void @_Z19hipaccGetAllDevicesv(ptr dead_on_unwind writable sret(%"class.std::vector.8") align 8 %15)
  invoke void @_Z36hipaccCreateContextsAndCommandQueuesb(i1 noundef zeroext true)
          to label %128 unwind label %139

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %129 = load i64, ptr %9, align 8, !tbaa !11
  %130 = udiv i64 %129, 1
  %131 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %130) #13
          to label %132 unwind label %143

132:                                              ; preds = %128
  store ptr %131, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  store i64 0, ptr %17, align 8, !tbaa !11
  br label %133

133:                                              ; preds = %154, %132
  %134 = load i64, ptr %17, align 8, !tbaa !11
  %135 = load i64, ptr %9, align 8, !tbaa !11
  %136 = udiv i64 %135, 1
  %137 = icmp ult i64 %134, %136
  br i1 %137, label %147, label %138

138:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  br label %157

139:                                              ; preds = %125
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %13, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %14, align 4
  br label %256

143:                                              ; preds = %128
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %13, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %14, align 4
  br label %255

147:                                              ; preds = %133
  %148 = load i64, ptr %17, align 8, !tbaa !11
  %149 = and i64 %148, 255
  %150 = trunc i64 %149 to i8
  %151 = load ptr, ptr %16, align 8, !tbaa !9
  %152 = load i64, ptr %17, align 8, !tbaa !11
  %153 = getelementptr inbounds i8, ptr %151, i64 %152
  store i8 %150, ptr %153, align 1, !tbaa !17
  br label %154

154:                                              ; preds = %147
  %155 = load i64, ptr %17, align 8, !tbaa !11
  %156 = add i64 %155, 1
  store i64 %156, ptr %17, align 8, !tbaa !11
  br label %133, !llvm.loop !18

157:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #10
  %158 = load i64, ptr %9, align 8, !tbaa !11
  invoke void @_Z18hipaccCreateBufferIhESt10shared_ptrI21HipaccImageOpenCLBaseEPT_mm(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %18, ptr noundef null, i64 noundef %158, i64 noundef 1)
          to label %159 unwind label %177

159:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #10
  %160 = load i64, ptr %9, align 8, !tbaa !11
  invoke void @_Z18hipaccCreateBufferIhESt10shared_ptrI21HipaccImageOpenCLBaseEPT_mm(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %19, ptr noundef null, i64 noundef %160, i64 noundef 1)
          to label %161 unwind label %181

161:                                              ; preds = %159
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %163 unwind label %185

163:                                              ; preds = %161
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef @.str.153)
          to label %165 unwind label %185

165:                                              ; preds = %163
  %166 = load i64, ptr %9, align 8, !tbaa !11
  %167 = udiv i64 %166, 1048576
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %164, i64 noundef %167)
          to label %169 unwind label %185

169:                                              ; preds = %165
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %171 unwind label %185

171:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  store i64 0, ptr %20, align 8, !tbaa !11
  br label %172

172:                                              ; preds = %229, %171
  %173 = load i64, ptr %20, align 8, !tbaa !11
  %174 = call noundef i64 @_ZNKSt6vectorIP13_cl_device_idSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #10
  %175 = icmp ult i64 %173, %174
  br i1 %175, label %189, label %176

176:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %246

177:                                              ; preds = %157
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %13, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %14, align 4
  br label %254

181:                                              ; preds = %159
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %13, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %14, align 4
  br label %253

185:                                              ; preds = %169, %165, %163, %161
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %13, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %14, align 4
  br label %252

189:                                              ; preds = %172
  %190 = load ptr, ptr %16, align 8, !tbaa !9
  %191 = load i64, ptr %20, align 8, !tbaa !11
  %192 = trunc i64 %191 to i32
  invoke void @_Z17hipaccWriteMemoryIhEvRSt10shared_ptrI21HipaccImageOpenCLBaseEPT_i(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef %190, i32 noundef %192)
          to label %193 unwind label %232

193:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %194 = load i64, ptr %20, align 8, !tbaa !11
  %195 = trunc i64 %194 to i32
  %196 = invoke noundef double @_Z25hipaccCopyBufferBenchmarkRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_ib(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %195, i1 noundef zeroext false)
          to label %197 unwind label %236

197:                                              ; preds = %193
  store double %196, ptr %21, align 8, !tbaa !19
  %198 = load double, ptr %21, align 8, !tbaa !19
  %199 = fdiv double %198, 1.000000e+03
  store double %199, ptr %21, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  %200 = load i64, ptr %9, align 8, !tbaa !11
  %201 = uitofp i64 %200 to double
  %202 = fmul double 2.000000e+00, %201
  %203 = load double, ptr %21, align 8, !tbaa !19
  %204 = fmul double %203, 0x4130000000000000
  %205 = fdiv double %202, %204
  %206 = fptrunc double %205 to float
  store float %206, ptr %22, align 4, !tbaa !21
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.154)
          to label %208 unwind label %240

208:                                              ; preds = %197
  %209 = load i64, ptr %20, align 8, !tbaa !11
  %210 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %207, i64 noundef %209)
          to label %211 unwind label %240

211:                                              ; preds = %208
  %212 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %210, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %213 unwind label %240

213:                                              ; preds = %211
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.155)
          to label %215 unwind label %240

215:                                              ; preds = %213
  %216 = load float, ptr %22, align 4, !tbaa !21
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %214, float noundef %216)
          to label %218 unwind label %240

218:                                              ; preds = %215
  %219 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %217, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %220 unwind label %240

220:                                              ; preds = %218
  %221 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.156)
          to label %222 unwind label %240

222:                                              ; preds = %220
  %223 = load float, ptr %22, align 4, !tbaa !21
  %224 = fdiv float %223, 1.024000e+03
  %225 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %221, float noundef %224)
          to label %226 unwind label %240

226:                                              ; preds = %222
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %228 unwind label %240

228:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  br label %229

229:                                              ; preds = %228
  %230 = load i64, ptr %20, align 8, !tbaa !11
  %231 = add i64 %230, 1
  store i64 %231, ptr %20, align 8, !tbaa !11
  br label %172, !llvm.loop !23

232:                                              ; preds = %189
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %13, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %14, align 4
  br label %245

236:                                              ; preds = %193
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %13, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %14, align 4
  br label %244

240:                                              ; preds = %226, %222, %220, %218, %215, %213, %211, %208, %197
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %13, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %244

244:                                              ; preds = %240, %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  br label %245

245:                                              ; preds = %244, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %252

246:                                              ; preds = %176
  %247 = load ptr, ptr %16, align 8, !tbaa !9
  %248 = icmp eq ptr %247, null
  br i1 %248, label %250, label %249

249:                                              ; preds = %246
  call void @_ZdaPv(ptr noundef %247) #14
  br label %250

250:                                              ; preds = %249, %246
  store i32 0, ptr %3, align 4
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #10
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @_ZNSt6vectorIP13_cl_device_idSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  %251 = load i32, ptr %3, align 4
  ret i32 %251

252:                                              ; preds = %245, %185
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #10
  br label %253

253:                                              ; preds = %252, %181
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #10
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #10
  br label %254

254:                                              ; preds = %253, %177
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #10
  br label %255

255:                                              ; preds = %254, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %256

256:                                              ; preds = %255, %139
  call void @_ZNSt6vectorIP13_cl_device_idSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #10
  br label %257

257:                                              ; preds = %256, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %13, align 8
  %260 = load i32, ptr %14, align 4
  %261 = insertvalue { ptr, i32 } poison, ptr %259, 0
  %262 = insertvalue { ptr, i32 } %261, i32 %260, 1
  resume { ptr, i32 } %262
}

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #8

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(120) ptr @_ZStrsINSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEERmEOT_S8_OT0_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18hipaccCreateBufferIhESt10shared_ptrI21HipaccImageOpenCLBaseEPT_mm(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef, i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind willreturn memory(read) "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 = { nobuiltin allocsize(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 = { nobuiltin 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 #6 = { 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 #7 = { mustprogress norecurse 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS16cl_platform_name", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !16}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = distinct !{!23, !16}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl" }
%"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl" = type { %"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<_cl_device_id *, std::allocator<_cl_device_id *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_istringstream" = type { %"class.std::basic_istream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"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 }
%"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 }

@.str.70 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.141 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [51 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.143 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [19 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 uwtable
declare dso_local void @_Z29hipaccInitPlatformsAndDevicesm16cl_platform_name(i64 noundef, i32 noundef) local_unnamed_addr #2

; 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 nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z19hipaccGetAllDevicesv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.8") align 8) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z36hipaccCreateContextsAndCommandQueuesb(i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5usagePPc(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #7 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::__cxx11::basic_istringstream", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector.8", align 8
  %8 = alloca %"class.std::shared_ptr", align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  store i64 67108864, ptr %3, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %.backedge, %2
  %.039 = phi i32 [ 31, %2 ], [ %.039.be, %.backedge ]
  %.026 = phi i64 [ 4294967295, %2 ], [ %.026.be, %.backedge ]
  %11 = call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.141) #10
  switch i32 %11, label %70 [
    i32 -1, label %73
    i32 104, label %12
    i32 100, label %15
    i32 112, label %34
    i32 115, label %56
  ]

12:                                               ; preds = %10
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.142)
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_Z5usagePPc(ptr noundef %1)
  call void @exit(i32 noundef 0) #11
  unreachable

15:                                               ; preds = %10
  %16 = load ptr, ptr @optarg, align 8, !tbaa !9
  %17 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.143, i64 noundef 3) #12
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %.backedge, label %19

19:                                               ; preds = %15
  %20 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.144, i64 noundef 3) #12
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %.backedge, label %22

22:                                               ; preds = %19
  %23 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.145, i64 noundef 3) #12
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %.backedge, label %25

25:                                               ; preds = %22
  %26 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.146, i64 noundef 3) #12
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %.backedge, label %28

28:                                               ; preds = %25
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.147)
  %30 = load ptr, ptr @optarg, align 8, !tbaa !9
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef %30)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str.148)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.backedge

34:                                               ; preds = %10
  %35 = load ptr, ptr @optarg, align 8, !tbaa !9
  %36 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %35, ptr noundef nonnull dereferenceable(1) @.str.70, i64 noundef 3) #12
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %.backedge, label %38

38:                                               ; preds = %34
  %39 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %35, ptr noundef nonnull dereferenceable(1) @.str.149, i64 noundef 3) #12
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %.backedge, label %41

41:                                               ; preds = %38
  %42 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %35, ptr noundef nonnull dereferenceable(1) @.str.72, i64 noundef 3) #12
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %.backedge, label %44

44:                                               ; preds = %41
  %45 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %35, ptr noundef nonnull dereferenceable(1) @.str.150, i64 noundef 3) #12
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %.backedge, label %47

47:                                               ; preds = %44
  %48 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %35, ptr noundef nonnull dereferenceable(1) @.str.74, i64 noundef 3) #12
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %.backedge, label %50

.backedge:                                        ; preds = %47, %44, %41, %38, %34, %25, %22, %19, %15, %50, %28, %61
  %.039.be = phi i32 [ %.039, %61 ], [ %.039, %50 ], [ %.039, %28 ], [ %.039, %15 ], [ %.039, %19 ], [ %.039, %22 ], [ %.039, %25 ], [ 1, %34 ], [ 2, %38 ], [ 4, %41 ], [ 8, %44 ], [ 16, %47 ]
  %.026.be = phi i64 [ %.026, %61 ], [ %.026, %50 ], [ %.026, %28 ], [ 8, %15 ], [ 2, %19 ], [ 4, %22 ], [ 4294967295, %25 ], [ %.026, %34 ], [ %.026, %38 ], [ %.026, %41 ], [ %.026, %44 ], [ %.026, %47 ]
  br label %10, !llvm.loop !11

50:                                               ; preds = %47
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.151)
  %52 = load ptr, ptr @optarg, align 8, !tbaa !9
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef %52)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @.str.148)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.backedge

56:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  %57 = load ptr, ptr @optarg, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %57, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %58 unwind label %62

58:                                               ; preds = %56
  invoke void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(120) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 8)
          to label %59 unwind label %64

59:                                               ; preds = %58
  %60 = invoke noundef nonnull align 8 dereferenceable(120) ptr @_ZStrsINSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEERmEOT_S8_OT0_(ptr noundef nonnull align 8 dereferenceable(120) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %61 unwind label %66

61:                                               ; preds = %59
  call void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %4) #10
  br label %.backedge

62:                                               ; preds = %56
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %69

64:                                               ; preds = %58
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %68

66:                                               ; preds = %59
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #10
  br label %68

68:                                               ; preds = %66, %64
  %.pn49 = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  br label %69

69:                                               ; preds = %68, %62
  %.pn49.pn = phi { ptr, i32 } [ %.pn49, %68 ], [ %63, %62 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %4) #10
  br label %151

70:                                               ; preds = %10
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.152)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @_Z5usagePPc(ptr noundef %1)
  call void @exit(i32 noundef 1) #11
  unreachable

73:                                               ; preds = %10
  call void @_Z29hipaccInitPlatformsAndDevicesm16cl_platform_name(i64 noundef %.026, i32 noundef %.039)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #10
  call void @_Z19hipaccGetAllDevicesv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.8") align 8 %7)
  invoke void @_Z36hipaccCreateContextsAndCommandQueuesb(i1 noundef zeroext true)
          to label %74 unwind label %82

74:                                               ; preds = %73
  %75 = load i64, ptr %3, align 8, !tbaa !5
  %76 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %75) #13
          to label %.preheader53 unwind label %84

.preheader53:                                     ; preds = %74
  %.not = icmp eq i64 %75, 0
  br i1 %.not, label %._crit_edge, label %iter.check

iter.check:                                       ; preds = %.preheader53
  %min.iters.check = icmp ult i64 %75, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check99 = icmp ult i64 %75, 16
  br i1 %min.iters.check99, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %75, -16
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <16 x i8> [ <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %77 = getelementptr inbounds i8, ptr %76, i64 %index
  store <16 x i8> %vec.ind, ptr %77, align 1, !tbaa !13
  %index.next = add nuw i64 %index, 16
  %vec.ind.next = add <16 x i8> %vec.ind, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
  %78 = icmp eq i64 %index.next, %n.vec
  br i1 %78, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %75, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %75, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %.02564.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec101, %vec.epilog.middle.block ]
  br label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec101 = and i64 %75, -8
  %79 = trunc i64 %vec.epilog.resume.val to i8
  %.splatinsert = insertelement <8 x i8> poison, i8 %79, i64 0
  %.splat = shufflevector <8 x i8> %.splatinsert, <8 x i8> poison, <8 x i32> zeroinitializer
  %induction = or disjoint <8 x i8> %.splat, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7>
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index103 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next106, %vec.epilog.vector.body ]
  %vec.ind104 = phi <8 x i8> [ %induction, %vec.epilog.ph ], [ %vec.ind.next105, %vec.epilog.vector.body ]
  %80 = getelementptr inbounds i8, ptr %76, i64 %index103
  store <8 x i8> %vec.ind104, ptr %80, align 1, !tbaa !13
  %index.next106 = add nuw i64 %index103, 8
  %vec.ind.next105 = add <8 x i8> %vec.ind104, <i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8>
  %81 = icmp eq i64 %index.next106, %n.vec101
  br i1 %81, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !17

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n107 = icmp eq i64 %75, %n.vec101
  br i1 %cmp.n107, label %._crit_edge, label %.lr.ph.preheader

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %vec.epilog.middle.block, %.preheader53
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  invoke void @_Z18hipaccCreateBufferIhESt10shared_ptrI21HipaccImageOpenCLBaseEPT_mm(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %8, ptr noundef null, i64 noundef %75, i64 noundef 1)
          to label %89 unwind label %102

82:                                               ; preds = %73
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %150

84:                                               ; preds = %74
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %150

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.02564 = phi i64 [ %88, %.lr.ph ], [ %.02564.ph, %.lr.ph.preheader ]
  %86 = trunc i64 %.02564 to i8
  %87 = getelementptr inbounds i8, ptr %76, i64 %.02564
  store i8 %86, ptr %87, align 1, !tbaa !13
  %88 = add nuw i64 %.02564, 1
  %exitcond.not = icmp eq i64 %88, %75
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

89:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  %90 = load i64, ptr %3, align 8, !tbaa !5
  invoke void @_Z18hipaccCreateBufferIhESt10shared_ptrI21HipaccImageOpenCLBaseEPT_mm(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %9, ptr noundef null, i64 noundef %90, i64 noundef 1)
          to label %91 unwind label %104

91:                                               ; preds = %89
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %93 unwind label %106

93:                                               ; preds = %91
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @.str.153)
          to label %95 unwind label %106

95:                                               ; preds = %93
  %96 = load i64, ptr %3, align 8, !tbaa !5
  %97 = lshr i64 %96, 20
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %94, i64 noundef %97)
          to label %99 unwind label %106

99:                                               ; preds = %95
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %106

.preheader:                                       ; preds = %99
  %101 = call noundef i64 @_ZNKSt6vectorIP13_cl_device_idSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #10
  %.not68 = icmp eq i64 %101, 0
  br i1 %.not68, label %._crit_edge67, label %.lr.ph66

102:                                              ; preds = %._crit_edge
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %149

104:                                              ; preds = %89
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %148

106:                                              ; preds = %99, %95, %93, %91
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %147

.lr.ph66:                                         ; preds = %.preheader, %137
  %.065 = phi i64 [ %138, %137 ], [ 0, %.preheader ]
  %108 = trunc i64 %.065 to i32
  invoke void @_Z17hipaccWriteMemoryIhEvRSt10shared_ptrI21HipaccImageOpenCLBaseEPT_i(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull %76, i32 noundef %108)
          to label %109 unwind label %141

109:                                              ; preds = %.lr.ph66
  %110 = invoke noundef double @_Z25hipaccCopyBufferBenchmarkRKSt10shared_ptrI21HipaccImageOpenCLBaseERS1_ib(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %108, i1 noundef zeroext false)
          to label %111 unwind label %143

111:                                              ; preds = %109
  %112 = fdiv double %110, 1.000000e+03
  %113 = load i64, ptr %3, align 8, !tbaa !5
  %114 = uitofp i64 %113 to double
  %115 = fmul double %114, 2.000000e+00
  %116 = fmul double %112, 0x4130000000000000
  %117 = fdiv double %115, %116
  %118 = fptrunc double %117 to float
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.154)
          to label %120 unwind label %145

120:                                              ; preds = %111
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %119, i64 noundef %.065)
          to label %122 unwind label %145

122:                                              ; preds = %120
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %124 unwind label %145

124:                                              ; preds = %122
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.155)
          to label %126 unwind label %145

126:                                              ; preds = %124
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %125, float noundef %118)
          to label %128 unwind label %145

128:                                              ; preds = %126
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %127, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %130 unwind label %145

130:                                              ; preds = %128
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.156)
          to label %132 unwind label %145

132:                                              ; preds = %130
  %133 = fmul float %118, 0x3F50000000000000
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %131, float noundef %133)
          to label %135 unwind label %145

135:                                              ; preds = %132
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %137 unwind label %145

137:                                              ; preds = %135
  %138 = add nuw i64 %.065, 1
  %139 = call noundef i64 @_ZNKSt6vectorIP13_cl_device_idSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #10
  %140 = icmp ult i64 %138, %139
  br i1 %140, label %.lr.ph66, label %._crit_edge67, !llvm.loop !19

141:                                              ; preds = %.lr.ph66
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %147

143:                                              ; preds = %109
  %144 = landingpad { ptr, i32 }
          cleanup
  br label %147

145:                                              ; preds = %135, %132, %130, %128, %126, %124, %122, %120, %111
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %147

._crit_edge67:                                    ; preds = %137, %.preheader
  call void @_ZdaPv(ptr noundef nonnull %76) #14
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @_ZNSt6vectorIP13_cl_device_idSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  ret i32 0

147:                                              ; preds = %141, %145, %143, %106
  %.pn.pn.pn = phi { ptr, i32 } [ %107, %106 ], [ %142, %141 ], [ %146, %145 ], [ %144, %143 ]
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #10
  br label %148

148:                                              ; preds = %147, %104
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %147 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  call void @_ZNSt12__shared_ptrI21HipaccImageOpenCLBaseLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #10
  br label %149

149:                                              ; preds = %148, %102
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %148 ], [ %103, %102 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  br label %150

150:                                              ; preds = %84, %149, %82
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %83, %82 ], [ %.pn.pn.pn.pn.pn, %149 ], [ %85, %84 ]
  call void @_ZNSt6vectorIP13_cl_device_idSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #10
  br label %151

151:                                              ; preds = %150, %69
  %.pn49.pn.pn = phi { ptr, i32 } [ %.pn49.pn, %69 ], [ %.pn.pn.pn.pn.pn.pn.pn, %150 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  resume { ptr, i32 } %.pn49.pn.pn
}

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #8

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(120) ptr @_ZStrsINSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEERmEOT_S8_OT0_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18hipaccCreateBufferIhESt10shared_ptrI21HipaccImageOpenCLBaseEPT_mm(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nobuiltin allocsize(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 = { nobuiltin 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 #6 = { 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 #7 = { mustprogress norecurse 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !12, !15, !16}
!18 = distinct !{!18, !12, !16, !15}
!19 = distinct !{!19, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass