; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu/x86 (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 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_x8610TensorDescS_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) #1 {
  %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 %2, 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 %25, ptr noundef %26, ptr noundef %27, ptr noundef %28)
  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 %21, ptr noundef %22, ptr noundef %23, ptr noundef %24)
  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 %156 [
    i32 0, label %132
    i32 1, label %139
  ]

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 %158

139:                                              ; preds = %112
  %140 = load i32, ptr %18, align 4, !tbaa !13
  %141 = load i32, ptr %42, align 4, !tbaa !13
  %142 = mul i32 %140, %141
  %143 = load i32, ptr %43, align 4, !tbaa !13
  %144 = add i32 %143, 4
  %145 = mul i32 %142, %144
  %146 = load i32, ptr %18, align 4, !tbaa !13
  %147 = load i32, ptr %27, align 4, !tbaa !13
  %148 = mul i32 %146, %147
  %149 = load i32, ptr %28, align 4, !tbaa !13
  %150 = mul i32 %148, %149
  %151 = add i32 %145, %150
  %152 = load i32, ptr %18, align 4, !tbaa !13
  %153 = mul i32 %152, 4
  %154 = add i32 %151, %153
  %155 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 %154, ptr %155, align 4, !tbaa !13
  br label %158

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

158:                                              ; preds = %156, %139, %132
  %159 = load i32, ptr %11, align 4, !tbaa !16
  %160 = icmp eq i32 %159, 1
  br i1 %160, label %164, label %161

161:                                              ; preds = %158
  %162 = load i32, ptr %11, align 4, !tbaa !16
  %163 = icmp eq i32 %162, 10
  br i1 %163, label %164, label %173

164:                                              ; preds = %161, %158
  %165 = load i32, ptr %23, align 4, !tbaa !13
  %166 = load i32, ptr %24, align 4, !tbaa !13
  %167 = mul i32 %165, %166
  %168 = mul i32 %167, 16
  %169 = mul i32 %168, 16
  %170 = load ptr, ptr %8, align 8, !tbaa !9
  %171 = load i32, ptr %170, align 4, !tbaa !13
  %172 = add i32 %171, %169
  store i32 %172, ptr %170, align 4, !tbaa !13
  br label %173

173:                                              ; preds = %164, %161
  %174 = load i32, ptr %11, align 4, !tbaa !16
  %175 = call noundef i32 @_Z7bytesOf8DataType(i32 noundef %174)
  %176 = load ptr, ptr %8, align 8, !tbaa !9
  %177 = load i32, ptr %176, align 4, !tbaa !13
  %178 = mul i32 %177, %175
  store i32 %178, ptr %176, align 4, !tbaa !13
  %179 = load i32, ptr %14, align 4, !tbaa !18
  %180 = icmp ne i32 %179, 2
  br i1 %180, label %181, label %186

181:                                              ; preds = %173
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !15
  %182 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %45)
  %183 = load ptr, ptr %8, align 8, !tbaa !9
  %184 = load i32, ptr %183, align 4, !tbaa !13
  %185 = add i32 %184, %182
  store i32 %185, ptr %183, align 4, !tbaa !13
  br label %186

186:                                              ; preds = %181, %173
  %187 = load ptr, ptr %8, align 8, !tbaa !9
  %188 = load i32, ptr %187, align 4, !tbaa !13
  %189 = add i32 %188, 32
  store i32 %189, ptr %187, align 4, !tbaa !13
  %190 = 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 %190
}

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

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

declare i32 @fflush(ptr noundef) #3

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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}


; 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: 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_x8610TensorDescS_S_20ConvolutionParamSpec36DepthwiseConvolutionForwardAlgorithmPj(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr nocapture noundef readnone 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 #1 {
  %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 %2, ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %24)
  %.not33 = icmp eq i32 %49, 0
  br i1 %.not33, 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 %17, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20)
  %.not34 = icmp eq i32 %61, 0
  br i1 %.not34, 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
  %73 = getelementptr inbounds i8, ptr %3, i64 36
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %3, i64 40
  %76 = load i32, ptr %75, align 8, !tbaa !15
  %77 = getelementptr inbounds i8, ptr %3, i64 44
  %78 = load i32, ptr %77, align 4, !tbaa !16
  %79 = getelementptr inbounds i8, ptr %3, i64 48
  %80 = load i32, ptr %79, align 8, !tbaa !17
  %81 = load i32, ptr %15, align 4, !tbaa !18
  %82 = add i32 %76, %74
  %83 = add i32 %82, %81
  %84 = load i32, ptr %16, align 4, !tbaa !18
  %85 = add i32 %80, %78
  %86 = add i32 %85, %84
  switch i32 %4, label %98 [
    i32 0, label %87
    i32 1, label %91
  ]

87:                                               ; preds = %72
  %88 = load i32, ptr %14, align 4, !tbaa !18
  %89 = mul i32 %86, %83
  %90 = mul i32 %89, %88
  br label %98

91:                                               ; preds = %72
  %92 = load i32, ptr %14, align 4, !tbaa !18
  %93 = add i32 %86, 4
  %94 = mul i32 %93, %83
  %95 = load i32, ptr %23, align 4, !tbaa !18
  %96 = load i32, ptr %24, align 4, !tbaa !18
  %97 = mul i32 %96, %95
  %reass.add = add i32 %94, 4
  %reass.add36 = add i32 %reass.add, %97
  %reass.mul = mul i32 %reass.add36, %92
  br label %98

98:                                               ; preds = %72, %91, %87
  %.sink = phi i32 [ %reass.mul, %91 ], [ %90, %87 ], [ 0, %72 ]
  %.0 = phi i32 [ 0, %91 ], [ 0, %87 ], [ 2, %72 ]
  store i32 %.sink, ptr %5, align 4, !tbaa !18
  %99 = load i32, ptr %7, align 4
  switch i32 %99, label %106 [
    i32 10, label %100
    i32 1, label %100
  ]

100:                                              ; preds = %98, %98
  %101 = load i32, ptr %19, align 4, !tbaa !18
  %102 = load i32, ptr %20, align 4, !tbaa !18
  %103 = shl i32 %101, 8
  %104 = mul i32 %103, %102
  %105 = add i32 %.sink, %104
  store i32 %105, ptr %5, align 4, !tbaa !18
  br label %106

106:                                              ; preds = %98, %100
  %107 = call noundef i32 @_Z7bytesOf8DataType(i32 noundef %99)
  %108 = load i32, ptr %5, align 4, !tbaa !18
  %109 = mul i32 %108, %107
  store i32 %109, ptr %5, align 4, !tbaa !18
  %110 = load i32, ptr %10, align 4, !tbaa !19
  %.not35 = icmp eq i32 %110, 2
  br i1 %.not35, label %115, label %111

111:                                              ; preds = %106
  %112 = call noundef i32 @_Z14tensorNumBytes10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %113 = load i32, ptr %5, align 4, !tbaa !18
  %114 = add i32 %113, %112
  br label %115

115:                                              ; preds = %111, %106
  %116 = phi i32 [ %114, %111 ], [ %109, %106 ]
  %117 = add i32 %116, 32
  store i32 %117, ptr %5, align 4, !tbaa !18
  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 #2

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

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

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

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

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

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

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

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


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