; LLVM IR from NVIDIA/TensorRT :: plugin/efficientNMSPlugin/tftrt (efficientNMSImplicitTFTRTPlugin)

; 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::plugin::EfficientNMSImplicitTFTRTPlugin" = type { %"class.nvinfer1::IPluginV2IOExt", %"struct.nvinfer1::plugin::EfficientNMSParameters", %"class.std::__cxx11::basic_string" }
%"class.nvinfer1::IPluginV2IOExt" = type { %"class.nvinfer1::IPluginV2Ext" }
%"class.nvinfer1::IPluginV2Ext" = type { %"class.nvinfer1::IPluginV2" }
%"class.nvinfer1::IPluginV2" = type { ptr }
%"struct.nvinfer1::plugin::EfficientNMSParameters" = type { float, float, i32, i32, i8, i32, i8, i8, i32, i8, i32, i32, i8, i32, i32, i32, i32, i32, i8, i8, i8, i32 }
%"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] }

@_ZTVN8nvinfer16plugin31EfficientNMSImplicitTFTRTPluginE = external dso_local unnamed_addr constant { [29 x ptr] }, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8nvinfer16plugin31EfficientNMSImplicitTFTRTPluginC2EPKvm(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #1 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 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
  %9 = load ptr, ptr %4, align 8
  call void @_ZN8nvinfer114IPluginV2IOExtC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #2
  store ptr getelementptr inbounds inrange(-16, 216) ({ [29 x ptr] }, ptr @_ZTVN8nvinfer16plugin31EfficientNMSImplicitTFTRTPluginE, i32 0, i32 0, i32 2), ptr %9, align 8, !tbaa !11
  %10 = getelementptr inbounds %"class.nvinfer1::plugin::EfficientNMSImplicitTFTRTPlugin", ptr %9, i32 0, i32 1
  %11 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 0
  store float 5.000000e-01, ptr %11, align 8, !tbaa !13
  %12 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 1
  store float 5.000000e-01, ptr %12, align 4, !tbaa !19
  %13 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 2
  store i32 100, ptr %13, align 8, !tbaa !20
  %14 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 3
  store i32 -1, ptr %14, align 4, !tbaa !21
  %15 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 4
  store i8 0, ptr %15, align 8, !tbaa !22
  %16 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 5
  store i32 -1, ptr %16, align 4, !tbaa !23
  %17 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 6
  store i8 0, ptr %17, align 8, !tbaa !24
  %18 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 7
  store i8 0, ptr %18, align 1, !tbaa !25
  %19 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 8
  store i32 0, ptr %19, align 4, !tbaa !26
  %20 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 9
  store i8 0, ptr %20, align 8, !tbaa !27
  %21 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 10
  store i32 4096, ptr %21, align 4, !tbaa !28
  %22 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 11
  store i32 -1, ptr %22, align 8, !tbaa !29
  %23 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 12
  store i8 0, ptr %23, align 4, !tbaa !30
  %24 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 13
  store i32 -1, ptr %24, align 8, !tbaa !31
  %25 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 14
  store i32 1, ptr %25, align 4, !tbaa !32
  %26 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 15
  store i32 -1, ptr %26, align 8, !tbaa !33
  %27 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 16
  store i32 -1, ptr %27, align 4, !tbaa !34
  %28 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 17
  store i32 -1, ptr %28, align 8, !tbaa !35
  %29 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 18
  store i8 1, ptr %29, align 4, !tbaa !36
  %30 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 19
  store i8 1, ptr %30, align 1, !tbaa !37
  %31 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 20
  store i8 0, ptr %31, align 2, !tbaa !38
  %32 = getelementptr inbounds %"struct.nvinfer1::plugin::EfficientNMSParameters", ptr %10, i32 0, i32 21
  store i32 0, ptr %32, align 8, !tbaa !39
  %33 = getelementptr inbounds %"class.nvinfer1::plugin::EfficientNMSImplicitTFTRTPlugin", ptr %9, i32 0, i32 2
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #2
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i64, ptr %6, align 8, !tbaa !9
  invoke void @_ZN8nvinfer16plugin31EfficientNMSImplicitTFTRTPlugin11deserializeEPKam(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef %34, i64 noundef %35)
          to label %36 unwind label %37

36:                                               ; preds = %3
  ret void

37:                                               ; preds = %3
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #2
  call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #2
  br label %41

41:                                               ; preds = %37
  %42 = load ptr, ptr %7, align 8
  %43 = load i32, ptr %8, align 4
  %44 = insertvalue { ptr, i32 } poison, ptr %42, 0
  %45 = insertvalue { ptr, i32 } %44, i32 %43, 1
  resume { ptr, i32 } %45
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8nvinfer16plugin31EfficientNMSImplicitTFTRTPlugin11deserializeEPKam(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i64 noundef) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN8nvinfer16plugin22EfficientNMSParametersE", !15, i64 0, !15, i64 4, !16, i64 8, !16, i64 12, !17, i64 16, !16, i64 20, !17, i64 24, !17, i64 25, !16, i64 28, !17, i64 32, !16, i64 36, !16, i64 40, !17, i64 44, !16, i64 48, !16, i64 52, !16, i64 56, !16, i64 60, !16, i64 64, !17, i64 68, !17, i64 69, !17, i64 70, !18, i64 72}
!15 = !{!"float", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!19 = !{!14, !15, i64 4}
!20 = !{!14, !16, i64 8}
!21 = !{!14, !16, i64 12}
!22 = !{!14, !17, i64 16}
!23 = !{!14, !16, i64 20}
!24 = !{!14, !17, i64 24}
!25 = !{!14, !17, i64 25}
!26 = !{!14, !16, i64 28}
!27 = !{!14, !17, i64 32}
!28 = !{!14, !16, i64 36}
!29 = !{!14, !16, i64 40}
!30 = !{!14, !17, i64 44}
!31 = !{!14, !16, i64 48}
!32 = !{!14, !16, i64 52}
!33 = !{!14, !16, i64 56}
!34 = !{!14, !16, i64 60}
!35 = !{!14, !16, i64 64}
!36 = !{!14, !17, i64 68}
!37 = !{!14, !17, i64 69}
!38 = !{!14, !17, i64 70}
!39 = !{!14, !18, i64 72}


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

@_ZTVN8nvinfer16plugin31EfficientNMSImplicitTFTRTPluginE = external dso_local unnamed_addr constant { [29 x ptr] }, align 8

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8nvinfer16plugin31EfficientNMSImplicitTFTRTPluginC2EPKvm(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1, i64 noundef %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN8nvinfer114IPluginV2IOExtC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #2
  store ptr getelementptr inbounds inrange(-16, 216) (i8, ptr @_ZTVN8nvinfer16plugin31EfficientNMSImplicitTFTRTPluginE, i64 16), ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  store <2 x float> <float 5.000000e-01, float 5.000000e-01>, ptr %4, align 8, !tbaa !8
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 100, ptr %5, align 8, !tbaa !11
  %6 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 -1, ptr %6, align 4, !tbaa !16
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 0, ptr %7, align 8, !tbaa !17
  %8 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 -1, ptr %8, align 4, !tbaa !18
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  store i8 0, ptr %9, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 33
  store i8 0, ptr %10, align 1, !tbaa !20
  %11 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 0, ptr %11, align 4, !tbaa !21
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  store i8 0, ptr %12, align 8, !tbaa !22
  %13 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 4096, ptr %13, align 4, !tbaa !23
  %14 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 -1, ptr %14, align 8, !tbaa !24
  %15 = getelementptr inbounds i8, ptr %0, i64 52
  store i8 0, ptr %15, align 4, !tbaa !25
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  store <4 x i32> <i32 -1, i32 1, i32 -1, i32 -1>, ptr %16, align 8, !tbaa !26
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 -1, ptr %17, align 8, !tbaa !27
  %18 = getelementptr inbounds i8, ptr %0, i64 76
  store i8 1, ptr %18, align 4, !tbaa !28
  %19 = getelementptr inbounds i8, ptr %0, i64 77
  store i8 1, ptr %19, align 1, !tbaa !29
  %20 = getelementptr inbounds i8, ptr %0, i64 78
  store i8 0, ptr %20, align 2, !tbaa !30
  %21 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 0, ptr %21, align 8, !tbaa !31
  %22 = getelementptr inbounds i8, ptr %0, i64 88
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #2
  invoke void @_ZN8nvinfer16plugin31EfficientNMSImplicitTFTRTPlugin11deserializeEPKam(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1, i64 noundef %2)
          to label %23 unwind label %24

23:                                               ; preds = %3
  ret void

24:                                               ; preds = %3
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #2
  tail call void @_ZN8nvinfer19IPluginV2D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #2
  resume { ptr, i32 } %25
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8nvinfer16plugin31EfficientNMSImplicitTFTRTPlugin11deserializeEPKam(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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, !9, i64 0}
!9 = !{!"float", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN8nvinfer16plugin22EfficientNMSParametersE", !9, i64 0, !9, i64 4, !13, i64 8, !13, i64 12, !14, i64 16, !13, i64 20, !14, i64 24, !14, i64 25, !13, i64 28, !14, i64 32, !13, i64 36, !13, i64 40, !14, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !14, i64 68, !14, i64 69, !14, i64 70, !15, i64 72}
!13 = !{!"int", !10, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = !{!"_ZTSN8nvinfer18DataTypeE", !10, i64 0}
!16 = !{!12, !13, i64 12}
!17 = !{!12, !14, i64 16}
!18 = !{!12, !13, i64 20}
!19 = !{!12, !14, i64 24}
!20 = !{!12, !14, i64 25}
!21 = !{!12, !13, i64 28}
!22 = !{!12, !14, i64 32}
!23 = !{!12, !13, i64 36}
!24 = !{!12, !13, i64 40}
!25 = !{!12, !14, i64 44}
!26 = !{!13, !13, i64 0}
!27 = !{!12, !13, i64 64}
!28 = !{!12, !14, i64 68}
!29 = !{!12, !14, i64 69}
!30 = !{!12, !14, i64 70}
!31 = !{!12, !15, i64 72}


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