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

; 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::DynamicPluginTensorDesc" = type { %"struct.nvinfer1::PluginTensorDesc", %"class.nvinfer1::Dims64", %"class.nvinfer1::Dims64", %"class.nvinfer1::Dims64" }
%"struct.nvinfer1::PluginTensorDesc" = type { %"class.nvinfer1::Dims64", i32, i32, float }
%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"class.nvinfer1::plugin::ProposalDynamicPlugin" = type { %"class.nvinfer1::IPluginV2DynamicExt", %"class.std::__cxx11::basic_string", i64, i64, i64, i64, float, i64, float, float, i64, i64, %"class.std::vector.3", i64, %"class.std::vector.3", i64 }
%"class.nvinfer1::IPluginV2DynamicExt" = type { %"class.nvinfer1::IPluginV2Ext" }
%"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] }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__._ZN8nvinfer16plugin14ProposalPlugin15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi = external hidden unnamed_addr constant [16 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare ptr @__cxa_begin_catch(ptr)

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

declare void @__cxa_end_catch()

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8nvinfer16plugin21ProposalDynamicPlugin15configurePluginEPKNS_23DynamicPluginTensorDescEiS4_i(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %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 i32, align 4
  %13 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  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
  %14 = load ptr, ptr %6, align 8
  %15 = load i32, ptr %8, align 4, !tbaa !9
  %16 = icmp eq i32 %15, 2
  br i1 %16, label %34, label %17

17:                                               ; preds = %5
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str.2, ptr noundef @__func__._ZN8nvinfer16plugin14ProposalPlugin15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi, i32 noundef 618, i32 noundef 0, ptr noundef @.str.10) #6
          to label %18 unwind label %19

18:                                               ; preds = %17
  unreachable

19:                                               ; preds = %37, %17
  %20 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %11, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %12, align 4
  br label %23

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

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

31:                                               ; preds = %27
  invoke void @__cxa_end_catch()
          to label %32 unwind label %56

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

33:                                               ; preds = %39, %32
  ret void

34:                                               ; preds = %5
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %39, label %37

37:                                               ; preds = %34
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef @.str.2, ptr noundef @__func__._ZN8nvinfer16plugin14ProposalPlugin15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi, i32 noundef 619, i32 noundef 0, ptr noundef @.str.18) #6
          to label %38 unwind label %19

38:                                               ; preds = %37
  unreachable

39:                                               ; preds = %34
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.nvinfer1::DynamicPluginTensorDesc", ptr %40, i64 0
  %42 = getelementptr inbounds %"struct.nvinfer1::DynamicPluginTensorDesc", ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds %"struct.nvinfer1::PluginTensorDesc", ptr %42, i32 0, i32 0
  %44 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds [8 x i64], ptr %44, i64 0, i64 2
  %46 = load i64, ptr %45, align 8, !tbaa !11
  %47 = getelementptr inbounds %"class.nvinfer1::plugin::ProposalDynamicPlugin", ptr %14, i32 0, i32 4
  store i64 %46, ptr %47, align 8, !tbaa !13
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.nvinfer1::DynamicPluginTensorDesc", ptr %48, i64 0
  %50 = getelementptr inbounds %"struct.nvinfer1::DynamicPluginTensorDesc", ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %"struct.nvinfer1::PluginTensorDesc", ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %51, i32 0, i32 1
  %53 = getelementptr inbounds [8 x i64], ptr %52, i64 0, i64 3
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds %"class.nvinfer1::plugin::ProposalDynamicPlugin", ptr %14, i32 0, i32 5
  store i64 %54, ptr %55, align 8, !tbaa !25
  br label %33

56:                                               ; preds = %31, %27
  %57 = landingpad { ptr, i32 }
          catch ptr null
  %58 = extractvalue { ptr, i32 } %57, 0
  call void @__clang_call_terminate(ptr %58) #8
  unreachable

59:                                               ; preds = %23
  %60 = load ptr, ptr %11, align 8
  call void @__clang_call_terminate(ptr %60) #8
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind memory(none) }
attributes #3 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn }
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 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 56}
!14 = !{!"_ZTSN8nvinfer16plugin21ProposalDynamicPluginE", !15, i64 0, !18, i64 8, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !20, i64 72, !12, i64 80, !20, i64 88, !20, i64 92, !12, i64 96, !12, i64 104, !21, i64 112, !12, i64 136, !21, i64 144, !12, i64 168}
!15 = !{!"_ZTSN8nvinfer119IPluginV2DynamicExtE", !16, i64 0}
!16 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !17, i64 0}
!17 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !12, i64 8, !7, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIfSaIfEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!14, !12, i64 64}


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

@.str.2 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__._ZN8nvinfer16plugin14ProposalPlugin15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi = external hidden unnamed_addr constant [16 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8nvinfer16plugin21ProposalDynamicPlugin15configurePluginEPKNS_23DynamicPluginTensorDescEiS4_i(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(176) %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef readnone %3, i32 noundef %4) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = icmp eq i32 %2, 2
  br i1 %6, label %17, label %.invoke

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

13:                                               ; preds = %7
  %14 = tail call ptr @__cxa_begin_catch(ptr %9) #5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %15 unwind label %28

15:                                               ; preds = %13
  invoke void @__cxa_end_catch()
          to label %16 unwind label %28

16:                                               ; preds = %15, %21
  ret void

17:                                               ; preds = %5
  %18 = icmp eq i32 %4, 1
  br i1 %18, label %21, label %.invoke

.invoke:                                          ; preds = %5, %17
  %19 = phi i32 [ 619, %17 ], [ 618, %5 ]
  %20 = phi ptr [ @.str.18, %17 ], [ @.str.10, %5 ]
  invoke void @_ZN8nvinfer16plugin16throwPluginErrorEPKcS2_iiS2_(ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN8nvinfer16plugin14ProposalPlugin15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi, i32 noundef %19, i32 noundef 0, ptr noundef nonnull %20) #6
          to label %.cont unwind label %7

.cont:                                            ; preds = %.invoke
  unreachable

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %1, i64 24
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  store i64 %23, ptr %24, align 8, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %1, i64 32
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 %26, ptr %27, align 8, !tbaa !22
  br label %16

28:                                               ; preds = %15, %13
  %29 = landingpad { ptr, i32 }
          catch ptr null
  %30 = extractvalue { ptr, i32 } %29, 0
  tail call void @__clang_call_terminate(ptr %30) #7
  unreachable

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

attributes #0 = { 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 #1 = { nofree nosync nounwind memory(none) }
attributes #2 = { 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 #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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 56}
!10 = !{!"_ZTSN8nvinfer16plugin21ProposalDynamicPluginE", !11, i64 0, !14, i64 8, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !17, i64 72, !6, i64 80, !17, i64 88, !17, i64 92, !6, i64 96, !6, i64 104, !18, i64 112, !6, i64 136, !18, i64 144, !6, i64 168}
!11 = !{!"_ZTSN8nvinfer119IPluginV2DynamicExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !13, i64 0}
!13 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !6, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIfSaIfEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!22 = !{!10, !6, i64 64}


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