; 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::DimsExprs" = type { i32, [8 x ptr] }
%"class.nvinfer1::plugin::BatchedNMSDynamicPlugin" = type <{ %"class.nvinfer1::IPluginV2DynamicExt", %"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::IPluginV2DynamicExt" = type { %"class.nvinfer1::IPluginV2Ext" }
%"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.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [47 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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare ptr @__cxa_begin_catch(ptr)

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

declare void @__cxa_end_catch()

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

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

19:                                               ; preds = %18
  br label %37

20:                                               ; preds = %69, %55, %47, %18
  %21 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %12, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %13, align 4
  br label %24

24:                                               ; preds = %20
  %25 = load i32, ptr %13, align 4
  %26 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #7
  %27 = icmp eq i32 %25, %26
  br i1 %27, label %28, label %134

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %29 = load ptr, ptr %12, align 8
  %30 = call ptr @__cxa_begin_catch(ptr %29) #7
  store ptr %30, ptr %14, align 8
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %32 unwind label %131

32:                                               ; preds = %28
  invoke void @__cxa_end_catch()
          to label %33 unwind label %131

33:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %34

34:                                               ; preds = %33
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 72, i1 false)
  %35 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 0
  %36 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  br label %130

37:                                               ; preds = %19, %6
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = icmp sge i32 %38, 0
  br i1 %39, label %40, label %47

40:                                               ; preds = %37
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = load ptr, ptr %15, align 8, !tbaa !11
  %43 = getelementptr inbounds ptr, ptr %42, i64 3
  %44 = load ptr, ptr %43, align 8
  %45 = call noundef i32 %44(ptr noundef nonnull align 8 dereferenceable(108) %15) #7
  %46 = icmp slt i32 %41, %45
  br i1 %46, label %49, label %47

47:                                               ; preds = %40, %37
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.10, ptr noundef @.str.2, i32 noundef 190)
          to label %48 unwind label %20

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48, %40
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %50, i64 0
  %52 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !13
  %54 = icmp eq i32 %53, 4
  br i1 %54, label %57, label %55

55:                                               ; preds = %49
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.11, ptr noundef @.str.2, i32 noundef 197)
          to label %56 unwind label %20

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56, %49
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %58, i64 1
  %60 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !13
  %62 = icmp eq i32 %61, 3
  br i1 %62, label %71, label %63

63:                                               ; preds = %57
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %64, i64 1
  %66 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !13
  %68 = icmp eq i32 %67, 4
  br i1 %68, label %71, label %69

69:                                               ; preds = %63
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.12, ptr noundef @.str.2, i32 noundef 203)
          to label %70 unwind label %20

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70, %63, %57
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %87

74:                                               ; preds = %71
  %75 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 0
  store i32 2, ptr %75, align 8, !tbaa !13
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %76, i64 0
  %78 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %77, i32 0, i32 1
  %79 = getelementptr inbounds [8 x ptr], ptr %78, i64 0, i64 0
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  %82 = getelementptr inbounds [8 x ptr], ptr %81, i64 0, i64 0
  store ptr %80, ptr %82, align 8, !tbaa !5
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %83, i64 noundef 1) #7
  %85 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  %86 = getelementptr inbounds [8 x ptr], ptr %85, i64 0, i64 1
  store ptr %84, ptr %86, align 8, !tbaa !5
  br label %129

87:                                               ; preds = %71
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = icmp eq i32 %88, 1
  br i1 %89, label %90, label %111

90:                                               ; preds = %87
  %91 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 0
  store i32 3, ptr %91, align 8, !tbaa !13
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %92, i64 0
  %94 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %93, i32 0, i32 1
  %95 = getelementptr inbounds [8 x ptr], ptr %94, i64 0, i64 0
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  %98 = getelementptr inbounds [8 x ptr], ptr %97, i64 0, i64 0
  store ptr %96, ptr %98, align 8, !tbaa !5
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSDynamicPlugin", ptr %15, i32 0, i32 1
  %101 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %100, i32 0, i32 4
  %102 = load i32, ptr %101, align 8, !tbaa !15
  %103 = sext i32 %102 to i64
  %104 = call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %99, i64 noundef %103) #7
  %105 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  %106 = getelementptr inbounds [8 x ptr], ptr %105, i64 0, i64 1
  store ptr %104, ptr %106, align 8, !tbaa !5
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %107, i64 noundef 4) #7
  %109 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  %110 = getelementptr inbounds [8 x ptr], ptr %109, i64 0, i64 2
  store ptr %108, ptr %110, align 8, !tbaa !5
  br label %128

111:                                              ; preds = %87
  %112 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 0
  store i32 2, ptr %112, align 8, !tbaa !13
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %113, i64 0
  %115 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %114, i32 0, i32 1
  %116 = getelementptr inbounds [8 x ptr], ptr %115, i64 0, i64 0
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  %119 = getelementptr inbounds [8 x ptr], ptr %118, i64 0, i64 0
  store ptr %117, ptr %119, align 8, !tbaa !5
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.nvinfer1::plugin::BatchedNMSDynamicPlugin", ptr %15, i32 0, i32 1
  %122 = getelementptr inbounds %"struct.nvinfer1::plugin::NMSParameters", ptr %121, i32 0, i32 4
  %123 = load i32, ptr %122, align 8, !tbaa !15
  %124 = sext i32 %123 to i64
  %125 = call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %120, i64 noundef %124) #7
  %126 = getelementptr inbounds %"class.nvinfer1::DimsExprs", ptr %0, i32 0, i32 1
  %127 = getelementptr inbounds [8 x ptr], ptr %126, i64 0, i64 1
  store ptr %125, ptr %127, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %111, %90
  br label %129

129:                                              ; preds = %128, %74
  br label %130

130:                                              ; preds = %129, %34
  ret void

131:                                              ; preds = %32, %28
  %132 = landingpad { ptr, i32 }
          catch ptr null
  %133 = extractvalue { ptr, i32 } %132, 0
  call void @__clang_call_terminate(ptr %133) #8
  unreachable

134:                                              ; preds = %24
  %135 = load ptr, ptr %12, align 8
  call void @__clang_call_terminate(ptr %135) #8
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind memory(none) }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN8nvinfer19DimsExprsE", !10, i64 0, !7, i64 8}
!15 = !{!16, !10, i64 24}
!16 = !{!"_ZTSN8nvinfer16plugin23BatchedNMSDynamicPluginE", !17, i64 0, !20, i64 8, !10, i64 40, !10, i64 44, !10, i64 48, !23, i64 56, !21, i64 88, !26, i64 92, !10, i64 96, !21, i64 100, !27, i64 104}
!17 = !{!"_ZTSN8nvinfer119IPluginV2DynamicExtE", !18, i64 0}
!18 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !19, i64 0}
!19 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!20 = !{!"_ZTSN8nvinfer16plugin13NMSParametersE", !21, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !22, i64 20, !22, i64 24, !21, i64 28}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!27 = !{!"_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"

%"class.nvinfer1::DimsExprs" = type { i32, [8 x ptr] }

@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [47 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef, ptr noundef, i32 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
define dso_local void @_ZN8nvinfer16plugin23BatchedNMSDynamicPlugin19getOutputDimensionsEiPKNS_9DimsExprsEiRNS_12IExprBuilderE(ptr dead_on_unwind noalias nocapture writable writeonly sret(%"class.nvinfer1::DimsExprs") align 8 %0, ptr noundef nonnull align 8 dereferenceable(108) %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4, ptr noundef nonnull align 8 dereferenceable(16) %5) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %7 = icmp eq i32 %4, 2
  br i1 %7, label %19, label %8

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

9:                                                ; preds = %35, %31, %27, %8
  %10 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %11 = extractvalue { ptr, i32 } %10, 0
  %12 = extractvalue { ptr, i32 } %10, 1
  %13 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #6
  %14 = icmp eq i32 %12, %13
  br i1 %14, label %15, label %63

15:                                               ; preds = %9
  %16 = tail call ptr @__cxa_begin_catch(ptr %11) #6
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %17 unwind label %60

17:                                               ; preds = %15
  invoke void @__cxa_end_catch()
          to label %18 unwind label %60

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

19:                                               ; preds = %8, %6
  %20 = icmp sgt i32 %2, -1
  br i1 %20, label %21, label %27

21:                                               ; preds = %19
  %22 = load ptr, ptr %1, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  %24 = load ptr, ptr %23, align 8
  %25 = tail call noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(108) %1) #6
  %26 = icmp sgt i32 %25, %2
  br i1 %26, label %28, label %27

27:                                               ; preds = %21, %19
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, i32 noundef 190)
          to label %28 unwind label %9

28:                                               ; preds = %27, %21
  %29 = load i32, ptr %3, align 8, !tbaa !8
  %30 = icmp eq i32 %29, 4
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.2, i32 noundef 197)
          to label %32 unwind label %9

32:                                               ; preds = %31, %28
  %33 = getelementptr inbounds i8, ptr %3, i64 72
  %34 = load i32, ptr %33, align 8, !tbaa !8
  %.off = add i32 %34, -3
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %36, label %35

35:                                               ; preds = %32
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.2, i32 noundef 203)
          to label %36 unwind label %9

36:                                               ; preds = %32, %35
  %37 = getelementptr inbounds i8, ptr %3, i64 8
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  switch i32 %2, label %52 [
    i32 0, label %39
    i32 1, label %43
  ]

39:                                               ; preds = %36
  store i32 2, ptr %0, align 8, !tbaa !8
  %40 = load ptr, ptr %37, align 8, !tbaa !12
  store ptr %40, ptr %38, align 8, !tbaa !12
  %41 = tail call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 1) #6
  %42 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %41, ptr %42, align 8, !tbaa !12
  br label %59

43:                                               ; preds = %36
  store i32 3, ptr %0, align 8, !tbaa !8
  %44 = load ptr, ptr %37, align 8, !tbaa !12
  store ptr %44, ptr %38, align 8, !tbaa !12
  %45 = getelementptr inbounds i8, ptr %1, i64 24
  %46 = load i32, ptr %45, align 8, !tbaa !14
  %47 = sext i32 %46 to i64
  %48 = tail call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %47) #6
  %49 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %48, ptr %49, align 8, !tbaa !12
  %50 = tail call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 4) #6
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %50, ptr %51, align 8, !tbaa !12
  br label %59

52:                                               ; preds = %36
  store i32 2, ptr %0, align 8, !tbaa !8
  %53 = load ptr, ptr %37, align 8, !tbaa !12
  store ptr %53, ptr %38, align 8, !tbaa !12
  %54 = getelementptr inbounds i8, ptr %1, i64 24
  %55 = load i32, ptr %54, align 8, !tbaa !14
  %56 = sext i32 %55 to i64
  %57 = tail call noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %56) #6
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %57, ptr %58, align 8, !tbaa !12
  br label %59

59:                                               ; preds = %39, %52, %43, %18
  ret void

60:                                               ; preds = %17, %15
  %61 = landingpad { ptr, i32 }
          catch ptr null
  %62 = extractvalue { ptr, i32 } %61, 0
  tail call void @__clang_call_terminate(ptr %62) #7
  unreachable

63:                                               ; preds = %9
  tail call void @__clang_call_terminate(ptr %11) #7
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8nvinfer112IExprBuilder8constantEl(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #5 align 2

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


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