; LLVM IR from NVIDIA/TensorRT :: plugin/detectionLayerPlugin (detectionLayerPlugin)

; 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.RefineDetectionWorkSpace = type { %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::Dims64", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"class.nvinfer1::DimsHW" = type { %"class.nvinfer1::Dims2" }
%"class.nvinfer1::Dims2" = type { %"class.nvinfer1::Dims64" }
%"class.nvinfer1::plugin::DetectionLayer" = type { %"class.nvinfer1::IPluginV2Ext", i32, i32, i32, float, float, i32, i32, %"class.std::shared_ptr", i32, %struct.RefineNMSParameters, %"class.std::__cxx11::basic_string" }
%"class.nvinfer1::IPluginV2Ext" = type { %"class.nvinfer1::IPluginV2" }
%"class.nvinfer1::IPluginV2" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%struct.RefineNMSParameters = type { i32, i32, i32, float, float }
%"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] }
%"struct.nvinfer1::plugin::CudaBind" = type { i64, ptr }

@_ZTISt9exception = external constant ptr
@.str.7 = external hidden unnamed_addr constant [102 x i8], align 1
@__func__._ZN8nvinfer16plugin14DetectionLayer7enqueueEiPKPKvPKPvS6_P11CUstream_st = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #3

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8)) #4

declare void @__cxa_end_catch()

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

declare void @_ZN24RefineDetectionWorkSpaceC1EiiRK19RefineNMSParametersN8nvinfer18DataTypeE(ptr noundef nonnull align 8 dereferenceable(728), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), i32 noundef) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN8nvinfer16plugin14DetectionLayer7enqueueEiPKPKvPKPvS6_P11CUstream_st(ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca %struct.RefineDetectionWorkSpace, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %29, label %23

23:                                               ; preds = %6
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str.7, ptr noundef @__func__._ZN8nvinfer16plugin14DetectionLayer7enqueueEiPKPKvPKPvS6_P11CUstream_st, i32 noundef 297, i32 noundef 0, ptr noundef @.str.23) #7
          to label %24 unwind label %25

24:                                               ; preds = %23
  unreachable

25:                                               ; preds = %32, %23
  %26 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %14, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %15, align 4
  br label %77

29:                                               ; preds = %6
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %34, label %32

32:                                               ; preds = %29
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str.7, ptr noundef @__func__._ZN8nvinfer16plugin14DetectionLayer7enqueueEiPKPKvPKPvS6_P11CUstream_st, i32 noundef 298, i32 noundef 0, ptr noundef @.str.24) #7
          to label %33 unwind label %25

33:                                               ; preds = %32
  unreachable

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %35, i64 0
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %37, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 728, ptr %17) #8
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionLayer", ptr %20, i32 0, i32 7
  %40 = load i32, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionLayer", ptr %20, i32 0, i32 10
  %42 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionLayer", ptr %20, i32 0, i32 9
  %43 = load i32, ptr %42, align 8, !tbaa !24
  invoke void @_ZN24RefineDetectionWorkSpaceC1EiiRK19RefineNMSParametersN8nvinfer18DataTypeE(ptr noundef nonnull align 8 dereferenceable(728) %17, i32 noundef %38, i32 noundef %40, ptr noundef nonnull align 4 dereferenceable(20) %41, i32 noundef %43)
          to label %44 unwind label %68

44:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionLayer", ptr %20, i32 0, i32 7
  %48 = load i32, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionLayer", ptr %20, i32 0, i32 10
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %51, i64 1
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds ptr, ptr %54, i64 0
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionLayer", ptr %20, i32 0, i32 8
  %58 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8nvinfer16plugin8CudaBindIiEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %57) #8
  %59 = getelementptr inbounds %"struct.nvinfer1::plugin::CudaBind", ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds ptr, ptr %61, i64 2
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = invoke noundef i32 @_Z19RefineBatchClassNMSP11CUstream_stiiN8nvinfer18DataTypeERK19RefineNMSParametersRK24RefineDetectionWorkSpacePvPKvSB_SB_SB_S9_(ptr noundef %45, i32 noundef %46, i32 noundef %48, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(20) %49, ptr noundef nonnull align 8 dereferenceable(728) %17, ptr noundef %50, ptr noundef %53, ptr noundef %56, ptr noundef %60, ptr noundef %63, ptr noundef %64)
          to label %66 unwind label %72

66:                                               ; preds = %44
  store i32 %65, ptr %18, align 4, !tbaa !27
  %67 = load i32, ptr %18, align 4, !tbaa !27
  store i32 %67, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 728, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %88

68:                                               ; preds = %34
  %69 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %14, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %15, align 4
  br label %76

72:                                               ; preds = %44
  %73 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %14, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %76

76:                                               ; preds = %72, %68
  call void @llvm.lifetime.end.p0(i64 728, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %77

77:                                               ; preds = %76, %25
  %78 = load i32, ptr %15, align 4
  %79 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %80 = icmp eq i32 %78, %79
  br i1 %80, label %81, label %93

81:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %82 = load ptr, ptr %14, align 8
  %83 = call ptr @__cxa_begin_catch(ptr %82) #8
  store ptr %83, ptr %19, align 8
  %84 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %85 unwind label %90

85:                                               ; preds = %81
  invoke void @__cxa_end_catch()
          to label %86 unwind label %90

86:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %87

87:                                               ; preds = %86
  store i32 1, ptr %7, align 4
  br label %88

88:                                               ; preds = %87, %66
  %89 = load i32, ptr %7, align 4
  ret i32 %89

90:                                               ; preds = %85, %81
  %91 = landingpad { ptr, i32 }
          catch ptr null
  %92 = extractvalue { ptr, i32 } %91, 0
  call void @__clang_call_terminate(ptr %92) #9
  unreachable

93:                                               ; preds = %77
  %94 = load ptr, ptr %14, align 8
  call void @__clang_call_terminate(ptr %94) #9
  unreachable
}

declare noundef i32 @_Z19RefineBatchClassNMSP11CUstream_stiiN8nvinfer18DataTypeERK19RefineNMSParametersRK24RefineDetectionWorkSpacePvPKvSB_SB_SB_S9_(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(728), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind memory(none) }
attributes #3 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { noreturn }
attributes #8 = { nounwind }
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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"_ZTSN8nvinfer16plugin14DetectionLayerE", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !15, i64 20, !15, i64 24, !10, i64 28, !10, i64 32, !16, i64 40, !19, i64 56, !20, i64 60, !21, i64 80}
!13 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !14, i64 0}
!14 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTSSt10shared_ptrIN8nvinfer16plugin8CudaBindIiEEE", !17, i64 0}
!17 = !{!"_ZTSSt12__shared_ptrIN8nvinfer16plugin8CudaBindIiEELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!19 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!20 = !{!"_ZTS19RefineNMSParameters", !10, i64 0, !10, i64 4, !10, i64 8, !15, i64 12, !15, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!12, !19, i64 56}
!25 = !{!26, !6, i64 8}
!26 = !{!"_ZTSN8nvinfer16plugin8CudaBindIiEE", !23, i64 0, !6, i64 8}
!27 = !{!28, !28, i64 0}
!28 = !{!"_ZTS9cudaError", !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.RefineDetectionWorkSpace = type { %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", %"class.nvinfer1::Dims64", %"class.nvinfer1::DimsHW", %"class.nvinfer1::DimsHW", i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"class.nvinfer1::DimsHW" = type { %"class.nvinfer1::Dims2" }
%"class.nvinfer1::Dims2" = type { %"class.nvinfer1::Dims64" }

@_ZTISt9exception = external constant ptr
@.str.7 = external hidden unnamed_addr constant [102 x i8], align 1
@__func__._ZN8nvinfer16plugin14DetectionLayer7enqueueEiPKPKvPKPvS6_P11CUstream_st = external hidden unnamed_addr constant [8 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #3

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare void @__cxa_end_catch() local_unnamed_addr

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

declare void @_ZN24RefineDetectionWorkSpaceC1EiiRK19RefineNMSParametersN8nvinfer18DataTypeE(ptr noundef nonnull align 8 dereferenceable(728), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), i32 noundef) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN8nvinfer16plugin14DetectionLayer7enqueueEiPKPKvPKPvS6_P11CUstream_st(ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %1, ptr noundef readonly %2, ptr noundef readonly %3, ptr noundef %4, ptr noundef %5) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %struct.RefineDetectionWorkSpace, align 8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %.invoke, label %10

8:                                                ; preds = %.invoke
  %9 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %38

10:                                               ; preds = %6
  %.not22 = icmp eq ptr %3, null
  br i1 %.not22, label %.invoke, label %13

.invoke:                                          ; preds = %6, %10
  %11 = phi i32 [ 298, %10 ], [ 297, %6 ]
  %12 = phi ptr [ @.str.24, %10 ], [ @.str.23, %6 ]
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef nonnull @.str.7, ptr noundef nonnull @__func__._ZN8nvinfer16plugin14DetectionLayer7enqueueEiPKPKvPKPvS6_P11CUstream_st, i32 noundef %11, i32 noundef 0, ptr noundef nonnull %12) #7
          to label %.cont unwind label %8

.cont:                                            ; preds = %.invoke
  unreachable

13:                                               ; preds = %10
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 728, ptr nonnull %7) #8
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %0, i64 60
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  %19 = load i32, ptr %18, align 8, !tbaa !23
  invoke void @_ZN24RefineDetectionWorkSpaceC1EiiRK19RefineNMSParametersN8nvinfer18DataTypeE(ptr noundef nonnull align 8 dereferenceable(728) %7, i32 noundef %1, i32 noundef %16, ptr noundef nonnull align 4 dereferenceable(20) %17, i32 noundef %19)
          to label %20 unwind label %33

20:                                               ; preds = %13
  %21 = load i32, ptr %15, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %2, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %0, i64 40
  %26 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8nvinfer16plugin8CudaBindIiEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !24
  %29 = getelementptr inbounds i8, ptr %2, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = invoke noundef i32 @_Z19RefineBatchClassNMSP11CUstream_stiiN8nvinfer18DataTypeERK19RefineNMSParametersRK24RefineDetectionWorkSpacePvPKvSB_SB_SB_S9_(ptr noundef %5, i32 noundef %1, i32 noundef %21, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(20) %17, ptr noundef nonnull align 8 dereferenceable(728) %7, ptr noundef %4, ptr noundef %23, ptr noundef %24, ptr noundef %28, ptr noundef %30, ptr noundef %14)
          to label %32 unwind label %35

32:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 728, ptr nonnull %7) #8
  br label %44

33:                                               ; preds = %13
  %34 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %37

35:                                               ; preds = %20
  %36 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %37

37:                                               ; preds = %35, %33
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 728, ptr nonnull %7) #8
  br label %38

38:                                               ; preds = %37, %8
  %.pn.pn = phi { ptr, i32 } [ %.pn, %37 ], [ %9, %8 ]
  %.1 = extractvalue { ptr, i32 } %.pn.pn, 0
  %.119 = extractvalue { ptr, i32 } %.pn.pn, 1
  %39 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %40 = icmp eq i32 %.119, %39
  br i1 %40, label %41, label %48

41:                                               ; preds = %38
  %42 = call ptr @__cxa_begin_catch(ptr %.1) #8
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %43 unwind label %45

43:                                               ; preds = %41
  invoke void @__cxa_end_catch()
          to label %44 unwind label %45

44:                                               ; preds = %43, %32
  %.0 = phi i32 [ %31, %32 ], [ 1, %43 ]
  ret i32 %.0

45:                                               ; preds = %43, %41
  %46 = landingpad { ptr, i32 }
          catch ptr null
  %47 = extractvalue { ptr, i32 } %46, 0
  call void @__clang_call_terminate(ptr %47) #9
  unreachable

48:                                               ; preds = %38
  call void @__clang_call_terminate(ptr %.1) #9
  unreachable
}

declare noundef i32 @_Z19RefineBatchClassNMSP11CUstream_stiiN8nvinfer18DataTypeERK19RefineNMSParametersRK24RefineDetectionWorkSpacePvPKvSB_SB_SB_S9_(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(728), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nofree nosync nounwind memory(none) }
attributes #3 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { noreturn }
attributes #8 = { nounwind }
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, !13, i64 32}
!10 = !{!"_ZTSN8nvinfer16plugin14DetectionLayerE", !11, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !14, i64 20, !14, i64 24, !13, i64 28, !13, i64 32, !15, i64 40, !18, i64 56, !19, i64 60, !20, i64 80}
!11 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!13 = !{!"int", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTSSt10shared_ptrIN8nvinfer16plugin8CudaBindIiEEE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrIN8nvinfer16plugin8CudaBindIiEELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!17 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!18 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!19 = !{!"_ZTS19RefineNMSParameters", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 12, !14, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!10, !18, i64 56}
!24 = !{!25, !6, i64 8}
!25 = !{!"_ZTSN8nvinfer16plugin8CudaBindIiEE", !22, i64 0, !6, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass