; LLVM IR from NVIDIA/TensorRT :: plugin/skipLayerNormPlugin (skipLayerNormPluginLegacy)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic" = type { %"class.nvinfer1::IPluginV2DynamicExt", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::unique_ptr", %"class.std::unique_ptr", i64, %"struct.nvinfer1::plugin::bert::WeightsWithOwnership", %"struct.nvinfer1::plugin::bert::WeightsWithOwnership", i32, i32, i8, %"class.std::unique_ptr", %"struct.nvinfer1::plugin::bert::WeightsWithOwnership", 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::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.5" }
%"struct.std::_Head_base.5" = type { ptr }
%"struct.nvinfer1::plugin::bert::WeightsWithOwnership" = type { %"class.nvinfer1::Weights" }
%"class.nvinfer1::Weights" = type { i32, ptr, i64 }

@_ZTISt9exception = external constant ptr

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

; Function Attrs: 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) #2

declare ptr @__cxa_begin_catch(ptr)

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

declare void @__cxa_end_catch()

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK8nvinfer16plugin4bert26SkipLayerNormPluginDynamic9serializeEPv(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 8
  invoke void @_Z15serialize_valueIN8nvinfer18DataTypeEEvPPvRKT_(ptr noundef %4, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %11 unwind label %47

11:                                               ; preds = %2
  %12 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 9
  invoke void @_Z15serialize_valueIN8nvinfer18DataTypeEEvPPvRKT_(ptr noundef %4, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %13 unwind label %47

13:                                               ; preds = %11
  %14 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 5
  invoke void @_Z15serialize_valueImEvPPvRKT_(ptr noundef %4, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %15 unwind label %47

15:                                               ; preds = %13
  %16 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 10
  invoke void @_Z15serialize_valueIbEvPPvRKT_(ptr noundef %4, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %17 unwind label %47

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %18, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 4
  %20 = call noundef ptr @_ZNKSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  %21 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 5
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 13
  %24 = load i64, ptr %23, align 8, !tbaa !27
  %25 = mul i64 %22, %24
  invoke void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %20, i64 noundef %25)
          to label %26 unwind label %51

26:                                               ; preds = %17
  %27 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 3
  %28 = call noundef ptr @_ZNKSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  %29 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 5
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 13
  %32 = load i64, ptr %31, align 8, !tbaa !27
  %33 = mul i64 %30, %32
  invoke void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %28, i64 noundef %33)
          to label %34 unwind label %51

34:                                               ; preds = %26
  %35 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 10
  %36 = load i8, ptr %35, align 8, !tbaa !28, !range !29, !noundef !30
  %37 = trunc i8 %36 to i1
  br i1 %37, label %38, label %66

38:                                               ; preds = %34
  %39 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 11
  %40 = call noundef ptr @_ZNKSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #5
  %41 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 5
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds %"class.nvinfer1::plugin::bert::SkipLayerNormPluginDynamic", ptr %9, i32 0, i32 13
  %44 = load i64, ptr %43, align 8, !tbaa !27
  %45 = mul i64 %42, %44
  invoke void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %40, i64 noundef %45)
          to label %46 unwind label %51

46:                                               ; preds = %38
  br label %66

47:                                               ; preds = %15, %13, %11, %2
  %48 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %5, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %6, align 4
  br label %55

51:                                               ; preds = %38, %26, %17
  %52 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %5, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %55

55:                                               ; preds = %51, %47
  %56 = load i32, ptr %6, align 4
  %57 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #5
  %58 = icmp eq i32 %56, %57
  br i1 %58, label %59, label %70

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %60 = load ptr, ptr %5, align 8
  %61 = call ptr @__cxa_begin_catch(ptr %60) #5
  store ptr %61, ptr %8, align 8
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %63 unwind label %67

63:                                               ; preds = %59
  invoke void @__cxa_end_catch()
          to label %64 unwind label %67

64:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %65

65:                                               ; preds = %66, %64
  ret void

66:                                               ; preds = %46, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %65

67:                                               ; preds = %63, %59
  %68 = landingpad { ptr, i32 }
          catch ptr null
  %69 = extractvalue { ptr, i32 } %68, 0
  call void @__clang_call_terminate(ptr %69) #6
  unreachable

70:                                               ; preds = %55
  %71 = load ptr, ptr %5, align 8
  call void @__clang_call_terminate(ptr %71) #6
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_valueIbEvPPvRKT_(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 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 88}
!10 = !{!"_ZTSN8nvinfer16plugin4bert26SkipLayerNormPluginDynamicE", !11, i64 0, !14, i64 8, !14, i64 40, !17, i64 72, !17, i64 80, !16, i64 88, !23, i64 96, !23, i64 120, !25, i64 144, !25, i64 148, !26, i64 152, !17, i64 160, !23, i64 168, !16, i64 192}
!11 = !{!"_ZTSN8nvinfer119IPluginV2DynamicExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !13, i64 0}
!13 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataIvN8nvinfer114pluginInternal11CudaDeleterIvEELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implIvN8nvinfer114pluginInternal11CudaDeleterIvEEE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPvN8nvinfer114pluginInternal11CudaDeleterIvEEEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPvN8nvinfer114pluginInternal11CudaDeleterIvEEEE", !22, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPvLb0EE", !6, i64 0}
!23 = !{!"_ZTSN8nvinfer16plugin4bert20WeightsWithOwnershipE", !24, i64 0}
!24 = !{!"_ZTSN8nvinfer17WeightsE", !25, i64 0, !6, i64 8, !16, i64 16}
!25 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!10, !16, i64 192}
!28 = !{!10, !26, i64 152}
!29 = !{i8 0, i8 2}
!30 = !{}


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

@_ZTISt9exception = external constant ptr

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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
declare dso_local noundef ptr @_ZNKSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE3getEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK8nvinfer16plugin4bert26SkipLayerNormPluginDynamic9serializeEPv(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef %1) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %1, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 144
  invoke void @_Z15serialize_valueIN8nvinfer18DataTypeEEvPPvRKT_(ptr noundef nonnull %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %6 unwind label %35

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 148
  invoke void @_Z15serialize_valueIN8nvinfer18DataTypeEEvPPvRKT_(ptr noundef nonnull %3, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %8 unwind label %35

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  invoke void @_Z15serialize_valueImEvPPvRKT_(ptr noundef nonnull %3, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %10 unwind label %35

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 152
  invoke void @_Z15serialize_valueIbEvPPvRKT_(ptr noundef nonnull %3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %12 unwind label %35

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %13, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  %15 = call noundef ptr @_ZNKSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %16 = load i64, ptr %9, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %0, i64 192
  %18 = load i64, ptr %17, align 8, !tbaa !27
  %19 = mul i64 %18, %16
  invoke void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %15, i64 noundef %19)
          to label %20 unwind label %37

20:                                               ; preds = %12
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  %22 = call noundef ptr @_ZNKSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  %23 = load i64, ptr %9, align 8, !tbaa !9
  %24 = load i64, ptr %17, align 8, !tbaa !27
  %25 = mul i64 %24, %23
  invoke void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %22, i64 noundef %25)
          to label %26 unwind label %37

26:                                               ; preds = %20
  %27 = load i8, ptr %11, align 8, !tbaa !28, !range !29, !noundef !30
  %28 = trunc nuw i8 %27 to i1
  br i1 %28, label %29, label %46

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 160
  %31 = call noundef ptr @_ZNKSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #5
  %32 = load i64, ptr %9, align 8, !tbaa !9
  %33 = load i64, ptr %17, align 8, !tbaa !27
  %34 = mul i64 %33, %32
  invoke void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %31, i64 noundef %34)
          to label %46 unwind label %37

35:                                               ; preds = %10, %8, %6, %2
  %36 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %39

37:                                               ; preds = %29, %20, %12
  %38 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %39

39:                                               ; preds = %37, %35
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ]
  %.0 = extractvalue { ptr, i32 } %.pn, 0
  %.04 = extractvalue { ptr, i32 } %.pn, 1
  %40 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #5
  %41 = icmp eq i32 %.04, %40
  br i1 %41, label %42, label %50

42:                                               ; preds = %39
  %43 = call ptr @__cxa_begin_catch(ptr %.0) #5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %44 unwind label %47

44:                                               ; preds = %42
  invoke void @__cxa_end_catch()
          to label %45 unwind label %47

45:                                               ; preds = %44, %46
  ret void

46:                                               ; preds = %29, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %45

47:                                               ; preds = %44, %42
  %48 = landingpad { ptr, i32 }
          catch ptr null
  %49 = extractvalue { ptr, i32 } %48, 0
  call void @__clang_call_terminate(ptr %49) #6
  unreachable

50:                                               ; preds = %39
  call void @__clang_call_terminate(ptr %.0) #6
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_valueImEvPPvRKT_(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_valueIbEvPPvRKT_(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8nvinfer16plugin4bert10serFromDevIcEEvRPcPKT_m(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 88}
!10 = !{!"_ZTSN8nvinfer16plugin4bert26SkipLayerNormPluginDynamicE", !11, i64 0, !14, i64 8, !14, i64 40, !17, i64 72, !17, i64 80, !16, i64 88, !23, i64 96, !23, i64 120, !25, i64 144, !25, i64 148, !26, i64 152, !17, i64 160, !23, i64 168, !16, i64 192}
!11 = !{!"_ZTSN8nvinfer119IPluginV2DynamicExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !13, i64 0}
!13 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSSt10unique_ptrIvN8nvinfer114pluginInternal11CudaDeleterIvEEE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataIvN8nvinfer114pluginInternal11CudaDeleterIvEELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implIvN8nvinfer114pluginInternal11CudaDeleterIvEEE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPvN8nvinfer114pluginInternal11CudaDeleterIvEEEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPvN8nvinfer114pluginInternal11CudaDeleterIvEEEE", !22, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPvLb0EE", !6, i64 0}
!23 = !{!"_ZTSN8nvinfer16plugin4bert20WeightsWithOwnershipE", !24, i64 0}
!24 = !{!"_ZTSN8nvinfer17WeightsE", !25, i64 0, !6, i64 8, !16, i64 16}
!25 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!10, !16, i64 192}
!28 = !{!10, !26, i64 152}
!29 = !{i8 0, i8 2}
!30 = !{}


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