; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu/arm (convolution)

; 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.ConvolutionParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %union.ActivationSpec, i32, i32, i32, i32 }
%union.ActivationSpec = type { %struct.ClipParamSpec }
%struct.ClipParamSpec = type { float, float }
%struct.ActivationParamSpec = type { i32, [4 x float] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #1

declare i32 @printf(ptr noundef, ...) #2

declare i32 @fflush(ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; 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) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15convolution_arm10TensorDescPvS_PKv20ConvolutionParamSpec27ConvolutionForwardAlgorithmS_S2_S_S2_jS0_S_S0_19ActivationParamSpec4Arch(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef byval(%struct.TensorDesc) align 8 %2, ptr noundef %3, ptr noundef byval(%struct.ConvolutionParamSpec) align 8 %4, i32 noundef %5, ptr noundef byval(%struct.TensorDesc) align 8 %6, ptr noundef %7, ptr noundef byval(%struct.TensorDesc) align 8 %8, ptr noundef %9, i32 noundef %10, ptr noundef %11, ptr noundef byval(%struct.TensorDesc) align 8 %12, ptr noundef %13, ptr noundef byval(%struct.ActivationParamSpec) align 8 %14, i32 noundef %15) #5 {
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca %struct.TensorDesc, align 4
  %35 = alloca %struct.TensorDesc, align 8
  %36 = alloca %struct.TensorDesc, align 8
  %37 = alloca %struct.TensorDesc, align 8
  %38 = alloca %struct.TensorDesc, align 8
  %39 = alloca %struct.TensorDesc, align 4
  %40 = alloca %struct.TensorDesc, align 4
  %41 = alloca %struct.TensorDesc, align 4
  %42 = alloca %struct.TensorDesc, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca ptr, align 8
  %46 = alloca %struct.TensorDesc, align 8
  %47 = alloca ptr, align 8
  %48 = alloca %struct.TensorDesc, align 8
  %49 = alloca ptr, align 8
  %50 = alloca %struct.TensorDesc, align 8
  %51 = alloca ptr, align 8
  %52 = alloca %struct.TensorDesc, align 8
  store ptr %1, ptr %17, align 8, !tbaa !5
  store ptr %3, ptr %18, align 8, !tbaa !5
  store i32 %5, ptr %19, align 4, !tbaa !9
  store ptr %7, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  store i32 %10, ptr %22, align 4, !tbaa !11
  store ptr %11, ptr %23, align 8, !tbaa !5
  store ptr %13, ptr %24, align 8, !tbaa !5
  store i32 %15, ptr %25, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %53 = getelementptr inbounds %struct.ConvolutionParamSpec, ptr %4, i32 0, i32 13
  %54 = load i32, ptr %53, align 4, !tbaa !15
  store i32 %54, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %55 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 2
  %56 = load i32, ptr %55, align 8, !tbaa !20
  %57 = sub i32 %56, 1
  store i32 %57, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %58 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 2
  %59 = load i32, ptr %58, align 8, !tbaa !20
  %60 = sub i32 %59, 2
  store i32 %60, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %61 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 2
  %62 = load i32, ptr %61, align 8, !tbaa !20
  %63 = sub i32 %62, 1
  store i32 %63, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !11
  %64 = load i32, ptr %26, align 4, !tbaa !11
  %65 = icmp ugt i32 %64, 1
  br i1 %65, label %66, label %84

66:                                               ; preds = %16
  %67 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %68 = load i32, ptr %27, align 4, !tbaa !11
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds [20 x i32], ptr %67, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !11
  %72 = icmp eq i32 %71, 1
  br i1 %72, label %83, label %73

73:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %74 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %75 = trunc i64 %74 to i32
  store i32 %75, ptr %31, align 4, !tbaa !11
  %76 = load i32, ptr %31, align 4, !tbaa !11
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %76)
  %78 = load ptr, ptr @stdout, align 8, !tbaa !5
  %79 = call i32 @fflush(ptr noundef %78)
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %81 = load ptr, ptr @stdout, align 8, !tbaa !5
  %82 = call i32 @fflush(ptr noundef %81)
  call void @exit(i32 noundef 1) #8
  unreachable

83:                                               ; preds = %66
  br label %84

84:                                               ; preds = %83, %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %85 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %86 = load i32, ptr %28, align 4, !tbaa !11
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds [20 x i32], ptr %85, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !11
  %90 = load i32, ptr %26, align 4, !tbaa !11
  %91 = udiv i32 %89, %90
  store i32 %91, ptr %32, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %92 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !24
  %94 = icmp eq i32 %93, 2
  br i1 %94, label %95, label %113

95:                                               ; preds = %84
  %96 = load i32, ptr %32, align 4, !tbaa !11
  %97 = urem i32 %96, 8
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %113

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 92, ptr %34) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !25
  %100 = getelementptr inbounds %struct.TensorDesc, ptr %34, i32 0, i32 1
  store i32 0, ptr %100, align 4, !tbaa !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !25
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %34, i64 92, i1 false), !tbaa.struct !25
  %102 = load ptr, ptr %23, align 8, !tbaa !5
  %103 = call noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef byval(%struct.TensorDesc) align 8 %35, ptr noundef %101, ptr noundef byval(%struct.TensorDesc) align 8 %36, ptr noundef %102)
  %104 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %104, ptr %33, align 8, !tbaa !5
  %105 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %34, i64 92, i1 false), !tbaa.struct !25
  %106 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %37)
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %105, i64 %107
  store ptr %108, ptr %23, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %34, i64 92, i1 false), !tbaa.struct !25
  %109 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %38)
  %110 = load i32, ptr %22, align 4, !tbaa !11
  %111 = sub i32 %110, %109
  store i32 %111, ptr %22, align 4, !tbaa !11
  %112 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 1
  store i32 0, ptr %112, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 92, ptr %34) #7
  br label %115

113:                                              ; preds = %95, %84
  %114 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %114, ptr %33, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %113, %99
  call void @llvm.lifetime.start.p0(i64 92, ptr %39) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !25
  %116 = load i32, ptr %26, align 4, !tbaa !11
  %117 = getelementptr inbounds %struct.TensorDesc, ptr %39, i32 0, i32 3
  %118 = load i32, ptr %28, align 4, !tbaa !11
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [20 x i32], ptr %117, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !11
  %122 = udiv i32 %121, %116
  store i32 %122, ptr %120, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 92, ptr %40) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 8 %12, i64 92, i1 false), !tbaa.struct !25
  %123 = load i32, ptr %26, align 4, !tbaa !11
  %124 = getelementptr inbounds %struct.TensorDesc, ptr %40, i32 0, i32 3
  %125 = load i32, ptr %28, align 4, !tbaa !11
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds [20 x i32], ptr %124, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !11
  %129 = udiv i32 %128, %123
  store i32 %129, ptr %127, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 92, ptr %41) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 8 %2, i64 92, i1 false), !tbaa.struct !25
  %130 = load i32, ptr %26, align 4, !tbaa !11
  %131 = getelementptr inbounds %struct.TensorDesc, ptr %41, i32 0, i32 3
  %132 = load i32, ptr %29, align 4, !tbaa !11
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds [20 x i32], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !11
  %136 = udiv i32 %135, %130
  store i32 %136, ptr %134, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 92, ptr %42) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 8 %8, i64 92, i1 false), !tbaa.struct !25
  %137 = load i32, ptr %26, align 4, !tbaa !11
  %138 = getelementptr inbounds %struct.TensorDesc, ptr %42, i32 0, i32 3
  %139 = load i32, ptr %30, align 4, !tbaa !11
  %140 = zext i32 %139 to i64
  %141 = getelementptr inbounds [20 x i32], ptr %138, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !11
  %143 = udiv i32 %142, %137
  store i32 %143, ptr %141, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  store i32 0, ptr %43, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  store i32 0, ptr %44, align 4, !tbaa !11
  br label %144

144:                                              ; preds = %178, %115
  %145 = load i32, ptr %44, align 4, !tbaa !11
  %146 = load i32, ptr %26, align 4, !tbaa !11
  %147 = icmp ult i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  br label %181

149:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %150 = load ptr, ptr %33, align 8, !tbaa !5
  %151 = load i32, ptr %44, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %39, i64 92, i1 false), !tbaa.struct !25
  %152 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %46)
  %153 = mul i32 %151, %152
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds i8, ptr %150, i64 %154
  store ptr %155, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %156 = load ptr, ptr %18, align 8, !tbaa !5
  %157 = load i32, ptr %44, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %41, i64 92, i1 false), !tbaa.struct !25
  %158 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %48)
  %159 = mul i32 %157, %158
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds i8, ptr %156, i64 %160
  store ptr %161, ptr %47, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #7
  %162 = load ptr, ptr %21, align 8, !tbaa !5
  %163 = load i32, ptr %44, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %42, i64 92, i1 false), !tbaa.struct !25
  %164 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %50)
  %165 = mul i32 %163, %164
  %166 = zext i32 %165 to i64
  %167 = getelementptr inbounds i8, ptr %162, i64 %166
  store ptr %167, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #7
  %168 = load ptr, ptr %24, align 8, !tbaa !5
  %169 = load i32, ptr %44, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %52, ptr align 4 %40, i64 92, i1 false), !tbaa.struct !25
  %170 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %52)
  %171 = mul i32 %169, %170
  %172 = zext i32 %171 to i64
  %173 = getelementptr inbounds i8, ptr %168, i64 %172
  store ptr %173, ptr %51, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 0
  %175 = load i32, ptr %174, align 8, !tbaa !31
  switch i32 %175, label %176 [
  ]

176:                                              ; preds = %149
  store i32 51, ptr %43, align 4, !tbaa !29
  br label %177

177:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %44, align 4, !tbaa !11
  %180 = add i32 %179, 1
  store i32 %180, ptr %44, align 4, !tbaa !11
  br label %144, !llvm.loop !32

181:                                              ; preds = %148
  %182 = load i32, ptr %43, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  ret i32 %182
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #6

declare noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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 = !{!"_ZTS27ConvolutionForwardAlgorithm", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS4Arch", !7, i64 0}
!15 = !{!16, !12, i64 52}
!16 = !{!"_ZTS20ConvolutionParamSpec", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !17, i64 72, !18, i64 76, !18, i64 80, !7, i64 84, !19, i64 92, !12, i64 96, !12, i64 100, !12, i64 104}
!17 = !{!"_ZTS15ConvolutionMode", !7, i64 0}
!18 = !{!"_ZTS14ActivationMode", !7, i64 0}
!19 = !{!"_ZTS9RoundMode", !7, i64 0}
!20 = !{!21, !12, i64 8}
!21 = !{!"_ZTS10TensorDesc", !22, i64 0, !23, i64 4, !12, i64 8, !7, i64 12}
!22 = !{!"_ZTS8DataType", !7, i64 0}
!23 = !{!"_ZTS10DataFormat", !7, i64 0}
!24 = !{!21, !23, i64 4}
!25 = !{i64 0, i64 4, !26, i64 4, i64 4, !27, i64 8, i64 4, !11, i64 12, i64 80, !28}
!26 = !{!22, !22, i64 0}
!27 = !{!23, !23, i64 0}
!28 = !{!7, !7, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"_ZTS2EE", !7, i64 0}
!31 = !{!21, !22, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; 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.ConvolutionParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %union.ActivationSpec, i32, i32, i32, i32 }
%union.ActivationSpec = type { %struct.ClipParamSpec }
%struct.ClipParamSpec = type { float, float }
%struct.ActivationParamSpec = type { i32, [4 x float] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; 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 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) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 52) i32 @_Z15convolution_arm10TensorDescPvS_PKv20ConvolutionParamSpec27ConvolutionForwardAlgorithmS_S2_S_S2_jS0_S_S0_19ActivationParamSpec4Arch(ptr nocapture noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %2, ptr nocapture noundef readnone %3, ptr nocapture noundef readonly byval(%struct.ConvolutionParamSpec) align 8 %4, i32 noundef %5, ptr nocapture noundef readnone byval(%struct.TensorDesc) align 8 %6, ptr nocapture noundef readnone %7, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %8, ptr nocapture noundef readnone %9, i32 noundef %10, ptr noundef %11, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %12, ptr nocapture noundef readnone %13, ptr nocapture noundef readnone byval(%struct.ActivationParamSpec) align 8 %14, i32 noundef %15) local_unnamed_addr #5 {
  %.sroa.7 = alloca { i32, [20 x i32] }, align 8
  %17 = alloca %struct.TensorDesc, align 8
  %18 = alloca %struct.TensorDesc, align 8
  %19 = alloca %struct.TensorDesc, align 8
  %20 = alloca %struct.TensorDesc, align 8
  %21 = alloca %struct.TensorDesc, align 8
  %22 = alloca %struct.TensorDesc, align 8
  %23 = alloca %struct.TensorDesc, align 8
  %24 = getelementptr inbounds i8, ptr %4, i64 52
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !13
  %28 = add i32 %27, -2
  %29 = getelementptr inbounds i8, ptr %2, i64 8
  %30 = load i32, ptr %29, align 8, !tbaa !13
  %31 = add i32 %30, -1
  %32 = icmp ugt i32 %25, 1
  br i1 %32, label %33, label %49

33:                                               ; preds = %16
  %34 = add i32 %27, -1
  %35 = getelementptr inbounds i8, ptr %0, i64 12
  %36 = zext i32 %34 to i64
  %37 = getelementptr inbounds [20 x i32], ptr %35, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !17
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %49, label %40

40:                                               ; preds = %33
  %41 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %42 = trunc i64 %41 to i32
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %42)
  %44 = load ptr, ptr @stdout, align 8, !tbaa !18
  %45 = tail call i32 @fflush(ptr noundef %44)
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %47 = load ptr, ptr @stdout, align 8, !tbaa !18
  %48 = tail call i32 @fflush(ptr noundef %47)
  tail call void @exit(i32 noundef 1) #10
  unreachable

49:                                               ; preds = %33, %16
  %50 = zext i32 %28 to i64
  %51 = getelementptr inbounds i8, ptr %0, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !20
  %53 = icmp eq i32 %52, 2
  br i1 %53, label %54, label %64

54:                                               ; preds = %49
  %55 = getelementptr inbounds i8, ptr %0, i64 12
  %56 = getelementptr inbounds [20 x i32], ptr %55, i64 0, i64 %50
  %57 = load i32, ptr %56, align 4, !tbaa !17
  %58 = udiv i32 %57, %25
  %59 = and i32 %58, 7
  %.not = icmp eq i32 %59, 0
  br i1 %.not, label %64, label %60

60:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 84, ptr nonnull %.sroa.7)
  %.sroa.0.0.copyload = load i32, ptr %0, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7, ptr noundef nonnull align 8 dereferenceable(84) %26, i64 84, i1 false), !tbaa.struct !22
  store i32 %.sroa.0.0.copyload, ptr %17, align 8, !tbaa !21
  %.sroa.6.0..sroa_idx10 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 0, ptr %.sroa.6.0..sroa_idx10, align 4, !tbaa !24
  %.sroa.7.0..sroa_idx16 = getelementptr inbounds i8, ptr %17, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7.0..sroa_idx16, ptr noundef nonnull align 8 dereferenceable(84) %26, i64 84, i1 false)
  %61 = tail call noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %17, ptr noundef %11)
  store i32 %.sroa.0.0.copyload, ptr %18, align 8, !tbaa !21
  %.sroa.6.0..sroa_idx12 = getelementptr inbounds i8, ptr %18, i64 4
  store i32 0, ptr %.sroa.6.0..sroa_idx12, align 4, !tbaa !24
  %.sroa.7.0..sroa_idx17 = getelementptr inbounds i8, ptr %18, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7.0..sroa_idx17, ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7, i64 84, i1 false), !tbaa.struct !22
  %62 = tail call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %18)
  store i32 %.sroa.0.0.copyload, ptr %19, align 8, !tbaa !21
  %.sroa.6.0..sroa_idx14 = getelementptr inbounds i8, ptr %19, i64 4
  store i32 0, ptr %.sroa.6.0..sroa_idx14, align 4, !tbaa !24
  %.sroa.7.0..sroa_idx18 = getelementptr inbounds i8, ptr %19, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7.0..sroa_idx18, ptr noundef nonnull align 8 dereferenceable(84) %.sroa.7, i64 84, i1 false), !tbaa.struct !22
  %63 = tail call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %19)
  store i32 0, ptr %51, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %.sroa.7)
  br label %64

64:                                               ; preds = %49, %54, %60
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %20) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %20, ptr noundef nonnull align 8 dereferenceable(92) %0, i64 92, i1 false), !tbaa.struct !25
  %65 = getelementptr inbounds i8, ptr %20, i64 12
  %66 = getelementptr inbounds [20 x i32], ptr %65, i64 0, i64 %50
  %67 = load i32, ptr %66, align 4, !tbaa !17
  %68 = udiv i32 %67, %25
  store i32 %68, ptr %66, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %21) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %21, ptr noundef nonnull align 8 dereferenceable(92) %12, i64 92, i1 false), !tbaa.struct !25
  %69 = getelementptr inbounds i8, ptr %21, i64 12
  %70 = getelementptr inbounds [20 x i32], ptr %69, i64 0, i64 %50
  %71 = load i32, ptr %70, align 4, !tbaa !17
  %72 = udiv i32 %71, %25
  store i32 %72, ptr %70, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %22) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %22, ptr noundef nonnull align 8 dereferenceable(92) %2, i64 92, i1 false), !tbaa.struct !25
  %73 = getelementptr inbounds i8, ptr %22, i64 12
  %74 = zext i32 %31 to i64
  %75 = getelementptr inbounds [20 x i32], ptr %73, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !17
  %77 = udiv i32 %76, %25
  store i32 %77, ptr %75, align 4, !tbaa !17
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 12
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 16
  %78 = udiv i32 %.sroa.4.0.copyload, %25
  %.sroa.4.0..sroa_idx45 = getelementptr inbounds i8, ptr %23, i64 12
  %.sroa.6.0..sroa_idx47 = getelementptr inbounds i8, ptr %23, i64 16
  %umax = tail call i32 @llvm.umax.i32(i32 %25, i32 1)
  br label %80

79:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %21) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %20) #9
  ret i32 51

80:                                               ; preds = %64, %80
  %.04448 = phi i32 [ 0, %64 ], [ %85, %80 ]
  %81 = tail call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %20)
  %82 = tail call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %22)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %23, ptr noundef nonnull align 8 dereferenceable(12) %8, i64 12, i1 false)
  store i32 %78, ptr %.sroa.4.0..sroa_idx45, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(76) %.sroa.6.0..sroa_idx47, ptr noundef nonnull align 8 dereferenceable(76) %.sroa.6.0..sroa_idx, i64 76, i1 false)
  %83 = tail call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %23)
  %84 = tail call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %21)
  %85 = add nuw i32 %.04448, 1
  %exitcond.not = icmp eq i32 %85, %umax
  br i1 %exitcond.not, label %79, label %80, !llvm.loop !26
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #6

declare noundef i32 @_Z15transformToNCHW10TensorDescPKvS_Pv(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef) local_unnamed_addr #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { "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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { 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, !7, i64 52}
!6 = !{!"_ZTS20ConvolutionParamSpec", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !10, i64 72, !11, i64 76, !11, i64 80, !8, i64 84, !12, i64 92, !7, i64 96, !7, i64 100, !7, i64 104}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS15ConvolutionMode", !8, i64 0}
!11 = !{!"_ZTS14ActivationMode", !8, i64 0}
!12 = !{!"_ZTS9RoundMode", !8, i64 0}
!13 = !{!14, !7, i64 8}
!14 = !{!"_ZTS10TensorDesc", !15, i64 0, !16, i64 4, !7, i64 8, !8, i64 12}
!15 = !{!"_ZTS8DataType", !8, i64 0}
!16 = !{!"_ZTS10DataFormat", !8, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !8, i64 0}
!20 = !{!14, !16, i64 4}
!21 = !{!15, !15, i64 0}
!22 = !{i64 0, i64 4, !17, i64 4, i64 80, !23}
!23 = !{!8, !8, i64 0}
!24 = !{!16, !16, i64 0}
!25 = !{i64 0, i64 4, !21, i64 4, i64 4, !24, i64 8, i64 4, !17, i64 12, i64 80, !23}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass