; LLVM IR from NVIDIA/TensorRT :: plugin/nvFasterRCNN (nvFasterRCNNPlugin)

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

%"struct.nvinfer1::plugin::RPROIParams" = type { i32, i32, i32, i32, i32, i32, i32, float, float, float }
%"class.nvinfer1::plugin::RPROIPlugin" = type <{ %"class.nvinfer1::IPluginV2IOExt", ptr, %"class.std::__cxx11::basic_string", i32, i32, i64, %"struct.nvinfer1::plugin::RPROIParams", i32, i32, i32, i32, ptr, ptr, i32, i32, i32, [4 x i8] }>
%"class.nvinfer1::IPluginV2IOExt" = type { %"class.nvinfer1::IPluginV2Ext" }
%"class.nvinfer1::IPluginV2Ext" = type { %"class.nvinfer1::IPluginV2" }
%"class.nvinfer1::IPluginV2" = type { 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] }

@_ZTVN8nvinfer16plugin11RPROIPluginE = external dso_local unnamed_addr constant { [29 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [92 x i8], align 1
@__func__._ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_ = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [61 x i8], align 1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: noreturn
declare void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148), ptr noundef, i32 noundef) #0 align 2

declare i32 @cudaMalloc(ptr noundef, i64 noundef) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_iiiiS4_mNS_8DataTypeES5_NS0_9DLayout_tE(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef byval(%"struct.nvinfer1::plugin::RPROIParams") align 8 %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr noundef %8, i64 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %14, align 8, !tbaa !5
  store ptr %2, ptr %15, align 8, !tbaa !5
  store ptr %3, ptr %16, align 8, !tbaa !5
  store i32 %4, ptr %17, align 4, !tbaa !9
  store i32 %5, ptr %18, align 4, !tbaa !9
  store i32 %6, ptr %19, align 4, !tbaa !9
  store i32 %7, ptr %20, align 4, !tbaa !9
  store ptr %8, ptr %21, align 8, !tbaa !5
  store i64 %9, ptr %22, align 8, !tbaa !11
  store i32 %10, ptr %23, align 4, !tbaa !13
  store i32 %11, ptr %24, align 4, !tbaa !13
  store i32 %12, ptr %25, align 4, !tbaa !15
  %28 = load ptr, ptr %14, align 8
  call void @_ZN8nvinfer114IPluginV2IOExtC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  store ptr getelementptr inbounds inrange(-16, 216) ({ [29 x ptr] }, ptr @_ZTVN8nvinfer16plugin11RPROIPluginE, i32 0, i32 0, i32 2), ptr %28, align 8, !tbaa !17
  %29 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 1
  store ptr null, ptr %29, align 8, !tbaa !19
  %30 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 2
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  %31 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 3
  store i32 4, ptr %31, align 8, !tbaa !28
  %32 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 4
  store i32 2, ptr %32, align 4, !tbaa !29
  %33 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 5
  %34 = load i64, ptr %22, align 8, !tbaa !11
  store i64 %34, ptr %33, align 8, !tbaa !30
  %35 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %1, i64 40, i1 false), !tbaa.struct !31
  %36 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 7
  %37 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %37, ptr %36, align 8, !tbaa !33
  %38 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 8
  %39 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %39, ptr %38, align 4, !tbaa !34
  %40 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 9
  %41 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %41, ptr %40, align 8, !tbaa !35
  %42 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 10
  %43 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %43, ptr %42, align 4, !tbaa !36
  %44 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 11
  store ptr null, ptr %44, align 8, !tbaa !37
  %45 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 12
  store ptr null, ptr %45, align 8, !tbaa !38
  %46 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 13
  %47 = load i32, ptr %23, align 4, !tbaa !13
  store i32 %47, ptr %46, align 8, !tbaa !39
  %48 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 14
  %49 = load i32, ptr %24, align 4, !tbaa !13
  store i32 %49, ptr %48, align 4, !tbaa !40
  %50 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 15
  %51 = load i32, ptr %25, align 4, !tbaa !15
  store i32 %51, ptr %50, align 8, !tbaa !41
  %52 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 5
  %53 = load i32, ptr %52, align 4, !tbaa !42
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %55, label %59

55:                                               ; preds = %13
  %56 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %57 = load i32, ptr %56, align 8, !tbaa !43
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %65, label %59

59:                                               ; preds = %55, %13
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str, ptr noundef @__func__._ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_, i32 noundef 69, i32 noundef 0, ptr noundef @.str.2) #7
          to label %60 unwind label %61

60:                                               ; preds = %59
  unreachable

61:                                               ; preds = %96, %76, %59
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %26, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %27, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  br label %116

65:                                               ; preds = %55
  %66 = load ptr, ptr %15, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 5
  %68 = load i32, ptr %67, align 4, !tbaa !42
  %69 = call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %28, ptr noundef %66, i32 noundef %68) #6
  %70 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 11
  store ptr %69, ptr %70, align 8, !tbaa !37
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %73 = load i32, ptr %72, align 8, !tbaa !43
  %74 = call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %28, ptr noundef %71, i32 noundef %73) #6
  %75 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 12
  store ptr %74, ptr %75, align 8, !tbaa !38
  br label %76

76:                                               ; preds = %65
  %77 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 1
  %78 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 5
  %79 = load i32, ptr %78, align 4, !tbaa !42
  %80 = mul nsw i32 4, %79
  %81 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %82 = load i32, ptr %81, align 8, !tbaa !43
  %83 = mul nsw i32 %80, %82
  %84 = sext i32 %83 to i64
  %85 = mul i64 %84, 4
  %86 = invoke i32 @cudaMalloc(ptr noundef %77, i64 noundef %85)
          to label %87 unwind label %61

87:                                               ; preds = %76
  %88 = icmp ne i32 %86, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %87
  call void @exit(i32 noundef 1) #8
  unreachable

90:                                               ; preds = %87
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %21, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %115

95:                                               ; preds = %92
  br label %96

96:                                               ; preds = %95
  %97 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %28, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !19
  %99 = load ptr, ptr %21, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 5
  %101 = load i32, ptr %100, align 4, !tbaa !42
  %102 = mul nsw i32 4, %101
  %103 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %104 = load i32, ptr %103, align 8, !tbaa !43
  %105 = mul nsw i32 %102, %104
  %106 = sext i32 %105 to i64
  %107 = mul i64 %106, 4
  %108 = invoke i32 @cudaMemcpy(ptr noundef %98, ptr noundef %99, i64 noundef %107, i32 noundef 3)
          to label %109 unwind label %61

109:                                              ; preds = %96
  %110 = icmp ne i32 %108, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %109
  call void @exit(i32 noundef 1) #8
  unreachable

112:                                              ; preds = %109
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  br label %115

115:                                              ; preds = %114, %92
  ret void

116:                                              ; preds = %61
  %117 = load ptr, ptr %26, align 8
  %118 = load i32, ptr %27, align 4
  %119 = insertvalue { ptr, i32 } poison, ptr %117, 0
  %120 = insertvalue { ptr, i32 } %119, i32 %118, 1
  resume { ptr, i32 } %120
}

declare i32 @cudaMemcpy(ptr noundef, ptr noundef, i64 noundef, i32 noundef) #3

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

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }
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 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN8nvinfer16plugin9DLayout_tE", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!20, !6, i64 8}
!20 = !{!"_ZTSN8nvinfer16plugin11RPROIPluginE", !21, i64 0, !6, i64 8, !24, i64 16, !10, i64 48, !10, i64 52, !12, i64 56, !26, i64 64, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !6, i64 120, !6, i64 128, !14, i64 136, !14, i64 140, !16, i64 144}
!21 = !{!"_ZTSN8nvinfer114IPluginV2IOExtE", !22, i64 0}
!22 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !23, i64 0}
!23 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !12, i64 8, !7, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!26 = !{!"_ZTSN8nvinfer16plugin11RPROIParamsE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !27, i64 28, !27, i64 32, !27, i64 36}
!27 = !{!"float", !7, i64 0}
!28 = !{!20, !10, i64 48}
!29 = !{!20, !10, i64 52}
!30 = !{!20, !12, i64 56}
!31 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 4, !9, i64 24, i64 4, !9, i64 28, i64 4, !32, i64 32, i64 4, !32, i64 36, i64 4, !32}
!32 = !{!27, !27, i64 0}
!33 = !{!20, !10, i64 104}
!34 = !{!20, !10, i64 108}
!35 = !{!20, !10, i64 112}
!36 = !{!20, !10, i64 116}
!37 = !{!20, !6, i64 120}
!38 = !{!20, !6, i64 128}
!39 = !{!20, !14, i64 136}
!40 = !{!20, !14, i64 140}
!41 = !{!20, !16, i64 144}
!42 = !{!26, !10, i64 20}
!43 = !{!26, !10, i64 24}


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

%"struct.nvinfer1::plugin::RPROIParams" = type { i32, i32, i32, i32, i32, i32, i32, float, float, float }

@_ZTVN8nvinfer16plugin11RPROIPluginE = external dso_local unnamed_addr constant { [29 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [92 x i8], align 1
@__func__._ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_ = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [61 x i8], align 1

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: noreturn
declare void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148), ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

declare i32 @cudaMalloc(ptr noundef, i64 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_iiiiS4_mNS_8DataTypeES5_NS0_9DLayout_tE(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr nocapture noundef readonly byval(%"struct.nvinfer1::plugin::RPROIParams") align 8 %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr noundef %8, i64 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN8nvinfer114IPluginV2IOExtC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  store ptr getelementptr inbounds inrange(-16, 216) (i8, ptr @_ZTVN8nvinfer16plugin11RPROIPluginE, i64 16), ptr %0, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr null, ptr %14, align 8, !tbaa !8
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 4, ptr %16, align 8, !tbaa !23
  %17 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 2, ptr %17, align 4, !tbaa !24
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  store i64 %9, ptr %18, align 8, !tbaa !25
  %19 = getelementptr inbounds i8, ptr %0, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(40) %1, i64 40, i1 false), !tbaa.struct !26
  %20 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %4, ptr %20, align 8, !tbaa !29
  %21 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 %5, ptr %21, align 4, !tbaa !30
  %22 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 %6, ptr %22, align 8, !tbaa !31
  %23 = getelementptr inbounds i8, ptr %0, i64 116
  store i32 %7, ptr %23, align 4, !tbaa !32
  %24 = getelementptr inbounds i8, ptr %0, i64 120
  %25 = getelementptr inbounds i8, ptr %0, i64 136
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %24, i8 0, i64 16, i1 false)
  store i32 %10, ptr %25, align 8, !tbaa !33
  %26 = getelementptr inbounds i8, ptr %0, i64 140
  store i32 %11, ptr %26, align 4, !tbaa !34
  %27 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 %12, ptr %27, align 8, !tbaa !35
  %28 = getelementptr inbounds i8, ptr %1, i64 20
  %29 = load i32, ptr %28, align 4, !tbaa !36
  %30 = icmp sgt i32 %29, 0
  %31 = getelementptr inbounds i8, ptr %1, i64 24
  %32 = load i32, ptr %31, align 8
  %33 = icmp sgt i32 %32, 0
  %or.cond = select i1 %30, i1 %33, i1 false
  br i1 %or.cond, label %38, label %34

34:                                               ; preds = %13
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_, i32 noundef 69, i32 noundef 0, ptr noundef nonnull @.str.2) #8
          to label %35 unwind label %36

35:                                               ; preds = %34
  unreachable

36:                                               ; preds = %50, %38, %34
  %37 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  tail call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  resume { ptr, i32 } %37

38:                                               ; preds = %13
  %39 = getelementptr inbounds i8, ptr %0, i64 128
  %40 = tail call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef %2, i32 noundef %29) #7
  store ptr %40, ptr %24, align 8, !tbaa !37
  %41 = tail call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef %3, i32 noundef %32) #7
  store ptr %41, ptr %39, align 8, !tbaa !38
  %42 = shl nsw i32 %29, 2
  %43 = mul nuw nsw i32 %42, %32
  %44 = zext nneg i32 %43 to i64
  %45 = shl nuw nsw i64 %44, 2
  %46 = invoke i32 @cudaMalloc(ptr noundef nonnull %14, i64 noundef %45)
          to label %47 unwind label %36

47:                                               ; preds = %38
  %.not = icmp eq i32 %46, 0
  br i1 %.not, label %49, label %48

48:                                               ; preds = %47
  tail call void @exit(i32 noundef 1) #9
  unreachable

49:                                               ; preds = %47
  %.not17 = icmp eq ptr %8, null
  br i1 %.not17, label %55, label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %14, align 8, !tbaa !8
  %52 = invoke i32 @cudaMemcpy(ptr noundef %51, ptr noundef nonnull %8, i64 noundef %45, i32 noundef 3)
          to label %53 unwind label %36

53:                                               ; preds = %50
  %.not18 = icmp eq i32 %52, 0
  br i1 %.not18, label %55, label %54

54:                                               ; preds = %53
  tail call void @exit(i32 noundef 1) #9
  unreachable

55:                                               ; preds = %53, %49
  ret void
}

declare i32 @cudaMemcpy(ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { 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, !13, i64 8}
!9 = !{!"_ZTSN8nvinfer16plugin11RPROIPluginE", !10, i64 0, !13, i64 8, !15, i64 16, !18, i64 48, !18, i64 52, !17, i64 56, !19, i64 64, !18, i64 104, !18, i64 108, !18, i64 112, !18, i64 116, !13, i64 120, !13, i64 128, !21, i64 136, !21, i64 140, !22, i64 144}
!10 = !{!"_ZTSN8nvinfer114IPluginV2IOExtE", !11, i64 0}
!11 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !7, i64 0}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !14, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!17 = !{!"long", !14, i64 0}
!18 = !{!"int", !14, i64 0}
!19 = !{!"_ZTSN8nvinfer16plugin11RPROIParamsE", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !20, i64 28, !20, i64 32, !20, i64 36}
!20 = !{!"float", !14, i64 0}
!21 = !{!"_ZTSN8nvinfer18DataTypeE", !14, i64 0}
!22 = !{!"_ZTSN8nvinfer16plugin9DLayout_tE", !14, i64 0}
!23 = !{!9, !18, i64 48}
!24 = !{!9, !18, i64 52}
!25 = !{!9, !17, i64 56}
!26 = !{i64 0, i64 4, !27, i64 4, i64 4, !27, i64 8, i64 4, !27, i64 12, i64 4, !27, i64 16, i64 4, !27, i64 20, i64 4, !27, i64 24, i64 4, !27, i64 28, i64 4, !28, i64 32, i64 4, !28, i64 36, i64 4, !28}
!27 = !{!18, !18, i64 0}
!28 = !{!20, !20, i64 0}
!29 = !{!9, !18, i64 104}
!30 = !{!9, !18, i64 108}
!31 = !{!9, !18, i64 112}
!32 = !{!9, !18, i64 116}
!33 = !{!9, !21, i64 136}
!34 = !{!9, !21, i64 140}
!35 = !{!9, !22, i64 144}
!36 = !{!19, !18, i64 20}
!37 = !{!9, !13, i64 120}
!38 = !{!9, !13, i64 128}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass