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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"class.nvinfer1::DimsHW" = type { %"class.nvinfer1::Dims2" }
%"class.nvinfer1::Dims2" = type { %"class.nvinfer1::Dims64" }
%"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 }
%"struct.nvinfer1::plugin::NMSParameters" = type { i8, i32, i32, i32, i32, float, float, i8 }
%"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] }

@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [72 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8nvinfer16plugin16BatchedNMSPlugin19getOutputDimensionsEiPKNS_6Dims64Ei(ptr dead_on_unwind noalias writable sret(%"class.nvinfer1::Dims64") align 8 %0, ptr noundef nonnull align 8 dereferenceable(108) %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.nvinfer1::DimsHW", align 8
  %13 = alloca ptr, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  store i32 %4, ptr %9, align 4, !tbaa !9
  %14 = load ptr, ptr %6, align 8
  %15 = load i32, ptr %9, align 4, !tbaa !9
  %16 = icmp eq i32 %15, 2
  br i1 %16, label %23, label %17

17:                                               ; preds = %5
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 151)
          to label %18 unwind label %19

18:                                               ; preds = %17
  br label %23

19:                                               ; preds = %62, %41, %33, %17
  %20 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %10, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %11, align 4
  br label %114

23:                                               ; preds = %18, %5
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = icmp sge i32 %24, 0
  br i1 %25, label %26, label %33

26:                                               ; preds = %23
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = load ptr, ptr %14, align 8, !tbaa !11
  %29 = getelementptr inbounds ptr, ptr %28, i64 3
  %30 = load ptr, ptr %29, align 8
  %31 = call noundef i32 %30(ptr noundef nonnull align 8 dereferenceable(108) %14) #9
  %32 = icmp slt i32 %27, %31
  br i1 %32, label %35, label %33

33:                                               ; preds = %26, %23
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 152)
          to label %34 unwind label %19

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34, %26
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %36, i64 0
  %38 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !13
  %40 = icmp eq i32 %39, 3
  br i1 %40, label %43, label %41

41:                                               ; preds = %35
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 153)
          to label %42 unwind label %19

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42, %35
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %44, i64 1
  %46 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !13
  %48 = icmp eq i32 %47, 2
  br i1 %48, label %64, label %49

49:                                               ; preds = %43
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %50, i64 1
  %52 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !13
  %54 = icmp eq i32 %53, 3
  br i1 %54, label %55, label %62

55:                                               ; preds = %49
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %56, i64 1
  %58 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %57, i32 0, i32 1
  %59 = getelementptr inbounds [8 x i64], ptr %58, i64 0, i64 2
  %60 = load i64, ptr %59, align 8, !tbaa !15
  %61 = icmp eq i64 %60, 1
  br i1 %61, label %64, label %62

62:                                               ; preds = %55, %49
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.8, ptr noundef @.str.2, i32 noundef 154)
          to label %63 unwind label %19

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63, %55, %43
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %65, i64 0
  %67 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %66, i32 0, i32 1
  %68 = getelementptr inbounds [8 x i64], ptr %67, i64 0, i64 0
  %69 = load i64, ptr %68, align 8, !tbaa !15
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %70, i64 0
  %72 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %71, i32 0, i32 1
  %73 = getelementptr inbounds [8 x i64], ptr %72, i64 0, i64 1
  %74 = load i64, ptr %73, align 8, !tbaa !15
  %75 = mul nsw i64 %69, %74
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %76, i64 0
  %78 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %77, i32 0, i32 1
  %79 = getelementptr inbounds [8 x i64], ptr %78, i64 0, i64 2
  %80 = load i64, ptr %79, align 8, !tbaa !15
  %81 = mul nsw i64 %75, %80
  %82 = trunc i64 %81 to i32
  %83 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %14, i32 0, i32 2
  store i32 %82, ptr %83, align 8, !tbaa !17
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %84, i64 1
  %86 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %85, i32 0, i32 1
  %87 = getelementptr inbounds [8 x i64], ptr %86, i64 0, i64 0
  %88 = load i64, ptr %87, align 8, !tbaa !15
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %89, i64 1
  %91 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %90, i32 0, i32 1
  %92 = getelementptr inbounds [8 x i64], ptr %91, i64 0, i64 1
  %93 = load i64, ptr %92, align 8, !tbaa !15
  %94 = mul nsw i64 %88, %93
  %95 = trunc i64 %94 to i32
  %96 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %14, i32 0, i32 3
  store i32 %95, ptr %96, align 4, !tbaa !28
  %97 = load i32, ptr %7, align 4, !tbaa !9
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %101

99:                                               ; preds = %64
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 72, i1 false)
  %100 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %0, i32 0, i32 0
  store i32 0, ptr %100, align 8, !tbaa !13
  br label %135

101:                                              ; preds = %64
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = icmp eq i32 %102, 1
  br i1 %103, label %104, label %127

104:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 72, ptr %12) #9
  %105 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %14, i32 0, i32 1
  %106 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %105, i32 0, i32 4
  %107 = load i32, ptr %106, align 8, !tbaa !29
  %108 = sext i32 %107 to i64
  invoke void @_ZN8nvinfer16DimsHWC2Ell(ptr noundef nonnull align 8 dereferenceable(72) %12, i64 noundef %108, i64 noundef 4)
          to label %109 unwind label %110

109:                                              ; preds = %104
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %12, i64 72, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 72, ptr %12) #9
  br label %135

110:                                              ; preds = %104
  %111 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %10, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 72, ptr %12) #9
  br label %114

114:                                              ; preds = %110, %19
  %115 = load i32, ptr %11, align 4
  %116 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #9
  %117 = icmp eq i32 %115, %116
  br i1 %117, label %118, label %139

118:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %119 = load ptr, ptr %10, align 8
  %120 = call ptr @__cxa_begin_catch(ptr %119) #9
  store ptr %120, ptr %13, align 8
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %121)
          to label %122 unwind label %136

122:                                              ; preds = %118
  invoke void @__cxa_end_catch()
          to label %123 unwind label %136

123:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %124

124:                                              ; preds = %123
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 72, i1 false)
  %125 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %0, i32 0, i32 0
  %126 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %0, i32 0, i32 1
  br label %135

127:                                              ; preds = %101
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 72, i1 false)
  %128 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %0, i32 0, i32 0
  store i32 1, ptr %128, align 8, !tbaa !13
  %129 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSPlugin", ptr %14, i32 0, i32 1
  %130 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %129, i32 0, i32 4
  %131 = load i32, ptr %130, align 8, !tbaa !29
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %0, i32 0, i32 1
  %134 = getelementptr inbounds [8 x i64], ptr %133, i64 0, i64 0
  store i64 %132, ptr %134, align 8, !tbaa !15
  br label %135

135:                                              ; preds = %127, %124, %109, %99
  ret void

136:                                              ; preds = %122, %118
  %137 = landingpad { ptr, i32 }
          catch ptr null
  %138 = extractvalue { ptr, i32 } %137, 0
  call void @__clang_call_terminate(ptr %138) #10
  unreachable

139:                                              ; preds = %114
  %140 = load ptr, ptr %10, align 8
  call void @__clang_call_terminate(ptr %140) #10
  unreachable
}

declare void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8nvinfer16DimsHWC2Ell(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, i64 noundef) unnamed_addr #5 align 2

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

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

declare ptr @__cxa_begin_catch(ptr)

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

declare void @__cxa_end_catch()

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { 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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN8nvinfer16Dims64E", !10, i64 0, !7, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !10, i64 40}
!18 = !{!"_ZTSN8nvinfer16plugin16BatchedNMSPluginE", !19, i64 0, !21, i64 8, !10, i64 40, !10, i64 44, !10, i64 48, !24, i64 56, !22, i64 88, !26, i64 92, !10, i64 96, !22, i64 100, !27, i64 104}
!19 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !20, i64 0}
!20 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!21 = !{!"_ZTSN8nvinfer16plugin13NMSParametersE", !22, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !23, i64 20, !23, i64 24, !22, i64 28}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !16, i64 8, !7, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!26 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!27 = !{!"_ZTS14pluginStatus_t", !7, i64 0}
!28 = !{!18, !10, i64 44}
!29 = !{!18, !10, i64 24}
!30 = !{i64 0, i64 4, !9, i64 8, i64 64, !31}
!31 = !{!7, !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"

%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"class.nvinfer1::DimsHW" = type { %"class.nvinfer1::Dims2" }
%"class.nvinfer1::Dims2" = type { %"class.nvinfer1::Dims64" }

@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [72 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8nvinfer16plugin16BatchedNMSPlugin19getOutputDimensionsEiPKNS_6Dims64Ei(ptr dead_on_unwind noalias nocapture writable writeonly sret(%"class.nvinfer1::Dims64") align 8 %0, ptr noundef nonnull align 8 dereferenceable(108) %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.nvinfer1::DimsHW", align 8
  %7 = icmp eq i32 %4, 2
  br i1 %7, label %11, label %8

8:                                                ; preds = %5
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, i32 noundef 151)
          to label %11 unwind label %9

9:                                                ; preds = %31, %23, %19, %8
  %10 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %58

11:                                               ; preds = %8, %5
  %12 = icmp sgt i32 %2, -1
  br i1 %12, label %13, label %19

13:                                               ; preds = %11
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load ptr, ptr %15, align 8
  %17 = tail call noundef i32 %16(ptr noundef nonnull align 8 dereferenceable(108) %1) #9
  %18 = icmp sgt i32 %17, %2
  br i1 %18, label %20, label %19

19:                                               ; preds = %13, %11
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 152)
          to label %20 unwind label %9

20:                                               ; preds = %19, %13
  %21 = load i32, ptr %3, align 8, !tbaa !8
  %22 = icmp eq i32 %21, 3
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.2, i32 noundef 153)
          to label %24 unwind label %9

24:                                               ; preds = %23, %20
  %25 = getelementptr inbounds i8, ptr %3, i64 72
  %26 = load i32, ptr %25, align 8, !tbaa !8
  switch i32 %26, label %31 [
    i32 2, label %32
    i32 3, label %27
  ]

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %3, i64 96
  %29 = load i64, ptr %28, align 8, !tbaa !12
  %30 = icmp eq i64 %29, 1
  br i1 %30, label %32, label %31

31:                                               ; preds = %24, %27
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.2, i32 noundef 154)
          to label %32 unwind label %9

32:                                               ; preds = %24, %31, %27
  %33 = getelementptr inbounds i8, ptr %3, i64 8
  %34 = load i64, ptr %33, align 8, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %3, i64 16
  %36 = load i64, ptr %35, align 8, !tbaa !12
  %37 = mul nsw i64 %36, %34
  %38 = getelementptr inbounds i8, ptr %3, i64 24
  %39 = load i64, ptr %38, align 8, !tbaa !12
  %40 = mul nsw i64 %37, %39
  %41 = trunc i64 %40 to i32
  %42 = getelementptr inbounds i8, ptr %1, i64 40
  store i32 %41, ptr %42, align 8, !tbaa !14
  %43 = getelementptr inbounds i8, ptr %3, i64 80
  %44 = load i64, ptr %43, align 8, !tbaa !12
  %45 = getelementptr inbounds i8, ptr %3, i64 88
  %46 = load i64, ptr %45, align 8, !tbaa !12
  %47 = mul nsw i64 %46, %44
  %48 = trunc i64 %47 to i32
  %49 = getelementptr inbounds i8, ptr %1, i64 44
  store i32 %48, ptr %49, align 4, !tbaa !26
  switch i32 %2, label %65 [
    i32 0, label %50
    i32 1, label %51
  ]

50:                                               ; preds = %32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %0, i8 0, i64 72, i1 false)
  br label %70

51:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #9
  %52 = getelementptr inbounds i8, ptr %1, i64 24
  %53 = load i32, ptr %52, align 8, !tbaa !27
  %54 = sext i32 %53 to i64
  invoke void @_ZN8nvinfer16DimsHWC2Ell(ptr noundef nonnull align 8 dereferenceable(72) %6, i64 noundef %54, i64 noundef 4)
          to label %55 unwind label %56

55:                                               ; preds = %51
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(72) %6, i64 72, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #9
  br label %70

56:                                               ; preds = %51
  %57 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #9
  br label %58

58:                                               ; preds = %56, %9
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %10, %9 ]
  %.0 = extractvalue { ptr, i32 } %.pn, 0
  %.018 = extractvalue { ptr, i32 } %.pn, 1
  %59 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #9
  %60 = icmp eq i32 %.018, %59
  br i1 %60, label %61, label %74

61:                                               ; preds = %58
  %62 = call ptr @__cxa_begin_catch(ptr %.0) #9
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %63 unwind label %71

63:                                               ; preds = %61
  invoke void @__cxa_end_catch()
          to label %64 unwind label %71

64:                                               ; preds = %63
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %0, i8 0, i64 72, i1 false)
  br label %70

65:                                               ; preds = %32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %0, i8 0, i64 72, i1 false)
  store i32 1, ptr %0, align 8, !tbaa !8
  %66 = getelementptr inbounds i8, ptr %1, i64 24
  %67 = load i32, ptr %66, align 8, !tbaa !27
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %68, ptr %69, align 8, !tbaa !12
  br label %70

70:                                               ; preds = %65, %64, %55, %50
  ret void

71:                                               ; preds = %63, %61
  %72 = landingpad { ptr, i32 }
          catch ptr null
  %73 = extractvalue { ptr, i32 } %72, 0
  call void @__clang_call_terminate(ptr %73) #10
  unreachable

74:                                               ; preds = %58
  call void @__clang_call_terminate(ptr %.0) #10
  unreachable
}

declare void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8nvinfer16DimsHWC2Ell(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, i64 noundef) unnamed_addr #5 align 2

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

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

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 #8

declare void @__cxa_end_catch() local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 = { nofree nosync nounwind memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { 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, !10, i64 0}
!9 = !{!"_ZTSN8nvinfer16Dims64E", !10, i64 0, !11, i64 8}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !11, i64 0}
!14 = !{!15, !10, i64 40}
!15 = !{!"_ZTSN8nvinfer16plugin16BatchedNMSPluginE", !16, i64 0, !18, i64 8, !10, i64 40, !10, i64 44, !10, i64 48, !21, i64 56, !19, i64 88, !24, i64 92, !10, i64 96, !19, i64 100, !25, i64 104}
!16 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !17, i64 0}
!17 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!18 = !{!"_ZTSN8nvinfer16plugin13NMSParametersE", !19, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !20, i64 20, !20, i64 24, !19, i64 28}
!19 = !{!"bool", !11, i64 0}
!20 = !{!"float", !11, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !13, i64 8, !11, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !23, i64 0}
!23 = !{!"any pointer", !11, i64 0}
!24 = !{!"_ZTSN8nvinfer18DataTypeE", !11, i64 0}
!25 = !{!"_ZTS14pluginStatus_t", !11, i64 0}
!26 = !{!15, !10, i64 44}
!27 = !{!15, !10, i64 24}
!28 = !{i64 0, i64 4, !29, i64 8, i64 64, !30}
!29 = !{!10, !10, i64 0}
!30 = !{!11, !11, i64 0}


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