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

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

@.str.4 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 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: 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) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK8nvinfer16plugin19GridAnchorGenerator9serializeEPv(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.nvinfer1::Weights", align 8
  %12 = alloca %"class.nvinfer1::Weights", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %14, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %15, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 2
  invoke void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %17 unwind label %129

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %114, %17
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 2
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = icmp slt i32 %19, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %18
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %117

24:                                               ; preds = %18
  %25 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %27) #5
  %29 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %28, i32 0, i32 0
  invoke void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %30 unwind label %129

30:                                               ; preds = %24
  %31 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %33) #5
  %35 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %34, i32 0, i32 1
  invoke void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %36 unwind label %129

36:                                               ; preds = %30
  %37 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39) #5
  %41 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %40, i32 0, i32 3
  invoke void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %41)
          to label %42 unwind label %129

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

43:                                               ; preds = %64, %42
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %47) #5
  %49 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %48, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !22
  %51 = icmp slt i32 %44, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %43
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %67

53:                                               ; preds = %43
  %54 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #5
  %58 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !25
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds float, ptr %59, i64 %61
  invoke void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %62)
          to label %63 unwind label %129

63:                                               ; preds = %53
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %9, align 4, !tbaa !9
  br label %43, !llvm.loop !26

67:                                               ; preds = %52
  %68 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %70) #5
  %72 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %71, i32 0, i32 4
  invoke void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %72)
          to label %73 unwind label %129

73:                                               ; preds = %67
  %74 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #5
  %78 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %77, i32 0, i32 5
  invoke void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %78)
          to label %79 unwind label %129

79:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %94, %79
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = icmp slt i32 %81, 4
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %97

84:                                               ; preds = %80
  %85 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 3
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #5
  %89 = getelementptr inbounds %"struct.nvinfer1::plugin::GridAnchorParameters", ptr %88, i32 0, i32 6
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [4 x float], ptr %89, i64 0, i64 %91
  invoke void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %92)
          to label %93 unwind label %129

93:                                               ; preds = %84
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !9
  br label %80, !llvm.loop !28

97:                                               ; preds = %83
  %98 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !29
  %100 = load i32, ptr %7, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  invoke void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %102)
          to label %103 unwind label %129

103:                                              ; preds = %97
  %104 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 5
  %105 = load ptr, ptr %104, align 8, !tbaa !30
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %"class.nvinfer1::Weights", ptr %105, i64 %107
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %108, i64 24, i1 false), !tbaa.struct !31
  call void @_ZNK8nvinfer16plugin19GridAnchorGenerator19serializeFromDeviceERPcNS_7WeightsE(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef byval(%"class.nvinfer1::Weights") align 8 %11) #5
  %109 = getelementptr inbounds %"class.nvinfer1::plugin::GridAnchorGenerator", ptr %13, i32 0, i32 6
  %110 = load ptr, ptr %109, align 8, !tbaa !35
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds %"class.nvinfer1::Weights", ptr %110, i64 %112
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %113, i64 24, i1 false), !tbaa.struct !31
  call void @_ZNK8nvinfer16plugin19GridAnchorGenerator19serializeFromDeviceERPcNS_7WeightsE(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef byval(%"class.nvinfer1::Weights") align 8 %12) #5
  br label %114

114:                                              ; preds = %103
  %115 = load i32, ptr %7, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %7, align 4, !tbaa !9
  br label %18, !llvm.loop !36

117:                                              ; preds = %23
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load ptr, ptr %13, align 8, !tbaa !37
  %121 = getelementptr inbounds ptr, ptr %120, i64 11
  %122 = load ptr, ptr %121, align 8
  %123 = call noundef i64 %122(ptr noundef nonnull align 8 dereferenceable(128) %13) #5
  %124 = getelementptr inbounds i8, ptr %119, i64 %123
  %125 = icmp eq ptr %118, %124
  br i1 %125, label %128, label %126

126:                                              ; preds = %117
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.12, ptr noundef @.str.4, i32 noundef 259)
          to label %127 unwind label %129

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void

129:                                              ; preds = %126, %97, %84, %73, %67, %53, %36, %30, %24, %2
  %130 = landingpad { ptr, i32 }
          catch ptr null
  %131 = extractvalue { ptr, i32 } %130, 0
  call void @__clang_call_terminate(ptr %131) #6
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK8nvinfer16plugin19GridAnchorGenerator19serializeFromDeviceERPcNS_7WeightsE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef byval(%"class.nvinfer1::Weights") align 8) #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!"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, !10, i64 40}
!12 = !{!"_ZTSN8nvinfer16plugin19GridAnchorGeneratorE", !13, i64 0, !15, i64 8, !10, i64 40, !18, i64 48, !6, i64 72, !6, i64 80, !6, i64 88, !15, i64 96}
!13 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !14, i64 0}
!14 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!23, !10, i64 16}
!23 = !{!"_ZTSN8nvinfer16plugin20GridAnchorParametersE", !24, i64 0, !24, i64 4, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 28}
!24 = !{!"float", !7, i64 0}
!25 = !{!23, !6, i64 8}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!12, !6, i64 72}
!30 = !{!12, !6, i64 80}
!31 = !{i64 0, i64 4, !32, i64 8, i64 8, !5, i64 16, i64 8, !34}
!32 = !{!33, !33, i64 0}
!33 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!34 = !{!17, !17, i64 0}
!35 = !{!12, !6, i64 88}
!36 = distinct !{!36, !27}
!37 = !{!38, !38, i64 0}
!38 = !{!"vtable pointer", !8, 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::Weights" = type { i32, ptr, i64 }

@.str.4 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1

; 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
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK8nvinfer16plugin19GridAnchorGenerator9serializeEPv(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store ptr %1, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %5 = load i32, ptr %4, align 8, !tbaa !9
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph27, label %._crit_edge28

.lr.ph27:                                         ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  %10 = getelementptr inbounds i8, ptr %0, i64 88
  br label %18

._crit_edge28:                                    ; preds = %._crit_edge, %2
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = load ptr, ptr %0, align 8, !tbaa !21
  %13 = getelementptr inbounds i8, ptr %12, i64 88
  %14 = load ptr, ptr %13, align 8
  %15 = call noundef i64 %14(ptr noundef nonnull align 8 dereferenceable(128) %0) #4
  %16 = getelementptr inbounds i8, ptr %1, i64 %15
  %17 = icmp eq ptr %11, %16
  br i1 %17, label %59, label %58

18:                                               ; preds = %.lr.ph27, %._crit_edge
  %indvars.iv33 = phi i64 [ 0, %.lr.ph27 ], [ %indvars.iv.next34, %._crit_edge ]
  %19 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  call void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %20 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %21 = getelementptr inbounds i8, ptr %20, i64 4
  call void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %22 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  call void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %24 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %26 = load i32, ptr %25, align 8, !tbaa !23
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %18
  %28 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %29 = getelementptr inbounds i8, ptr %28, i64 20
  call void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %30 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %31 = getelementptr inbounds i8, ptr %30, i64 24
  call void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %32 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %33 = getelementptr inbounds i8, ptr %32, i64 28
  call void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %34 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %35 = getelementptr inbounds i8, ptr %34, i64 32
  call void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %35)
  %36 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %37 = getelementptr inbounds i8, ptr %36, i64 36
  call void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %38 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %39 = getelementptr inbounds i8, ptr %38, i64 40
  call void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %40 = load ptr, ptr %8, align 8, !tbaa !26
  %41 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv33
  call void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %42 = load ptr, ptr %9, align 8, !tbaa !27
  %43 = getelementptr inbounds %"class.nvinfer1::Weights", ptr %42, i64 %indvars.iv33
  call void @_ZNK8nvinfer16plugin19GridAnchorGenerator19serializeFromDeviceERPcNS_7WeightsE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull byval(%"class.nvinfer1::Weights") align 8 %43) #4
  %44 = load ptr, ptr %10, align 8, !tbaa !28
  %45 = getelementptr inbounds %"class.nvinfer1::Weights", ptr %44, i64 %indvars.iv33
  call void @_ZNK8nvinfer16plugin19GridAnchorGenerator19serializeFromDeviceERPcNS_7WeightsE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull byval(%"class.nvinfer1::Weights") align 8 %45) #4
  %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1
  %46 = load i32, ptr %4, align 8, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next34, %47
  br i1 %48, label %18, label %._crit_edge28, !llvm.loop !29

.lr.ph:                                           ; preds = %18, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %18 ]
  %49 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !31
  %52 = getelementptr inbounds float, ptr %51, i64 %indvars.iv
  call void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %52)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %53 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv33) #4
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %55 = load i32, ptr %54, align 8, !tbaa !23
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next, %56
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !32

58:                                               ; preds = %._crit_edge28
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.4, i32 noundef 259)
          to label %59 unwind label %60

59:                                               ; preds = %58, %._crit_edge28
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret void

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin5writeIicEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin5writeIfcEEvRPT0_RKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK8nvinfer16plugin19GridAnchorGenerator19serializeFromDeviceERPcNS_7WeightsE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef byval(%"class.nvinfer1::Weights") align 8) local_unnamed_addr #2 align 2

declare void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef, ptr noundef, i32 noundef) 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 = { 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, !16, i64 40}
!10 = !{!"_ZTSN8nvinfer16plugin19GridAnchorGeneratorE", !11, i64 0, !13, i64 8, !16, i64 40, !17, i64 48, !6, i64 72, !6, i64 80, !6, i64 88, !13, i64 96}
!11 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN8nvinfer16plugin20GridAnchorParametersESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = !{!24, !16, i64 16}
!24 = !{!"_ZTSN8nvinfer16plugin20GridAnchorParametersE", !25, i64 0, !25, i64 4, !6, i64 8, !16, i64 16, !16, i64 20, !16, i64 24, !7, i64 28}
!25 = !{!"float", !7, i64 0}
!26 = !{!10, !6, i64 72}
!27 = !{!10, !6, i64 80}
!28 = !{!10, !6, i64 88}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!24, !6, i64 8}
!32 = distinct !{!32, !30}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass