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

; 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.PoolingParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8 }

@.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: mustprogress uwtable
define dso_local noundef i32 @_Z15pooling_general10TensorDescPKv16PoolingParamSpecPvS_S3_(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef byval(%struct.PoolingParamSpec) align 8 %2, ptr noundef %3, ptr noundef byval(%struct.TensorDesc) align 8 %4, ptr noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %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 %struct.TensorDesc, align 8
  %28 = alloca i32, align 4
  %29 = alloca %struct.TensorDesc, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.TensorDesc, align 8
  %33 = alloca i32, align 4
  %34 = alloca %struct.TensorDesc, align 8
  %35 = alloca i32, align 4
  %36 = alloca %struct.TensorDesc, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca %struct.TensorDesc, align 8
  %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 i32, align 4
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %5, ptr %10, align 8, !tbaa !5
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = icmp eq ptr null, %46
  br i1 %47, label %51, label %48

48:                                               ; preds = %6
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = icmp eq ptr null, %49
  br i1 %50, label %51, label %67

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

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

66:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %67

67:                                               ; preds = %66, %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !13
  %68 = call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %27)
  %69 = icmp ne i8 %68, 0
  br i1 %69, label %70, label %103

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !13
  %71 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %29, ptr noundef %13, ptr noundef %15, ptr noundef %17, ptr noundef %18, ptr noundef %20, ptr noundef %21)
  store i32 %71, ptr %28, align 4, !tbaa !9
  %72 = load i32, ptr %28, align 4, !tbaa !9
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %86

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

86:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !13
  %87 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %32, ptr noundef %14, ptr noundef %16, ptr noundef %22, ptr noundef %23, ptr noundef %25, ptr noundef %26)
  store i32 %87, ptr %31, align 4, !tbaa !9
  %88 = load i32, ptr %31, align 4, !tbaa !9
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %102

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %91 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %92 = trunc i64 %91 to i32
  store i32 %92, ptr %33, align 4, !tbaa !11
  %93 = load i32, ptr %33, align 4, !tbaa !11
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %93)
  %95 = load ptr, ptr @stdout, align 8, !tbaa !5
  %96 = call i32 @fflush(ptr noundef %95)
  %97 = load i32, ptr %31, align 4, !tbaa !9
  %98 = call ptr @ee2str(i32 noundef %97)
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %98)
  %100 = load ptr, ptr @stdout, align 8, !tbaa !5
  %101 = call i32 @fflush(ptr noundef %100)
  call void @exit(i32 noundef 1) #8
  unreachable

102:                                              ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  store i32 1, ptr %24, align 4, !tbaa !11
  store i32 1, ptr %19, align 4, !tbaa !11
  br label %141

103:                                              ; preds = %67
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !13
  %104 = call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %34)
  %105 = icmp ne i8 %104, 0
  br i1 %105, label %106, label %139

106:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !13
  %107 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %36, ptr noundef %13, ptr noundef %15, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  store i32 %107, ptr %35, align 4, !tbaa !9
  %108 = load i32, ptr %35, align 4, !tbaa !9
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %122

110:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  %111 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %112 = trunc i64 %111 to i32
  store i32 %112, ptr %37, align 4, !tbaa !11
  %113 = load i32, ptr %37, align 4, !tbaa !11
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %113)
  %115 = load ptr, ptr @stdout, align 8, !tbaa !5
  %116 = call i32 @fflush(ptr noundef %115)
  %117 = load i32, ptr %35, align 4, !tbaa !9
  %118 = call ptr @ee2str(i32 noundef %117)
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %118)
  %120 = load ptr, ptr @stdout, align 8, !tbaa !5
  %121 = call i32 @fflush(ptr noundef %120)
  call void @exit(i32 noundef 1) #8
  unreachable

122:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !13
  %123 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %39, ptr noundef %14, ptr noundef %16, ptr noundef %22, ptr noundef %23, ptr noundef %24, ptr noundef %25, ptr noundef %26)
  store i32 %123, ptr %38, align 4, !tbaa !9
  %124 = load i32, ptr %38, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %138

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  %127 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %128 = trunc i64 %127 to i32
  store i32 %128, ptr %40, align 4, !tbaa !11
  %129 = load i32, ptr %40, align 4, !tbaa !11
  %130 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %129)
  %131 = load ptr, ptr @stdout, align 8, !tbaa !5
  %132 = call i32 @fflush(ptr noundef %131)
  %133 = load i32, ptr %38, align 4, !tbaa !9
  %134 = call ptr @ee2str(i32 noundef %133)
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %134)
  %136 = load ptr, ptr @stdout, align 8, !tbaa !5
  %137 = call i32 @fflush(ptr noundef %136)
  call void @exit(i32 noundef 1) #8
  unreachable

138:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  br label %140

139:                                              ; preds = %103
  store i32 51, ptr %7, align 4
  store i32 1, ptr %41, align 4
  br label %188

140:                                              ; preds = %138
  br label %141

141:                                              ; preds = %140, %102
  %142 = load i32, ptr %17, align 4, !tbaa !11
  %143 = load i32, ptr %22, align 4, !tbaa !11
  %144 = icmp ne i32 %142, %143
  br i1 %144, label %153, label %145

145:                                              ; preds = %141
  %146 = load i32, ptr %18, align 4, !tbaa !11
  %147 = load i32, ptr %23, align 4, !tbaa !11
  %148 = icmp ne i32 %146, %147
  br i1 %148, label %153, label %149

149:                                              ; preds = %145
  %150 = load i32, ptr %16, align 4, !tbaa !16
  %151 = load i32, ptr %15, align 4, !tbaa !16
  %152 = icmp ne i32 %150, %151
  br i1 %152, label %153, label %169

153:                                              ; preds = %149, %145, %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 2, ptr %42, align 4, !tbaa !9
  %154 = load i32, ptr %42, align 4, !tbaa !9
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %168

156:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  %157 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %158 = trunc i64 %157 to i32
  store i32 %158, ptr %43, align 4, !tbaa !11
  %159 = load i32, ptr %43, align 4, !tbaa !11
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %159)
  %161 = load ptr, ptr @stdout, align 8, !tbaa !5
  %162 = call i32 @fflush(ptr noundef %161)
  %163 = load i32, ptr %42, align 4, !tbaa !9
  %164 = call ptr @ee2str(i32 noundef %163)
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %164)
  %166 = load ptr, ptr @stdout, align 8, !tbaa !5
  %167 = call i32 @fflush(ptr noundef %166)
  call void @exit(i32 noundef 1) #8
  unreachable

168:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %169

169:                                              ; preds = %168, %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  store i32 1, ptr %44, align 4, !tbaa !11
  %170 = load i32, ptr %15, align 4, !tbaa !16
  %171 = icmp eq i32 %170, 22
  br i1 %171, label %172, label %173

172:                                              ; preds = %169
  store i32 4, ptr %44, align 4, !tbaa !11
  br label %183

173:                                              ; preds = %169
  %174 = load i32, ptr %15, align 4, !tbaa !16
  %175 = icmp eq i32 %174, 2
  br i1 %175, label %176, label %177

176:                                              ; preds = %173
  store i32 8, ptr %44, align 4, !tbaa !11
  br label %182

177:                                              ; preds = %173
  %178 = load i32, ptr %15, align 4, !tbaa !16
  %179 = icmp eq i32 %178, 41
  br i1 %179, label %180, label %181

180:                                              ; preds = %177
  store i32 16, ptr %44, align 4, !tbaa !11
  br label %181

181:                                              ; preds = %180, %177
  br label %182

182:                                              ; preds = %181, %176
  br label %183

183:                                              ; preds = %182, %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #7
  store i32 0, ptr %45, align 4, !tbaa !9
  %184 = load i32, ptr %13, align 4, !tbaa !14
  switch i32 %184, label %185 [
  ]

185:                                              ; preds = %183
  store i32 51, ptr %45, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %45, align 4, !tbaa !9
  store i32 %187, ptr %7, align 4
  store i32 1, ptr %41, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  br label %188

188:                                              ; preds = %186, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %189 = load i32, ptr %7, align 4
  ret i32 %189
}

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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #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 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #4

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"_ZTS2EE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 4, !14, i64 4, i64 4, !16, i64 8, i64 4, !11, i64 12, i64 80, !18}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS8DataType", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS10DataFormat", !7, i64 0}
!18 = !{!7, !7, i64 0}


; 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.PoolingParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8 }

@.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 nounwind uwtable
define dso_local noundef i32 @_Z15pooling_general10TensorDescPKv16PoolingParamSpecPvS_S3_(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr noundef readnone %1, ptr nocapture noundef readnone byval(%struct.PoolingParamSpec) align 8 %2, ptr nocapture noundef readnone %3, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %4, ptr noundef readnone %5) local_unnamed_addr #0 {
  %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 = icmp eq ptr %1, null
  %22 = icmp eq ptr %5, null
  %or.cond = or i1 %21, %22
  br i1 %or.cond, label %23, label %33

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

33:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #6
  %34 = tail call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %.not = icmp eq i8 %34, 0
  br i1 %.not, label %60, label %35

35:                                               ; preds = %33
  %36 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %14, ptr noundef nonnull %15)
  %.not29 = icmp eq i32 %36, 0
  br i1 %.not29, label %47, label %37

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

47:                                               ; preds = %35
  %48 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %19, ptr noundef nonnull %20)
  %.not30 = icmp eq i32 %48, 0
  br i1 %.not30, label %59, label %49

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

59:                                               ; preds = %47
  store i32 1, ptr %18, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %86

60:                                               ; preds = %33
  %61 = tail call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %.not26 = icmp eq i8 %61, 0
  br i1 %.not26, label %105, label %62

62:                                               ; preds = %60
  %63 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15)
  %.not27 = icmp eq i32 %63, 0
  br i1 %.not27, label %74, label %64

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

74:                                               ; preds = %62
  %75 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20)
  %.not28 = icmp eq i32 %75, 0
  br i1 %.not28, label %86, label %76

76:                                               ; preds = %74
  %77 = call i64 (i64, ...) @syscall(i64 noundef 186) #6
  %78 = trunc i64 %77 to i32
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %78)
  %80 = load ptr, ptr @stdout, align 8, !tbaa !5
  %81 = call i32 @fflush(ptr noundef %80)
  %82 = call ptr @ee2str(i32 noundef %75)
  %83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %82)
  %84 = load ptr, ptr @stdout, align 8, !tbaa !5
  %85 = call i32 @fflush(ptr noundef %84)
  call void @exit(i32 noundef 1) #7
  unreachable

86:                                               ; preds = %74, %59
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %.not31 = icmp eq i32 %87, %88
  br i1 %.not31, label %89, label %95

89:                                               ; preds = %86
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = load i32, ptr %17, align 4, !tbaa !9
  %.not32 = icmp eq i32 %90, %91
  br i1 %.not32, label %92, label %95

92:                                               ; preds = %89
  %93 = load i32, ptr %10, align 4, !tbaa !11
  %94 = load i32, ptr %9, align 4, !tbaa !11
  %.not33 = icmp eq i32 %93, %94
  br i1 %.not33, label %105, label %95

95:                                               ; preds = %86, %89, %92
  %96 = call i64 (i64, ...) @syscall(i64 noundef 186) #6
  %97 = trunc i64 %96 to i32
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %97)
  %99 = load ptr, ptr @stdout, align 8, !tbaa !5
  %100 = call i32 @fflush(ptr noundef %99)
  %101 = call ptr @ee2str(i32 noundef 2)
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %101)
  %103 = load ptr, ptr @stdout, align 8, !tbaa !5
  %104 = call i32 @fflush(ptr noundef %103)
  call void @exit(i32 noundef 1) #7
  unreachable

105:                                              ; preds = %92, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  ret i32 51
}

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #4

; 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 nounwind uwtable
declare dso_local noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #4

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

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


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