; LLVM IR from huawei-noah/bolt :: compute/tensor/src (unpooling)

; 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.PoolingParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8 }
%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.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 @_Z27unpooling_infer_output_sizeP6Tensor16PoolingParamSpecS0_P8ArchInfo(ptr noundef %0, ptr noundef byval(%struct.PoolingParamSpec) align 8 %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.TensorDesc, align 4
  %11 = alloca %struct.TensorDesc, align 4
  %12 = alloca %struct.TensorDesc, align 8
  %13 = alloca %struct.TensorDesc, align 4
  %14 = alloca %struct.PoolingParamSpec, align 4
  %15 = alloca %struct.TensorDesc, align 8
  %16 = alloca %struct.PoolingParamSpec, align 8
  %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 %struct.TensorDesc, align 8
  %25 = alloca i32, align 4
  %26 = alloca %struct.TensorDesc, align 8
  %27 = alloca i32, align 4
  %28 = alloca %struct.TensorDesc, align 8
  %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 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 %struct.TensorDesc, align 8
  %44 = alloca %struct.TensorDesc, align 4
  %45 = alloca %struct.TensorDesc, align 8
  %46 = alloca %struct.TensorDesc, align 4
  %47 = alloca %struct.TensorDesc, align 8
  %48 = alloca %struct.TensorDesc, align 4
  %49 = alloca %struct.TensorDesc, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = icmp eq ptr %50, null
  br i1 %51, label %55, label %52

52:                                               ; preds = %4
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %71

55:                                               ; preds = %52, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 1, ptr %8, align 4, !tbaa !9
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %70

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

70:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %71

71:                                               ; preds = %70, %52
  call void @llvm.lifetime.start.p0(i64 92, ptr %10) #8
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %10, ptr noundef nonnull align 8 dereferenceable(32) %72)
  call void @llvm.lifetime.start.p0(i64 92, ptr %11) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  call void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %11, ptr noundef byval(%struct.TensorDesc) align 8 %12)
  call void @llvm.lifetime.start.p0(i64 92, ptr %13) #8
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %13, ptr noundef nonnull align 8 dereferenceable(32) %73)
  call void @llvm.lifetime.start.p0(i64 60, ptr %14) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %11, i64 92, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %1, i64 60, i1 false), !tbaa.struct !19
  call void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind writable sret(%struct.PoolingParamSpec) align 4 %14, ptr noundef byval(%struct.TensorDesc) align 8 %15, ptr noundef byval(%struct.PoolingParamSpec) align 8 %16)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1, ptr align 4 %14, i64 60, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 60, ptr %14) #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.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %74 = call noundef zeroext i8 @_Z10tensorIs3d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %24)
  %75 = icmp ne i8 %74, 0
  br i1 %75, label %76, label %93

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %77 = call noundef i32 @_Z11tensor3dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %26, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %22)
  store i32 %77, ptr %25, align 4, !tbaa !9
  %78 = load i32, ptr %25, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %92

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %81 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %27, align 4, !tbaa !11
  %83 = load i32, ptr %27, align 4, !tbaa !11
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %83)
  %85 = load ptr, ptr @stdout, align 8, !tbaa !5
  %86 = call i32 @fflush(ptr noundef %85)
  %87 = load i32, ptr %25, align 4, !tbaa !9
  %88 = call ptr @ee2str(i32 noundef %87)
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %88)
  %90 = load ptr, ptr @stdout, align 8, !tbaa !5
  %91 = call i32 @fflush(ptr noundef %90)
  call void @exit(i32 noundef 1) #9
  unreachable

92:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  store i32 1, ptr %23, align 4, !tbaa !11
  store i32 1, ptr %21, align 4, !tbaa !11
  br label %151

93:                                               ; preds = %71
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %94 = call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %28)
  %95 = icmp ne i8 %94, 0
  br i1 %95, label %96, label %113

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %97 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %30, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %22, ptr noundef %23)
  store i32 %97, ptr %29, align 4, !tbaa !9
  %98 = load i32, ptr %29, align 4, !tbaa !9
  %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 %31) #8
  %101 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %102 = trunc i64 %101 to i32
  store i32 %102, ptr %31, align 4, !tbaa !11
  %103 = load i32, ptr %31, align 4, !tbaa !11
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %103)
  %105 = load ptr, ptr @stdout, align 8, !tbaa !5
  %106 = call i32 @fflush(ptr noundef %105)
  %107 = load i32, ptr %29, align 4, !tbaa !9
  %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 !5
  %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 %29) #8
  store i32 1, ptr %21, align 4, !tbaa !11
  br label %150

113:                                              ; preds = %93
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %114 = call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %32)
  %115 = icmp ne i8 %114, 0
  br i1 %115, label %116, label %133

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %117 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %34, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23)
  store i32 %117, ptr %33, align 4, !tbaa !9
  %118 = load i32, ptr %33, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %132

120:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %121 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %122 = trunc i64 %121 to i32
  store i32 %122, ptr %35, align 4, !tbaa !11
  %123 = load i32, ptr %35, align 4, !tbaa !11
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %123)
  %125 = load ptr, ptr @stdout, align 8, !tbaa !5
  %126 = call i32 @fflush(ptr noundef %125)
  %127 = load i32, ptr %33, align 4, !tbaa !9
  %128 = call ptr @ee2str(i32 noundef %127)
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %128)
  %130 = load ptr, ptr @stdout, align 8, !tbaa !5
  %131 = call i32 @fflush(ptr noundef %130)
  call void @exit(i32 noundef 1) #9
  unreachable

132:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %149

133:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store i32 51, ptr %36, align 4, !tbaa !9
  %134 = load i32, ptr %36, align 4, !tbaa !9
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %148

136:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %137 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %138 = trunc i64 %137 to i32
  store i32 %138, ptr %37, align 4, !tbaa !11
  %139 = load i32, ptr %37, align 4, !tbaa !11
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %139)
  %141 = load ptr, ptr @stdout, align 8, !tbaa !5
  %142 = call i32 @fflush(ptr noundef %141)
  %143 = load i32, ptr %36, align 4, !tbaa !9
  %144 = call ptr @ee2str(i32 noundef %143)
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %144)
  %146 = load ptr, ptr @stdout, align 8, !tbaa !5
  %147 = call i32 @fflush(ptr noundef %146)
  call void @exit(i32 noundef 1) #9
  unreachable

148:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %149

149:                                              ; preds = %148, %132
  br label %150

150:                                              ; preds = %149, %112
  br label %151

151:                                              ; preds = %150, %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  store i32 0, ptr %38, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  store i32 0, ptr %39, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  store i32 0, ptr %40, align 4, !tbaa !11
  %152 = load i32, ptr %21, align 4, !tbaa !11
  %153 = sub i32 %152, 1
  %154 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 3
  %155 = load i32, ptr %154, align 4, !tbaa !26
  %156 = mul i32 %153, %155
  %157 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !28
  %159 = add i32 %156, %158
  %160 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 6
  %161 = load i32, ptr %160, align 8, !tbaa !29
  %162 = add i32 %159, %161
  %163 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 7
  %164 = load i32, ptr %163, align 4, !tbaa !30
  %165 = add i32 %162, %164
  store i32 %165, ptr %38, align 4, !tbaa !11
  %166 = load i32, ptr %22, align 4, !tbaa !11
  %167 = sub i32 %166, 1
  %168 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 4
  %169 = load i32, ptr %168, align 8, !tbaa !31
  %170 = mul i32 %167, %169
  %171 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !32
  %173 = add i32 %170, %172
  %174 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 9
  %175 = load i32, ptr %174, align 4, !tbaa !33
  %176 = add i32 %173, %175
  %177 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 8
  %178 = load i32, ptr %177, align 8, !tbaa !34
  %179 = add i32 %176, %178
  store i32 %179, ptr %39, align 4, !tbaa !11
  %180 = load i32, ptr %23, align 4, !tbaa !11
  %181 = sub i32 %180, 1
  %182 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 5
  %183 = load i32, ptr %182, align 4, !tbaa !35
  %184 = mul i32 %181, %183
  %185 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 2
  %186 = load i32, ptr %185, align 8, !tbaa !36
  %187 = add i32 %184, %186
  %188 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 10
  %189 = load i32, ptr %188, align 8, !tbaa !37
  %190 = add i32 %187, %189
  %191 = getelementptr inbounds %struct.PoolingParamSpec, ptr %1, i32 0, i32 11
  %192 = load i32, ptr %191, align 4, !tbaa !38
  %193 = add i32 %190, %192
  store i32 %193, ptr %40, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %194 = load i32, ptr %18, align 4, !tbaa !16
  store i32 %194, ptr %41, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  store i32 0, ptr %42, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %195 = call noundef zeroext i8 @_Z10tensorIs3d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %43)
  %196 = icmp ne i8 %195, 0
  br i1 %196, label %197, label %203

197:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 92, ptr %44) #8
  %198 = load i32, ptr %17, align 4, !tbaa !14
  %199 = load i32, ptr %41, align 4, !tbaa !16
  %200 = load i32, ptr %19, align 4, !tbaa !11
  %201 = load i32, ptr %20, align 4, !tbaa !11
  %202 = load i32, ptr %39, align 4, !tbaa !11
  call void @_Z9tensor3df8DataType10DataFormatjjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %44, i32 noundef %198, i32 noundef %199, i32 noundef %200, i32 noundef %201, i32 noundef %202)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %44, i64 92, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 92, ptr %44) #8
  br label %227

203:                                              ; preds = %151
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %204 = call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %45)
  %205 = icmp ne i8 %204, 0
  br i1 %205, label %206, label %213

206:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 92, ptr %46) #8
  %207 = load i32, ptr %17, align 4, !tbaa !14
  %208 = load i32, ptr %41, align 4, !tbaa !16
  %209 = load i32, ptr %19, align 4, !tbaa !11
  %210 = load i32, ptr %20, align 4, !tbaa !11
  %211 = load i32, ptr %39, align 4, !tbaa !11
  %212 = load i32, ptr %40, align 4, !tbaa !11
  call void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %46, i32 noundef %207, i32 noundef %208, i32 noundef %209, i32 noundef %210, i32 noundef %211, i32 noundef %212)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %46, i64 92, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 92, ptr %46) #8
  br label %226

213:                                              ; preds = %203
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %10, i64 92, i1 false), !tbaa.struct !13
  %214 = call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %47)
  %215 = icmp ne i8 %214, 0
  br i1 %215, label %216, label %224

216:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 92, ptr %48) #8
  %217 = load i32, ptr %17, align 4, !tbaa !14
  %218 = load i32, ptr %41, align 4, !tbaa !16
  %219 = load i32, ptr %19, align 4, !tbaa !11
  %220 = load i32, ptr %20, align 4, !tbaa !11
  %221 = load i32, ptr %38, align 4, !tbaa !11
  %222 = load i32, ptr %39, align 4, !tbaa !11
  %223 = load i32, ptr %40, align 4, !tbaa !11
  call void @_Z9tensor5df8DataType10DataFormatjjjjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %48, i32 noundef %217, i32 noundef %218, i32 noundef %219, i32 noundef %220, i32 noundef %221, i32 noundef %222, i32 noundef %223)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %48, i64 92, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 92, ptr %48) #8
  br label %225

224:                                              ; preds = %213
  store i32 51, ptr %42, align 4, !tbaa !9
  br label %225

225:                                              ; preds = %224, %216
  br label %226

226:                                              ; preds = %225, %206
  br label %227

227:                                              ; preds = %226, %197
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %13, i64 92, i1 false), !tbaa.struct !13
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %228, ptr noundef byval(%struct.TensorDesc) align 8 %49)
  %229 = load i32, ptr %42, align 4, !tbaa !9
  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 %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 92, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr %10) #8
  ret i32 %229
}

; 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: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef byval(%struct.TensorDesc) align 8) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind noalias writable sret(%struct.PoolingParamSpec) align 4, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef byval(%struct.PoolingParamSpec) align 8) #4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor3df8DataType10DataFormatjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9tensor5df8DataType10DataFormatjjjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) #0 align 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 = { 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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}
!19 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !11, i64 12, i64 4, !11, i64 16, i64 4, !11, i64 20, i64 4, !11, i64 24, i64 4, !11, i64 28, i64 4, !11, i64 32, i64 4, !11, i64 36, i64 4, !11, i64 40, i64 4, !11, i64 44, i64 4, !11, i64 48, i64 4, !20, i64 52, i64 4, !22, i64 56, i64 1, !24}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS9RoundMode", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTS11PoolingMode", !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!27, !12, i64 12}
!27 = !{!"_ZTS16PoolingParamSpec", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !21, i64 48, !23, i64 52, !25, i64 56}
!28 = !{!27, !12, i64 0}
!29 = !{!27, !12, i64 24}
!30 = !{!27, !12, i64 28}
!31 = !{!27, !12, i64 16}
!32 = !{!27, !12, i64 4}
!33 = !{!27, !12, i64 36}
!34 = !{!27, !12, i64 32}
!35 = !{!27, !12, i64 20}
!36 = !{!27, !12, i64 8}
!37 = !{!27, !12, i64 40}
!38 = !{!27, !12, i64 44}


; 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.PoolingParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8 }
%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.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 uwtable
define dso_local noundef range(i32 0, 52) i32 @_Z27unpooling_infer_output_sizeP6Tensor16PoolingParamSpecS0_P8ArchInfo(ptr noundef %0, ptr nocapture noundef byval(%struct.PoolingParamSpec) align 8 %1, ptr noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #0 {
  %5 = alloca %struct.TensorDesc, align 8
  %6 = alloca %struct.TensorDesc, align 8
  %7 = alloca %struct.TensorDesc, align 8
  %8 = alloca %struct.PoolingParamSpec, 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 %struct.TensorDesc, align 4
  %17 = alloca %struct.TensorDesc, align 4
  %18 = alloca %struct.TensorDesc, align 4
  %19 = icmp eq ptr %0, null
  %20 = icmp eq ptr %2, null
  %or.cond = or i1 %19, %20
  br i1 %or.cond, label %21, label %31

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

31:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %5) #8
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %5, ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %6) #8
  call void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %6, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %7) #8
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %7, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %8) #8
  call void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind nonnull writable sret(%struct.PoolingParamSpec) align 4 %8, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %6, ptr noundef nonnull byval(%struct.PoolingParamSpec) align 8 %1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 4 dereferenceable(60) %8, i64 60, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  %32 = call noundef zeroext i8 @_Z10tensorIs3d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  %.not = icmp eq i8 %32, 0
  br i1 %.not, label %46, label %33

33:                                               ; preds = %31
  %34 = call noundef i32 @_Z11tensor3dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %14)
  %.not37 = icmp eq i32 %34, 0
  br i1 %.not37, label %45, label %35

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

45:                                               ; preds = %33
  store i32 1, ptr %15, align 4, !tbaa !10
  store i32 1, ptr %13, align 4, !tbaa !10
  br label %86

46:                                               ; preds = %31
  %47 = call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  %.not33 = icmp eq i8 %47, 0
  br i1 %.not33, label %61, label %48

48:                                               ; preds = %46
  %49 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %14, ptr noundef nonnull %15)
  %.not36 = icmp eq i32 %49, 0
  br i1 %.not36, label %60, label %50

50:                                               ; preds = %48
  %51 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %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) #9
  unreachable

60:                                               ; preds = %48
  store i32 1, ptr %13, align 4, !tbaa !10
  br label %86

61:                                               ; preds = %46
  %62 = call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  %.not34 = icmp eq i8 %62, 0
  br i1 %.not34, label %76, label %63

63:                                               ; preds = %61
  %64 = call noundef i32 @_Z11tensor5dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15)
  %.not35 = icmp eq i32 %64, 0
  br i1 %.not35, label %._crit_edge, label %66

._crit_edge:                                      ; preds = %63
  %.pre = load i32, ptr %13, align 4, !tbaa !10
  %65 = add i32 %.pre, -1
  br label %86

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

76:                                               ; preds = %61
  %77 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %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 51)
  %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) #9
  unreachable

86:                                               ; preds = %._crit_edge, %60, %45
  %87 = phi i32 [ %65, %._crit_edge ], [ 0, %60 ], [ 0, %45 ]
  %88 = getelementptr inbounds i8, ptr %1, i64 12
  %89 = load i32, ptr %88, align 4, !tbaa !18
  %90 = mul i32 %87, %89
  %91 = load i32, ptr %1, align 8, !tbaa !20
  %92 = add i32 %90, %91
  %93 = getelementptr inbounds i8, ptr %1, i64 24
  %94 = load i32, ptr %93, align 8, !tbaa !21
  %95 = add i32 %92, %94
  %96 = getelementptr inbounds i8, ptr %1, i64 28
  %97 = load i32, ptr %96, align 4, !tbaa !22
  %98 = add i32 %95, %97
  %99 = load i32, ptr %14, align 4, !tbaa !10
  %100 = add i32 %99, -1
  %101 = getelementptr inbounds i8, ptr %1, i64 16
  %102 = load i32, ptr %101, align 8, !tbaa !23
  %103 = mul i32 %100, %102
  %104 = getelementptr inbounds i8, ptr %1, i64 4
  %105 = load i32, ptr %104, align 4, !tbaa !24
  %106 = add i32 %103, %105
  %107 = getelementptr inbounds i8, ptr %1, i64 36
  %108 = load i32, ptr %107, align 4, !tbaa !25
  %109 = add i32 %106, %108
  %110 = getelementptr inbounds i8, ptr %1, i64 32
  %111 = load i32, ptr %110, align 8, !tbaa !26
  %112 = add i32 %109, %111
  %113 = load i32, ptr %15, align 4, !tbaa !10
  %114 = add i32 %113, -1
  %115 = getelementptr inbounds i8, ptr %1, i64 20
  %116 = load i32, ptr %115, align 4, !tbaa !27
  %117 = mul i32 %114, %116
  %118 = getelementptr inbounds i8, ptr %1, i64 8
  %119 = load i32, ptr %118, align 8, !tbaa !28
  %120 = add i32 %117, %119
  %121 = getelementptr inbounds i8, ptr %1, i64 40
  %122 = load i32, ptr %121, align 8, !tbaa !29
  %123 = add i32 %120, %122
  %124 = getelementptr inbounds i8, ptr %1, i64 44
  %125 = load i32, ptr %124, align 4, !tbaa !30
  %126 = add i32 %123, %125
  %127 = load i32, ptr %10, align 4, !tbaa !31
  %128 = call noundef zeroext i8 @_Z10tensorIs3d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  %.not38 = icmp eq i8 %128, 0
  br i1 %.not38, label %133, label %129

129:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %16) #8
  %130 = load i32, ptr %9, align 4, !tbaa !33
  %131 = load i32, ptr %11, align 4, !tbaa !10
  %132 = load i32, ptr %12, align 4, !tbaa !10
  call void @_Z9tensor3df8DataType10DataFormatjjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %16, i32 noundef %130, i32 noundef %127, i32 noundef %131, i32 noundef %132, i32 noundef %112)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %7, ptr noundef nonnull align 4 dereferenceable(92) %16, i64 92, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %16) #8
  br label %145

133:                                              ; preds = %86
  %134 = call noundef zeroext i8 @_Z10tensorIs4d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  %.not39 = icmp eq i8 %134, 0
  br i1 %.not39, label %139, label %135

135:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %17) #8
  %136 = load i32, ptr %9, align 4, !tbaa !33
  %137 = load i32, ptr %11, align 4, !tbaa !10
  %138 = load i32, ptr %12, align 4, !tbaa !10
  call void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %17, i32 noundef %136, i32 noundef %127, i32 noundef %137, i32 noundef %138, i32 noundef %112, i32 noundef %126)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %7, ptr noundef nonnull align 4 dereferenceable(92) %17, i64 92, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %17) #8
  br label %145

139:                                              ; preds = %133
  %140 = call noundef zeroext i8 @_Z10tensorIs5d10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  %.not40 = icmp eq i8 %140, 0
  br i1 %.not40, label %145, label %141

141:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %18) #8
  %142 = load i32, ptr %9, align 4, !tbaa !33
  %143 = load i32, ptr %11, align 4, !tbaa !10
  %144 = load i32, ptr %12, align 4, !tbaa !10
  call void @_Z9tensor5df8DataType10DataFormatjjjjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %18, i32 noundef %142, i32 noundef %127, i32 noundef %143, i32 noundef %144, i32 noundef %98, i32 noundef %112, i32 noundef %126)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %7, ptr noundef nonnull align 4 dereferenceable(92) %18, i64 92, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %18) #8
  br label %145

145:                                              ; preds = %139, %135, %141, %129
  %.0 = phi i32 [ 0, %129 ], [ 0, %135 ], [ 0, %141 ], [ 51, %139 ]
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %5) #8
  ret i32 %.0
}

; 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: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z17transformDescTo4d10TensorDesc(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL12update_param10TensorDesc16PoolingParamSpec(ptr dead_on_unwind noalias writable sret(%struct.PoolingParamSpec) align 4, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef byval(%struct.PoolingParamSpec) align 8) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor3dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_(ptr noundef byval(%struct.TensorDesc) align 8, 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 @_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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9tensor3df8DataType10DataFormatjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9tensor5df8DataType10DataFormatjjjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #0 align 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 = { 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 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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, !10, i64 8, i64 4, !10, i64 12, i64 4, !10, i64 16, i64 4, !10, i64 20, i64 4, !10, i64 24, i64 4, !10, i64 28, i64 4, !10, i64 32, i64 4, !10, i64 36, i64 4, !10, i64 40, i64 4, !10, i64 44, i64 4, !10, i64 48, i64 4, !12, i64 52, i64 4, !14, i64 56, i64 1, !16}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS9RoundMode", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS11PoolingMode", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !11, i64 12}
!19 = !{!"_ZTS16PoolingParamSpec", !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, !13, i64 48, !15, i64 52, !17, i64 56}
!20 = !{!19, !11, i64 0}
!21 = !{!19, !11, i64 24}
!22 = !{!19, !11, i64 28}
!23 = !{!19, !11, i64 16}
!24 = !{!19, !11, i64 4}
!25 = !{!19, !11, i64 36}
!26 = !{!19, !11, i64 32}
!27 = !{!19, !11, i64 20}
!28 = !{!19, !11, i64 8}
!29 = !{!19, !11, i64 40}
!30 = !{!19, !11, i64 44}
!31 = !{!32, !32, i64 0}
!32 = !{!"_ZTS10DataFormat", !7, i64 0}
!33 = !{!34, !34, i64 0}
!34 = !{!"_ZTS8DataType", !7, i64 0}
!35 = !{i64 0, i64 4, !33, i64 4, i64 4, !31, i64 8, i64 4, !10, i64 12, i64 80, !36}
!36 = !{!7, !7, i64 0}


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