; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu/arm (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 @_Z11pooling_arm10TensorDescPKv16PoolingParamSpecPvS_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 %struct.TensorDesc, align 8
  %26 = alloca i32, align 4
  %27 = alloca %struct.TensorDesc, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %struct.TensorDesc, align 8
  %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 i32, align 4
  %37 = alloca %struct.TensorDesc, align 8
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca ptr, align 8
  %42 = 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
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = icmp eq ptr null, %43
  br i1 %44, label %48, label %45

45:                                               ; preds = %6
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = icmp eq ptr null, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %45, %6
  store i32 1, ptr %7, align 4
  br label %188

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  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.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !9
  %50 = call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %25)
  %51 = icmp ne i8 %50, 0
  br i1 %51, label %52, label %89

52:                                               ; preds = %49
  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 !9
  %53 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %27, ptr noundef %11, ptr noundef %13, ptr noundef %15, ptr noundef %16, ptr noundef %18, ptr noundef %19)
  store i32 %53, ptr %26, align 4, !tbaa !17
  %54 = load i32, ptr %26, align 4, !tbaa !17
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %68

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

68:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !9
  %69 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %30, ptr noundef %12, ptr noundef %14, ptr noundef %20, ptr noundef %21, ptr noundef %23, ptr noundef %24)
  store i32 %69, ptr %29, align 4, !tbaa !17
  %70 = load i32, ptr %29, align 4, !tbaa !17
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %84

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

84:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  store i32 1, ptr %22, align 4, !tbaa !14
  store i32 1, ptr %17, align 4, !tbaa !14
  %85 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 7
  store i32 0, ptr %85, align 4, !tbaa !19
  %86 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 6
  store i32 0, ptr %86, align 8, !tbaa !24
  %87 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 3
  store i32 1, ptr %87, align 4, !tbaa !25
  %88 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 0
  store i32 1, ptr %88, align 8, !tbaa !26
  br label %127

89:                                               ; preds = %49
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !9
  %90 = call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %32)
  %91 = icmp ne i8 %90, 0
  br i1 %91, label %92, label %125

92:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !9
  %93 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %34, ptr noundef %11, ptr noundef %13, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19)
  store i32 %93, ptr %33, align 4, !tbaa !17
  %94 = load i32, ptr %33, align 4, !tbaa !17
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %108

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %97 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %98 = trunc i64 %97 to i32
  store i32 %98, ptr %35, align 4, !tbaa !14
  %99 = load i32, ptr %35, align 4, !tbaa !14
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %99)
  %101 = load ptr, ptr @stdout, align 8, !tbaa !5
  %102 = call i32 @fflush(ptr noundef %101)
  %103 = load i32, ptr %33, align 4, !tbaa !17
  %104 = call ptr @ee2str(i32 noundef %103)
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %104)
  %106 = load ptr, ptr @stdout, align 8, !tbaa !5
  %107 = call i32 @fflush(ptr noundef %106)
  call void @exit(i32 noundef 1) #8
  unreachable

108:                                              ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !9
  %109 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %37, ptr noundef %12, ptr noundef %14, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24)
  store i32 %109, ptr %36, align 4, !tbaa !17
  %110 = load i32, ptr %36, align 4, !tbaa !17
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %124

112:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  %113 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %114 = trunc i64 %113 to i32
  store i32 %114, ptr %38, align 4, !tbaa !14
  %115 = load i32, ptr %38, align 4, !tbaa !14
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %115)
  %117 = load ptr, ptr @stdout, align 8, !tbaa !5
  %118 = call i32 @fflush(ptr noundef %117)
  %119 = load i32, ptr %36, align 4, !tbaa !17
  %120 = call ptr @ee2str(i32 noundef %119)
  %121 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %120)
  %122 = load ptr, ptr @stdout, align 8, !tbaa !5
  %123 = call i32 @fflush(ptr noundef %122)
  call void @exit(i32 noundef 1) #8
  unreachable

124:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %126

125:                                              ; preds = %89
  store i32 51, ptr %7, align 4
  store i32 1, ptr %39, align 4
  br label %187

126:                                              ; preds = %124
  br label %127

127:                                              ; preds = %126, %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  store i32 0, ptr %40, align 4, !tbaa !17
  %128 = load i32, ptr %11, align 4, !tbaa !10
  %129 = load i32, ptr %12, align 4, !tbaa !10
  %130 = icmp ne i32 %128, %129
  br i1 %130, label %131, label %132

131:                                              ; preds = %127
  store i32 2, ptr %40, align 4, !tbaa !17
  br label %132

132:                                              ; preds = %131, %127
  %133 = load i32, ptr %15, align 4, !tbaa !14
  %134 = load i32, ptr %20, align 4, !tbaa !14
  %135 = icmp ne i32 %133, %134
  br i1 %135, label %140, label %136

136:                                              ; preds = %132
  %137 = load i32, ptr %16, align 4, !tbaa !14
  %138 = load i32, ptr %21, align 4, !tbaa !14
  %139 = icmp ne i32 %137, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %136, %132
  store i32 2, ptr %40, align 4, !tbaa !17
  br label %141

141:                                              ; preds = %140, %136
  %142 = load i32, ptr %13, align 4, !tbaa !12
  %143 = icmp ne i32 %142, 2
  br i1 %143, label %148, label %144

144:                                              ; preds = %141
  %145 = load i32, ptr %14, align 4, !tbaa !12
  %146 = load i32, ptr %13, align 4, !tbaa !12
  %147 = icmp ne i32 %145, %146
  br i1 %147, label %148, label %149

148:                                              ; preds = %144, %141
  store i32 2, ptr %40, align 4, !tbaa !17
  br label %149

149:                                              ; preds = %148, %144
  %150 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 6
  %151 = load i32, ptr %150, align 8, !tbaa !24
  %152 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 0
  %153 = load i32, ptr %152, align 8, !tbaa !26
  %154 = icmp uge i32 %151, %153
  br i1 %154, label %167, label %155

155:                                              ; preds = %149
  %156 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 8
  %157 = load i32, ptr %156, align 8, !tbaa !27
  %158 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 1
  %159 = load i32, ptr %158, align 4, !tbaa !28
  %160 = icmp uge i32 %157, %159
  br i1 %160, label %167, label %161

161:                                              ; preds = %155
  %162 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 10
  %163 = load i32, ptr %162, align 8, !tbaa !29
  %164 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 2
  %165 = load i32, ptr %164, align 8, !tbaa !30
  %166 = icmp uge i32 %163, %165
  br i1 %166, label %167, label %168

167:                                              ; preds = %161, %155, %149
  store i32 51, ptr %7, align 4
  store i32 1, ptr %39, align 4
  br label %186

168:                                              ; preds = %161
  %169 = load i32, ptr %16, align 4, !tbaa !14
  %170 = udiv i32 %169, 8
  store i32 %170, ptr %16, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  store ptr null, ptr %41, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 13
  %172 = load i32, ptr %171, align 4, !tbaa !31
  %173 = icmp eq i32 %172, 0
  br i1 %173, label %174, label %177

174:                                              ; preds = %168
  %175 = load i32, ptr %11, align 4, !tbaa !10
  switch i32 %175, label %176 [
  ]

176:                                              ; preds = %174
  store i32 51, ptr %7, align 4
  store i32 1, ptr %39, align 4
  br label %185

177:                                              ; preds = %168
  %178 = getelementptr inbounds %struct.PoolingParamSpec, ptr %2, i32 0, i32 13
  %179 = load i32, ptr %178, align 4, !tbaa !31
  %180 = icmp eq i32 %179, 1
  br i1 %180, label %181, label %184

181:                                              ; preds = %177
  %182 = load i32, ptr %11, align 4, !tbaa !10
  switch i32 %182, label %183 [
  ]

183:                                              ; preds = %181
  store i32 51, ptr %7, align 4
  store i32 1, ptr %39, align 4
  br label %185

184:                                              ; preds = %177
  store i32 51, ptr %7, align 4
  store i32 1, ptr %39, align 4
  br label %185

185:                                              ; preds = %184, %183, %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %186

186:                                              ; preds = %185, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  br label %187

187:                                              ; preds = %186, %125
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %188

188:                                              ; preds = %187, %48
  %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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #2

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

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

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

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

; 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 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #2

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

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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{i64 0, i64 4, !10, i64 4, i64 4, !12, i64 8, i64 4, !14, i64 12, i64 80, !16}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTS8DataType", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS10DataFormat", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTS2EE", !7, i64 0}
!19 = !{!20, !15, i64 28}
!20 = !{!"_ZTS16PoolingParamSpec", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !21, i64 48, !22, i64 52, !23, i64 56}
!21 = !{!"_ZTS9RoundMode", !7, i64 0}
!22 = !{!"_ZTS11PoolingMode", !7, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!20, !15, i64 24}
!25 = !{!20, !15, i64 12}
!26 = !{!20, !15, i64 0}
!27 = !{!20, !15, i64 32}
!28 = !{!20, !15, i64 4}
!29 = !{!20, !15, i64 40}
!30 = !{!20, !15, i64 8}
!31 = !{!20, !22, i64 52}


; 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 range(i32 1, 52) i32 @_Z11pooling_arm10TensorDescPKv16PoolingParamSpecPvS_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 %75, label %23

23:                                               ; 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
  %24 = tail call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %.not = icmp eq i8 %24, 0
  br i1 %.not, label %49, label %25

25:                                               ; preds = %23
  %26 = 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)
  %.not23 = icmp eq i32 %26, 0
  br i1 %.not23, label %37, label %27

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

37:                                               ; preds = %25
  %38 = 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)
  %.not24 = icmp eq i32 %38, 0
  br i1 %.not24, label %.thread, label %39

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

49:                                               ; preds = %23
  %50 = tail call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %.not20 = icmp eq i8 %50, 0
  br i1 %.not20, label %.thread, label %51

51:                                               ; preds = %49
  %52 = 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)
  %.not21 = icmp eq i32 %52, 0
  br i1 %.not21, label %63, label %53

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

63:                                               ; preds = %51
  %64 = 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)
  %.not22 = icmp eq i32 %64, 0
  br i1 %.not22, label %.thread, label %65

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

.thread:                                          ; preds = %63, %37, %49
  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
  br label %75

75:                                               ; preds = %6, %.thread
  %.3 = phi i32 [ 51, %.thread ], [ 1, %6 ]
  ret i32 %.3
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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 #2

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

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

; 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 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #2

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

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


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