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

; 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.EinsumParamSpec = type { [8 x i8], [8 x i8], [8 x i8], i32, i32, i32 }
%"class.std::unordered_map.18" = type { %"class.std::_Hashtable.19" }
%"class.std::_Hashtable.19" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

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

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

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

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

declare i32 @fflush(ptr noundef) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z24einsum_infer_output_sizeSt6vectorIP6TensorSaIS1_EE15EinsumParamSpecS1_P8ArchInfo(ptr noundef %0, ptr noundef byval(%struct.EinsumParamSpec) align 8 %1, ptr noundef %2, ptr noundef %3) #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.TensorDesc, align 8
  %12 = alloca %"class.std::unordered_map.18", align 8
  %13 = alloca %"class.std::unordered_map.18", align 8
  %14 = alloca %struct.TensorDesc, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.TensorDesc, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.TensorDesc, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.TensorDesc, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %41

25:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !9
  %26 = load i32, ptr %9, align 4, !tbaa !9
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %40

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

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

41:                                               ; preds = %40, %4
  %42 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 5
  %43 = load i32, ptr %42, align 8, !tbaa !13
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %57

45:                                               ; preds = %41
  %46 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 4
  %47 = load i32, ptr %46, align 4, !tbaa !15
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %49, label %57

49:                                               ; preds = %45
  %50 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 3
  %51 = load i32, ptr %50, align 8, !tbaa !16
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %49
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #8
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %11, ptr noundef nonnull align 8 dereferenceable(32) %56)
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef byval(%struct.TensorDesc) align 8 %11)
  store i32 0, ptr %5, align 4
  br label %199

57:                                               ; preds = %49, %45, %41
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #8
  call void @llvm.lifetime.start.p0(i64 92, ptr %14) #8
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #8
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %14, ptr noundef nonnull align 8 dereferenceable(32) %59)
          to label %60 unwind label %70

60:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 92, ptr %17) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %14, i64 92, i1 false), !tbaa.struct !17
  %61 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 5
  %62 = load i32, ptr %61, align 8, !tbaa !13
  %63 = getelementptr inbounds %struct.TensorDesc, ptr %17, i32 0, i32 2
  store i32 %62, ptr %63, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %64

64:                                               ; preds = %86, %60
  %65 = load i32, ptr %18, align 4, !tbaa !11
  %66 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 4
  %67 = load i32, ptr %66, align 4, !tbaa !15
  %68 = icmp slt i32 %65, %67
  br i1 %68, label %74, label %69

69:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %93

70:                                               ; preds = %57
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %15, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %16, align 4
  br label %198

74:                                               ; preds = %64
  %75 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %76 = load i32, ptr %18, align 4, !tbaa !11
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [20 x i32], ptr %75, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !11
  %80 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 1
  %81 = load i32, ptr %18, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [8 x i8], ptr %80, i64 0, i64 %82
  %84 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 1 dereferenceable(1) %83)
          to label %85 unwind label %89

85:                                               ; preds = %74
  store i32 %79, ptr %84, align 4, !tbaa !11
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %18, align 4, !tbaa !11
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %18, align 4, !tbaa !11
  br label %64, !llvm.loop !25

89:                                               ; preds = %74
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %15, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %197

93:                                               ; preds = %69
  %94 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %95 = icmp ugt i64 %94, 1
  br i1 %95, label %96, label %131

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 92, ptr %19) #8
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #8
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %19, ptr noundef nonnull align 8 dereferenceable(32) %98)
          to label %99 unwind label %106

99:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %100

100:                                              ; preds = %122, %99
  %101 = load i32, ptr %20, align 4, !tbaa !11
  %102 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 3
  %103 = load i32, ptr %102, align 8, !tbaa !16
  %104 = icmp slt i32 %101, %103
  br i1 %104, label %110, label %105

105:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %129

106:                                              ; preds = %96
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %15, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %16, align 4
  br label %130

110:                                              ; preds = %100
  %111 = getelementptr inbounds %struct.TensorDesc, ptr %19, i32 0, i32 3
  %112 = load i32, ptr %20, align 4, !tbaa !11
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [20 x i32], ptr %111, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !11
  %116 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 0
  %117 = load i32, ptr %20, align 4, !tbaa !11
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [8 x i8], ptr %116, i64 0, i64 %118
  %120 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 1 dereferenceable(1) %119)
          to label %121 unwind label %125

121:                                              ; preds = %110
  store i32 %115, ptr %120, align 4, !tbaa !11
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %20, align 4, !tbaa !11
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %20, align 4, !tbaa !11
  br label %100, !llvm.loop !27

125:                                              ; preds = %110
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %15, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %130

129:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 92, ptr %19) #8
  br label %131

130:                                              ; preds = %125, %106
  call void @llvm.lifetime.end.p0(i64 92, ptr %19) #8
  br label %197

131:                                              ; preds = %129, %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %132

132:                                              ; preds = %168, %131
  %133 = load i32, ptr %21, align 4, !tbaa !11
  %134 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 5
  %135 = load i32, ptr %134, align 8, !tbaa !13
  %136 = icmp slt i32 %133, %135
  br i1 %136, label %138, label %137

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

138:                                              ; preds = %132
  %139 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 2
  %140 = load i32, ptr %21, align 4, !tbaa !11
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [8 x i8], ptr %139, i64 0, i64 %141
  %143 = invoke noundef i64 @_ZNKSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 1 dereferenceable(1) %142)
          to label %144 unwind label %171

144:                                              ; preds = %138
  %145 = icmp ne i64 %143, 0
  br i1 %145, label %146, label %154

146:                                              ; preds = %144
  %147 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 2
  %148 = load i32, ptr %21, align 4, !tbaa !11
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [8 x i8], ptr %147, i64 0, i64 %149
  %151 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 1 dereferenceable(1) %150)
          to label %152 unwind label %171

152:                                              ; preds = %146
  %153 = load i32, ptr %151, align 4, !tbaa !11
  br label %162

154:                                              ; preds = %144
  %155 = getelementptr inbounds %struct.EinsumParamSpec, ptr %1, i32 0, i32 2
  %156 = load i32, ptr %21, align 4, !tbaa !11
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [8 x i8], ptr %155, i64 0, i64 %157
  %159 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 1 dereferenceable(1) %158)
          to label %160 unwind label %171

160:                                              ; preds = %154
  %161 = load i32, ptr %159, align 4, !tbaa !11
  br label %162

162:                                              ; preds = %160, %152
  %163 = phi i32 [ %153, %152 ], [ %161, %160 ]
  %164 = getelementptr inbounds %struct.TensorDesc, ptr %17, i32 0, i32 3
  %165 = load i32, ptr %21, align 4, !tbaa !11
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [20 x i32], ptr %164, i64 0, i64 %166
  store i32 %163, ptr %167, align 4, !tbaa !11
  br label %168

168:                                              ; preds = %162
  %169 = load i32, ptr %21, align 4, !tbaa !11
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %21, align 4, !tbaa !11
  br label %132, !llvm.loop !28

171:                                              ; preds = %154, %146, %138
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %15, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %197

175:                                              ; preds = %137
  %176 = getelementptr inbounds %struct.TensorDesc, ptr %17, i32 0, i32 2
  %177 = load i32, ptr %176, align 4, !tbaa !23
  %178 = icmp ugt i32 %177, 3
  br i1 %178, label %179, label %181

179:                                              ; preds = %175
  %180 = getelementptr inbounds %struct.TensorDesc, ptr %17, i32 0, i32 1
  store i32 0, ptr %180, align 4, !tbaa !29
  br label %190

181:                                              ; preds = %175
  %182 = getelementptr inbounds %struct.TensorDesc, ptr %17, i32 0, i32 2
  %183 = load i32, ptr %182, align 4, !tbaa !23
  %184 = icmp eq i32 %183, 3
  br i1 %184, label %185, label %187

185:                                              ; preds = %181
  %186 = getelementptr inbounds %struct.TensorDesc, ptr %17, i32 0, i32 1
  store i32 15, ptr %186, align 4, !tbaa !29
  br label %189

187:                                              ; preds = %181
  %188 = getelementptr inbounds %struct.TensorDesc, ptr %17, i32 0, i32 1
  store i32 14, ptr %188, align 4, !tbaa !29
  br label %189

189:                                              ; preds = %187, %185
  br label %190

190:                                              ; preds = %189, %179
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %17, i64 92, i1 false), !tbaa.struct !17
  invoke void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %191, ptr noundef byval(%struct.TensorDesc) align 8 %22)
          to label %192 unwind label %193

192:                                              ; preds = %190
  store i32 0, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 92, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr %14) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #8
  br label %199

193:                                              ; preds = %190
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %15, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %16, align 4
  br label %197

197:                                              ; preds = %193, %171, %130, %89
  call void @llvm.lifetime.end.p0(i64 92, ptr %17) #8
  br label %198

198:                                              ; preds = %197, %70
  call void @llvm.lifetime.end.p0(i64 92, ptr %14) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #8
  br label %201

199:                                              ; preds = %192, %53
  %200 = load i32, ptr %5, align 4
  ret i32 %200

201:                                              ; preds = %198
  %202 = load ptr, ptr %15, align 8
  %203 = load i32, ptr %16, align 4
  %204 = insertvalue { ptr, i32 } poison, ptr %202, 0
  %205 = insertvalue { ptr, i32 } %204, i32 %203, 1
  resume { ptr, i32 } %205
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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 = !{!14, !12, i64 32}
!14 = !{!"_ZTS15EinsumParamSpec", !7, i64 0, !7, i64 8, !7, i64 16, !12, i64 24, !12, i64 28, !12, i64 32}
!15 = !{!14, !12, i64 28}
!16 = !{!14, !12, i64 24}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !20, i64 8, i64 4, !11, i64 12, i64 80, !22}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS8DataType", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS10DataFormat", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !12, i64 8}
!24 = !{!"_ZTS10TensorDesc", !19, i64 0, !21, i64 4, !12, i64 8, !7, i64 12}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = !{!24, !21, i64 4}


; 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.EinsumParamSpec = type { [8 x i8], [8 x i8], [8 x i8], i32, i32, i32 }
%"class.std::unordered_map.18" = type { %"class.std::_Hashtable.19" }
%"class.std::_Hashtable.19" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
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 #5 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z24einsum_infer_output_sizeSt6vectorIP6TensorSaIS1_EE15EinsumParamSpecS1_P8ArchInfo(ptr noundef %0, ptr noundef byval(%struct.EinsumParamSpec) align 8 %1, ptr noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.TensorDesc, align 8
  %6 = alloca %"class.std::unordered_map.18", align 8
  %7 = alloca %"class.std::unordered_map.18", align 8
  %8 = alloca %struct.TensorDesc, align 4
  %9 = alloca %struct.TensorDesc, align 8
  %10 = alloca %struct.TensorDesc, align 4
  %11 = icmp eq ptr %2, null
  br i1 %11, label %12, label %22

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

22:                                               ; preds = %4
  %23 = getelementptr inbounds i8, ptr %1, i64 32
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = icmp eq i32 %24, 0
  %26 = getelementptr inbounds i8, ptr %1, i64 28
  %27 = load i32, ptr %26, align 4
  %28 = icmp eq i32 %27, 1
  %or.cond = select i1 %25, i1 %28, i1 false
  %29 = getelementptr inbounds i8, ptr %1, i64 24
  %30 = load i32, ptr %29, align 8
  %31 = icmp eq i32 %30, 0
  %or.cond5 = select i1 %or.cond, i1 %31, i1 false
  br i1 %or.cond5, label %32, label %35

32:                                               ; preds = %22
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #8
  %34 = load ptr, ptr %33, 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) %34)
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %5)
  br label %111

35:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #8
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %8) #8
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #8
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %8, ptr noundef nonnull align 8 dereferenceable(32) %37)
          to label %38 unwind label %47

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %9) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %9, ptr noundef nonnull align 4 dereferenceable(92) %8, i64 92, i1 false), !tbaa.struct !12
  %39 = load i32, ptr %23, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 %39, ptr %40, align 8, !tbaa !19
  %41 = load i32, ptr %26, align 4, !tbaa !21
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %38
  %43 = getelementptr inbounds i8, ptr %8, i64 12
  %44 = getelementptr inbounds i8, ptr %1, i64 8
  br label %49

._crit_edge:                                      ; preds = %54, %38
  %45 = call noundef i64 @_ZNKSt6vectorIP6TensorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %46 = icmp ugt i64 %45, 1
  br i1 %46, label %60, label %80

47:                                               ; preds = %35
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %110

49:                                               ; preds = %.lr.ph, %54
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %54 ]
  %50 = getelementptr inbounds [20 x i32], ptr %43, i64 0, i64 %indvars.iv
  %51 = load i32, ptr %50, align 4, !tbaa !17
  %52 = getelementptr inbounds [8 x i8], ptr %44, i64 0, i64 %indvars.iv
  %53 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 1 dereferenceable(1) %52)
          to label %54 unwind label %58

54:                                               ; preds = %49
  store i32 %51, ptr %53, align 4, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = load i32, ptr %26, align 4, !tbaa !21
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next, %56
  br i1 %57, label %49, label %._crit_edge, !llvm.loop !22

58:                                               ; preds = %49
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %109

60:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %10) #8
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP6TensorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #8
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  invoke void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %10, ptr noundef nonnull align 8 dereferenceable(32) %62)
          to label %.preheader unwind label %66

.preheader:                                       ; preds = %60
  %63 = load i32, ptr %29, align 8, !tbaa !24
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %.preheader
  %65 = getelementptr inbounds i8, ptr %10, i64 12
  br label %68

._crit_edge42:                                    ; preds = %73, %.preheader
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %10) #8
  br label %80

66:                                               ; preds = %60
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %79

68:                                               ; preds = %.lr.ph41, %73
  %indvars.iv48 = phi i64 [ 0, %.lr.ph41 ], [ %indvars.iv.next49, %73 ]
  %69 = getelementptr inbounds [20 x i32], ptr %65, i64 0, i64 %indvars.iv48
  %70 = load i32, ptr %69, align 4, !tbaa !17
  %71 = getelementptr inbounds [8 x i8], ptr %1, i64 0, i64 %indvars.iv48
  %72 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 1 dereferenceable(1) %71)
          to label %73 unwind label %77

73:                                               ; preds = %68
  store i32 %70, ptr %72, align 4, !tbaa !17
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %74 = load i32, ptr %29, align 8, !tbaa !24
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next49, %75
  br i1 %76, label %68, label %._crit_edge42, !llvm.loop !25

77:                                               ; preds = %68
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %79

79:                                               ; preds = %77, %66
  %.pn = phi { ptr, i32 } [ %78, %77 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %10) #8
  br label %109

80:                                               ; preds = %._crit_edge42, %._crit_edge
  %81 = load i32, ptr %23, align 8, !tbaa !9
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.lr.ph45, label %._crit_edge46

.lr.ph45:                                         ; preds = %80
  %83 = getelementptr inbounds i8, ptr %1, i64 16
  %84 = getelementptr inbounds i8, ptr %9, i64 12
  br label %86

._crit_edge46:                                    ; preds = %90, %80
  %85 = icmp ugt i32 %39, 3
  br i1 %85, label %98, label %100

86:                                               ; preds = %.lr.ph45, %90
  %indvars.iv51 = phi i64 [ 0, %.lr.ph45 ], [ %indvars.iv.next52, %90 ]
  %87 = getelementptr inbounds [8 x i8], ptr %83, i64 0, i64 %indvars.iv51
  %88 = invoke noundef i64 @_ZNKSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 1 dereferenceable(1) %87)
          to label %.invoke unwind label %96

.invoke:                                          ; preds = %86
  %.not = icmp eq i64 %88, 0
  %. = select i1 %.not, ptr %7, ptr %6
  %89 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %., ptr noundef nonnull align 1 dereferenceable(1) %87)
          to label %90 unwind label %96

90:                                               ; preds = %.invoke
  %91 = load i32, ptr %89, align 4, !tbaa !17
  %92 = getelementptr inbounds [20 x i32], ptr %84, i64 0, i64 %indvars.iv51
  store i32 %91, ptr %92, align 4, !tbaa !17
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %93 = load i32, ptr %23, align 8, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = icmp slt i64 %indvars.iv.next52, %94
  br i1 %95, label %86, label %._crit_edge46, !llvm.loop !26

96:                                               ; preds = %.invoke, %86
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %109

98:                                               ; preds = %._crit_edge46
  %99 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 0, ptr %99, align 4, !tbaa !27
  br label %105

100:                                              ; preds = %._crit_edge46
  %101 = icmp eq i32 %39, 3
  %102 = getelementptr inbounds i8, ptr %9, i64 4
  br i1 %101, label %103, label %104

103:                                              ; preds = %100
  store i32 15, ptr %102, align 4, !tbaa !27
  br label %105

104:                                              ; preds = %100
  store i32 14, ptr %102, align 4, !tbaa !27
  br label %105

105:                                              ; preds = %103, %104, %98
  invoke void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %9)
          to label %106 unwind label %107

106:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %8) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  br label %111

107:                                              ; preds = %105
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %109

109:                                              ; preds = %107, %96, %79, %58
  %.pn36 = phi { ptr, i32 } [ %59, %58 ], [ %.pn, %79 ], [ %97, %96 ], [ %108, %107 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #8
  br label %110

110:                                              ; preds = %109, %47
  %.pn36.pn = phi { ptr, i32 } [ %.pn36, %109 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %8) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #8
  call void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  resume { ptr, i32 } %.pn36.pn

111:                                              ; preds = %106, %32
  ret i32 0
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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, !11, i64 32}
!10 = !{!"_ZTS15EinsumParamSpec", !7, i64 0, !7, i64 8, !7, i64 16, !11, i64 24, !11, i64 28, !11, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{i64 0, i64 4, !13, i64 4, i64 4, !15, i64 8, i64 4, !17, i64 12, i64 80, !18}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS8DataType", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTS10DataFormat", !7, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !11, i64 8}
!20 = !{!"_ZTS10TensorDesc", !14, i64 0, !16, i64 4, !11, i64 8, !7, i64 12}
!21 = !{!10, !11, i64 28}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!10, !11, i64 24}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = !{!20, !16, i64 4}


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