; LLVM IR from huawei-noah/bolt :: compute/tensor/src (pooling)

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

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.PoolingParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8 }
%class.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"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 }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%struct.ArchInfo = type { i32, ptr }

; 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: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef byval(%struct.TensorDesc) align 8) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind noalias writable sret(%struct.PoolingParamSpec) align 4, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef byval(%struct.PoolingParamSpec) align 8) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z7pooling6Tensor16PoolingParamSpecS_St6vectorIS_SaIS_EEP8ArchInfo(ptr noundef %0, ptr noundef byval(%struct.PoolingParamSpec) align 8 %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.TensorDesc, align 4
  %12 = alloca %struct.TensorDesc, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %class.Tensor, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.TensorDesc, align 4
  %18 = alloca %struct.TensorDesc, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %class.Tensor, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %class.Tensor, align 8
  %23 = alloca [2 x float], align 4
  %24 = alloca ptr, align 8
  %25 = alloca %class.Tensor, align 8
  %26 = alloca %struct.PoolingParamSpec, align 4
  %27 = alloca %struct.TensorDesc, align 8
  %28 = alloca %struct.PoolingParamSpec, align 8
  %29 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store ptr %4, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.ArchInfo, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !9
  store i32 %32, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 92, ptr %11) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %12, ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %11, ptr noundef byval(%struct.TensorDesc) align 8 %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  %33 = load i32, ptr %10, align 4, !tbaa !12
  %34 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %14, i32 noundef %33)
          to label %35 unwind label %48

35:                                               ; preds = %5
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  store ptr %34, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %17) #6
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %18, ptr noundef nonnull align 8 dereferenceable(32) %36)
  call void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %17, ptr noundef byval(%struct.TensorDesc) align 8 %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %37 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %37) #6
  %38 = load i32, ptr %10, align 4, !tbaa !12
  %39 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %20, i32 noundef %38)
          to label %40 unwind label %52

40:                                               ; preds = %35
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  store ptr %39, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store ptr null, ptr %21, align 8, !tbaa !5
  %41 = call noundef i64 @_ZNKSt6vectorI6TensorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %42 = icmp eq i64 %41, 2
  br i1 %42, label %43, label %60

43:                                               ; preds = %40
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 1) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %44) #6
  %45 = load i32, ptr %10, align 4, !tbaa !12
  %46 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %22, i32 noundef %45)
          to label %47 unwind label %56

47:                                               ; preds = %43
  store ptr %46, ptr %21, align 8, !tbaa !5
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %60

48:                                               ; preds = %5
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %15, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %83

52:                                               ; preds = %35
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %15, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  br label %82

56:                                               ; preds = %43
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %15, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %81

60:                                               ; preds = %47, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %61 = call noundef float @_ZN6Tensor9get_scaleEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  store float %61, ptr %23, align 4, !tbaa !13
  %62 = getelementptr inbounds float, ptr %23, i64 1
  store float -1.000000e+00, ptr %62, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %63 = load i32, ptr %10, align 4, !tbaa !12
  %64 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %25, i32 noundef %63)
          to label %65 unwind label %72

65:                                               ; preds = %60
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  store ptr %64, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 60, ptr %26) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %11, i64 92, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 8 %1, i64 60, i1 false), !tbaa.struct !23
  call void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind writable sret(%struct.PoolingParamSpec) align 4 %26, ptr noundef byval(%struct.TensorDesc) align 8 %27, ptr noundef byval(%struct.PoolingParamSpec) align 8 %28)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1, ptr align 4 %26, i64 60, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 60, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 51, ptr %29, align 4, !tbaa !30
  %66 = load i32, ptr %10, align 4, !tbaa !12
  %67 = icmp eq i32 %66, 2
  br i1 %67, label %71, label %68

68:                                               ; preds = %65
  %69 = load i32, ptr %10, align 4, !tbaa !12
  %70 = icmp eq i32 %69, 7
  br i1 %70, label %71, label %76

71:                                               ; preds = %68, %65
  br label %76

72:                                               ; preds = %60
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %15, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %16, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %81

76:                                               ; preds = %71, %68
  %77 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  %78 = getelementptr inbounds [2 x float], ptr %23, i64 0, i64 1
  %79 = load float, ptr %78, align 4, !tbaa !13
  call void @_ZN6Tensor9set_scaleEf(ptr noundef nonnull align 8 dereferenceable(32) %77, float noundef %79)
  %80 = load i32, ptr %29, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  ret i32 %80

81:                                               ; preds = %72, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %82

82:                                               ; preds = %81, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %17) #6
  br label %83

83:                                               ; preds = %82, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %84

84:                                               ; preds = %83
  %85 = load ptr, ptr %15, align 8
  %86 = load i32, ptr %16, align 4
  %87 = insertvalue { ptr, i32 } poison, ptr %85, 0
  %88 = insertvalue { ptr, i32 } %87, i32 %86, 1
  resume { ptr, i32 } %88
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6Tensor9get_scaleEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Tensor9set_scaleEf(ptr noundef nonnull align 8 dereferenceable(32), float noundef) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 = { 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 }

!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, !11, i64 0}
!10 = !{!"_ZTS8ArchInfo", !11, i64 0, !6, i64 8}
!11 = !{!"_ZTS4Arch", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{i64 0, i64 4, !16, i64 4, i64 4, !18, i64 8, i64 4, !20, i64 12, i64 80, !22}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS8DataType", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS10DataFormat", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20, i64 12, i64 4, !20, i64 16, i64 4, !20, i64 20, i64 4, !20, i64 24, i64 4, !20, i64 28, i64 4, !20, i64 32, i64 4, !20, i64 36, i64 4, !20, i64 40, i64 4, !20, i64 44, i64 4, !20, i64 48, i64 4, !24, i64 52, i64 4, !26, i64 56, i64 1, !28}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTS9RoundMode", !7, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"_ZTS11PoolingMode", !7, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!31, !31, i64 0}
!31 = !{!"_ZTS2EE", !7, 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"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.PoolingParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8 }
%class.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"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 }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }

; 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: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind noalias writable sret(%struct.PoolingParamSpec) align 4, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef byval(%struct.PoolingParamSpec) align 8) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z7pooling6Tensor16PoolingParamSpecS_St6vectorIS_SaIS_EEP8ArchInfo(ptr noundef nonnull %0, ptr nocapture noundef byval(%struct.PoolingParamSpec) align 8 %1, ptr noundef %2, ptr noundef %3, ptr nocapture noundef readonly %4) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca %struct.TensorDesc, align 8
  %7 = alloca %struct.TensorDesc, align 8
  %8 = alloca %class.Tensor, align 8
  %9 = alloca %struct.TensorDesc, align 4
  %10 = alloca %struct.TensorDesc, align 8
  %11 = alloca %class.Tensor, align 8
  %12 = alloca %class.Tensor, align 8
  %13 = alloca %class.Tensor, align 8
  %14 = alloca %struct.PoolingParamSpec, align 4
  %15 = load i32, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %6) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %7, ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %6, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %7)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  %16 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %8, i32 noundef %15)
          to label %17 unwind label %28

17:                                               ; preds = %5
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %9) #6
  %18 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %10, ptr noundef nonnull align 8 dereferenceable(32) %18)
  call void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %9, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %10)
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  %20 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %11, i32 noundef %15)
          to label %21 unwind label %30

21:                                               ; preds = %17
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  %22 = call noundef i64 @_ZNKSt6vectorI6TensorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %23 = icmp eq i64 %22, 2
  br i1 %23, label %24, label %34

24:                                               ; preds = %21
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 1) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  %26 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %12, i32 noundef %15)
          to label %27 unwind label %32

27:                                               ; preds = %24
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %34

28:                                               ; preds = %5
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %42

30:                                               ; preds = %17
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %41

32:                                               ; preds = %24
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %41

34:                                               ; preds = %27, %21
  %35 = call noundef float @_ZN6Tensor9get_scaleEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %36 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %13, i32 noundef %15)
          to label %37 unwind label %39

37:                                               ; preds = %34
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %14) #6
  call void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind nonnull writable sret(%struct.PoolingParamSpec) align 4 %14, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %6, ptr noundef nonnull byval(%struct.PoolingParamSpec) align 8 %1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 4 dereferenceable(60) %14, i64 60, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %14) #6
  %38 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  call void @_ZN6Tensor9set_scaleEf(ptr noundef nonnull align 8 dereferenceable(32) %38, float noundef -1.000000e+00)
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %6) #6
  ret i32 51

39:                                               ; preds = %34
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %41

41:                                               ; preds = %32, %39, %30
  %.sink = phi ptr [ %12, %32 ], [ %13, %39 ], [ %11, %30 ]
  %.pn.pn = phi { ptr, i32 } [ %33, %32 ], [ %40, %39 ], [ %31, %30 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.sink) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #6
  br label %42

42:                                               ; preds = %41, %28
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %41 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6Tensor9get_scaleEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Tensor9set_scaleEf(ptr noundef nonnull align 8 dereferenceable(32), float noundef) local_unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 = { 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 }

!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, !7, i64 0}
!6 = !{!"_ZTS8ArchInfo", !7, i64 0, !10, i64 8}
!7 = !{!"_ZTS4Arch", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 4, !12, i64 16, i64 4, !12, i64 20, i64 4, !12, i64 24, i64 4, !12, i64 28, i64 4, !12, i64 32, i64 4, !12, i64 36, i64 4, !12, i64 40, i64 4, !12, i64 44, i64 4, !12, i64 48, i64 4, !14, i64 52, i64 4, !16, i64 56, i64 1, !18}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS9RoundMode", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS11PoolingMode", !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !8, i64 0}


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