; LLVM IR from NVIDIA/TensorRT :: plugin/common (vfcCommon)

; 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::ROIAlignV3PluginCreator" = type { %"class.nvinfer1::v_1_0::IPluginCreatorV3One", %"class.std::__cxx11::basic_string" }
%"class.nvinfer1::v_1_0::IPluginCreatorV3One" = type { %"class.nvinfer1::v_1_0::IPluginCreatorInterface" }
%"class.nvinfer1::v_1_0::IPluginCreatorInterface" = type { %"class.nvinfer1::IVersionedInterface" }
%"class.nvinfer1::IVersionedInterface" = 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] }

@__dso_handle = external hidden global i8
@_ZZ11getCreatorsE16sRoiAlignCreator = external hidden global %"class.nvinfer1::plugin::ROIAlignV3PluginCreator", align 8
@_ZGVZ11getCreatorsE16sRoiAlignCreator = external hidden global i64, align 8
@_ZZ11getCreatorsE20kPLUGIN_CREATOR_LIST = external hidden constant [1 x ptr], align 8

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

; Function Attrs: mustprogress uwtable
define dso_local ptr @getCreators(ptr noundef nonnull align 4 dereferenceable(4) %0) #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  store i32 1, ptr %5, align 4, !tbaa !9
  %6 = load atomic i8, ptr @_ZGVZ11getCreatorsE16sRoiAlignCreator acquire, align 8
  %7 = icmp eq i8 %6, 0
  br i1 %7, label %8, label %14, !prof !11

8:                                                ; preds = %1
  %9 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ11getCreatorsE16sRoiAlignCreator) #0
  %10 = icmp ne i32 %9, 0
  br i1 %10, label %11, label %14

11:                                               ; preds = %8
  invoke void @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorC1Ev(ptr noundef nonnull align 8 dereferenceable(40) @_ZZ11getCreatorsE16sRoiAlignCreator)
          to label %12 unwind label %15

12:                                               ; preds = %11
  %13 = call i32 @__cxa_atexit(ptr @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorD2Ev, ptr @_ZZ11getCreatorsE16sRoiAlignCreator, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ11getCreatorsE16sRoiAlignCreator) #0
  br label %14

14:                                               ; preds = %12, %8, %1
  ret ptr @_ZZ11getCreatorsE20kPLUGIN_CREATOR_LIST

15:                                               ; preds = %11
  %16 = landingpad { ptr, i32 }
          cleanup
  %17 = extractvalue { ptr, i32 } %16, 0
  store ptr %17, ptr %3, align 8
  %18 = extractvalue { ptr, i32 } %16, 1
  store i32 %18, ptr %4, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ11getCreatorsE16sRoiAlignCreator) #0
  br label %19

19:                                               ; preds = %15
  %20 = load ptr, ptr %3, align 8
  %21 = load i32, ptr %4, align 4
  %22 = insertvalue { ptr, i32 } poison, ptr %20, 0
  %23 = insertvalue { ptr, i32 } %22, i32 %21, 1
  resume { ptr, i32 } %23
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

declare void @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #0

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

attributes #0 = { nounwind }
attributes #1 = { 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 #2 = { "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" }

!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 = !{!"branch_weights", i32 1, i32 1048575}


; 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::plugin::ROIAlignV3PluginCreator" = type { %"class.nvinfer1::v_1_0::IPluginCreatorV3One", %"class.std::__cxx11::basic_string" }
%"class.nvinfer1::v_1_0::IPluginCreatorV3One" = type { %"class.nvinfer1::v_1_0::IPluginCreatorInterface" }
%"class.nvinfer1::v_1_0::IPluginCreatorInterface" = type { %"class.nvinfer1::IVersionedInterface" }
%"class.nvinfer1::IVersionedInterface" = 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] }

@__dso_handle = external hidden global i8
@_ZZ11getCreatorsE16sRoiAlignCreator = external hidden global %"class.nvinfer1::plugin::ROIAlignV3PluginCreator", align 8
@_ZGVZ11getCreatorsE16sRoiAlignCreator = external hidden global i64, align 8
@_ZZ11getCreatorsE20kPLUGIN_CREATOR_LIST = external hidden constant [1 x ptr], align 8

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @getCreators(ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  store i32 1, ptr %0, align 4, !tbaa !5
  %2 = load atomic i8, ptr @_ZGVZ11getCreatorsE16sRoiAlignCreator acquire, align 8
  %3 = icmp eq i8 %2, 0
  br i1 %3, label %4, label %9, !prof !9

4:                                                ; preds = %1
  %5 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ11getCreatorsE16sRoiAlignCreator) #4
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %9, label %6

6:                                                ; preds = %4
  invoke void @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorC1Ev(ptr noundef nonnull align 8 dereferenceable(40) @_ZZ11getCreatorsE16sRoiAlignCreator)
          to label %7 unwind label %10

7:                                                ; preds = %6
  %8 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorD2Ev, ptr nonnull @_ZZ11getCreatorsE16sRoiAlignCreator, ptr nonnull @__dso_handle) #4
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ11getCreatorsE16sRoiAlignCreator) #4
  br label %9

9:                                                ; preds = %7, %4, %1
  ret ptr @_ZZ11getCreatorsE20kPLUGIN_CREATOR_LIST

10:                                               ; preds = %6
  %11 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZ11getCreatorsE16sRoiAlignCreator) #4
  resume { ptr, i32 } %11
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

declare void @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8nvinfer16plugin23ROIAlignV3PluginCreatorD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

attributes #0 = { nofree nounwind }
attributes #1 = { 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 #2 = { "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 }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", i32 1, i32 1048575}


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