; 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
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1

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

30:                                               ; preds = %4
  %31 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %32 = load i32, ptr %31, align 8, !tbaa !40
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %40, label %34

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

35:                                               ; preds = %34
  unreachable

36:                                               ; preds = %51, %34
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  br label %93

40:                                               ; preds = %30
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 5
  %43 = load i32, ptr %42, align 4, !tbaa !39
  %44 = call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %11, ptr noundef %41, i32 noundef %43) #7
  %45 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %11, i32 0, i32 11
  store ptr %44, ptr %45, align 8, !tbaa !34
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %48 = load i32, ptr %47, align 8, !tbaa !40
  %49 = call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %11, ptr noundef %46, i32 noundef %48) #7
  %50 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %11, i32 0, i32 12
  store ptr %49, ptr %50, align 8, !tbaa !35
  br label %51

51:                                               ; preds = %40
  %52 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %11, i32 0, i32 1
  %53 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 5
  %54 = load i32, ptr %53, align 4, !tbaa !39
  %55 = mul nsw i32 4, %54
  %56 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %57 = load i32, ptr %56, align 8, !tbaa !40
  %58 = mul nsw i32 %55, %57
  %59 = sext i32 %58 to i64
  %60 = mul i64 %59, 4
  %61 = invoke i32 @cudaMalloc(ptr noundef %52, i64 noundef %60)
          to label %62 unwind label %36

62:                                               ; preds = %51
  %63 = icmp ne i32 %61, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %62
  call void @exit(i32 noundef 1) #9
  unreachable

65:                                               ; preds = %62
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %68 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 5
  %69 = load i32, ptr %68, align 4, !tbaa !39
  %70 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %11, i32 0, i32 11
  %71 = load ptr, ptr %70, align 8, !tbaa !34
  %72 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 6
  %73 = load i32, ptr %72, align 8, !tbaa !40
  %74 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %11, i32 0, i32 12
  %75 = load ptr, ptr %74, align 8, !tbaa !35
  %76 = getelementptr inbounds %"struct.nvinfer1::plugin::RPROIParams", ptr %1, i32 0, i32 2
  %77 = load i32, ptr %76, align 8, !tbaa !41
  %78 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %11, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = invoke noundef i32 @_ZN8nvinfer16plugin15generateAnchorsEP11CUstream_stiPfiS3_iS3_(ptr noundef null, i32 noundef %69, ptr noundef %71, i32 noundef %73, ptr noundef %75, i32 noundef %77, ptr noundef %79)
          to label %81 unwind label %86

81:                                               ; preds = %67
  store i32 %80, ptr %10, align 4, !tbaa !42
  %82 = load i32, ptr %10, align 4, !tbaa !42
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %90, label %84

84:                                               ; preds = %81
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str, ptr noundef @__func__._ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_, i32 noundef 50, i32 noundef 0, ptr noundef @.str.3) #8
          to label %85 unwind label %86

85:                                               ; preds = %84
  unreachable

86:                                               ; preds = %84, %67
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %8, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %93

90:                                               ; preds = %81
  %91 = call noundef i64 @_ZNK8nvinfer16plugin11RPROIPlugin11getSmemSizeEv(ptr noundef nonnull align 8 dereferenceable(148) %11) #7
  %92 = getelementptr inbounds %"class.nvinfer1::plugin::RPROIPlugin", ptr %11, i32 0, i32 5
  store i64 %91, ptr %92, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  ret void

93:                                               ; preds = %86, %36
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr %8, align 8
  %96 = load i32, ptr %9, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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) #2

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

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) #1 align 2

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

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

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

declare noundef i32 @_ZN8nvinfer16plugin15generateAnchorsEP11CUstream_stiPfiS3_iS3_(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

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

; 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 nounwind uwtable
declare dso_local void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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


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

%"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
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_(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) unnamed_addr #0 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
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr null, ptr %5, align 8, !tbaa !8
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 4, ptr %7, align 8, !tbaa !23
  %8 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 2, ptr %8, align 4, !tbaa !24
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  store i64 0, ptr %9, align 8, !tbaa !25
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(40) %1, i64 40, i1 false), !tbaa.struct !26
  %11 = getelementptr inbounds i8, ptr %0, i64 104
  %12 = getelementptr inbounds i8, ptr %0, i64 120
  %13 = getelementptr inbounds i8, ptr %0, i64 128
  %14 = getelementptr inbounds i8, ptr %1, i64 20
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(44) %11, i8 0, i64 44, i1 false)
  %15 = load i32, ptr %14, align 4, !tbaa !29
  %16 = icmp sgt i32 %15, 0
  %17 = getelementptr inbounds i8, ptr %1, i64 24
  %18 = load i32, ptr %17, align 8
  %19 = icmp sgt i32 %18, 0
  %or.cond = select i1 %16, i1 %19, i1 false
  br i1 %or.cond, label %24, label %20

20:                                               ; preds = %4
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_, i32 noundef 42, i32 noundef 0, ptr noundef nonnull @.str.2) #8
          to label %21 unwind label %22

21:                                               ; preds = %20
  unreachable

22:                                               ; preds = %24, %20
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %49

24:                                               ; preds = %4
  %25 = tail call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef %2, i32 noundef %15) #7
  store ptr %25, ptr %12, align 8, !tbaa !30
  %26 = tail call noundef ptr @_ZN8nvinfer16plugin11RPROIPlugin10copyToHostEPKvi(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef %3, i32 noundef %18) #7
  store ptr %26, ptr %13, align 8, !tbaa !31
  %27 = shl nsw i32 %15, 2
  %28 = mul nuw nsw i32 %27, %18
  %29 = zext nneg i32 %28 to i64
  %30 = shl nuw nsw i64 %29, 2
  %31 = invoke i32 @cudaMalloc(ptr noundef nonnull %5, i64 noundef %30)
          to label %32 unwind label %22

32:                                               ; preds = %24
  %.not = icmp eq i32 %31, 0
  br i1 %.not, label %34, label %33

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

34:                                               ; preds = %32
  %35 = load ptr, ptr %12, align 8, !tbaa !30
  %36 = load ptr, ptr %13, align 8, !tbaa !31
  %37 = getelementptr inbounds i8, ptr %1, i64 8
  %38 = load i32, ptr %37, align 8, !tbaa !32
  %39 = load ptr, ptr %5, align 8, !tbaa !8
  %40 = invoke noundef i32 @_ZN8nvinfer16plugin15generateAnchorsEP11CUstream_stiPfiS3_iS3_(ptr noundef null, i32 noundef %15, ptr noundef %35, i32 noundef %18, ptr noundef %36, i32 noundef %38, ptr noundef %39)
          to label %41 unwind label %45

41:                                               ; preds = %34
  %42 = icmp eq i32 %40, 0
  br i1 %42, label %47, label %43

43:                                               ; preds = %41
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN8nvinfer16plugin11RPROIPluginC2ENS0_11RPROIParamsEPKfS4_, i32 noundef 50, i32 noundef 0, ptr noundef nonnull @.str.3) #8
          to label %44 unwind label %45

44:                                               ; preds = %43
  unreachable

45:                                               ; preds = %43, %34
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %41
  %48 = tail call noundef i64 @_ZNK8nvinfer16plugin11RPROIPlugin11getSmemSizeEv(ptr noundef nonnull align 8 dereferenceable(148) %0) #7
  store i64 %48, ptr %9, align 8, !tbaa !25
  ret void

49:                                               ; preds = %45, %22
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %23, %22 ]
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  tail call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 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) #2

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

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 #1 align 2

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

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

declare noundef i32 @_ZN8nvinfer16plugin15generateAnchorsEP11CUstream_stiPfiS3_iS3_(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK8nvinfer16plugin11RPROIPlugin11getSmemSizeEv(ptr noundef nonnull align 8 dereferenceable(148)) local_unnamed_addr #1 align 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 nounwind uwtable
declare dso_local void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 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 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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 = !{!19, !18, i64 20}
!30 = !{!9, !13, i64 120}
!31 = !{!9, !13, i64 128}
!32 = !{!19, !18, i64 8}


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