; LLVM IR from ermig1979/Simd :: src/Simd (SimdBaseSynetConvolution16bNchwGemm)

; 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.Simd::SynetConvolution16b" = type { %"struct.Simd::Deletable", %"struct.Simd::ConvParam", %"struct.Simd::Array", %"class.std::__cxx11::basic_string", %"struct.Simd::Array.0", %"struct.Simd::Array.1", %"struct.Simd::Array.1", i8, i8, i8, i64, i64, i64, i64 }
%"struct.Simd::Deletable" = type { ptr }
%"struct.Simd::ConvParam" = type <{ %struct.SimdConvolutionParameters, i32, [4 x i8], i64, i32, [4 x i8] }>
%struct.SimdConvolutionParameters = type { i64, i64, i64, i32, i32, i64, i64, i64, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32 }
%"struct.Simd::Array" = type { ptr, 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] }
%"struct.Simd::Array.0" = type { ptr, i64 }
%"struct.Simd::Array.1" = type { ptr, i64 }
%"class.Simd::Base::SynetConvolution16bNchwGemm" = type { %"class.Simd::SynetConvolution16b", %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr, [2 x ptr] }
%"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam" = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32 }

; 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
define dso_local void @_ZN4Simd4Base27SynetConvolution16bNchwGemm9SetWeightEPKf(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr noundef %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %15 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %14, i32 0, i32 1
  store ptr %15, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %16 = getelementptr inbounds %"class.Simd::Base::SynetConvolution16bNchwGemm", ptr %14, i32 0, i32 1
  store ptr %16, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %14, i32 0, i32 4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %18, i32 0, i32 11
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %21, i32 0, i32 9
  %23 = load i64, ptr %22, align 8, !tbaa !13
  %24 = mul i64 %20, %23
  call void @_ZN4Simd5ArrayItE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %24, i1 noundef zeroext true, i64 noundef 8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %25 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %14, i32 0, i32 4
  %26 = getelementptr inbounds %"struct.Simd::Array.0", ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  store ptr %27, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !30
  br label %28

28:                                               ; preds = %103, %2
  %29 = load i64, ptr %8, align 8, !tbaa !30
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %30, i32 0, i32 11
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = icmp ult i64 %29, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %109

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %36, i32 0, i32 11
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = load i64, ptr %8, align 8, !tbaa !30
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %40, i32 0, i32 8
  %42 = load i64, ptr %41, align 8, !tbaa !31
  %43 = add i64 %39, %42
  %44 = call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %38, i64 noundef %43)
  %45 = load i64, ptr %8, align 8, !tbaa !30
  %46 = sub i64 %44, %45
  store i64 %46, ptr %10, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !30
  br label %47

47:                                               ; preds = %99, %35
  %48 = load i64, ptr %11, align 8, !tbaa !30
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %49, i32 0, i32 9
  %51 = load i64, ptr %50, align 8, !tbaa !13
  %52 = icmp ult i64 %48, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %47
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %102

54:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i64, ptr %11, align 8, !tbaa !30
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %57, i32 0, i32 0
  %59 = load i64, ptr %58, align 8, !tbaa !32
  %60 = mul i64 %56, %59
  %61 = getelementptr inbounds float, ptr %55, i64 %60
  %62 = load i64, ptr %8, align 8, !tbaa !30
  %63 = getelementptr inbounds float, ptr %61, i64 %62
  store ptr %63, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !30
  br label %64

64:                                               ; preds = %95, %54
  %65 = load i64, ptr %13, align 8, !tbaa !30
  %66 = load i64, ptr %10, align 8, !tbaa !30
  %67 = icmp ult i64 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %98

69:                                               ; preds = %64
  %70 = load i64, ptr %11, align 8, !tbaa !30
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %71, i32 0, i32 5
  %73 = load i64, ptr %72, align 8, !tbaa !33
  %74 = icmp ult i64 %70, %73
  br i1 %74, label %75, label %91

75:                                               ; preds = %69
  %76 = load i64, ptr %8, align 8, !tbaa !30
  %77 = load i64, ptr %13, align 8, !tbaa !30
  %78 = add i64 %76, %77
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %79, i32 0, i32 0
  %81 = load i64, ptr %80, align 8, !tbaa !32
  %82 = icmp ult i64 %78, %81
  br i1 %82, label %83, label %91

83:                                               ; preds = %75
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = load i64, ptr %13, align 8, !tbaa !30
  %86 = getelementptr inbounds float, ptr %84, i64 %85
  %87 = load float, ptr %86, align 4, !tbaa !34
  %88 = call noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef %87)
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds i16, ptr %89, i32 1
  store ptr %90, ptr %7, align 8, !tbaa !5
  store i16 %88, ptr %89, align 2, !tbaa !36
  br label %94

91:                                               ; preds = %75, %69
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds i16, ptr %92, i32 1
  store ptr %93, ptr %7, align 8, !tbaa !5
  store i16 0, ptr %92, align 2, !tbaa !36
  br label %94

94:                                               ; preds = %91, %83
  br label %95

95:                                               ; preds = %94
  %96 = load i64, ptr %13, align 8, !tbaa !30
  %97 = add i64 %96, 1
  store i64 %97, ptr %13, align 8, !tbaa !30
  br label %64, !llvm.loop !38

98:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %99

99:                                               ; preds = %98
  %100 = load i64, ptr %11, align 8, !tbaa !30
  %101 = add i64 %100, 1
  store i64 %101, ptr %11, align 8, !tbaa !30
  br label %47, !llvm.loop !40

102:                                              ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %104, i32 0, i32 8
  %106 = load i64, ptr %105, align 8, !tbaa !31
  %107 = load i64, ptr %8, align 8, !tbaa !30
  %108 = add i64 %107, %106
  store i64 %108, ptr %8, align 8, !tbaa !30
  br label %28, !llvm.loop !41

109:                                              ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd5ArrayItE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext, i64 noundef) #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef, i64 noundef) #3

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef) #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 = { alwaysinline 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 = { alwaysinline 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 88}
!10 = !{!"_ZTSN4Simd4Base27SynetConvolution16bNchwGemm8AlgParamE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !12, i64 104, !12, i64 108}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !11, i64 72}
!14 = !{!15, !6, i64 240}
!15 = !{!"_ZTSN4Simd19SynetConvolution16bE", !16, i64 0, !17, i64 8, !24, i64 192, !25, i64 208, !27, i64 240, !28, i64 256, !28, i64 272, !29, i64 288, !29, i64 289, !29, i64 290, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320}
!16 = !{!"_ZTSN4Simd9DeletableE"}
!17 = !{!"_ZTSN4Simd9ConvParamE", !18, i64 0, !22, i64 160, !11, i64 168, !23, i64 176}
!18 = !{!"_ZTS25SimdConvolutionParameters", !11, i64 0, !11, i64 8, !11, i64 16, !19, i64 24, !20, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !19, i64 56, !20, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !21, i64 152}
!19 = !{!"_ZTS18SimdTensorDataType", !7, i64 0}
!20 = !{!"_ZTS20SimdTensorFormatType", !7, i64 0}
!21 = !{!"_ZTS29SimdConvolutionActivationType", !7, i64 0}
!22 = !{!"_ZTS8SimdBool", !7, i64 0}
!23 = !{!"_ZTS26SimdSynetCompatibilityType", !7, i64 0}
!24 = !{!"_ZTSN4Simd5ArrayIhEE", !6, i64 0, !11, i64 8}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !11, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!27 = !{!"_ZTSN4Simd5ArrayItEE", !6, i64 0, !11, i64 8}
!28 = !{!"_ZTSN4Simd5ArrayIfEE", !6, i64 0, !11, i64 8}
!29 = !{!"bool", !7, i64 0}
!30 = !{!11, !11, i64 0}
!31 = !{!10, !11, i64 64}
!32 = !{!10, !11, i64 0}
!33 = !{!18, !11, i64 32}
!34 = !{!35, !35, i64 0}
!35 = !{!"float", !7, i64 0}
!36 = !{!37, !37, i64 0}
!37 = !{!"short", !7, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}
!41 = distinct !{!41, !39}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base27SynetConvolution16bNchwGemm9SetWeightEPKf(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr nocapture noundef readonly %1) unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 328
  %4 = getelementptr inbounds i8, ptr %0, i64 240
  %5 = getelementptr inbounds i8, ptr %0, i64 416
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 400
  %8 = load i64, ptr %7, align 8, !tbaa !11
  %9 = mul i64 %8, %6
  tail call void @_ZN4Simd5ArrayItE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %9, i1 noundef zeroext true, i64 noundef 8)
  %10 = load i64, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %11 = load ptr, ptr %4, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %0, i64 392
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %.pre = load i64, ptr %12, align 8, !tbaa !29
  br label %14

._crit_edge:                                      ; preds = %._crit_edge40, %2
  ret void

14:                                               ; preds = %.lr.ph, %._crit_edge40
  %15 = phi i64 [ %.pre, %.lr.ph ], [ %43, %._crit_edge40 ]
  %16 = phi i64 [ %10, %.lr.ph ], [ %45, %._crit_edge40 ]
  %.02951 = phi ptr [ %11, %.lr.ph ], [ %.1.lcssa, %._crit_edge40 ]
  %.03149 = phi i64 [ 0, %.lr.ph ], [ %44, %._crit_edge40 ]
  %17 = add i64 %15, %.03149
  %18 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %16, i64 noundef %17)
  %19 = sub i64 %18, %.03149
  %invariant.gep = getelementptr float, ptr %1, i64 %.03149
  %20 = load i64, ptr %7, align 8, !tbaa !11
  %.not52 = icmp eq i64 %20, 0
  %.not53 = icmp eq i64 %18, %.03149
  %or.cond = or i1 %.not52, %.not53
  br i1 %or.cond, label %._crit_edge40, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %14
  %21 = sub i64 %18, %.03149
  %22 = shl i64 %21, 1
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %23 = phi i64 [ %40, %._crit_edge.us ], [ %20, %.lr.ph.us.preheader ]
  %.137.us = phi ptr [ %.us-phi.us, %._crit_edge.us ], [ %.02951, %.lr.ph.us.preheader ]
  %.03035.us = phi i64 [ %41, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ]
  %24 = load i64, ptr %3, align 8, !tbaa !30
  %25 = mul i64 %24, %.03035.us
  %gep.us = getelementptr float, ptr %invariant.gep, i64 %25
  %26 = load i64, ptr %13, align 8, !tbaa !31
  %27 = icmp ult i64 %.03035.us, %26
  br i1 %27, label %.lr.ph.split.us47, label %.lr.ph.split.us.us.preheader

.lr.ph.split.us.us.preheader:                     ; preds = %.lr.ph.us
  tail call void @llvm.memset.p0.i64(ptr align 2 %.137.us, i8 0, i64 %22, i1 false), !tbaa !32
  %scevgep = getelementptr i8, ptr %.137.us, i64 %22
  br label %._crit_edge.us

.lr.ph.split.us47:                                ; preds = %.lr.ph.us, %38
  %.034.us42 = phi i64 [ %39, %38 ], [ 0, %.lr.ph.us ]
  %.233.us43 = phi ptr [ %.3.us44, %38 ], [ %.137.us, %.lr.ph.us ]
  %28 = load i64, ptr %13, align 8, !tbaa !31
  %29 = icmp ult i64 %.03035.us, %28
  br i1 %29, label %30, label %38

30:                                               ; preds = %.lr.ph.split.us47
  %31 = add i64 %.034.us42, %.03149
  %32 = load i64, ptr %3, align 8, !tbaa !30
  %33 = icmp ult i64 %31, %32
  br i1 %33, label %34, label %38

34:                                               ; preds = %30
  %35 = getelementptr inbounds float, ptr %gep.us, i64 %.034.us42
  %36 = load float, ptr %35, align 4, !tbaa !34
  %37 = tail call noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef %36)
  br label %38

38:                                               ; preds = %34, %30, %.lr.ph.split.us47
  %storemerge.us = phi i16 [ %37, %34 ], [ 0, %30 ], [ 0, %.lr.ph.split.us47 ]
  %.3.us44 = getelementptr inbounds i8, ptr %.233.us43, i64 2
  store i16 %storemerge.us, ptr %.233.us43, align 2, !tbaa !32
  %39 = add nuw i64 %.034.us42, 1
  %exitcond.not = icmp eq i64 %39, %19
  br i1 %exitcond.not, label %._crit_edge.us.loopexit, label %.lr.ph.split.us47, !llvm.loop !36

._crit_edge.us.loopexit:                          ; preds = %38
  %.pre56 = load i64, ptr %7, align 8, !tbaa !11
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.lr.ph.split.us.us.preheader, %._crit_edge.us.loopexit
  %40 = phi i64 [ %.pre56, %._crit_edge.us.loopexit ], [ %23, %.lr.ph.split.us.us.preheader ]
  %.us-phi.us = phi ptr [ %.3.us44, %._crit_edge.us.loopexit ], [ %scevgep, %.lr.ph.split.us.us.preheader ]
  %41 = add nuw i64 %.03035.us, 1
  %42 = icmp ult i64 %41, %40
  br i1 %42, label %.lr.ph.us, label %._crit_edge40, !llvm.loop !39

._crit_edge40:                                    ; preds = %._crit_edge.us, %14
  %.1.lcssa = phi ptr [ %.02951, %14 ], [ %.us-phi.us, %._crit_edge.us ]
  %43 = load i64, ptr %12, align 8, !tbaa !29
  %44 = add i64 %43, %.03149
  %45 = load i64, ptr %5, align 8, !tbaa !5
  %46 = icmp ult i64 %44, %45
  br i1 %46, label %14, label %._crit_edge, !llvm.loop !40
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd5ArrayItE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZN4Simd4Base17Float32ToBFloat16Ef(float noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { 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 #1 = { alwaysinline 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 = { alwaysinline 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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 88}
!6 = !{!"_ZTSN4Simd4Base27SynetConvolution16bNchwGemm8AlgParamE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !10, i64 104, !10, i64 108}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 72}
!12 = !{!13, !23, i64 240}
!13 = !{!"_ZTSN4Simd19SynetConvolution16bE", !14, i64 0, !15, i64 8, !22, i64 192, !24, i64 208, !26, i64 240, !27, i64 256, !27, i64 272, !28, i64 288, !28, i64 289, !28, i64 290, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320}
!14 = !{!"_ZTSN4Simd9DeletableE"}
!15 = !{!"_ZTSN4Simd9ConvParamE", !16, i64 0, !20, i64 160, !7, i64 168, !21, i64 176}
!16 = !{!"_ZTS25SimdConvolutionParameters", !7, i64 0, !7, i64 8, !7, i64 16, !17, i64 24, !18, i64 28, !7, i64 32, !7, i64 40, !7, i64 48, !17, i64 56, !18, i64 60, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !19, i64 152}
!17 = !{!"_ZTS18SimdTensorDataType", !8, i64 0}
!18 = !{!"_ZTS20SimdTensorFormatType", !8, i64 0}
!19 = !{!"_ZTS29SimdConvolutionActivationType", !8, i64 0}
!20 = !{!"_ZTS8SimdBool", !8, i64 0}
!21 = !{!"_ZTS26SimdSynetCompatibilityType", !8, i64 0}
!22 = !{!"_ZTSN4Simd5ArrayIhEE", !23, i64 0, !7, i64 8}
!23 = !{!"any pointer", !8, i64 0}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !7, i64 8, !8, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !23, i64 0}
!26 = !{!"_ZTSN4Simd5ArrayItEE", !23, i64 0, !7, i64 8}
!27 = !{!"_ZTSN4Simd5ArrayIfEE", !23, i64 0, !7, i64 8}
!28 = !{!"bool", !8, i64 0}
!29 = !{!6, !7, i64 64}
!30 = !{!6, !7, i64 0}
!31 = !{!16, !7, i64 32}
!32 = !{!33, !33, i64 0}
!33 = !{!"short", !8, i64 0}
!34 = !{!35, !35, i64 0}
!35 = !{!"float", !8, i64 0}
!36 = distinct !{!36, !37, !38}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!"llvm.loop.unswitch.partial.disable"}
!39 = distinct !{!39, !37}
!40 = distinct !{!40, !37}


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