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

; 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::plugin::DetectionOutput" = type { %"class.nvinfer1::IPluginV2Ext", %"struct.nvinfer1::plugin::DetectionOutputParameters", i32, i32, i32, i32, i32, %"class.std::__cxx11::basic_string" }
%"class.nvinfer1::IPluginV2Ext" = type { %"class.nvinfer1::IPluginV2" }
%"class.nvinfer1::IPluginV2" = type { ptr }
%"struct.nvinfer1::plugin::DetectionOutputParameters" = type <{ i8, i8, [2 x i8], i32, i32, i32, i32, float, float, i32, [3 x i32], i8, i8, i8, 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 [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [68 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8nvinfer16plugin15DetectionOutput15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, i32 noundef %9, i32 noundef %10) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i32 %2, ptr %14, align 4, !tbaa !9
  store ptr %3, ptr %15, align 8, !tbaa !5
  store i32 %4, ptr %16, align 4, !tbaa !9
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store i32 %9, ptr %21, align 4, !tbaa !11
  store i32 %10, ptr %22, align 4, !tbaa !9
  %27 = load ptr, ptr %12, align 8
  %28 = load i32, ptr %14, align 4, !tbaa !9
  %29 = icmp eq i32 %28, 3
  br i1 %29, label %32, label %30

30:                                               ; preds = %11
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 502)
          to label %31 unwind label %171

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31, %11
  %33 = load i32, ptr %16, align 4, !tbaa !9
  %34 = icmp eq i32 %33, 2
  br i1 %34, label %37, label %35

35:                                               ; preds = %32
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.16, ptr noundef @.str.2, i32 noundef 503)
          to label %36 unwind label %171

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36, %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %54, %37
  %39 = load i32, ptr %23, align 4, !tbaa !9
  %40 = load i32, ptr %14, align 4, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %57

43:                                               ; preds = %38
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = load i32, ptr %23, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %44, i64 %46
  %48 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !13
  %50 = icmp eq i32 %49, 3
  br i1 %50, label %53, label %51

51:                                               ; preds = %43
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.17, ptr noundef @.str.2, i32 noundef 508)
          to label %52 unwind label %171

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52, %43
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %23, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %23, align 4, !tbaa !9
  br label %38, !llvm.loop !15

57:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %74, %57
  %59 = load i32, ptr %24, align 4, !tbaa !9
  %60 = load i32, ptr %16, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %77

63:                                               ; preds = %58
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = load i32, ptr %24, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %64, i64 %66
  %68 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 8, !tbaa !13
  %70 = icmp eq i32 %69, 3
  br i1 %70, label %73, label %71

71:                                               ; preds = %63
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.18, ptr noundef @.str.2, i32 noundef 514)
          to label %72 unwind label %171

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72, %63
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %24, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %24, align 4, !tbaa !9
  br label %58, !llvm.loop !17

77:                                               ; preds = %62
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %80 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %79, i32 0, i32 10
  %81 = getelementptr inbounds [3 x i32], ptr %80, i64 0, i64 0
  %82 = load i32, ptr %81, align 8, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %78, i64 %83
  %85 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %84, i32 0, i32 1
  %86 = getelementptr inbounds [8 x i64], ptr %85, i64 0, i64 0
  %87 = load i64, ptr %86, align 8, !tbaa !18
  %88 = trunc i64 %87 to i32
  %89 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 2
  store i32 %88, ptr %89, align 8, !tbaa !20
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %92 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %91, i32 0, i32 10
  %93 = getelementptr inbounds [3 x i32], ptr %92, i64 0, i64 1
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %90, i64 %95
  %97 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %96, i32 0, i32 1
  %98 = getelementptr inbounds [8 x i64], ptr %97, i64 0, i64 0
  %99 = load i64, ptr %98, align 8, !tbaa !18
  %100 = trunc i64 %99 to i32
  %101 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 3
  store i32 %100, ptr %101, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 4, ptr %25, align 4, !tbaa !9
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %104 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %103, i32 0, i32 10
  %105 = getelementptr inbounds [3 x i32], ptr %104, i64 0, i64 2
  %106 = load i32, ptr %105, align 8, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %102, i64 %107
  %109 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds [8 x i64], ptr %109, i64 0, i64 1
  %111 = load i64, ptr %110, align 8, !tbaa !18
  %112 = sdiv i64 %111, 4
  %113 = trunc i64 %112 to i32
  %114 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 4
  store i32 %113, ptr %114, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %115 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %116 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %115, i32 0, i32 0
  %117 = load i8, ptr %116, align 8, !tbaa !33, !range !34, !noundef !35
  %118 = trunc i8 %117 to i1
  br i1 %118, label %119, label %120

119:                                              ; preds = %77
  br label %124

120:                                              ; preds = %77
  %121 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %122 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %121, i32 0, i32 4
  %123 = load i32, ptr %122, align 8, !tbaa !36
  br label %124

124:                                              ; preds = %120, %119
  %125 = phi i32 [ 1, %119 ], [ %123, %120 ]
  store i32 %125, ptr %26, align 4, !tbaa !9
  %126 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 4
  %127 = load i32, ptr %126, align 8, !tbaa !32
  %128 = load i32, ptr %26, align 4, !tbaa !9
  %129 = mul nsw i32 %127, %128
  %130 = mul nsw i32 %129, 4
  %131 = sext i32 %130 to i64
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %134 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %133, i32 0, i32 10
  %135 = getelementptr inbounds [3 x i32], ptr %134, i64 0, i64 0
  %136 = load i32, ptr %135, align 8, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %132, i64 %137
  %139 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds [8 x i64], ptr %139, i64 0, i64 0
  %141 = load i64, ptr %140, align 8, !tbaa !18
  %142 = icmp eq i64 %131, %141
  br i1 %142, label %145, label %143

143:                                              ; preds = %124
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.19, ptr noundef @.str.2, i32 noundef 527)
          to label %144 unwind label %171

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144, %124
  %146 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 4
  %147 = load i32, ptr %146, align 8, !tbaa !32
  %148 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %149 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %148, i32 0, i32 4
  %150 = load i32, ptr %149, align 8, !tbaa !36
  %151 = mul nsw i32 %147, %150
  %152 = sext i32 %151 to i64
  %153 = load ptr, ptr %13, align 8, !tbaa !5
  %154 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 1
  %155 = getelementptr inbounds %"struct.nvinfer1::plugin::DetectionOutputParameters", ptr %154, i32 0, i32 10
  %156 = getelementptr inbounds [3 x i32], ptr %155, i64 0, i64 1
  %157 = load i32, ptr %156, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %153, i64 %158
  %160 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %159, i32 0, i32 1
  %161 = getelementptr inbounds [8 x i64], ptr %160, i64 0, i64 0
  %162 = load i64, ptr %161, align 8, !tbaa !18
  %163 = icmp eq i64 %152, %162
  br i1 %163, label %166, label %164

164:                                              ; preds = %145
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.20, ptr noundef @.str.2, i32 noundef 530)
          to label %165 unwind label %171

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165, %145
  %167 = load ptr, ptr %17, align 8, !tbaa !5
  %168 = getelementptr inbounds i32, ptr %167, i64 0
  %169 = load i32, ptr %168, align 4, !tbaa !37
  %170 = getelementptr inbounds %"class.nvinfer1::plugin::DetectionOutput", ptr %27, i32 0, i32 5
  store i32 %169, ptr %170, align 4, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  ret void

171:                                              ; preds = %164, %143, %71, %51, %35, %30
  %172 = landingpad { ptr, i32 }
          catch ptr null
  %173 = extractvalue { ptr, i32 } %172, 0
  call void @__clang_call_terminate(ptr %173) #5
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = { nounwind }
attributes #5 = { 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 = !{!"_ZTSN8nvinfer112TensorFormatE", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN8nvinfer16Dims64E", !10, i64 0, !7, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!21, !10, i64 56}
!21 = !{!"_ZTSN8nvinfer16plugin15DetectionOutputE", !22, i64 0, !24, i64 8, !10, i64 56, !10, i64 60, !10, i64 64, !28, i64 68, !10, i64 72, !29, i64 80}
!22 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !23, i64 0}
!23 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!24 = !{!"_ZTSN8nvinfer16plugin25DetectionOutputParametersE", !25, i64 0, !25, i64 1, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !26, i64 20, !26, i64 24, !27, i64 28, !7, i64 32, !25, i64 44, !25, i64 45, !25, i64 46}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = !{!"_ZTSN8nvinfer16plugin11CodeTypeSSDE", !7, i64 0}
!28 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!29 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !30, i64 0, !19, i64 8, !7, i64 16}
!30 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!31 = !{!21, !10, i64 60}
!32 = !{!21, !10, i64 64}
!33 = !{!21, !25, i64 8}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!21, !10, i64 16}
!37 = !{!28, !28, i64 0}
!38 = !{!21, !28, i64 68}


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

@.str.2 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [68 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8nvinfer16plugin15DetectionOutput15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi(ptr nocapture noundef nonnull align 8 dereferenceable(112) %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readnone %6, ptr nocapture noundef readnone %7, ptr nocapture noundef readnone %8, i32 noundef %9, i32 noundef %10) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %12 = icmp eq i32 %2, 3
  br i1 %12, label %14, label %13

13:                                               ; preds = %11
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 502)
          to label %14 unwind label %.loopexit.split-lp.loopexit.split-lp

14:                                               ; preds = %13, %11
  %15 = icmp eq i32 %4, 2
  br i1 %15, label %17, label %16

16:                                               ; preds = %14
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.2, i32 noundef 503)
          to label %17 unwind label %.loopexit.split-lp.loopexit.split-lp

17:                                               ; preds = %16, %14
  %18 = icmp sgt i32 %2, 0
  br i1 %18, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %17
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.lr.ph

.preheader:                                       ; preds = %24, %17
  %19 = icmp sgt i32 %4, 0
  br i1 %19, label %.lr.ph25.preheader, label %._crit_edge

.lr.ph25.preheader:                               ; preds = %.preheader
  %wide.trip.count30 = zext nneg i32 %4 to i64
  br label %.lr.ph25

.lr.ph:                                           ; preds = %.lr.ph.preheader, %24
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %24 ]
  %20 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %1, i64 %indvars.iv
  %21 = load i32, ptr %20, align 8, !tbaa !5
  %22 = icmp eq i32 %21, 3
  br i1 %22, label %24, label %23

23:                                               ; preds = %.lr.ph
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.2, i32 noundef 508)
          to label %24 unwind label %.loopexit.split-lp.loopexit

24:                                               ; preds = %.lr.ph, %23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !10

._crit_edge:                                      ; preds = %61, %.preheader
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load i32, ptr %26, align 8, !tbaa !12
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %1, i64 %28, i32 1
  %30 = load i64, ptr %29, align 8, !tbaa !13
  %31 = trunc i64 %30 to i32
  %32 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %31, ptr %32, align 8, !tbaa !15
  %33 = getelementptr inbounds i8, ptr %0, i64 44
  %34 = load i32, ptr %33, align 4, !tbaa !12
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %1, i64 %35, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !13
  %38 = trunc i64 %37 to i32
  %39 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %38, ptr %39, align 4, !tbaa !27
  %40 = getelementptr inbounds i8, ptr %0, i64 48
  %41 = load i32, ptr %40, align 8, !tbaa !12
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %1, i64 %42, i32 1, i64 1
  %44 = load i64, ptr %43, align 8, !tbaa !13
  %45 = sdiv i64 %44, 4
  %46 = trunc i64 %45 to i32
  %47 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %46, ptr %47, align 8, !tbaa !28
  %48 = load i8, ptr %25, align 8, !tbaa !29, !range !30, !noundef !31
  %49 = trunc nuw i8 %48 to i1
  %50 = getelementptr inbounds i8, ptr %0, i64 16
  %51 = load i32, ptr %50, align 8
  %52 = select i1 %49, i32 1, i32 %51
  %53 = shl i32 %46, 2
  %54 = mul i32 %53, %52
  %55 = sext i32 %54 to i64
  %56 = icmp eq i64 %30, %55
  br i1 %56, label %63, label %62

.lr.ph25:                                         ; preds = %.lr.ph25.preheader, %61
  %indvars.iv27 = phi i64 [ 0, %.lr.ph25.preheader ], [ %indvars.iv.next28, %61 ]
  %57 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %3, i64 %indvars.iv27
  %58 = load i32, ptr %57, align 8, !tbaa !5
  %59 = icmp eq i32 %58, 3
  br i1 %59, label %61, label %60

60:                                               ; preds = %.lr.ph25
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.2, i32 noundef 514)
          to label %61 unwind label %.loopexit

61:                                               ; preds = %.lr.ph25, %60
  %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1
  %exitcond31.not = icmp eq i64 %indvars.iv.next28, %wide.trip.count30
  br i1 %exitcond31.not, label %._crit_edge, label %.lr.ph25, !llvm.loop !32

62:                                               ; preds = %._crit_edge
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.2, i32 noundef 527)
          to label %._crit_edge32 unwind label %.loopexit.split-lp.loopexit.split-lp

._crit_edge32:                                    ; preds = %62
  %.pre = load i32, ptr %47, align 8, !tbaa !28
  %.pre33 = load i32, ptr %50, align 8, !tbaa !33
  %.pre34 = load i32, ptr %33, align 4, !tbaa !12
  %.phi.trans.insert = sext i32 %.pre34 to i64
  %.phi.trans.insert35 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %1, i64 %.phi.trans.insert, i32 1
  %.pre36 = load i64, ptr %.phi.trans.insert35, align 8, !tbaa !13
  br label %63

63:                                               ; preds = %._crit_edge32, %._crit_edge
  %64 = phi i64 [ %.pre36, %._crit_edge32 ], [ %37, %._crit_edge ]
  %65 = phi i32 [ %.pre33, %._crit_edge32 ], [ %51, %._crit_edge ]
  %66 = phi i32 [ %.pre, %._crit_edge32 ], [ %46, %._crit_edge ]
  %67 = mul nsw i32 %65, %66
  %68 = sext i32 %67 to i64
  %69 = icmp eq i64 %64, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %63
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.2, i32 noundef 530)
          to label %71 unwind label %.loopexit.split-lp.loopexit.split-lp

71:                                               ; preds = %70, %63
  %72 = load i32, ptr %5, align 4, !tbaa !34
  %73 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %72, ptr %73, align 4, !tbaa !35
  ret void

.loopexit:                                        ; preds = %60
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %23
  %lpad.loopexit20 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %70, %62, %16, %13
  %lpad.loopexit.split-lp21 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit20, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp21, %.loopexit.split-lp.loopexit.split-lp ]
  %74 = extractvalue { ptr, i32 } %lpad.phi, 0
  tail call void @__clang_call_terminate(ptr %74) #3
  unreachable
}

attributes #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 = { 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 #2 = { 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 #3 = { 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, !7, i64 0}
!6 = !{!"_ZTSN8nvinfer16Dims64E", !7, i64 0, !8, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!16, !7, i64 56}
!16 = !{!"_ZTSN8nvinfer16plugin15DetectionOutputE", !17, i64 0, !19, i64 8, !7, i64 56, !7, i64 60, !7, i64 64, !23, i64 68, !7, i64 72, !24, i64 80}
!17 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !18, i64 0}
!18 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!19 = !{!"_ZTSN8nvinfer16plugin25DetectionOutputParametersE", !20, i64 0, !20, i64 1, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !21, i64 20, !21, i64 24, !22, i64 28, !8, i64 32, !20, i64 44, !20, i64 45, !20, i64 46}
!20 = !{!"bool", !8, i64 0}
!21 = !{!"float", !8, i64 0}
!22 = !{!"_ZTSN8nvinfer16plugin11CodeTypeSSDE", !8, i64 0}
!23 = !{!"_ZTSN8nvinfer18DataTypeE", !8, i64 0}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !14, i64 8, !8, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !26, i64 0}
!26 = !{!"any pointer", !8, i64 0}
!27 = !{!16, !7, i64 60}
!28 = !{!16, !7, i64 64}
!29 = !{!16, !20, i64 8}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !11}
!33 = !{!16, !7, i64 16}
!34 = !{!23, !23, i64 0}
!35 = !{!16, !23, i64 68}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass