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

; 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.RNNParamSpec = type { i32, i32, i32, i32, float, float, i8, float, i32 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl" }
%"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl" = type { %"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(92) ptr @_ZNSt6vectorI10TensorDescSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10TensorDescSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z21rnn_infer_output_sizeSt6vectorIP6TensorSaIS1_EE12RNNParamSpecS3_P8ArchInfo(ptr noundef %0, ptr noundef byval(%struct.RNNParamSpec) align 8 %1, ptr noundef %2, ptr noundef %3) #2 personality ptr @__gxx_personality_v0 {
  %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 i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.TensorDesc, 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 %"class.std::vector.8", align 8
  %22 = alloca %struct.TensorDesc, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %struct.TensorDesc, align 4
  %27 = alloca %struct.TensorDesc, align 4
  %28 = alloca %struct.TensorDesc, align 4
  %29 = alloca %struct.TensorDesc, align 4
  %30 = alloca i32, align 4
  %31 = 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
  %32 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %33 = icmp eq i64 %32, 0
  br i1 %33, label %34, label %50

34:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 1, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %49

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %38 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %9, align 4, !tbaa !11
  %40 = load i32, ptr %9, align 4, !tbaa !11
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %40)
  %42 = load ptr, ptr @stdout, align 8, !tbaa !5
  %43 = call i32 @fflush(ptr noundef %42)
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = call ptr @ee2str(i32 noundef %44)
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.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) #10
  unreachable

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

50:                                               ; preds = %49, %4
  %51 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %53, label %69

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 1, ptr %10, align 4, !tbaa !9
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %68

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %57 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %58 = trunc i64 %57 to i32
  store i32 %58, ptr %11, align 4, !tbaa !11
  %59 = load i32, ptr %11, align 4, !tbaa !11
  %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 %10, align 4, !tbaa !9
  %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) #10
  unreachable

68:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %69

69:                                               ; preds = %68, %50
  call void @llvm.lifetime.start.p0(i64 92, ptr %12) #9
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #9
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %12, ptr noundef nonnull align 8 dereferenceable(32) %71)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %72 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 0
  %73 = load i32, ptr %72, align 4, !tbaa !13
  store i32 %73, ptr %13, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %74 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !18
  store i32 %75, ptr %14, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %76 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 3
  %77 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 2
  %78 = load i32, ptr %77, align 4, !tbaa !20
  %79 = sub i32 %78, 1
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !11
  store i32 %82, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %83 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 3
  %84 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !20
  %86 = sub i32 %85, 2
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds [20 x i32], ptr %83, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !11
  store i32 %89, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %90 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 3
  %91 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 2
  %92 = load i32, ptr %91, align 4, !tbaa !20
  %93 = sub i32 %92, 3
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds [20 x i32], ptr %90, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !11
  store i32 %96, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %97

97:                                               ; preds = %112, %69
  %98 = load i32, ptr %18, align 4, !tbaa !11
  %99 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 2
  %100 = load i32, ptr %99, align 4, !tbaa !20
  %101 = sub i32 %100, 3
  %102 = icmp ult i32 %98, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %115

104:                                              ; preds = %97
  %105 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 3
  %106 = load i32, ptr %18, align 4, !tbaa !11
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds [20 x i32], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !11
  %110 = load i32, ptr %17, align 4, !tbaa !11
  %111 = mul i32 %110, %109
  store i32 %111, ptr %17, align 4, !tbaa !11
  br label %112

112:                                              ; preds = %104
  %113 = load i32, ptr %18, align 4, !tbaa !11
  %114 = add i32 %113, 1
  store i32 %114, ptr %18, align 4, !tbaa !11
  br label %97, !llvm.loop !21

115:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %116 = getelementptr inbounds %struct.RNNParamSpec, ptr %1, i32 0, i32 6
  %117 = load i8, ptr %116, align 8, !tbaa !23, !range !29, !noundef !30
  %118 = trunc i8 %117 to i1
  %119 = zext i1 %118 to i64
  %120 = select i1 %118, i32 2, i32 1
  store i32 %120, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %121 = load i32, ptr %19, align 4, !tbaa !11
  %122 = getelementptr inbounds %struct.RNNParamSpec, ptr %1, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !31
  %124 = mul i32 %121, %123
  store i32 %124, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #9
  call void @_ZNSt6vectorI10TensorDescSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.start.p0(i64 92, ptr %22) #9
  %125 = load i32, ptr %13, align 4, !tbaa !17
  %126 = load i32, ptr %15, align 4, !tbaa !11
  %127 = load i32, ptr %16, align 4, !tbaa !11
  %128 = load i32, ptr %20, align 4, !tbaa !11
  invoke void @_Z9tensor3df8DataType10DataFormatjjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %22, i32 noundef %125, i32 noundef 15, i32 noundef %126, i32 noundef %127, i32 noundef %128)
          to label %129 unwind label %155

129:                                              ; preds = %115
  invoke void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 4 dereferenceable(92) %22)
          to label %130 unwind label %155

130:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %131 = getelementptr inbounds %struct.RNNParamSpec, ptr %1, i32 0, i32 3
  %132 = load i32, ptr %131, align 4, !tbaa !32
  %133 = icmp sgt i32 %132, 0
  br i1 %133, label %134, label %137

134:                                              ; preds = %130
  %135 = getelementptr inbounds %struct.RNNParamSpec, ptr %1, i32 0, i32 3
  %136 = load i32, ptr %135, align 4, !tbaa !32
  br label %140

137:                                              ; preds = %130
  %138 = getelementptr inbounds %struct.RNNParamSpec, ptr %1, i32 0, i32 1
  %139 = load i32, ptr %138, align 4, !tbaa !31
  br label %140

140:                                              ; preds = %137, %134
  %141 = phi i32 [ %136, %134 ], [ %139, %137 ]
  store i32 %141, ptr %25, align 4, !tbaa !11
  %142 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  %143 = icmp eq i64 %142, 2
  br i1 %143, label %144, label %178

144:                                              ; preds = %140
  %145 = getelementptr inbounds %struct.RNNParamSpec, ptr %1, i32 0, i32 0
  %146 = load i32, ptr %145, align 8, !tbaa !33
  %147 = icmp eq i32 %146, 1
  br i1 %147, label %148, label %163

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 92, ptr %26) #9
  %149 = load i32, ptr %13, align 4, !tbaa !17
  %150 = load i32, ptr %15, align 4, !tbaa !11
  %151 = load i32, ptr %25, align 4, !tbaa !11
  %152 = load i32, ptr %20, align 4, !tbaa !11
  %153 = add i32 %151, %152
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %26, i32 noundef %149, i32 noundef 14, i32 noundef %150, i32 noundef %153)
          to label %154 unwind label %159

154:                                              ; preds = %148
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %26, i64 92, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.end.p0(i64 92, ptr %26) #9
  br label %172

155:                                              ; preds = %129, %115
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %23, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %24, align 4
  br label %226

159:                                              ; preds = %148
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %23, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 92, ptr %26) #9
  br label %225

163:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 92, ptr %27) #9
  %164 = load i32, ptr %13, align 4, !tbaa !17
  %165 = load i32, ptr %15, align 4, !tbaa !11
  %166 = load i32, ptr %20, align 4, !tbaa !11
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %27, i32 noundef %164, i32 noundef 14, i32 noundef %165, i32 noundef %166)
          to label %167 unwind label %168

167:                                              ; preds = %163
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %27, i64 92, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.end.p0(i64 92, ptr %27) #9
  br label %172

168:                                              ; preds = %163
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %23, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 92, ptr %27) #9
  br label %225

172:                                              ; preds = %167, %154
  invoke void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 4 dereferenceable(92) %22)
          to label %173 unwind label %174

173:                                              ; preds = %172
  br label %201

174:                                              ; preds = %190, %185, %172
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %23, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %24, align 4
  br label %225

178:                                              ; preds = %140
  %179 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  %180 = icmp eq i64 %179, 3
  br i1 %180, label %181, label %200

181:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 92, ptr %28) #9
  %182 = load i32, ptr %13, align 4, !tbaa !17
  %183 = load i32, ptr %15, align 4, !tbaa !11
  %184 = load i32, ptr %20, align 4, !tbaa !11
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %28, i32 noundef %182, i32 noundef 14, i32 noundef %183, i32 noundef %184)
          to label %185 unwind label %192

185:                                              ; preds = %181
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %28, i64 92, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.end.p0(i64 92, ptr %28) #9
  invoke void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 4 dereferenceable(92) %22)
          to label %186 unwind label %174

186:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 92, ptr %29) #9
  %187 = load i32, ptr %13, align 4, !tbaa !17
  %188 = load i32, ptr %15, align 4, !tbaa !11
  %189 = load i32, ptr %25, align 4, !tbaa !11
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %29, i32 noundef %187, i32 noundef 14, i32 noundef %188, i32 noundef %189)
          to label %190 unwind label %196

190:                                              ; preds = %186
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %29, i64 92, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.end.p0(i64 92, ptr %29) #9
  invoke void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 4 dereferenceable(92) %22)
          to label %191 unwind label %174

191:                                              ; preds = %190
  br label %200

192:                                              ; preds = %181
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %23, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 92, ptr %28) #9
  br label %225

196:                                              ; preds = %186
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %23, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 92, ptr %29) #9
  br label %225

200:                                              ; preds = %191, %178
  br label %201

201:                                              ; preds = %200, %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !11
  br label %202

202:                                              ; preds = %217, %201
  %203 = load i32, ptr %30, align 4, !tbaa !11
  %204 = zext i32 %203 to i64
  %205 = call noundef i64 @_ZNKSt6vectorI10TensorDescSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  %206 = icmp ult i64 %204, %205
  br i1 %206, label %208, label %207

207:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %224

208:                                              ; preds = %202
  %209 = load i32, ptr %30, align 4, !tbaa !11
  %210 = zext i32 %209 to i64
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %210) #9
  %212 = load ptr, ptr %211, align 8, !tbaa !5
  %213 = load i32, ptr %30, align 4, !tbaa !11
  %214 = zext i32 %213 to i64
  %215 = call noundef nonnull align 4 dereferenceable(92) ptr @_ZNSt6vectorI10TensorDescSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %214) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %215, i64 92, i1 false), !tbaa.struct !34
  invoke void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %212, ptr noundef byval(%struct.TensorDesc) align 8 %31)
          to label %216 unwind label %220

216:                                              ; preds = %208
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %30, align 4, !tbaa !11
  %219 = add i32 %218, 1
  store i32 %219, ptr %30, align 4, !tbaa !11
  br label %202, !llvm.loop !36

220:                                              ; preds = %208
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %23, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %225

224:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %22) #9
  call void @_ZNSt6vectorI10TensorDescSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %12) #9
  ret i32 0

225:                                              ; preds = %220, %196, %192, %174, %168, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %226

226:                                              ; preds = %225, %155
  call void @llvm.lifetime.end.p0(i64 92, ptr %22) #9
  call void @_ZNSt6vectorI10TensorDescSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %12) #9
  br label %227

227:                                              ; preds = %226
  %228 = load ptr, ptr %23, align 8
  %229 = load i32, ptr %24, align 4
  %230 = insertvalue { ptr, i32 } poison, ptr %228, 0
  %231 = insertvalue { ptr, i32 } %230, i32 %229, 1
  resume { ptr, i32 } %231
}

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

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

declare i32 @fflush(ptr noundef) #5

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

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

; Function Attrs: 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)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10TensorDescSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(92)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI10TensorDescSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { 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 = !{!14, !15, i64 0}
!14 = !{!"_ZTS10TensorDesc", !15, i64 0, !16, i64 4, !12, i64 8, !7, i64 12}
!15 = !{!"_ZTS8DataType", !7, i64 0}
!16 = !{!"_ZTS10DataFormat", !7, i64 0}
!17 = !{!15, !15, i64 0}
!18 = !{!14, !16, i64 4}
!19 = !{!16, !16, i64 0}
!20 = !{!14, !12, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !27, i64 24}
!24 = !{!"_ZTS12RNNParamSpec", !25, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !26, i64 16, !26, i64 20, !27, i64 24, !26, i64 28, !28, i64 32}
!25 = !{!"_ZTS7RNNMode", !7, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTS14ActivationMode", !7, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!24, !12, i64 4}
!32 = !{!24, !12, i64 12}
!33 = !{!24, !25, i64 0}
!34 = !{i64 0, i64 4, !17, i64 4, i64 4, !19, i64 8, i64 4, !11, i64 12, i64 80, !35}
!35 = !{!7, !7, i64 0}
!36 = distinct !{!36, !22}


; 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.RNNParamSpec = type { i32, i32, i32, i32, float, float, i8, float, i32 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl" }
%"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl" = type { %"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TensorDesc, std::allocator<TensorDesc>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(92) ptr @_ZNSt6vectorI10TensorDescSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10TensorDescSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z21rnn_infer_output_sizeSt6vectorIP6TensorSaIS1_EE12RNNParamSpecS3_P8ArchInfo(ptr noundef nonnull %0, ptr nocapture noundef readonly byval(%struct.RNNParamSpec) align 8 %1, ptr noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.TensorDesc, align 4
  %6 = alloca %"class.std::vector.8", align 8
  %7 = alloca %struct.TensorDesc, align 4
  %8 = alloca %struct.TensorDesc, align 4
  %9 = alloca %struct.TensorDesc, align 4
  %10 = alloca %struct.TensorDesc, align 4
  %11 = alloca %struct.TensorDesc, align 4
  %12 = alloca %struct.TensorDesc, align 8
  %13 = tail call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %14 = icmp eq i64 %13, 0
  br i1 %14, label %15, label %25

15:                                               ; preds = %4
  %16 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %17 = trunc i64 %16 to i32
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %17)
  %19 = load ptr, ptr @stdout, align 8, !tbaa !5
  %20 = tail call i32 @fflush(ptr noundef %19)
  %21 = tail call ptr @ee2str(i32 noundef 1)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %21)
  %23 = load ptr, ptr @stdout, align 8, !tbaa !5
  %24 = tail call i32 @fflush(ptr noundef %23)
  tail call void @exit(i32 noundef 1) #10
  unreachable

25:                                               ; preds = %4
  %26 = tail call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %28, label %38

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

38:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %5) #9
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #9
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %5, ptr noundef nonnull align 8 dereferenceable(32) %40)
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %5, i64 12
  %43 = getelementptr inbounds i8, ptr %5, i64 8
  %44 = load i32, ptr %43, align 4, !tbaa !14
  %45 = add i32 %44, -1
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds [20 x i32], ptr %42, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !15
  %49 = add i32 %44, -2
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds [20 x i32], ptr %42, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = getelementptr inbounds i8, ptr %1, i64 24
  %54 = load i8, ptr %53, align 8, !tbaa !16, !range !22, !noundef !23
  %55 = zext nneg i8 %54 to i32
  %56 = getelementptr inbounds i8, ptr %1, i64 4
  %57 = load i32, ptr %56, align 4
  %58 = shl i32 %57, %55
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  call void @_ZNSt6vectorI10TensorDescSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %7) #9
  invoke void @_Z9tensor3df8DataType10DataFormatjjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %7, i32 noundef %41, i32 noundef 15, i32 noundef %48, i32 noundef %52, i32 noundef %58)
          to label %59 unwind label %73

59:                                               ; preds = %38
  invoke void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(92) %7)
          to label %60 unwind label %73

60:                                               ; preds = %59
  %61 = getelementptr inbounds i8, ptr %1, i64 12
  %62 = load i32, ptr %61, align 4
  %63 = icmp sgt i32 %62, 0
  %64 = select i1 %63, i32 %62, i32 %57
  %65 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  %66 = icmp eq i64 %65, 2
  br i1 %66, label %67, label %83

67:                                               ; preds = %60
  %68 = load i32, ptr %1, align 8, !tbaa !24
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %77

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %8) #9
  %71 = add i32 %64, %58
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %8, i32 noundef %41, i32 noundef 14, i32 noundef %48, i32 noundef %71)
          to label %72 unwind label %75

72:                                               ; preds = %70
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(92) %7, ptr noundef nonnull align 4 dereferenceable(92) %8, i64 92, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %8) #9
  br label %.invoke

73:                                               ; preds = %59, %38
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %107

75:                                               ; preds = %70
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %8) #9
  br label %107

77:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %9) #9
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %9, i32 noundef %41, i32 noundef 14, i32 noundef %48, i32 noundef %58)
          to label %78 unwind label %79

78:                                               ; preds = %77
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(92) %7, ptr noundef nonnull align 4 dereferenceable(92) %9, i64 92, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #9
  br label %.invoke

79:                                               ; preds = %77
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #9
  br label %107

81:                                               ; preds = %.invoke, %87
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %107

83:                                               ; preds = %60
  %84 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  %85 = icmp eq i64 %84, 3
  br i1 %85, label %86, label %94

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %10) #9
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %10, i32 noundef %41, i32 noundef 14, i32 noundef %48, i32 noundef %58)
          to label %87 unwind label %90

87:                                               ; preds = %86
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(92) %7, ptr noundef nonnull align 4 dereferenceable(92) %10, i64 92, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %10) #9
  invoke void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(92) %7)
          to label %88 unwind label %81

88:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %11) #9
  invoke void @_Z9tensor2df8DataType10DataFormatjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %11, i32 noundef %41, i32 noundef 14, i32 noundef %48, i32 noundef %64)
          to label %89 unwind label %92

89:                                               ; preds = %88
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(92) %7, ptr noundef nonnull align 4 dereferenceable(92) %11, i64 92, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %11) #9
  br label %.invoke

.invoke:                                          ; preds = %72, %78, %89
  invoke void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(92) %7)
          to label %94 unwind label %81

90:                                               ; preds = %86
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %10) #9
  br label %107

92:                                               ; preds = %88
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %11) #9
  br label %107

94:                                               ; preds = %.invoke, %83
  %95 = call noundef i64 @_ZNKSt6vectorI10TensorDescSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  %.not = icmp eq i64 %95, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %100, %94
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %7) #9
  call void @_ZNSt6vectorI10TensorDescSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %5) #9
  ret i32 0

.lr.ph:                                           ; preds = %94, %100
  %96 = phi i64 [ %102, %100 ], [ 0, %94 ]
  %.041 = phi i32 [ %101, %100 ], [ 0, %94 ]
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %96) #9
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = call noundef nonnull align 4 dereferenceable(92) ptr @_ZNSt6vectorI10TensorDescSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %96) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %12, ptr noundef nonnull align 4 dereferenceable(92) %99, i64 92, i1 false), !tbaa.struct !25
  invoke void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %98, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %12)
          to label %100 unwind label %105

100:                                              ; preds = %.lr.ph
  %101 = add i32 %.041, 1
  %102 = zext i32 %101 to i64
  %103 = call noundef i64 @_ZNKSt6vectorI10TensorDescSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  %104 = icmp ugt i64 %103, %102
  br i1 %104, label %.lr.ph, label %._crit_edge, !llvm.loop !29

105:                                              ; preds = %.lr.ph
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %107

107:                                              ; preds = %75, %79, %81, %90, %92, %105, %73
  %.pn.pn = phi { ptr, i32 } [ %74, %73 ], [ %106, %105 ], [ %82, %81 ], [ %76, %75 ], [ %80, %79 ], [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %7) #9
  call void @_ZNSt6vectorI10TensorDescSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %5) #9
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI10TensorDescSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI10TensorDescSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(92)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI10TensorDescSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS10TensorDesc", !11, i64 0, !12, i64 4, !13, i64 8, !7, i64 12}
!11 = !{!"_ZTS8DataType", !7, i64 0}
!12 = !{!"_ZTS10DataFormat", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!10, !13, i64 8}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !20, i64 24}
!17 = !{!"_ZTS12RNNParamSpec", !18, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !19, i64 16, !19, i64 20, !20, i64 24, !19, i64 28, !21, i64 32}
!18 = !{!"_ZTS7RNNMode", !7, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS14ActivationMode", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!17, !18, i64 0}
!25 = !{i64 0, i64 4, !26, i64 4, i64 4, !27, i64 8, i64 4, !15, i64 12, i64 80, !28}
!26 = !{!11, !11, i64 0}
!27 = !{!12, !12, i64 0}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass