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

; 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::CoordConvACPlugin" = type { %"class.nvinfer1::IPluginV2Ext", i32, i32, i32, i32, i32, i32, i32, ptr }
%"class.nvinfer1::IPluginV2Ext" = type { %"class.nvinfer1::IPluginV2" }
%"class.nvinfer1::IPluginV2" = type { ptr }

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

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef ptr @_ZNK8nvinfer16plugin17CoordConvACPlugin5cloneEv(ptr noundef nonnull align 8 dereferenceable(48) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %9 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #8
          to label %10 unwind label %33

10:                                               ; preds = %1
  %11 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 1
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 2
  %14 = load i32, ptr %13, align 4, !tbaa !15
  %15 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 3
  %16 = load i32, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 4
  %18 = load i32, ptr %17, align 4, !tbaa !17
  %19 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 5
  %20 = load i32, ptr %19, align 8, !tbaa !18
  %21 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 6
  %22 = load i32, ptr %21, align 4, !tbaa !19
  %23 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 7
  %24 = load i32, ptr %23, align 8, !tbaa !20
  invoke void @_ZN8nvinfer16plugin17CoordConvACPluginC1ENS_8DataTypeEiiiiii(ptr noundef nonnull align 8 dereferenceable(48) %9, i32 noundef %12, i32 noundef %14, i32 noundef %16, i32 noundef %18, i32 noundef %20, i32 noundef %22, i32 noundef %24)
          to label %25 unwind label %37

25:                                               ; preds = %10
  store ptr %9, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %8, i32 0, i32 8
  %28 = load ptr, ptr %27, align 8, !tbaa !21
  %29 = load ptr, ptr %26, align 8, !tbaa !22
  %30 = getelementptr inbounds ptr, ptr %29, i64 15
  %31 = load ptr, ptr %30, align 8
  call void %31(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef %28) #7
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %32, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %53

33:                                               ; preds = %1
  %34 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %5, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %6, align 4
  br label %41

37:                                               ; preds = %10
  %38 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %9, i64 noundef 48) #9
  br label %41

41:                                               ; preds = %37, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %6, align 4
  %44 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #7
  %45 = icmp eq i32 %43, %44
  br i1 %45, label %46, label %58

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %47 = load ptr, ptr %5, align 8
  %48 = call ptr @__cxa_begin_catch(ptr %47) #7
  store ptr %48, ptr %7, align 8
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %50 unwind label %55

50:                                               ; preds = %46
  invoke void @__cxa_end_catch()
          to label %51 unwind label %55

51:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %52

52:                                               ; preds = %51
  store ptr null, ptr %2, align 8
  br label %53

53:                                               ; preds = %52, %25
  %54 = load ptr, ptr %2, align 8
  ret ptr %54

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

58:                                               ; preds = %42
  %59 = load ptr, ptr %5, align 8
  call void @__clang_call_terminate(ptr %59) #10
  unreachable
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

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

declare void @__cxa_end_catch()

declare void @_ZN8nvinfer16plugin17CoordConvACPluginC1ENS_8DataTypeEiiiiii(ptr, i32, i32, i32, i32, i32, i32, i32)

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 = { 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 = { nobuiltin allocsize(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 = { nobuiltin nounwind "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 memory(none) }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { 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, !13, i64 8}
!10 = !{!"_ZTSN8nvinfer16plugin17CoordConvACPluginE", !11, i64 0, !13, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !6, i64 40}
!11 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!13 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!10, !14, i64 12}
!16 = !{!10, !14, i64 16}
!17 = !{!10, !14, i64 20}
!18 = !{!10, !14, i64 24}
!19 = !{!10, !14, i64 28}
!20 = !{!10, !14, i64 32}
!21 = !{!10, !6, i64 40}
!22 = !{!23, !23, i64 0}
!23 = !{!"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"

@_ZTISt9exception = external constant ptr

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef ptr @_ZNK8nvinfer16plugin17CoordConvACPlugin5cloneEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = invoke noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #6
          to label %3 unwind label %24

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 12
  %7 = load i32, ptr %6, align 4, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = load i32, ptr %8, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %0, i64 20
  %11 = load i32, ptr %10, align 4, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = load i32, ptr %12, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %0, i64 28
  %15 = load i32, ptr %14, align 4, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  %17 = load i32, ptr %16, align 8, !tbaa !19
  invoke void @_ZN8nvinfer16plugin17CoordConvACPluginC1ENS_8DataTypeEiiiiii(ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef %5, i32 noundef %7, i32 noundef %9, i32 noundef %11, i32 noundef %13, i32 noundef %15, i32 noundef %17)
          to label %18 unwind label %26

18:                                               ; preds = %3
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  %20 = load ptr, ptr %19, align 8, !tbaa !20
  %21 = load ptr, ptr %2, align 8, !tbaa !21
  %22 = getelementptr inbounds i8, ptr %21, i64 120
  %23 = load ptr, ptr %22, align 8
  tail call void %23(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef %20) #7
  br label %34

24:                                               ; preds = %1
  %25 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %28

26:                                               ; preds = %3
  %27 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  tail call void @_ZdlPvm(ptr noundef nonnull %2, i64 noundef 48) #8
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  %.07 = extractvalue { ptr, i32 } %.pn, 1
  %.08 = extractvalue { ptr, i32 } %.pn, 0
  %29 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #7
  %30 = icmp eq i32 %.07, %29
  br i1 %30, label %31, label %38

31:                                               ; preds = %28
  %32 = tail call ptr @__cxa_begin_catch(ptr %.08) #7
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %33 unwind label %35

33:                                               ; preds = %31
  invoke void @__cxa_end_catch()
          to label %34 unwind label %35

34:                                               ; preds = %33, %18
  %.0 = phi ptr [ %2, %18 ], [ null, %33 ]
  ret ptr %.0

35:                                               ; preds = %33, %31
  %36 = landingpad { ptr, i32 }
          catch ptr null
  %37 = extractvalue { ptr, i32 } %36, 0
  tail call void @__clang_call_terminate(ptr %37) #9
  unreachable

38:                                               ; preds = %28
  tail call void @__clang_call_terminate(ptr %.08) #9
  unreachable
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #4

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

declare void @__cxa_end_catch() local_unnamed_addr

declare void @_ZN8nvinfer16plugin17CoordConvACPluginC1ENS_8DataTypeEiiiiii(ptr, i32, i32, i32, i32, i32, i32, i32) local_unnamed_addr

attributes #0 = { 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 #1 = { 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 #2 = { nobuiltin allocsize(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 = { nobuiltin nounwind "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 = { nofree nosync nounwind memory(none) }
attributes #5 = { 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 #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin nounwind }
attributes #9 = { 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, !9, i64 8}
!6 = !{!"_ZTSN8nvinfer16plugin17CoordConvACPluginE", !7, i64 0, !9, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !13, i64 40}
!7 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !8, i64 0}
!8 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!9 = !{!"_ZTSN8nvinfer18DataTypeE", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"any pointer", !10, i64 0}
!14 = !{!6, !12, i64 12}
!15 = !{!6, !12, i64 16}
!16 = !{!6, !12, i64 20}
!17 = !{!6, !12, i64 24}
!18 = !{!6, !12, i64 28}
!19 = !{!6, !12, i64 32}
!20 = !{!6, !13, i64 40}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !11, i64 0}


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