; 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::Dims64" = type { i32, [8 x i64] }
%"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 }

@.str = external hidden unnamed_addr constant [96 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN8nvinfer16plugin17CoordConvACPlugin15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, i32 noundef %9, i32 noundef %10) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i32 %2, ptr %14, align 4, !tbaa !9
  store ptr %3, ptr %15, align 8, !tbaa !5
  store i32 %4, ptr %16, align 4, !tbaa !9
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store i32 %9, ptr %21, align 4, !tbaa !11
  store i32 %10, ptr %22, align 4, !tbaa !9
  %23 = load ptr, ptr %12, align 8
  %24 = load i32, ptr %14, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %28, label %26

26:                                               ; preds = %11
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.8, ptr noundef @.str, i32 noundef 124)
          to label %27 unwind label %74

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27, %11
  %29 = load i32, ptr %16, align 4, !tbaa !9
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %33, label %31

31:                                               ; preds = %28
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.9, ptr noundef @.str, i32 noundef 125)
          to label %32 unwind label %74

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32, %28
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %34, i32 0, i32 1
  %36 = getelementptr inbounds [8 x i64], ptr %35, i64 0, i64 0
  %37 = load i64, ptr %36, align 8, !tbaa !13
  %38 = trunc i64 %37 to i32
  %39 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %23, i32 0, i32 2
  store i32 %38, ptr %39, align 4, !tbaa !15
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %40, i32 0, i32 1
  %42 = getelementptr inbounds [8 x i64], ptr %41, i64 0, i64 1
  %43 = load i64, ptr %42, align 8, !tbaa !13
  %44 = trunc i64 %43 to i32
  %45 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %23, i32 0, i32 3
  store i32 %44, ptr %45, align 8, !tbaa !20
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %46, i32 0, i32 1
  %48 = getelementptr inbounds [8 x i64], ptr %47, i64 0, i64 2
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = trunc i64 %49 to i32
  %51 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %23, i32 0, i32 4
  store i32 %50, ptr %51, align 4, !tbaa !21
  %52 = load ptr, ptr %15, align 8, !tbaa !5
  %53 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %52, i32 0, i32 1
  %54 = getelementptr inbounds [8 x i64], ptr %53, i64 0, i64 0
  %55 = load i64, ptr %54, align 8, !tbaa !13
  %56 = trunc i64 %55 to i32
  %57 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %23, i32 0, i32 5
  store i32 %56, ptr %57, align 8, !tbaa !22
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %58, i32 0, i32 1
  %60 = getelementptr inbounds [8 x i64], ptr %59, i64 0, i64 1
  %61 = load i64, ptr %60, align 8, !tbaa !13
  %62 = trunc i64 %61 to i32
  %63 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %23, i32 0, i32 6
  store i32 %62, ptr %63, align 4, !tbaa !23
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %64, i32 0, i32 1
  %66 = getelementptr inbounds [8 x i64], ptr %65, i64 0, i64 2
  %67 = load i64, ptr %66, align 8, !tbaa !13
  %68 = trunc i64 %67 to i32
  %69 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %23, i32 0, i32 7
  store i32 %68, ptr %69, align 8, !tbaa !24
  %70 = load ptr, ptr %17, align 8, !tbaa !5
  %71 = getelementptr inbounds i32, ptr %70, i64 0
  %72 = load i32, ptr %71, align 4, !tbaa !25
  %73 = getelementptr inbounds %"class.nvinfer1::plugin::CoordConvACPlugin", ptr %23, i32 0, i32 1
  store i32 %72, ptr %73, align 8, !tbaa !26
  ret void

74:                                               ; preds = %31, %26
  %75 = landingpad { ptr, i32 }
          catch ptr null
  %76 = extractvalue { ptr, i32 } %75, 0
  call void @__clang_call_terminate(ptr %76) #3
  unreachable
}

attributes #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 #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 = { 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 = !{!"_ZTSN8nvinfer112TensorFormatE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !10, i64 12}
!16 = !{!"_ZTSN8nvinfer16plugin17CoordConvACPluginE", !17, i64 0, !19, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 40}
!17 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !18, i64 0}
!18 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!19 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!20 = !{!16, !10, i64 16}
!21 = !{!16, !10, i64 20}
!22 = !{!16, !10, i64 24}
!23 = !{!16, !10, i64 28}
!24 = !{!16, !10, i64 32}
!25 = !{!19, !19, i64 0}
!26 = !{!16, !19, i64 8}


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

@.str = external hidden unnamed_addr constant [96 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #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 void @_ZN8nvinfer16plugin17CoordConvACPlugin15configurePluginEPKNS_6Dims64EiS4_iPKNS_8DataTypeES7_PKbS9_NS_12TensorFormatEi(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(48) %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readnone %6, ptr nocapture noundef readnone %7, ptr nocapture noundef readnone %8, i32 noundef %9, i32 noundef %10) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %12 = icmp eq i32 %2, 1
  br i1 %12, label %14, label %13

13:                                               ; preds = %11
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str, i32 noundef 124)
          to label %14 unwind label %35

14:                                               ; preds = %13, %11
  %15 = icmp eq i32 %4, 1
  br i1 %15, label %17, label %16

16:                                               ; preds = %14
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str, i32 noundef 125)
          to label %17 unwind label %35

17:                                               ; preds = %16, %14
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load i64, ptr %18, align 8, !tbaa !5
  %20 = trunc i64 %19 to i32
  %21 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %20, ptr %21, align 4, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %1, i64 16
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = load <2 x i64>, ptr %22, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %3, i64 8
  %26 = load <2 x i64>, ptr %25, align 8, !tbaa !5
  %27 = shufflevector <2 x i64> %24, <2 x i64> %26, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %28 = trunc <4 x i64> %27 to <4 x i32>
  store <4 x i32> %28, ptr %23, align 8, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %3, i64 24
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = trunc i64 %30 to i32
  %32 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %31, ptr %32, align 8, !tbaa !17
  %33 = load i32, ptr %5, align 4, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %33, ptr %34, align 8, !tbaa !19
  ret void

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

attributes #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 #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 = { 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, !14, i64 12}
!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, !15, i64 40}
!11 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !12, i64 0}
!12 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!13 = !{!"_ZTSN8nvinfer18DataTypeE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!14, !14, i64 0}
!17 = !{!10, !14, i64 32}
!18 = !{!13, !13, i64 0}
!19 = !{!10, !13, i64 8}


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