; 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd7AlignHiEmm(i64 noundef, i64 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base27SynetConvolution16bNchwGemm7ForwardEPKhPtPfPh(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #2 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %27 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 1
  store ptr %27, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %28 = getelementptr inbounds %"class.Simd::Base::SynetConvolution16bNchwGemm", ptr %26, i32 0, i32 1
  store ptr %28, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %29

29:                                               ; preds = %278, %5
  %30 = load i64, ptr %13, align 8, !tbaa !9
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %31, i32 0, i32 6
  %33 = load i64, ptr %32, align 8, !tbaa !11
  %34 = icmp ult i64 %30, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %29
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %280

36:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %37 = load i64, ptr %13, align 8, !tbaa !9
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %38, i32 0, i32 7
  %40 = load i64, ptr %39, align 8, !tbaa !16
  %41 = add i64 %37, %40
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %42, i32 0, i32 6
  %44 = load i64, ptr %43, align 8, !tbaa !11
  %45 = call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %41, i64 noundef %44)
  store i64 %45, ptr %15, align 8, !tbaa !9
  %46 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 9
  %47 = load i8, ptr %46, align 2, !tbaa !19, !range !31, !noundef !32
  %48 = trunc i8 %47 to i1
  br i1 %48, label %61, label %49

49:                                               ; preds = %36
  %50 = getelementptr inbounds %"class.Simd::Base::SynetConvolution16bNchwGemm", ptr %26, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !33
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = load i64, ptr %13, align 8, !tbaa !9
  %56 = load i64, ptr %15, align 8, !tbaa !9
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %57, i32 0, i32 0
  %59 = load i64, ptr %58, align 8, !tbaa !35
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  call void %51(ptr noundef %52, ptr noundef nonnull align 8 dereferenceable(180) %53, ptr noundef nonnull align 8 dereferenceable(112) %54, i64 noundef %55, i64 noundef %56, i64 noundef 0, i64 noundef %59, ptr noundef %60)
  br label %61

61:                                               ; preds = %49, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %272, %61
  %63 = load i64, ptr %16, align 8, !tbaa !9
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %64, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !36
  %67 = icmp ult i64 %63, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %62
  store i32 4, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %278

69:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %70, i32 0, i32 11
  %72 = load i64, ptr %71, align 8, !tbaa !37
  %73 = load i64, ptr %16, align 8, !tbaa !9
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %74, i32 0, i32 8
  %76 = load i64, ptr %75, align 8, !tbaa !38
  %77 = add i64 %73, %76
  %78 = call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %72, i64 noundef %77)
  %79 = load i64, ptr %16, align 8, !tbaa !9
  %80 = sub i64 %78, %79
  store i64 %80, ptr %17, align 8, !tbaa !9
  %81 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 9
  %82 = load i8, ptr %81, align 2, !tbaa !19, !range !31, !noundef !32
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %97

84:                                               ; preds = %69
  %85 = getelementptr inbounds %"class.Simd::Base::SynetConvolution16bNchwGemm", ptr %26, i32 0, i32 2
  %86 = load ptr, ptr %85, align 8, !tbaa !33
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = load i64, ptr %13, align 8, !tbaa !9
  %91 = load i64, ptr %15, align 8, !tbaa !9
  %92 = load i64, ptr %16, align 8, !tbaa !9
  %93 = load i64, ptr %16, align 8, !tbaa !9
  %94 = load i64, ptr %17, align 8, !tbaa !9
  %95 = add i64 %93, %94
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  call void %86(ptr noundef %87, ptr noundef nonnull align 8 dereferenceable(180) %88, ptr noundef nonnull align 8 dereferenceable(112) %89, i64 noundef %90, i64 noundef %91, i64 noundef %92, i64 noundef %95, ptr noundef %96)
  br label %97

97:                                               ; preds = %84, %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %98 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 9
  %99 = load i8, ptr %98, align 2, !tbaa !19, !range !31, !noundef !32
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %102

101:                                              ; preds = %97
  br label %108

102:                                              ; preds = %97
  %103 = load i64, ptr %16, align 8, !tbaa !9
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %104, i32 0, i32 2
  %106 = load i64, ptr %105, align 8, !tbaa !39
  %107 = mul i64 %103, %106
  br label %108

108:                                              ; preds = %102, %101
  %109 = phi i64 [ 0, %101 ], [ %107, %102 ]
  store i64 %109, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %110 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 5
  %111 = getelementptr inbounds %"struct.Simd::Array.1", ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !40
  store ptr %112, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %113 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 6
  %114 = getelementptr inbounds %"struct.Simd::Array.1", ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !41
  store ptr %115, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %265, %108
  %117 = load i64, ptr %21, align 8, !tbaa !9
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %118, i32 0, i32 5
  %120 = load i64, ptr %119, align 8, !tbaa !42
  %121 = icmp ult i64 %117, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %116
  store i32 7, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %271

123:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %124, i32 0, i32 5
  %126 = load i64, ptr %125, align 8, !tbaa !42
  %127 = load i64, ptr %21, align 8, !tbaa !9
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %128, i32 0, i32 6
  %130 = load i64, ptr %129, align 8, !tbaa !43
  %131 = add i64 %127, %130
  %132 = call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %126, i64 noundef %131)
  %133 = load i64, ptr %21, align 8, !tbaa !9
  %134 = sub i64 %132, %133
  store i64 %134, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %135, i32 0, i32 8
  %137 = load i64, ptr %136, align 8, !tbaa !38
  %138 = load ptr, ptr %12, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %138, i32 0, i32 11
  %140 = load i64, ptr %139, align 8, !tbaa !37
  %141 = icmp ult i64 %137, %140
  br i1 %141, label %142, label %158

142:                                              ; preds = %123
  %143 = load i64, ptr %21, align 8, !tbaa !9
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %144, i32 0, i32 6
  %146 = load i64, ptr %145, align 8, !tbaa !11
  %147 = mul i64 %143, %146
  %148 = load i64, ptr %13, align 8, !tbaa !9
  %149 = add i64 %147, %148
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %150, i32 0, i32 7
  %152 = load i64, ptr %151, align 8, !tbaa !44
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %153, i32 0, i32 2
  %155 = load i64, ptr %154, align 8, !tbaa !39
  %156 = call noundef i64 @_ZN4Simd7AlignHiEmm(i64 noundef %152, i64 noundef %155)
  %157 = mul i64 %149, %156
  br label %159

158:                                              ; preds = %123
  br label %159

159:                                              ; preds = %158, %142
  %160 = phi i64 [ %157, %142 ], [ 0, %158 ]
  store i64 %160, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %161 = load i64, ptr %21, align 8, !tbaa !9
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %162, i32 0, i32 6
  %164 = load i64, ptr %163, align 8, !tbaa !11
  %165 = mul i64 %161, %164
  %166 = load i64, ptr %13, align 8, !tbaa !9
  %167 = add i64 %165, %166
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %168, i32 0, i32 7
  %170 = load i64, ptr %169, align 8, !tbaa !44
  %171 = mul i64 %167, %170
  %172 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 11
  %173 = load i64, ptr %172, align 8, !tbaa !45
  %174 = mul i64 %171, %173
  store i64 %174, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %175 = getelementptr inbounds %"class.Simd::SynetConvolution16b", ptr %26, i32 0, i32 4
  %176 = getelementptr inbounds %"struct.Simd::Array.0", ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !46
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %178, i32 0, i32 9
  %180 = load i64, ptr %179, align 8, !tbaa !47
  %181 = load i64, ptr %16, align 8, !tbaa !9
  %182 = mul i64 %180, %181
  %183 = getelementptr inbounds i16, ptr %177, i64 %182
  %184 = load i64, ptr %21, align 8, !tbaa !9
  %185 = load i64, ptr %17, align 8, !tbaa !9
  %186 = mul i64 %184, %185
  %187 = getelementptr inbounds i16, ptr %183, i64 %186
  store ptr %187, ptr %25, align 8, !tbaa !5
  %188 = load i64, ptr %16, align 8, !tbaa !9
  %189 = load i64, ptr %17, align 8, !tbaa !9
  %190 = add i64 %188, %189
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %191, i32 0, i32 11
  %193 = load i64, ptr %192, align 8, !tbaa !37
  %194 = icmp eq i64 %190, %193
  br i1 %194, label %195, label %225

195:                                              ; preds = %159
  %196 = getelementptr inbounds %"class.Simd::Base::SynetConvolution16bNchwGemm", ptr %26, i32 0, i32 3
  %197 = getelementptr inbounds [2 x ptr], ptr %196, i64 0, i64 1
  %198 = load ptr, ptr %197, align 8, !tbaa !5
  %199 = load ptr, ptr %25, align 8, !tbaa !5
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = load ptr, ptr %12, align 8, !tbaa !5
  %202 = load i64, ptr %22, align 8, !tbaa !9
  %203 = load i64, ptr %15, align 8, !tbaa !9
  %204 = load i64, ptr %13, align 8, !tbaa !9
  %205 = sub i64 %203, %204
  %206 = load i64, ptr %17, align 8, !tbaa !9
  %207 = load i64, ptr %17, align 8, !tbaa !9
  %208 = load ptr, ptr %12, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %208, i32 0, i32 11
  %210 = load i64, ptr %209, align 8, !tbaa !37
  %211 = icmp eq i64 %207, %210
  %212 = zext i1 %211 to i64
  %213 = select i1 %211, i32 1, i32 0
  %214 = load ptr, ptr %8, align 8, !tbaa !5
  %215 = load i64, ptr %18, align 8, !tbaa !9
  %216 = getelementptr inbounds i16, ptr %214, i64 %215
  %217 = load ptr, ptr %19, align 8, !tbaa !5
  %218 = load ptr, ptr %20, align 8, !tbaa !5
  %219 = load ptr, ptr %9, align 8, !tbaa !5
  %220 = load i64, ptr %23, align 8, !tbaa !9
  %221 = getelementptr inbounds float, ptr %219, i64 %220
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = load i64, ptr %24, align 8, !tbaa !9
  %224 = getelementptr inbounds i8, ptr %222, i64 %223
  call void %198(ptr noundef %199, ptr noundef nonnull align 8 dereferenceable(180) %200, ptr noundef nonnull align 8 dereferenceable(112) %201, i64 noundef %202, i64 noundef %205, i64 noundef %206, i32 noundef %213, ptr noundef %216, ptr noundef %217, ptr noundef %218, ptr noundef %221, ptr noundef %224)
  br label %252

225:                                              ; preds = %159
  %226 = getelementptr inbounds %"class.Simd::Base::SynetConvolution16bNchwGemm", ptr %26, i32 0, i32 3
  %227 = getelementptr inbounds [2 x ptr], ptr %226, i64 0, i64 0
  %228 = load ptr, ptr %227, align 8, !tbaa !5
  %229 = load ptr, ptr %25, align 8, !tbaa !5
  %230 = load ptr, ptr %11, align 8, !tbaa !5
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = load i64, ptr %22, align 8, !tbaa !9
  %233 = load i64, ptr %15, align 8, !tbaa !9
  %234 = load i64, ptr %13, align 8, !tbaa !9
  %235 = sub i64 %233, %234
  %236 = load i64, ptr %17, align 8, !tbaa !9
  %237 = load i64, ptr %16, align 8, !tbaa !9
  %238 = icmp eq i64 %237, 0
  %239 = zext i1 %238 to i64
  %240 = select i1 %238, i32 1, i32 0
  %241 = load ptr, ptr %8, align 8, !tbaa !5
  %242 = load i64, ptr %18, align 8, !tbaa !9
  %243 = getelementptr inbounds i16, ptr %241, i64 %242
  %244 = load ptr, ptr %19, align 8, !tbaa !5
  %245 = load ptr, ptr %20, align 8, !tbaa !5
  %246 = load ptr, ptr %9, align 8, !tbaa !5
  %247 = load i64, ptr %23, align 8, !tbaa !9
  %248 = getelementptr inbounds float, ptr %246, i64 %247
  %249 = load ptr, ptr %10, align 8, !tbaa !5
  %250 = load i64, ptr %24, align 8, !tbaa !9
  %251 = getelementptr inbounds i8, ptr %249, i64 %250
  call void %228(ptr noundef %229, ptr noundef nonnull align 8 dereferenceable(180) %230, ptr noundef nonnull align 8 dereferenceable(112) %231, i64 noundef %232, i64 noundef %235, i64 noundef %236, i32 noundef %240, ptr noundef %243, ptr noundef %244, ptr noundef %245, ptr noundef %248, ptr noundef %251)
  br label %252

252:                                              ; preds = %225, %195
  %253 = load i64, ptr %22, align 8, !tbaa !9
  %254 = load ptr, ptr %19, align 8, !tbaa !5
  %255 = getelementptr inbounds float, ptr %254, i64 %253
  store ptr %255, ptr %19, align 8, !tbaa !5
  %256 = load ptr, ptr %11, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %256, i32 0, i32 21
  %258 = load i32, ptr %257, align 8, !tbaa !48
  %259 = icmp eq i32 %258, 4
  br i1 %259, label %260, label %264

260:                                              ; preds = %252
  %261 = load i64, ptr %22, align 8, !tbaa !9
  %262 = load ptr, ptr %20, align 8, !tbaa !5
  %263 = getelementptr inbounds float, ptr %262, i64 %261
  store ptr %263, ptr %20, align 8, !tbaa !5
  br label %264

264:                                              ; preds = %260, %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br label %265

265:                                              ; preds = %264
  %266 = load ptr, ptr %12, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %266, i32 0, i32 6
  %268 = load i64, ptr %267, align 8, !tbaa !43
  %269 = load i64, ptr %21, align 8, !tbaa !9
  %270 = add i64 %269, %268
  store i64 %270, ptr %21, align 8, !tbaa !9
  br label %116, !llvm.loop !49

271:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br label %272

272:                                              ; preds = %271
  %273 = load ptr, ptr %12, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.Simd::Base::SynetConvolution16bNchwGemm::AlgParam", ptr %273, i32 0, i32 8
  %275 = load i64, ptr %274, align 8, !tbaa !38
  %276 = load i64, ptr %16, align 8, !tbaa !9
  %277 = add i64 %276, %275
  store i64 %277, ptr %16, align 8, !tbaa !9
  br label %62, !llvm.loop !51

278:                                              ; preds = %68
  %279 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %279, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %29, !llvm.loop !52

280:                                              ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 40}
!12 = !{!"_ZTS25SimdConvolutionParameters", !10, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !14, i64 28, !10, i64 32, !10, i64 40, !10, i64 48, !13, i64 56, !14, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !15, i64 152}
!13 = !{!"_ZTS18SimdTensorDataType", !7, i64 0}
!14 = !{!"_ZTS20SimdTensorFormatType", !7, i64 0}
!15 = !{!"_ZTS29SimdConvolutionActivationType", !7, i64 0}
!16 = !{!17, !10, i64 56}
!17 = !{!"_ZTSN4Simd4Base27SynetConvolution16bNchwGemm8AlgParamE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !18, i64 104, !18, i64 108}
!18 = !{!"int", !7, i64 0}
!19 = !{!20, !30, i64 290}
!20 = !{!"_ZTSN4Simd19SynetConvolution16bE", !21, i64 0, !22, i64 8, !25, i64 192, !26, i64 208, !28, i64 240, !29, i64 256, !29, i64 272, !30, i64 288, !30, i64 289, !30, i64 290, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320}
!21 = !{!"_ZTSN4Simd9DeletableE"}
!22 = !{!"_ZTSN4Simd9ConvParamE", !12, i64 0, !23, i64 160, !10, i64 168, !24, i64 176}
!23 = !{!"_ZTS8SimdBool", !7, i64 0}
!24 = !{!"_ZTS26SimdSynetCompatibilityType", !7, i64 0}
!25 = !{!"_ZTSN4Simd5ArrayIhEE", !6, i64 0, !10, i64 8}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !27, i64 0, !10, i64 8, !7, i64 16}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!28 = !{!"_ZTSN4Simd5ArrayItEE", !6, i64 0, !10, i64 8}
!29 = !{!"_ZTSN4Simd5ArrayIfEE", !6, i64 0, !10, i64 8}
!30 = !{!"bool", !7, i64 0}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!34, !6, i64 440}
!34 = !{!"_ZTSN4Simd4Base27SynetConvolution16bNchwGemmE", !20, i64 0, !17, i64 328, !6, i64 440, !7, i64 448}
!35 = !{!12, !10, i64 0}
!36 = !{!17, !10, i64 0}
!37 = !{!17, !10, i64 88}
!38 = !{!17, !10, i64 64}
!39 = !{!17, !10, i64 16}
!40 = !{!20, !6, i64 256}
!41 = !{!20, !6, i64 272}
!42 = !{!12, !10, i64 32}
!43 = !{!17, !10, i64 48}
!44 = !{!12, !10, i64 48}
!45 = !{!20, !10, i64 304}
!46 = !{!20, !6, i64 240}
!47 = !{!17, !10, i64 72}
!48 = !{!12, !15, i64 152}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}
!51 = distinct !{!51, !50}
!52 = distinct !{!52, !50}


; 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd7AlignHiEmm(i64 noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Simd4Base27SynetConvolution16bNchwGemm7ForwardEPKhPtPfPh(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 align 2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = getelementptr inbounds i8, ptr %0, i64 328
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %._crit_edge112, label %.lr.ph111

.lr.ph111:                                        ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 384
  %11 = getelementptr inbounds i8, ptr %0, i64 290
  %12 = getelementptr inbounds i8, ptr %0, i64 440
  %13 = getelementptr inbounds i8, ptr %0, i64 416
  %14 = getelementptr inbounds i8, ptr %0, i64 392
  %15 = getelementptr inbounds i8, ptr %0, i64 344
  %16 = getelementptr inbounds i8, ptr %0, i64 256
  %17 = getelementptr inbounds i8, ptr %0, i64 272
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  %19 = getelementptr inbounds i8, ptr %0, i64 376
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = getelementptr inbounds i8, ptr %0, i64 304
  %22 = getelementptr inbounds i8, ptr %0, i64 240
  %23 = getelementptr inbounds i8, ptr %0, i64 400
  %24 = getelementptr inbounds i8, ptr %0, i64 160
  br label %27

.loopexit:                                        ; preds = %._crit_edge, %37
  %25 = load i64, ptr %8, align 8, !tbaa !5
  %26 = icmp ult i64 %31, %25
  br i1 %26, label %27, label %._crit_edge112, !llvm.loop !13

._crit_edge112:                                   ; preds = %.loopexit, %5
  ret void

27:                                               ; preds = %.lr.ph111, %.loopexit
  %28 = phi i64 [ %9, %.lr.ph111 ], [ %25, %.loopexit ]
  %.0109 = phi i64 [ 0, %.lr.ph111 ], [ %31, %.loopexit ]
  %29 = load i64, ptr %10, align 8, !tbaa !15
  %30 = add i64 %29, %.0109
  %31 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %30, i64 noundef %28)
  %32 = load i8, ptr %11, align 2, !tbaa !18, !range !31, !noundef !32
  %33 = trunc nuw i8 %32 to i1
  br i1 %33, label %37, label %34

34:                                               ; preds = %27
  %35 = load ptr, ptr %12, align 8, !tbaa !33
  %36 = load i64, ptr %6, align 8, !tbaa !35
  tail call void %35(ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(180) %6, ptr noundef nonnull align 8 dereferenceable(112) %7, i64 noundef %.0109, i64 noundef %31, i64 noundef 0, i64 noundef %36, ptr noundef %2)
  br label %37

37:                                               ; preds = %34, %27
  %38 = load i64, ptr %7, align 8, !tbaa !36
  %.not113 = icmp eq i64 %38, 0
  br i1 %.not113, label %.loopexit, label %.lr.ph108

.lr.ph108:                                        ; preds = %37
  %39 = sub i64 %31, %.0109
  %.pre = load i64, ptr %14, align 8, !tbaa !37
  br label %40

40:                                               ; preds = %.lr.ph108, %._crit_edge
  %41 = phi i64 [ %.pre, %.lr.ph108 ], [ %60, %._crit_edge ]
  %.096106 = phi i64 [ 0, %.lr.ph108 ], [ %61, %._crit_edge ]
  %42 = load i64, ptr %13, align 8, !tbaa !38
  %43 = add i64 %41, %.096106
  %44 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %42, i64 noundef %43)
  %45 = sub i64 %44, %.096106
  %46 = load i8, ptr %11, align 2, !tbaa !18, !range !31, !noundef !32
  %47 = trunc nuw i8 %46 to i1
  br i1 %47, label %48, label %50

48:                                               ; preds = %40
  %49 = load ptr, ptr %12, align 8, !tbaa !33
  tail call void %49(ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(180) %6, ptr noundef nonnull align 8 dereferenceable(112) %7, i64 noundef %.0109, i64 noundef %31, i64 noundef %.096106, i64 noundef %44, ptr noundef %2)
  br label %50

50:                                               ; preds = %48, %40
  %51 = load i64, ptr %18, align 8, !tbaa !39
  %.not114 = icmp eq i64 %51, 0
  br i1 %.not114, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %50
  %52 = load ptr, ptr %17, align 8, !tbaa !40
  %53 = load ptr, ptr %16, align 8, !tbaa !41
  %54 = load i8, ptr %11, align 2, !tbaa !18, !range !31, !noundef !32
  %55 = trunc nuw i8 %54 to i1
  %56 = load i64, ptr %15, align 8
  %57 = mul i64 %56, %.096106
  %58 = select i1 %55, i64 0, i64 %57
  %59 = getelementptr inbounds i16, ptr %2, i64 %58
  %.pre115 = load i64, ptr %19, align 8, !tbaa !42
  %.119.v = icmp eq i64 %.096106, 0
  %.119 = zext i1 %.119.v to i32
  br label %64

._crit_edge:                                      ; preds = %81, %50
  %60 = load i64, ptr %14, align 8, !tbaa !37
  %61 = add i64 %60, %.096106
  %62 = load i64, ptr %7, align 8, !tbaa !36
  %63 = icmp ult i64 %61, %62
  br i1 %63, label %40, label %.loopexit, !llvm.loop !43

64:                                               ; preds = %.lr.ph, %81
  %65 = phi i64 [ %.pre115, %.lr.ph ], [ %104, %81 ]
  %66 = phi i64 [ %51, %.lr.ph ], [ %106, %81 ]
  %.097105 = phi ptr [ %53, %.lr.ph ], [ %101, %81 ]
  %.098104 = phi i64 [ 0, %.lr.ph ], [ %105, %81 ]
  %.099103 = phi ptr [ %52, %.lr.ph ], [ %spec.select, %81 ]
  %67 = add i64 %65, %.098104
  %68 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %66, i64 noundef %67)
  %69 = sub i64 %68, %.098104
  %70 = load i64, ptr %14, align 8, !tbaa !37
  %71 = load i64, ptr %13, align 8, !tbaa !38
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %73, label %81

73:                                               ; preds = %64
  %74 = load i64, ptr %8, align 8, !tbaa !5
  %75 = mul i64 %74, %.098104
  %76 = add i64 %75, %.0109
  %77 = load i64, ptr %20, align 8, !tbaa !44
  %78 = load i64, ptr %15, align 8, !tbaa !45
  %79 = tail call noundef i64 @_ZN4Simd7AlignHiEmm(i64 noundef %77, i64 noundef %78)
  %80 = mul i64 %79, %76
  %.pre116 = load i64, ptr %13, align 8, !tbaa !38
  br label %81

81:                                               ; preds = %64, %73
  %82 = phi i64 [ %.pre116, %73 ], [ %71, %64 ]
  %83 = phi i64 [ %80, %73 ], [ 0, %64 ]
  %84 = load i64, ptr %8, align 8, !tbaa !5
  %85 = mul i64 %84, %.098104
  %86 = add i64 %85, %.0109
  %87 = load i64, ptr %20, align 8, !tbaa !44
  %88 = mul i64 %86, %87
  %89 = load i64, ptr %21, align 8, !tbaa !46
  %90 = mul i64 %88, %89
  %91 = load ptr, ptr %22, align 8, !tbaa !47
  %92 = load i64, ptr %23, align 8, !tbaa !48
  %93 = mul i64 %92, %.096106
  %94 = getelementptr inbounds i16, ptr %91, i64 %93
  %95 = mul i64 %.098104, %45
  %96 = getelementptr inbounds i16, ptr %94, i64 %95
  %97 = icmp eq i64 %44, %82
  %98 = getelementptr inbounds float, ptr %3, i64 %83
  %99 = getelementptr inbounds i8, ptr %4, i64 %90
  %..v = select i1 %97, i64 456, i64 448
  %. = getelementptr inbounds i8, ptr %0, i64 %..v
  %100 = load ptr, ptr %., align 8, !tbaa !49
  tail call void %100(ptr noundef %96, ptr noundef nonnull align 8 dereferenceable(180) %6, ptr noundef nonnull align 8 dereferenceable(112) %7, i64 noundef %69, i64 noundef %39, i64 noundef %45, i32 noundef %.119, ptr noundef %59, ptr noundef %.097105, ptr noundef %.099103, ptr noundef %98, ptr noundef %99)
  %101 = getelementptr inbounds float, ptr %.097105, i64 %69
  %102 = load i32, ptr %24, align 8, !tbaa !50
  %103 = icmp eq i32 %102, 4
  %spec.select.idx = select i1 %103, i64 %69, i64 0
  %spec.select = getelementptr inbounds float, ptr %.099103, i64 %spec.select.idx
  %104 = load i64, ptr %19, align 8, !tbaa !42
  %105 = add i64 %104, %.098104
  %106 = load i64, ptr %18, align 8, !tbaa !39
  %107 = icmp ult i64 %105, %106
  br i1 %107, label %64, label %._crit_edge, !llvm.loop !51
}

attributes #0 = { 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 #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" }

!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 40}
!6 = !{!"_ZTS25SimdConvolutionParameters", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 28, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !11, 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, !12, i64 152}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS18SimdTensorDataType", !8, i64 0}
!11 = !{!"_ZTS20SimdTensorFormatType", !8, i64 0}
!12 = !{!"_ZTS29SimdConvolutionActivationType", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !7, i64 56}
!16 = !{!"_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, !17, i64 104, !17, i64 108}
!17 = !{!"int", !8, i64 0}
!18 = !{!19, !30, i64 290}
!19 = !{!"_ZTSN4Simd19SynetConvolution16bE", !20, i64 0, !21, i64 8, !24, i64 192, !26, i64 208, !28, i64 240, !29, i64 256, !29, i64 272, !30, i64 288, !30, i64 289, !30, i64 290, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320}
!20 = !{!"_ZTSN4Simd9DeletableE"}
!21 = !{!"_ZTSN4Simd9ConvParamE", !6, i64 0, !22, i64 160, !7, i64 168, !23, i64 176}
!22 = !{!"_ZTS8SimdBool", !8, i64 0}
!23 = !{!"_ZTS26SimdSynetCompatibilityType", !8, i64 0}
!24 = !{!"_ZTSN4Simd5ArrayIhEE", !25, i64 0, !7, i64 8}
!25 = !{!"any pointer", !8, i64 0}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !27, i64 0, !7, i64 8, !8, i64 16}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !25, i64 0}
!28 = !{!"_ZTSN4Simd5ArrayItEE", !25, i64 0, !7, i64 8}
!29 = !{!"_ZTSN4Simd5ArrayIfEE", !25, i64 0, !7, i64 8}
!30 = !{!"bool", !8, i64 0}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!34, !25, i64 440}
!34 = !{!"_ZTSN4Simd4Base27SynetConvolution16bNchwGemmE", !19, i64 0, !16, i64 328, !25, i64 440, !8, i64 448}
!35 = !{!6, !7, i64 0}
!36 = !{!16, !7, i64 0}
!37 = !{!16, !7, i64 64}
!38 = !{!16, !7, i64 88}
!39 = !{!6, !7, i64 32}
!40 = !{!19, !25, i64 272}
!41 = !{!19, !25, i64 256}
!42 = !{!16, !7, i64 48}
!43 = distinct !{!43, !14}
!44 = !{!6, !7, i64 48}
!45 = !{!16, !7, i64 16}
!46 = !{!19, !7, i64 304}
!47 = !{!19, !25, i64 240}
!48 = !{!16, !7, i64 72}
!49 = !{!25, !25, i64 0}
!50 = !{!6, !12, i64 152}
!51 = distinct !{!51, !14}


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