; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu/arm (depthwise_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 }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 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: 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) #1

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

; 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 noundef i32 @_Z49depthwise_convolution_infer_forward_tmp_bytes_arm10TensorDescS_S_20ConvolutionParamSpec36DepthwiseConvolutionForwardAlgorithmPj(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef byval(%struct.TensorDesc) align 8 %1, ptr noundef byval(%struct.TensorDesc) align 8 %2, ptr noundef byval(%struct.ConvolutionParamSpec) align 8 %3, i32 noundef %4, ptr noundef %5) #3 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %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 %struct.TensorDesc, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %struct.TensorDesc, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %struct.TensorDesc, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca %struct.TensorDesc, align 8
  store i32 %4, ptr %7, align 4, !tbaa !5
  store ptr %5, ptr %8, align 8, !tbaa !9
  %46 = load ptr, ptr %8, align 8, !tbaa !9
  %47 = icmp eq ptr null, %46
  br i1 %47, label %48, label %64

48:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !11
  %49 = load i32, ptr %9, align 4, !tbaa !11
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %63

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %52 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %53 = trunc i64 %52 to i32
  store i32 %53, ptr %10, align 4, !tbaa !13
  %54 = load i32, ptr %10, align 4, !tbaa !13
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %54)
  %56 = load ptr, ptr @stdout, align 8, !tbaa !9
  %57 = call i32 @fflush(ptr noundef %56)
  %58 = load i32, ptr %9, align 4, !tbaa !11
  %59 = call ptr @ee2str(i32 noundef %58)
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %59)
  %61 = load ptr, ptr @stdout, align 8, !tbaa !9
  %62 = call i32 @fflush(ptr noundef %61)
  call void @exit(i32 noundef 1) #9
  unreachable

63:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %64

64:                                               ; preds = %63, %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !15
  %65 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %30, ptr noundef %11, ptr noundef %14, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20)
  store i32 %65, ptr %29, align 4, !tbaa !11
  %66 = load i32, ptr %29, align 4, !tbaa !11
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %80

68:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %69 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %31, align 4, !tbaa !13
  %71 = load i32, ptr %31, align 4, !tbaa !13
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %71)
  %73 = load ptr, ptr @stdout, align 8, !tbaa !9
  %74 = call i32 @fflush(ptr noundef %73)
  %75 = load i32, ptr %29, align 4, !tbaa !11
  %76 = call ptr @ee2str(i32 noundef %75)
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %76)
  %78 = load ptr, ptr @stdout, align 8, !tbaa !9
  %79 = call i32 @fflush(ptr noundef %78)
  call void @exit(i32 noundef 1) #9
  unreachable

80:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 8 %1, i64 92, i1 false), !tbaa.struct !15
  %81 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %33, ptr noundef %12, ptr noundef %15, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24)
  store i32 %81, ptr %32, align 4, !tbaa !11
  %82 = load i32, ptr %32, align 4, !tbaa !11
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %96

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %85 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %86 = trunc i64 %85 to i32
  store i32 %86, ptr %34, align 4, !tbaa !13
  %87 = load i32, ptr %34, align 4, !tbaa !13
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %87)
  %89 = load ptr, ptr @stdout, align 8, !tbaa !9
  %90 = call i32 @fflush(ptr noundef %89)
  %91 = load i32, ptr %32, align 4, !tbaa !11
  %92 = call ptr @ee2str(i32 noundef %91)
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %92)
  %94 = load ptr, ptr @stdout, align 8, !tbaa !9
  %95 = call i32 @fflush(ptr noundef %94)
  call void @exit(i32 noundef 1) #9
  unreachable

96:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 8 %2, i64 92, i1 false), !tbaa.struct !15
  %97 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %36, ptr noundef %13, ptr noundef %16, ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %28)
  store i32 %97, ptr %35, align 4, !tbaa !11
  %98 = load i32, ptr %35, align 4, !tbaa !11
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %112

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %101 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %102 = trunc i64 %101 to i32
  store i32 %102, ptr %37, align 4, !tbaa !13
  %103 = load i32, ptr %37, align 4, !tbaa !13
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %103)
  %105 = load ptr, ptr @stdout, align 8, !tbaa !9
  %106 = call i32 @fflush(ptr noundef %105)
  %107 = load i32, ptr %35, align 4, !tbaa !11
  %108 = call ptr @ee2str(i32 noundef %107)
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %108)
  %110 = load ptr, ptr @stdout, align 8, !tbaa !9
  %111 = call i32 @fflush(ptr noundef %110)
  call void @exit(i32 noundef 1) #9
  unreachable

112:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  %113 = getelementptr inbounds %struct.ConvolutionParamSpec, ptr %3, i32 0, i32 9
  %114 = load i32, ptr %113, align 4, !tbaa !21
  store i32 %114, ptr %38, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %115 = getelementptr inbounds %struct.ConvolutionParamSpec, ptr %3, i32 0, i32 10
  %116 = load i32, ptr %115, align 8, !tbaa !26
  store i32 %116, ptr %39, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  %117 = getelementptr inbounds %struct.ConvolutionParamSpec, ptr %3, i32 0, i32 11
  %118 = load i32, ptr %117, align 4, !tbaa !27
  store i32 %118, ptr %40, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %119 = getelementptr inbounds %struct.ConvolutionParamSpec, ptr %3, i32 0, i32 12
  %120 = load i32, ptr %119, align 8, !tbaa !28
  store i32 %120, ptr %41, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  %121 = load i32, ptr %19, align 4, !tbaa !13
  %122 = load i32, ptr %38, align 4, !tbaa !13
  %123 = add i32 %121, %122
  %124 = load i32, ptr %39, align 4, !tbaa !13
  %125 = add i32 %123, %124
  store i32 %125, ptr %42, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  %126 = load i32, ptr %20, align 4, !tbaa !13
  %127 = load i32, ptr %40, align 4, !tbaa !13
  %128 = add i32 %126, %127
  %129 = load i32, ptr %41, align 4, !tbaa !13
  %130 = add i32 %128, %129
  store i32 %130, ptr %43, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  store i32 0, ptr %44, align 4, !tbaa !11
  %131 = load i32, ptr %7, align 4, !tbaa !5
  switch i32 %131, label %139 [
    i32 0, label %132
  ]

132:                                              ; preds = %112
  %133 = load i32, ptr %18, align 4, !tbaa !13
  %134 = load i32, ptr %42, align 4, !tbaa !13
  %135 = mul i32 %133, %134
  %136 = load i32, ptr %43, align 4, !tbaa !13
  %137 = mul i32 %135, %136
  %138 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 %137, ptr %138, align 4, !tbaa !13
  br label %141

139:                                              ; preds = %112
  store i32 2, ptr %44, align 4, !tbaa !11
  %140 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 0, ptr %140, align 4, !tbaa !13
  br label %141

141:                                              ; preds = %139, %132
  %142 = load i32, ptr %11, align 4, !tbaa !16
  %143 = call noundef i32 @_Z7bytesOf8DataType(i32 noundef %142)
  %144 = load ptr, ptr %8, align 8, !tbaa !9
  %145 = load i32, ptr %144, align 4, !tbaa !13
  %146 = mul i32 %145, %143
  store i32 %146, ptr %144, align 4, !tbaa !13
  %147 = getelementptr inbounds %struct.TensorDesc, ptr %1, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !29
  switch i32 %148, label %149 [
  ]

149:                                              ; preds = %141
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %14, align 4, !tbaa !18
  %152 = icmp ne i32 %151, 2
  br i1 %152, label %153, label %158

153:                                              ; preds = %150
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !15
  %154 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %45)
  %155 = load ptr, ptr %8, align 8, !tbaa !9
  %156 = load i32, ptr %155, align 4, !tbaa !13
  %157 = add i32 %156, %154
  store i32 %157, ptr %155, align 4, !tbaa !13
  br label %158

158:                                              ; preds = %153, %150
  %159 = load ptr, ptr %8, align 8, !tbaa !9
  %160 = load i32, ptr %159, align 4, !tbaa !13
  %161 = add i32 %160, 32
  store i32 %161, ptr %159, align 4, !tbaa !13
  %162 = load i32, ptr %44, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  ret i32 %162
}

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

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

declare i32 @fflush(ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #6

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

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

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

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


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

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 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: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 3) i32 @_Z49depthwise_convolution_infer_forward_tmp_bytes_arm10TensorDescS_S_20ConvolutionParamSpec36DepthwiseConvolutionForwardAlgorithmPj(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %1, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %2, ptr nocapture noundef readonly byval(%struct.ConvolutionParamSpec) align 8 %3, i32 noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = icmp eq ptr %5, null
  br i1 %25, label %26, label %36

26:                                               ; preds = %6
  %27 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %28 = trunc i64 %27 to i32
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %28)
  %30 = load ptr, ptr @stdout, align 8, !tbaa !5
  %31 = tail call i32 @fflush(ptr noundef %30)
  %32 = tail call ptr @ee2str(i32 noundef 1)
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %32)
  %34 = load ptr, ptr @stdout, align 8, !tbaa !5
  %35 = tail call i32 @fflush(ptr noundef %34)
  tail call void @exit(i32 noundef 1) #8
  unreachable

36:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  %37 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0, ptr noundef nonnull %7, ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16)
  %.not = icmp eq i32 %37, 0
  br i1 %.not, label %48, label %38

38:                                               ; preds = %36
  %39 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %40 = trunc i64 %39 to i32
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %40)
  %42 = load ptr, ptr @stdout, align 8, !tbaa !5
  %43 = call i32 @fflush(ptr noundef %42)
  %44 = call ptr @ee2str(i32 noundef %37)
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %44)
  %46 = load ptr, ptr @stdout, align 8, !tbaa !5
  %47 = call i32 @fflush(ptr noundef %46)
  call void @exit(i32 noundef 1) #8
  unreachable

48:                                               ; preds = %36
  %49 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %1, ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20)
  %.not28 = icmp eq i32 %49, 0
  br i1 %.not28, label %60, label %50

50:                                               ; preds = %48
  %51 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %52 = trunc i64 %51 to i32
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %52)
  %54 = load ptr, ptr @stdout, align 8, !tbaa !5
  %55 = call i32 @fflush(ptr noundef %54)
  %56 = call ptr @ee2str(i32 noundef %49)
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %56)
  %58 = load ptr, ptr @stdout, align 8, !tbaa !5
  %59 = call i32 @fflush(ptr noundef %58)
  call void @exit(i32 noundef 1) #8
  unreachable

60:                                               ; preds = %48
  %61 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %2, ptr noundef nonnull %9, ptr noundef nonnull %12, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %24)
  %.not29 = icmp eq i32 %61, 0
  br i1 %.not29, label %72, label %62

62:                                               ; preds = %60
  %63 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %64 = trunc i64 %63 to i32
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %64)
  %66 = load ptr, ptr @stdout, align 8, !tbaa !5
  %67 = call i32 @fflush(ptr noundef %66)
  %68 = call ptr @ee2str(i32 noundef %61)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %68)
  %70 = load ptr, ptr @stdout, align 8, !tbaa !5
  %71 = call i32 @fflush(ptr noundef %70)
  call void @exit(i32 noundef 1) #8
  unreachable

72:                                               ; preds = %60
  %cond = icmp eq i32 %4, 0
  br i1 %cond, label %73, label %91

73:                                               ; preds = %72
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %3, i64 44
  %76 = load i32, ptr %75, align 4, !tbaa !11
  %77 = add i32 %76, %74
  %78 = getelementptr inbounds i8, ptr %3, i64 48
  %79 = load i32, ptr %78, align 8, !tbaa !16
  %80 = add i32 %77, %79
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = getelementptr inbounds i8, ptr %3, i64 36
  %83 = load i32, ptr %82, align 4, !tbaa !17
  %84 = add i32 %83, %81
  %85 = getelementptr inbounds i8, ptr %3, i64 40
  %86 = load i32, ptr %85, align 8, !tbaa !18
  %87 = add i32 %84, %86
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = mul i32 %87, %80
  %90 = mul i32 %89, %88
  br label %91

91:                                               ; preds = %72, %73
  %storemerge = phi i32 [ %90, %73 ], [ 0, %72 ]
  %.0 = phi i32 [ 0, %73 ], [ 2, %72 ]
  store i32 %storemerge, ptr %5, align 4, !tbaa !9
  %92 = load i32, ptr %7, align 4, !tbaa !19
  %93 = call noundef i32 @_Z7bytesOf8DataType(i32 noundef %92)
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = mul i32 %94, %93
  store i32 %95, ptr %5, align 4, !tbaa !9
  %96 = load i32, ptr %10, align 4, !tbaa !21
  %.not30 = icmp eq i32 %96, 2
  br i1 %.not30, label %101, label %97

97:                                               ; preds = %91
  %98 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %99 = load i32, ptr %5, align 4, !tbaa !9
  %100 = add i32 %99, %98
  br label %101

101:                                              ; preds = %97, %91
  %102 = phi i32 [ %100, %97 ], [ %95, %91 ]
  %103 = add i32 %102, 32
  store i32 %103, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  ret i32 %.0
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7bytesOf8DataType(i32 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 "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 = { 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 #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 44}
!12 = !{!"_ZTS20ConvolutionParamSpec", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !13, i64 72, !14, i64 76, !14, i64 80, !7, i64 84, !15, i64 92, !10, i64 96, !10, i64 100, !10, i64 104}
!13 = !{!"_ZTS15ConvolutionMode", !7, i64 0}
!14 = !{!"_ZTS14ActivationMode", !7, i64 0}
!15 = !{!"_ZTS9RoundMode", !7, i64 0}
!16 = !{!12, !10, i64 48}
!17 = !{!12, !10, i64 36}
!18 = !{!12, !10, i64 40}
!19 = !{!20, !20, i64 0}
!20 = !{!"_ZTS8DataType", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"_ZTS10DataFormat", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass