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

; 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::FlattenConcat" = type { %"class.nvinfer1::IPluginV2Ext", %"class.std::vector.0", %"class.std::vector.5", i8, i32, i32, i32, %"class.nvinfer1::Dims64", %"class.std::__cxx11::basic_string", ptr, %"class.std::shared_ptr" }
%"class.nvinfer1::IPluginV2Ext" = type { %"class.nvinfer1::IPluginV2" }
%"class.nvinfer1::IPluginV2" = type { ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@.str = external hidden unnamed_addr constant [88 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

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

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

declare ptr @__cxa_begin_catch(ptr)

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

declare void @__cxa_end_catch()

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN8nvinfer16plugin13FlattenConcat7enqueueEiPKPKvPKPvS6_P11CUstream_st(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %25 = load ptr, ptr %8, align 8
  %26 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 4
  %27 = load i32, ptr %26, align 4, !tbaa !11
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %35, label %29

29:                                               ; preds = %6
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef @.str.11, ptr noundef @.str, i32 noundef 149)
          to label %30 unwind label %31

30:                                               ; preds = %29
  br label %35

31:                                               ; preds = %29
  %32 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %14, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %15, align 4
  br label %141

35:                                               ; preds = %30, %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %36 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 7
  %37 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 4
  %38 = load i32, ptr %37, align 4, !tbaa !11
  %39 = sub nsw i32 %38, 1
  %40 = invoke noundef i64 @_ZN8nvinfer114pluginInternal6volumeERKNS_6Dims64Eii(ptr noundef nonnull align 8 dereferenceable(72) %36, i32 noundef 0, i32 noundef %39)
          to label %41 unwind label %50

41:                                               ; preds = %35
  %42 = trunc i64 %40 to i32
  store i32 %42, ptr %16, align 4, !tbaa !9
  %43 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 3
  %44 = load i8, ptr %43, align 8, !tbaa !31, !range !32, !noundef !33
  %45 = trunc i8 %44 to i1
  br i1 %45, label %54, label %46

46:                                               ; preds = %41
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = load i32, ptr %16, align 4, !tbaa !9
  %49 = mul nsw i32 %48, %47
  store i32 %49, ptr %16, align 4, !tbaa !9
  br label %54

50:                                               ; preds = %35
  %51 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %14, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %15, align 4
  br label %140

54:                                               ; preds = %46, %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds ptr, ptr %55, i64 0
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  store ptr %57, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %133, %54
  %59 = load i32, ptr %19, align 4, !tbaa !9
  %60 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 6
  %61 = load i32, ptr %60, align 4, !tbaa !34
  %62 = icmp slt i32 %59, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %58
  store i32 2, ptr %20, align 4
  br label %136

64:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = load i32, ptr %19, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %65, i64 %67
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  store ptr %69, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %117, %64
  %71 = load i32, ptr %22, align 4, !tbaa !9
  %72 = load i32, ptr %16, align 4, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 5, ptr %20, align 4
  br label %120

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %76 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 10
  %77 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8nvinfer114pluginInternal13CublasWrapperELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %76) #6
  %78 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 9
  %79 = load ptr, ptr %78, align 8, !tbaa !35
  %80 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 2
  %81 = load i32, ptr %19, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82) #6
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = load ptr, ptr %21, align 8, !tbaa !5
  %86 = load i32, ptr %22, align 4, !tbaa !9
  %87 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 2
  %88 = load i32, ptr %19, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89) #6
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = mul nsw i32 %86, %91
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds float, ptr %85, i64 %93
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  %96 = load i32, ptr %22, align 4, !tbaa !9
  %97 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 5
  %98 = load i32, ptr %97, align 8, !tbaa !36
  %99 = mul nsw i32 %96, %98
  %100 = load i32, ptr %18, align 4, !tbaa !9
  %101 = add nsw i32 %99, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds float, ptr %95, i64 %102
  %104 = invoke noundef i32 @_ZN8nvinfer114pluginInternal13CublasWrapper11cublasScopyEP13cublasContextiPKfiPfi(ptr noundef nonnull align 8 dereferenceable(152) %77, ptr noundef %79, i32 noundef %84, ptr noundef %94, i32 noundef 1, ptr noundef %103, i32 noundef 1)
          to label %105 unwind label %109

105:                                              ; preds = %75
  store i32 %104, ptr %23, align 4, !tbaa !37
  %106 = load i32, ptr %23, align 4, !tbaa !37
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %113

108:                                              ; preds = %105
  store i32 1, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %114

109:                                              ; preds = %75
  %110 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %14, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %140

113:                                              ; preds = %105
  store i32 0, ptr %20, align 4
  br label %114

114:                                              ; preds = %113, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  %115 = load i32, ptr %20, align 4
  switch i32 %115, label %120 [
    i32 0, label %116
  ]

116:                                              ; preds = %114
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %22, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %22, align 4, !tbaa !9
  br label %70, !llvm.loop !39

120:                                              ; preds = %114, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  %121 = load i32, ptr %20, align 4
  switch i32 %121, label %130 [
    i32 5, label %122
  ]

122:                                              ; preds = %120
  %123 = getelementptr inbounds %"class.nvinfer1::plugin::FlattenConcat", ptr %25, i32 0, i32 2
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %125) #6
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = load i32, ptr %18, align 4, !tbaa !9
  %129 = add nsw i32 %128, %127
  store i32 %129, ptr %18, align 4, !tbaa !9
  store i32 0, ptr %20, align 4
  br label %130

130:                                              ; preds = %122, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  %131 = load i32, ptr %20, align 4
  switch i32 %131, label %136 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %19, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %19, align 4, !tbaa !9
  br label %58, !llvm.loop !41

136:                                              ; preds = %130, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %137 = load i32, ptr %20, align 4
  switch i32 %137, label %139 [
    i32 2, label %138
  ]

138:                                              ; preds = %136
  store i32 0, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %139

139:                                              ; preds = %138, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %152

140:                                              ; preds = %109, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %141

141:                                              ; preds = %140, %31
  %142 = load i32, ptr %15, align 4
  %143 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #6
  %144 = icmp eq i32 %142, %143
  br i1 %144, label %145, label %157

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %146 = load ptr, ptr %14, align 8
  %147 = call ptr @__cxa_begin_catch(ptr %146) #6
  store ptr %147, ptr %24, align 8
  %148 = load ptr, ptr %24, align 8, !tbaa !5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %148)
          to label %149 unwind label %154

149:                                              ; preds = %145
  invoke void @__cxa_end_catch()
          to label %150 unwind label %154

150:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %151

151:                                              ; preds = %150
  store i32 -1, ptr %7, align 4
  br label %152

152:                                              ; preds = %151, %139
  %153 = load i32, ptr %7, align 4
  ret i32 %153

154:                                              ; preds = %149, %145
  %155 = landingpad { ptr, i32 }
          catch ptr null
  %156 = extractvalue { ptr, i32 } %155, 0
  call void @__clang_call_terminate(ptr %156) #7
  unreachable

157:                                              ; preds = %141
  %158 = load ptr, ptr %14, align 8
  call void @__clang_call_terminate(ptr %158) #7
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN8nvinfer114pluginInternal6volumeERKNS_6Dims64Eii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN8nvinfer114pluginInternal13CublasWrapperELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

declare noundef i32 @_ZN8nvinfer114pluginInternal13CublasWrapper11cublasScopyEP13cublasContextiPKfiPfi(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nounwind memory(none) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 60}
!12 = !{!"_ZTSN8nvinfer16plugin13FlattenConcatE", !13, i64 0, !15, i64 8, !19, i64 32, !23, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !24, i64 72, !25, i64 144, !6, i64 176, !28, i64 184}
!13 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !14, i64 0}
!14 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!15 = !{!"_ZTSSt6vectorImSaImEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseImSaImEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN8nvinfer16Dims64E", !10, i64 0, !7, i64 8}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !27, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!27 = !{!"long", !7, i64 0}
!28 = !{!"_ZTSSt10shared_ptrIN8nvinfer114pluginInternal13CublasWrapperEE", !29, i64 0}
!29 = !{!"_ZTSSt12__shared_ptrIN8nvinfer114pluginInternal13CublasWrapperELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !30, i64 8}
!30 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!31 = !{!12, !23, i64 56}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!12, !10, i64 68}
!35 = !{!12, !6, i64 176}
!36 = !{!12, !10, i64 64}
!37 = !{!38, !38, i64 0}
!38 = !{!"_ZTSN8nvinfer114pluginInternal12CublasStatusE", !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}


; 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 [88 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.11 = external hidden unnamed_addr constant [19 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: 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
define dso_local noundef i32 @_ZN8nvinfer16plugin13FlattenConcat7enqueueEiPKPKvPKPvS6_P11CUstream_st(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readnone %4, ptr nocapture noundef readnone %5) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %7 = getelementptr inbounds i8, ptr %0, i64 60
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %12

9:                                                ; preds = %6
  invoke void @_ZN8nvinfer16plugin15reportAssertionEPKcS2_i(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str, i32 noundef 149)
          to label %._crit_edge unwind label %10

._crit_edge:                                      ; preds = %9
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  br label %12

10:                                               ; preds = %9
  %11 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %62

12:                                               ; preds = %._crit_edge, %6
  %13 = phi i32 [ %.pre, %._crit_edge ], [ %8, %6 ]
  %14 = getelementptr inbounds i8, ptr %0, i64 72
  %15 = add nsw i32 %13, -1
  %16 = invoke noundef i64 @_ZN8nvinfer114pluginInternal6volumeERKNS_6Dims64Eii(ptr noundef nonnull align 8 dereferenceable(72) %14, i32 noundef 0, i32 noundef %15)
          to label %17 unwind label %57

17:                                               ; preds = %12
  %18 = trunc i64 %16 to i32
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  %20 = load i8, ptr %19, align 8, !tbaa !29, !range !30, !noundef !31
  %21 = trunc nuw i8 %20 to i1
  %22 = select i1 %21, i32 1, i32 %1
  %spec.select = mul i32 %22, %18
  %23 = load ptr, ptr %3, align 8, !tbaa !32
  %24 = getelementptr inbounds i8, ptr %0, i64 68
  %25 = load i32, ptr %24, align 4, !tbaa !33
  %.not4958 = icmp sgt i32 %25, 0
  br i1 %.not4958, label %.lr.ph63, label %.thread

.lr.ph63:                                         ; preds = %17
  %.not48.not56 = icmp sgt i32 %spec.select, 0
  %26 = getelementptr inbounds i8, ptr %0, i64 184
  %27 = getelementptr inbounds i8, ptr %0, i64 176
  %28 = getelementptr inbounds i8, ptr %0, i64 32
  %29 = getelementptr inbounds i8, ptr %0, i64 64
  br i1 %.not48.not56, label %.lr.ph.us, label %.lr.ph63.split

.lr.ph.us:                                        ; preds = %.lr.ph63, %._crit_edge.us
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %._crit_edge.us ], [ 0, %.lr.ph63 ]
  %.04259.us = phi i32 [ %53, %._crit_edge.us ], [ 0, %.lr.ph63 ]
  %30 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv71
  %31 = load ptr, ptr %30, align 8, !tbaa !32
  br label %34

32:                                               ; preds = %50
  %33 = add nuw nsw i32 %.03457.us, 1
  %exitcond.not = icmp eq i32 %33, %spec.select
  br i1 %exitcond.not, label %._crit_edge.us, label %34, !llvm.loop !34

34:                                               ; preds = %.lr.ph.us, %32
  %.03457.us = phi i32 [ 0, %.lr.ph.us ], [ %33, %32 ]
  %35 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN8nvinfer114pluginInternal13CublasWrapperELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %26) #5
  %36 = load ptr, ptr %27, align 8, !tbaa !36
  %37 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv71) #5
  %38 = load i32, ptr %37, align 4, !tbaa !37
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv71) #5
  %40 = load i32, ptr %39, align 4, !tbaa !37
  %41 = mul nsw i32 %40, %.03457.us
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds float, ptr %31, i64 %42
  %44 = load i32, ptr %29, align 8, !tbaa !38
  %45 = mul nsw i32 %44, %.03457.us
  %46 = add nsw i32 %45, %.04259.us
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds float, ptr %23, i64 %47
  %49 = invoke noundef i32 @_ZN8nvinfer114pluginInternal13CublasWrapper11cublasScopyEP13cublasContextiPKfiPfi(ptr noundef nonnull align 8 dereferenceable(152) %35, ptr noundef %36, i32 noundef %38, ptr noundef %43, i32 noundef 1, ptr noundef %48, i32 noundef 1)
          to label %50 unwind label %.split.us

50:                                               ; preds = %34
  %.not47.us = icmp eq i32 %49, 0
  br i1 %.not47.us, label %32, label %.thread

._crit_edge.us:                                   ; preds = %32
  %51 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv71) #5
  %52 = load i32, ptr %51, align 4, !tbaa !37
  %53 = add nsw i32 %52, %.04259.us
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %54 = load i32, ptr %24, align 4, !tbaa !33
  %55 = sext i32 %54 to i64
  %.not49.us = icmp slt i64 %indvars.iv.next72, %55
  br i1 %.not49.us, label %.lr.ph.us, label %.thread, !llvm.loop !39

.split.us:                                        ; preds = %34
  %56 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %62

57:                                               ; preds = %12
  %58 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %62

.lr.ph63.split:                                   ; preds = %.lr.ph63, %.lr.ph63.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph63.split ], [ 0, %.lr.ph63 ]
  %59 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = load i32, ptr %24, align 4, !tbaa !33
  %61 = sext i32 %60 to i64
  %.not49 = icmp slt i64 %indvars.iv.next, %61
  br i1 %.not49, label %.lr.ph63.split, label %.thread, !llvm.loop !39

62:                                               ; preds = %57, %.split.us, %10
  %.pn.pn = phi { ptr, i32 } [ %11, %10 ], [ %56, %.split.us ], [ %58, %57 ]
  %.133 = extractvalue { ptr, i32 } %.pn.pn, 0
  %.136 = extractvalue { ptr, i32 } %.pn.pn, 1
  %63 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #5
  %64 = icmp eq i32 %.136, %63
  br i1 %64, label %65, label %71

65:                                               ; preds = %62
  %66 = tail call ptr @__cxa_begin_catch(ptr %.133) #5
  invoke void @_ZN8nvinfer16plugin11caughtErrorERKSt9exception(ptr noundef nonnull align 8 dereferenceable(8) %66)
          to label %67 unwind label %68

67:                                               ; preds = %65
  invoke void @__cxa_end_catch()
          to label %.thread unwind label %68

.thread:                                          ; preds = %.lr.ph63.split, %._crit_edge.us, %50, %17, %67
  %.6 = phi i32 [ -1, %67 ], [ 0, %17 ], [ 1, %50 ], [ 0, %._crit_edge.us ], [ 0, %.lr.ph63.split ]
  ret i32 %.6

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

71:                                               ; preds = %62
  tail call void @__clang_call_terminate(ptr %.133) #6
  unreachable
}

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

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

declare noundef i32 @_ZN8nvinfer114pluginInternal13CublasWrapper11cublasScopyEP13cublasContextiPKfiPfi(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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 = { 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, !21, i64 60}
!6 = !{!"_ZTSN8nvinfer16plugin13FlattenConcatE", !7, i64 0, !9, i64 8, !16, i64 32, !20, i64 56, !21, i64 60, !21, i64 64, !21, i64 68, !22, i64 72, !23, i64 144, !13, i64 176, !26, i64 184}
!7 = !{!"_ZTSN8nvinfer112IPluginV2ExtE", !8, i64 0}
!8 = !{!"_ZTSN8nvinfer19IPluginV2E"}
!9 = !{!"_ZTSSt6vectorImSaImEE", !10, i64 0}
!10 = !{!"_ZTSSt12_Vector_baseImSaImEE", !11, i64 0}
!11 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"_ZTSSt6vectorIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!20 = !{!"bool", !14, i64 0}
!21 = !{!"int", !14, i64 0}
!22 = !{!"_ZTSN8nvinfer16Dims64E", !21, i64 0, !14, i64 8}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !14, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!25 = !{!"long", !14, i64 0}
!26 = !{!"_ZTSSt10shared_ptrIN8nvinfer114pluginInternal13CublasWrapperEE", !27, i64 0}
!27 = !{!"_ZTSSt12__shared_ptrIN8nvinfer114pluginInternal13CublasWrapperELN9__gnu_cxx12_Lock_policyE2EE", !13, i64 0, !28, i64 8}
!28 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !13, i64 0}
!29 = !{!6, !20, i64 56}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!13, !13, i64 0}
!33 = !{!6, !21, i64 68}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!6, !13, i64 176}
!37 = !{!21, !21, i64 0}
!38 = !{!6, !21, i64 64}
!39 = distinct !{!39, !35}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass