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

; 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.int2 = type { i32, i32 }
%struct.dim3 = type { i32, i32, i32 }
%"class.nvinfer1::plugin::ResizeNearest" = type { %"class.nvinfer1::IPluginV2Ext", float, %"class.nvinfer1::Dims64", %"class.nvinfer1::Dims64", %"class.std::__cxx11::basic_string" }
%"class.nvinfer1::IPluginV2Ext" = type { %"class.nvinfer1::IPluginV2" }
%"class.nvinfer1::IPluginV2" = type { ptr }
%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"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] }

; 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: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #1

; 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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN8nvinfer16plugin13ResizeNearest7enqueueEiPKPKvPKPvS6_P11CUstream_st(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca %struct.int2, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.dim3, align 4
  %21 = alloca %struct.dim3, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.dim3, align 4
  %25 = alloca %struct.dim3, align 4
  %26 = alloca %struct.int2, align 8
  %27 = alloca { i64, i32 }, align 4
  %28 = alloca { i64, i32 }, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %30 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 3
  %31 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %30, i32 0, i32 1
  %32 = getelementptr inbounds [8 x i64], ptr %31, i64 0, i64 0
  %33 = load i64, ptr %32, align 8, !tbaa !11
  %34 = trunc i64 %33 to i32
  store i32 %34, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %35 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 1
  %36 = load float, ptr %35, align 8, !tbaa !13
  store float %36, ptr %14, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %37 = getelementptr inbounds %struct.int2, ptr %15, i32 0, i32 0
  %38 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 3
  %39 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds [8 x i64], ptr %39, i64 0, i64 2
  %41 = load i64, ptr %40, align 8, !tbaa !11
  %42 = invoke noundef i32 @_ZN8nvinfer16plugin10dimToInt32El(i64 noundef %41)
          to label %43 unwind label %128

43:                                               ; preds = %6
  store i32 %42, ptr %37, align 8, !tbaa !22
  %44 = getelementptr inbounds %struct.int2, ptr %15, i32 0, i32 1
  %45 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 3
  %46 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds [8 x i64], ptr %46, i64 0, i64 1
  %48 = load i64, ptr %47, align 8, !tbaa !11
  %49 = invoke noundef i32 @_ZN8nvinfer16plugin10dimToInt32El(i64 noundef %48)
          to label %50 unwind label %128

50:                                               ; preds = %43
  store i32 %49, ptr %44, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %51 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 2
  %52 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %51, i32 0, i32 1
  %53 = getelementptr inbounds [8 x i64], ptr %52, i64 0, i64 2
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = trunc i64 %54 to i32
  store i32 %55, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %56 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 3
  %57 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %56, i32 0, i32 1
  %58 = getelementptr inbounds [8 x i64], ptr %57, i64 0, i64 2
  %59 = load i64, ptr %58, align 8, !tbaa !11
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %61 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 2
  %62 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds [8 x i64], ptr %62, i64 0, i64 1
  %64 = load i64, ptr %63, align 8, !tbaa !11
  %65 = load i32, ptr %16, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = mul nsw i64 %64, %66
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %69 = getelementptr inbounds %"class.nvinfer1::plugin::ResizeNearest", ptr %29, i32 0, i32 3
  %70 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %69, i32 0, i32 1
  %71 = getelementptr inbounds [8 x i64], ptr %70, i64 0, i64 1
  %72 = load i64, ptr %71, align 8, !tbaa !11
  %73 = load i32, ptr %17, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = mul nsw i64 %72, %74
  %76 = trunc i64 %75 to i32
  store i32 %76, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  invoke void @_ZN4dim3C2Ejjj(ptr noundef nonnull align 4 dereferenceable(12) %20, i32 noundef 32, i32 noundef 16, i32 noundef 1)
          to label %77 unwind label %128

77:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  %78 = getelementptr inbounds %struct.int2, ptr %15, i32 0, i32 0
  %79 = load i32, ptr %78, align 8, !tbaa !22
  %80 = sub nsw i32 %79, 1
  %81 = getelementptr inbounds %struct.dim3, ptr %20, i32 0, i32 0
  %82 = load i32, ptr %81, align 4, !tbaa !25
  %83 = udiv i32 %80, %82
  %84 = add i32 %83, 1
  %85 = getelementptr inbounds %struct.int2, ptr %15, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !24
  %87 = sub nsw i32 %86, 1
  %88 = getelementptr inbounds %struct.dim3, ptr %20, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !27
  %90 = udiv i32 %87, %89
  %91 = add i32 %90, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %92 = load i32, ptr %8, align 4, !tbaa !9
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = mul nsw i32 %92, %93
  store i32 %94, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 65535, ptr %23, align 4, !tbaa !9
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %96 unwind label %128

96:                                               ; preds = %77
  %97 = load i32, ptr %95, align 4, !tbaa !9
  invoke void @_ZN4dim3C2Ejjj(ptr noundef nonnull align 4 dereferenceable(12) %21, i32 noundef %84, i32 noundef %91, i32 noundef %97)
          to label %98 unwind label %128

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %21, i64 12, i1 false), !tbaa.struct !28
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %20, i64 12, i1 false), !tbaa.struct !28
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = mul nsw i32 %100, %101
  %103 = load float, ptr %14, align 4, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %15, i64 8, i1 false), !tbaa.struct !29
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds ptr, ptr %104, i64 0
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = load i32, ptr %16, align 4, !tbaa !9
  %108 = load i32, ptr %18, align 4, !tbaa !9
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds ptr, ptr %109, i64 0
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load i32, ptr %17, align 4, !tbaa !9
  %113 = load i32, ptr %19, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %24, i64 12, i1 false)
  %114 = getelementptr inbounds { i64, i32 }, ptr %27, i32 0, i32 0
  %115 = load i64, ptr %114, align 4
  %116 = getelementptr inbounds { i64, i32 }, ptr %27, i32 0, i32 1
  %117 = load i32, ptr %116, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %25, i64 12, i1 false)
  %118 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 0
  %119 = load i64, ptr %118, align 4
  %120 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 1
  %121 = load i32, ptr %120, align 4
  %122 = load i64, ptr %26, align 8
  invoke void @_Z13resizeNearest4dim3S_P11CUstream_stif4int2PKfiiPfii(i64 %115, i32 %117, i64 %119, i32 %121, ptr noundef %99, i32 noundef %102, float noundef %103, i64 %122, ptr noundef %106, i32 noundef %107, i32 noundef %108, ptr noundef %111, i32 noundef %112, i32 noundef %113)
          to label %123 unwind label %128

123:                                              ; preds = %98
  %124 = invoke i32 @cudaGetLastError()
          to label %125 unwind label %128

125:                                              ; preds = %123
  %126 = icmp ne i32 %124, 0
  %127 = zext i1 %126 to i32
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  ret i32 %127

128:                                              ; preds = %123, %98, %96, %77, %50, %43, %6
  %129 = landingpad { ptr, i32 }
          catch ptr null
  %130 = extractvalue { ptr, i32 } %129, 0
  call void @__clang_call_terminate(ptr %130) #7
  unreachable
}

declare noundef i32 @_ZN8nvinfer16plugin10dimToInt32El(i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dim3C2Ejjj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

declare void @_Z13resizeNearest4dim3S_P11CUstream_stif4int2PKfiiPfii(i64, i32, i64, i32, ptr noundef, i32 noundef, float noundef, i64, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #4

declare i32 @cudaGetLastError() #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { inlinehint 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 = !{!"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, !17, i64 8}
!14 = !{!"_ZTSN8nvinfer16plugin13ResizeNearestE", !15, i64 0, !17, i64 8, !18, i64 16, !18, i64 88, !19, i64 160}
!15 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !16, i64 0}
!16 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!17 = !{!"float", !7, i64 0}
!18 = !{!"_ZTSN8nvinfer16Dims64E", !10, i64 0, !7, i64 8}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !12, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!17, !17, i64 0}
!22 = !{!23, !10, i64 0}
!23 = !{!"_ZTS4int2", !10, i64 0, !10, i64 4}
!24 = !{!23, !10, i64 4}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTS4dim3", !10, i64 0, !10, i64 4, !10, i64 8}
!27 = !{!26, !10, i64 4}
!28 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9}
!29 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}


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

%struct.dim3 = type { i32, i32, i32 }

; Function Attrs: mustprogress 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 noundef range(i32 0, 2) i32 @_ZN8nvinfer16plugin13ResizeNearest7enqueueEiPKPKvPKPvS6_P11CUstream_st(ptr nocapture noundef nonnull readonly align 8 dereferenceable(192) %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readnone %4, ptr noundef %5) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %struct.dim3, align 8
  %8 = alloca %struct.dim3, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = getelementptr inbounds i8, ptr %0, i64 96
  %12 = load i64, ptr %11, align 8, !tbaa !5
  %13 = trunc i64 %12 to i32
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load float, ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %0, i64 112
  %17 = load i64, ptr %16, align 8, !tbaa !5
  %18 = invoke noundef i32 @_ZN8nvinfer16plugin10dimToInt32El(i64 noundef %17)
          to label %19 unwind label %55

19:                                               ; preds = %6
  %20 = getelementptr inbounds i8, ptr %0, i64 104
  %21 = load i64, ptr %20, align 8, !tbaa !5
  %22 = invoke noundef i32 @_ZN8nvinfer16plugin10dimToInt32El(i64 noundef %21)
          to label %23 unwind label %55

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %0, i64 40
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = trunc i64 %25 to i32
  %27 = load i64, ptr %16, align 8, !tbaa !5
  %28 = trunc i64 %27 to i32
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = mul i64 %30, %25
  %32 = trunc i64 %31 to i32
  %33 = load i64, ptr %20, align 8, !tbaa !5
  %34 = mul i64 %33, %27
  %35 = trunc i64 %34 to i32
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  call void @_ZN4dim3C2Ejjj(ptr noundef nonnull align 4 dereferenceable(12) %7, i32 noundef 32, i32 noundef 16, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #5
  %36 = add nsw i32 %18, -1
  %37 = load i32, ptr %7, align 8, !tbaa !19
  %38 = udiv i32 %36, %37
  %39 = add i32 %38, 1
  %40 = add nsw i32 %22, -1
  %41 = getelementptr inbounds i8, ptr %7, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !21
  %43 = udiv i32 %40, %42
  %44 = add i32 %43, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %45 = mul nsw i32 %13, %1
  store i32 %45, ptr %9, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store i32 65535, ptr %10, align 4, !tbaa !22
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %47 = load i32, ptr %46, align 4, !tbaa !22
  call void @_ZN4dim3C2Ejjj(ptr noundef nonnull align 4 dereferenceable(12) %8, i32 noundef %39, i32 noundef %44, i32 noundef %47)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %.sroa.06.0.copyload = load i64, ptr %8, align 8
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.27.0.copyload = load i32, ptr %.sroa.27.0..sroa_idx, align 8, !tbaa !22
  %.sroa.04.0.copyload = load i64, ptr %7, align 8
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.25.0.copyload = load i32, ptr %.sroa.25.0..sroa_idx, align 8, !tbaa !22
  %.sroa.5.0.insert.ext = zext i32 %22 to i64
  %.sroa.5.0.insert.shift = shl nuw i64 %.sroa.5.0.insert.ext, 32
  %.sroa.013.0.insert.ext = zext i32 %18 to i64
  %.sroa.013.0.insert.insert = or disjoint i64 %.sroa.5.0.insert.shift, %.sroa.013.0.insert.ext
  %48 = load ptr, ptr %2, align 8, !tbaa !23
  %49 = load ptr, ptr %3, align 8, !tbaa !23
  invoke void @_Z13resizeNearest4dim3S_P11CUstream_stif4int2PKfiiPfii(i64 %.sroa.06.0.copyload, i32 %.sroa.27.0.copyload, i64 %.sroa.04.0.copyload, i32 %.sroa.25.0.copyload, ptr noundef %5, i32 noundef %45, float noundef %15, i64 %.sroa.013.0.insert.insert, ptr noundef %48, i32 noundef %26, i32 noundef %32, ptr noundef %49, i32 noundef %28, i32 noundef %35)
          to label %50 unwind label %55

50:                                               ; preds = %23
  %51 = invoke i32 @cudaGetLastError()
          to label %52 unwind label %55

52:                                               ; preds = %50
  %53 = icmp ne i32 %51, 0
  %54 = zext i1 %53 to i32
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  ret i32 %54

55:                                               ; preds = %50, %23, %19, %6
  %56 = landingpad { ptr, i32 }
          catch ptr null
  %57 = extractvalue { ptr, i32 } %56, 0
  call void @__clang_call_terminate(ptr %57) #6
  unreachable
}

declare noundef i32 @_ZN8nvinfer16plugin10dimToInt32El(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dim3C2Ejjj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

declare void @_Z13resizeNearest4dim3S_P11CUstream_stif4int2PKfiiPfii(i64, i32, i64, i32, ptr noundef, i32 noundef, float noundef, i64, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @cudaGetLastError() local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 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 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, !13, i64 8}
!10 = !{!"_ZTSN8nvinfer16plugin13ResizeNearestE", !11, i64 0, !13, i64 8, !14, i64 16, !14, i64 88, !16, i64 160}
!11 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSN8nvinfer16Dims64E", !15, i64 0, !7, i64 8}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !6, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!20, !15, i64 0}
!20 = !{!"_ZTS4dim3", !15, i64 0, !15, i64 4, !15, i64 8}
!21 = !{!20, !15, i64 4}
!22 = !{!15, !15, i64 0}
!23 = !{!18, !18, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass