; LLVM IR from NVIDIA/TensorRT :: plugin/batchedNMSPlugin/batchedNMSPlugin.ll (ZN8nvinfer16plugin16BatchedNMSPluginC2EPKvm)

; 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::NMSParameters" = type { i8, i32, i32, i32, i32, float, float, i8 }
%"class.nvinfer1::plugin::BatchedNMSPlugin" = type <{ %"class.nvinfer1::IPluginV2Ext", %"struct.nvinfer1::plugin::NMSParameters", i32, i32, i32, [4 x i8], %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i32, i8, [3 x i8], i32, [4 x i8] }>
%"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] }

@_ZTVN8nvinfer16plugin16BatchedNMSPluginE = external dso_local unnamed_addr constant { [27 x ptr] }, align 8
@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@__func__._ZN8nvinfer16plugin16BatchedNMSPluginC2ENS0_13NMSParametersE = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZN8nvinfer16pluginL11checkParamsERKNS0_13NMSParametersE(ptr noundef nonnull align 4 dereferenceable(32)) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8nvinfer16plugin16BatchedNMSPluginC2EPKvm(ptr noundef nonnull align 8 dereferenceable(108) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.nvinfer1::plugin::NMSParameters", align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  %12 = load ptr, ptr %4, align 8
  call void @_ZN8nvinfer112IPluginV2ExtC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  store ptr getelementptr inbounds inrange(-16, 200) ({ [27 x ptr] }, ptr @_ZTVN8nvinfer16plugin16BatchedNMSPluginE, i32 0, i32 0, i32 2), ptr %12, align 8, !tbaa !11
  %13 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 1
  %14 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 0
  store i8 0, ptr %14, align 8, !tbaa !13
  %15 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 1
  store i32 0, ptr %15, align 4, !tbaa !18
  %16 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 2
  store i32 0, ptr %16, align 8, !tbaa !19
  %17 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 3
  store i32 0, ptr %17, align 4, !tbaa !20
  %18 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 4
  store i32 0, ptr %18, align 8, !tbaa !21
  %19 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 5
  store float 0.000000e+00, ptr %19, align 4, !tbaa !22
  %20 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 6
  store float 0.000000e+00, ptr %20, align 8, !tbaa !23
  %21 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %13, i32 0, i32 7
  store i8 0, ptr %21, align 4, !tbaa !24
  %22 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 2
  store i32 0, ptr %22, align 8, !tbaa !25
  %23 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 3
  store i32 0, ptr %23, align 4, !tbaa !33
  %24 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 4
  store i32 0, ptr %24, align 8, !tbaa !34
  %25 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  %26 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 7
  store i8 0, ptr %26, align 8, !tbaa !35
  %27 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 11
  store i8 1, ptr %27, align 4, !tbaa !36
  %28 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 13
  store i32 0, ptr %28, align 8, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %29, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %30, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  invoke void @_ZN8nvinfer16plugin4readINS0_13NMSParametersEcEET_RPKT0_(ptr dead_on_unwind writable sret(%"struct.nvinfer1::plugin::NMSParameters") align 4 %9, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %31 unwind label %63

31:                                               ; preds = %3
  %32 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 4 %9, i64 32, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  %33 = invoke noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %34 unwind label %67

34:                                               ; preds = %31
  %35 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 2
  store i32 %33, ptr %35, align 8, !tbaa !25
  %36 = invoke noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %37 unwind label %67

37:                                               ; preds = %34
  %38 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 3
  store i32 %36, ptr %38, align 4, !tbaa !33
  %39 = invoke noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %40 unwind label %67

40:                                               ; preds = %37
  %41 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 4
  store i32 %39, ptr %41, align 8, !tbaa !34
  %42 = invoke noundef zeroext i1 @_ZN8nvinfer16plugin4readIbcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %43 unwind label %67

43:                                               ; preds = %40
  %44 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 7
  %45 = zext i1 %42 to i8
  store i8 %45, ptr %44, align 8, !tbaa !35
  %46 = invoke noundef i32 @_ZN8nvinfer16plugin4readINS_8DataTypeEcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %47 unwind label %67

47:                                               ; preds = %43
  %48 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 9
  store i32 %46, ptr %48, align 4, !tbaa !42
  %49 = invoke noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %50 unwind label %67

50:                                               ; preds = %47
  %51 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 10
  store i32 %49, ptr %51, align 8, !tbaa !43
  %52 = invoke noundef zeroext i1 @_ZN8nvinfer16plugin4readIbcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %53 unwind label %67

53:                                               ; preds = %50
  %54 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 11
  %55 = zext i1 %52 to i8
  store i8 %55, ptr %54, align 4, !tbaa !36
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i64, ptr %6, align 8, !tbaa !9
  %59 = getelementptr inbounds i8, ptr %57, i64 %58
  %60 = icmp eq ptr %56, %59
  br i1 %60, label %71, label %61

61:                                               ; preds = %53
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str.2, ptr noundef @__func__._ZN8nvinfer16plugin16BatchedNMSPluginC2ENS0_13NMSParametersE, i32 noundef 93, i32 noundef 0, ptr noundef @.str.4) #7
          to label %62 unwind label %67

62:                                               ; preds = %61
  unreachable

63:                                               ; preds = %3
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %10, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  br label %82

67:                                               ; preds = %79, %71, %61, %50, %47, %43, %40, %37, %34, %31
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  br label %82

71:                                               ; preds = %53
  %72 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 1
  %73 = invoke noundef i32 @_ZN8nvinfer16pluginL11checkParamsERKNS0_13NMSParametersE(ptr noundef nonnull align 4 dereferenceable(32) %72)
          to label %74 unwind label %67

74:                                               ; preds = %71
  %75 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 13
  store i32 %73, ptr %75, align 8, !tbaa !37
  %76 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %12, i32 0, i32 13
  %77 = load i32, ptr %76, align 8, !tbaa !37
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %81, label %79

79:                                               ; preds = %74
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str.2, ptr noundef @__func__._ZN8nvinfer16plugin16BatchedNMSPluginC2ENS0_13NMSParametersE, i32 noundef 96, i32 noundef 0, ptr noundef @.str.3) #7
          to label %80 unwind label %67

80:                                               ; preds = %79
  unreachable

81:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void

82:                                               ; preds = %67, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %10, align 8
  %85 = load i32, ptr %11, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin4readINS0_13NMSParametersEcEET_RPKT0_(ptr dead_on_unwind noalias writable sret(%"struct.nvinfer1::plugin::NMSParameters") align 4, ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8nvinfer16plugin4readIbcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn "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 }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN8nvinfer16plugin13NMSParametersE", !15, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !17, i64 20, !17, i64 24, !15, i64 28}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!14, !16, i64 4}
!19 = !{!14, !16, i64 8}
!20 = !{!14, !16, i64 12}
!21 = !{!14, !16, i64 16}
!22 = !{!14, !17, i64 20}
!23 = !{!14, !17, i64 24}
!24 = !{!14, !15, i64 28}
!25 = !{!26, !16, i64 40}
!26 = !{!"_ZTSN8nvinfer16plugin16BatchedNMSPluginE", !27, i64 0, !14, i64 8, !16, i64 40, !16, i64 44, !16, i64 48, !29, i64 56, !15, i64 88, !31, i64 92, !16, i64 96, !15, i64 100, !32, i64 104}
!27 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !28, i64 0}
!28 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!29 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !30, i64 0, !10, i64 8, !7, i64 16}
!30 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!31 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!32 = !{!"_ZTS14pluginStatus_t", !7, i64 0}
!33 = !{!26, !16, i64 44}
!34 = !{!26, !16, i64 48}
!35 = !{!26, !15, i64 88}
!36 = !{!26, !15, i64 100}
!37 = !{!26, !32, i64 104}
!38 = !{i64 0, i64 1, !39, i64 4, i64 4, !40, i64 8, i64 4, !40, i64 12, i64 4, !40, i64 16, i64 4, !40, i64 20, i64 4, !41, i64 24, i64 4, !41, i64 28, i64 1, !39}
!39 = !{!15, !15, i64 0}
!40 = !{!16, !16, i64 0}
!41 = !{!17, !17, i64 0}
!42 = !{!26, !31, i64 92}
!43 = !{!26, !16, i64 96}


; 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::NMSParameters" = type { i8, i32, i32, i32, i32, float, float, i8 }

@_ZTVN8nvinfer16plugin16BatchedNMSPluginE = external dso_local unnamed_addr constant { [27 x ptr] }, align 8
@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@__func__._ZN8nvinfer16plugin16BatchedNMSPluginC2ENS0_13NMSParametersE = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZN8nvinfer16pluginL11checkParamsERKNS0_13NMSParametersE(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: noreturn
declare void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8nvinfer16plugin16BatchedNMSPluginC2EPKvm(ptr noundef nonnull align 8 dereferenceable(108) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.nvinfer1::plugin::NMSParameters", align 4
  tail call void @_ZN8nvinfer112IPluginV2ExtC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  store ptr getelementptr inbounds inrange(-16, 200) (i8, ptr @_ZTVN8nvinfer16plugin16BatchedNMSPluginE, i64 16), ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  store i8 0, ptr %6, align 8, !tbaa !8
  %7 = getelementptr inbounds i8, ptr %0, i64 12
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 0, ptr %8, align 8, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 0, ptr %9, align 4, !tbaa !24
  %10 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 0, ptr %10, align 8, !tbaa !25
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(25) %7, i8 0, i64 25, i1 false)
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  %12 = getelementptr inbounds i8, ptr %0, i64 88
  store i8 0, ptr %12, align 8, !tbaa !26
  %13 = getelementptr inbounds i8, ptr %0, i64 100
  store i8 1, ptr %13, align 4, !tbaa !27
  %14 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 0, ptr %14, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store ptr %1, ptr %4, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN8nvinfer16plugin4readINS0_13NMSParametersEcEET_RPKT0_(ptr dead_on_unwind nonnull writable sret(%"struct.nvinfer1::plugin::NMSParameters") align 4 %5, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %15 = call noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i32 %15, ptr %8, align 8, !tbaa !14
  %16 = call noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i32 %16, ptr %9, align 4, !tbaa !24
  %17 = call noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i32 %17, ptr %10, align 8, !tbaa !25
  %18 = call noundef zeroext i1 @_ZN8nvinfer16plugin4readIbcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %19 = zext i1 %18 to i8
  store i8 %19, ptr %12, align 8, !tbaa !26
  %20 = call noundef i32 @_ZN8nvinfer16plugin4readINS_8DataTypeEcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %21 = getelementptr inbounds i8, ptr %0, i64 92
  store i32 %20, ptr %21, align 4, !tbaa !34
  %22 = call noundef i32 @_ZN8nvinfer16plugin4readIicEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %23 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %22, ptr %23, align 8, !tbaa !35
  %24 = call noundef zeroext i1 @_ZN8nvinfer16plugin4readIbcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %25 = zext i1 %24 to i8
  store i8 %25, ptr %13, align 4, !tbaa !27
  %26 = load ptr, ptr %4, align 8, !tbaa !29
  %27 = getelementptr inbounds i8, ptr %1, i64 %2
  %28 = icmp eq ptr %26, %27
  br i1 %28, label %31, label %.invoke

29:                                               ; preds = %.invoke, %31
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  resume { ptr, i32 } %30

31:                                               ; preds = %3
  %32 = invoke noundef i32 @_ZN8nvinfer16pluginL11checkParamsERKNS0_13NMSParametersE(ptr noundef nonnull align 4 dereferenceable(32) %6)
          to label %33 unwind label %29

33:                                               ; preds = %31
  store i32 %32, ptr %14, align 8, !tbaa !28
  %34 = icmp eq i32 %32, 0
  br i1 %34, label %37, label %.invoke

.invoke:                                          ; preds = %3, %33
  %35 = phi i32 [ 96, %33 ], [ 93, %3 ]
  %36 = phi ptr [ @.str.3, %33 ], [ @.str.4, %3 ]
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN8nvinfer16plugin16BatchedNMSPluginC2ENS0_13NMSParametersE, i32 noundef %35, i32 noundef 0, ptr noundef nonnull %36) #8
          to label %.cont unwind label %29

.cont:                                            ; preds = %.invoke
  unreachable

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin4readINS0_13NMSParametersEcEET_RPKT0_(ptr dead_on_unwind noalias writable sret(%"struct.nvinfer1::plugin::NMSParameters") align 4, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8nvinfer16plugin4readIbcEET_RPKT0_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

!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, !10, i64 0}
!9 = !{!"_ZTSN8nvinfer16plugin13NMSParametersE", !10, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !13, i64 20, !13, i64 24, !10, i64 28}
!10 = !{!"bool", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"int", !11, i64 0}
!13 = !{!"float", !11, i64 0}
!14 = !{!15, !12, i64 40}
!15 = !{!"_ZTSN8nvinfer16plugin16BatchedNMSPluginE", !16, i64 0, !9, i64 8, !12, i64 40, !12, i64 44, !12, i64 48, !18, i64 56, !10, i64 88, !22, i64 92, !12, i64 96, !10, i64 100, !23, i64 104}
!16 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !17, i64 0}
!17 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !21, i64 8, !11, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !20, i64 0}
!20 = !{!"any pointer", !11, i64 0}
!21 = !{!"long", !11, i64 0}
!22 = !{!"_ZTSN8nvinfer18DataTypeE", !11, i64 0}
!23 = !{!"_ZTS14pluginStatus_t", !11, i64 0}
!24 = !{!15, !12, i64 44}
!25 = !{!15, !12, i64 48}
!26 = !{!15, !10, i64 88}
!27 = !{!15, !10, i64 100}
!28 = !{!15, !23, i64 104}
!29 = !{!20, !20, i64 0}
!30 = !{i64 0, i64 1, !31, i64 4, i64 4, !32, i64 8, i64 4, !32, i64 12, i64 4, !32, i64 16, i64 4, !32, i64 20, i64 4, !33, i64 24, i64 4, !33, i64 28, i64 1, !31}
!31 = !{!10, !10, i64 0}
!32 = !{!12, !12, i64 0}
!33 = !{!13, !13, i64 0}
!34 = !{!15, !22, i64 92}
!35 = !{!15, !12, i64 96}


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