; LLVM IR from libxsmm/libxsmm :: src (generator_gemm_reference_impl)

; 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.libxsmm_gemm_def = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_calculate_brgemm_offsets = external hidden unnamed_addr constant [119 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_calculate_brgemm_offsets(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %13, i32 0, i32 25
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %34

17:                                               ; preds = %6
  %18 = load ptr, ptr %12, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %18, i32 0, i32 57
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = load i64, ptr %11, align 8, !tbaa !9
  %22 = getelementptr inbounds ptr, ptr %20, i64 %21
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %23, ptr %24, align 8, !tbaa !5
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %25, i32 0, i32 58
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = load i64, ptr %11, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %27, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %30, ptr %31, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %32, align 8, !tbaa !9
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 0, ptr %33, align 8, !tbaa !9
  br label %307

34:                                               ; preds = %6
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %35, i32 0, i32 25
  %37 = load i32, ptr %36, align 4, !tbaa !11
  %38 = icmp eq i32 %37, 2
  br i1 %38, label %39, label %284

39:                                               ; preds = %34
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %40, i32 0, i32 55
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %43 = load i64, ptr %11, align 8, !tbaa !9
  %44 = getelementptr inbounds i64, ptr %42, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !19
  %49 = icmp eq i32 0, %48
  br i1 %49, label %50, label %51

50:                                               ; preds = %39
  br label %157

51:                                               ; preds = %39
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !19
  %55 = icmp eq i32 1, %54
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  br label %155

57:                                               ; preds = %51
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !19
  %61 = icmp eq i32 2, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %57
  br label %153

63:                                               ; preds = %57
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !19
  %67 = icmp eq i32 3, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  br label %151

69:                                               ; preds = %63
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !19
  %73 = icmp eq i32 4, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %69
  br label %149

75:                                               ; preds = %69
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !19
  %79 = icmp eq i32 5, %78
  br i1 %79, label %80, label %81

80:                                               ; preds = %75
  br label %147

81:                                               ; preds = %75
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !19
  %85 = icmp eq i32 6, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %81
  br label %145

87:                                               ; preds = %81
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !19
  %91 = icmp eq i32 7, %90
  br i1 %91, label %92, label %93

92:                                               ; preds = %87
  br label %143

93:                                               ; preds = %87
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !19
  %97 = icmp eq i32 8, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %93
  br label %141

99:                                               ; preds = %93
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !19
  %103 = icmp eq i32 9, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %99
  br label %139

105:                                              ; preds = %99
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !19
  %109 = icmp eq i32 10, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %105
  br label %137

111:                                              ; preds = %105
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 8, !tbaa !19
  %115 = icmp eq i32 11, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %111
  br label %135

117:                                              ; preds = %111
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %119, align 8, !tbaa !19
  %121 = icmp eq i32 12, %120
  br i1 %121, label %122, label %123

122:                                              ; preds = %117
  br label %133

123:                                              ; preds = %117
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %125, align 8, !tbaa !19
  %127 = icmp eq i32 13, %126
  br i1 %127, label %128, label %129

128:                                              ; preds = %123
  br label %131

129:                                              ; preds = %123
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 122, ptr noundef @__PRETTY_FUNCTION__.libxsmm_calculate_brgemm_offsets) #2
  unreachable

130:                                              ; No predecessors!
  br label %131

131:                                              ; preds = %130, %128
  %132 = phi i32 [ 1, %128 ], [ 0, %130 ]
  br label %133

133:                                              ; preds = %131, %122
  %134 = phi i32 [ 1, %122 ], [ %132, %131 ]
  br label %135

135:                                              ; preds = %133, %116
  %136 = phi i32 [ 2, %116 ], [ %134, %133 ]
  br label %137

137:                                              ; preds = %135, %110
  %138 = phi i32 [ 2, %110 ], [ %136, %135 ]
  br label %139

139:                                              ; preds = %137, %104
  %140 = phi i32 [ 4, %104 ], [ %138, %137 ]
  br label %141

141:                                              ; preds = %139, %98
  %142 = phi i32 [ 4, %98 ], [ %140, %139 ]
  br label %143

143:                                              ; preds = %141, %92
  %144 = phi i32 [ 8, %92 ], [ %142, %141 ]
  br label %145

145:                                              ; preds = %143, %86
  %146 = phi i32 [ 8, %86 ], [ %144, %143 ]
  br label %147

147:                                              ; preds = %145, %80
  %148 = phi i32 [ 1, %80 ], [ %146, %145 ]
  br label %149

149:                                              ; preds = %147, %74
  %150 = phi i32 [ 1, %74 ], [ %148, %147 ]
  br label %151

151:                                              ; preds = %149, %68
  %152 = phi i32 [ 2, %68 ], [ %150, %149 ]
  br label %153

153:                                              ; preds = %151, %62
  %154 = phi i32 [ 2, %62 ], [ %152, %151 ]
  br label %155

155:                                              ; preds = %153, %56
  %156 = phi i32 [ 4, %56 ], [ %154, %153 ]
  br label %157

157:                                              ; preds = %155, %50
  %158 = phi i32 [ 8, %50 ], [ %156, %155 ]
  %159 = sext i32 %158 to i64
  %160 = sdiv i64 %45, %159
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %160, ptr %161, align 8, !tbaa !9
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %162, i32 0, i32 56
  %164 = load ptr, ptr %163, align 8, !tbaa !20
  %165 = load i64, ptr %11, align 8, !tbaa !9
  %166 = getelementptr inbounds i64, ptr %164, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !9
  %168 = load ptr, ptr %12, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %168, i32 0, i32 1
  %170 = load i32, ptr %169, align 4, !tbaa !21
  %171 = icmp eq i32 0, %170
  br i1 %171, label %172, label %173

172:                                              ; preds = %157
  br label %279

173:                                              ; preds = %157
  %174 = load ptr, ptr %12, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %174, i32 0, i32 1
  %176 = load i32, ptr %175, align 4, !tbaa !21
  %177 = icmp eq i32 1, %176
  br i1 %177, label %178, label %179

178:                                              ; preds = %173
  br label %277

179:                                              ; preds = %173
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %180, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !21
  %183 = icmp eq i32 2, %182
  br i1 %183, label %184, label %185

184:                                              ; preds = %179
  br label %275

185:                                              ; preds = %179
  %186 = load ptr, ptr %12, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %186, i32 0, i32 1
  %188 = load i32, ptr %187, align 4, !tbaa !21
  %189 = icmp eq i32 3, %188
  br i1 %189, label %190, label %191

190:                                              ; preds = %185
  br label %273

191:                                              ; preds = %185
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %192, i32 0, i32 1
  %194 = load i32, ptr %193, align 4, !tbaa !21
  %195 = icmp eq i32 4, %194
  br i1 %195, label %196, label %197

196:                                              ; preds = %191
  br label %271

197:                                              ; preds = %191
  %198 = load ptr, ptr %12, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %198, i32 0, i32 1
  %200 = load i32, ptr %199, align 4, !tbaa !21
  %201 = icmp eq i32 5, %200
  br i1 %201, label %202, label %203

202:                                              ; preds = %197
  br label %269

203:                                              ; preds = %197
  %204 = load ptr, ptr %12, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %204, i32 0, i32 1
  %206 = load i32, ptr %205, align 4, !tbaa !21
  %207 = icmp eq i32 6, %206
  br i1 %207, label %208, label %209

208:                                              ; preds = %203
  br label %267

209:                                              ; preds = %203
  %210 = load ptr, ptr %12, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %210, i32 0, i32 1
  %212 = load i32, ptr %211, align 4, !tbaa !21
  %213 = icmp eq i32 7, %212
  br i1 %213, label %214, label %215

214:                                              ; preds = %209
  br label %265

215:                                              ; preds = %209
  %216 = load ptr, ptr %12, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %216, i32 0, i32 1
  %218 = load i32, ptr %217, align 4, !tbaa !21
  %219 = icmp eq i32 8, %218
  br i1 %219, label %220, label %221

220:                                              ; preds = %215
  br label %263

221:                                              ; preds = %215
  %222 = load ptr, ptr %12, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %222, i32 0, i32 1
  %224 = load i32, ptr %223, align 4, !tbaa !21
  %225 = icmp eq i32 9, %224
  br i1 %225, label %226, label %227

226:                                              ; preds = %221
  br label %261

227:                                              ; preds = %221
  %228 = load ptr, ptr %12, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %228, i32 0, i32 1
  %230 = load i32, ptr %229, align 4, !tbaa !21
  %231 = icmp eq i32 10, %230
  br i1 %231, label %232, label %233

232:                                              ; preds = %227
  br label %259

233:                                              ; preds = %227
  %234 = load ptr, ptr %12, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %234, i32 0, i32 1
  %236 = load i32, ptr %235, align 4, !tbaa !21
  %237 = icmp eq i32 11, %236
  br i1 %237, label %238, label %239

238:                                              ; preds = %233
  br label %257

239:                                              ; preds = %233
  %240 = load ptr, ptr %12, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %240, i32 0, i32 1
  %242 = load i32, ptr %241, align 4, !tbaa !21
  %243 = icmp eq i32 12, %242
  br i1 %243, label %244, label %245

244:                                              ; preds = %239
  br label %255

245:                                              ; preds = %239
  %246 = load ptr, ptr %12, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %246, i32 0, i32 1
  %248 = load i32, ptr %247, align 4, !tbaa !21
  %249 = icmp eq i32 13, %248
  br i1 %249, label %250, label %251

250:                                              ; preds = %245
  br label %253

251:                                              ; preds = %245
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 123, ptr noundef @__PRETTY_FUNCTION__.libxsmm_calculate_brgemm_offsets) #2
  unreachable

252:                                              ; No predecessors!
  br label %253

253:                                              ; preds = %252, %250
  %254 = phi i32 [ 1, %250 ], [ 0, %252 ]
  br label %255

255:                                              ; preds = %253, %244
  %256 = phi i32 [ 1, %244 ], [ %254, %253 ]
  br label %257

257:                                              ; preds = %255, %238
  %258 = phi i32 [ 2, %238 ], [ %256, %255 ]
  br label %259

259:                                              ; preds = %257, %232
  %260 = phi i32 [ 2, %232 ], [ %258, %257 ]
  br label %261

261:                                              ; preds = %259, %226
  %262 = phi i32 [ 4, %226 ], [ %260, %259 ]
  br label %263

263:                                              ; preds = %261, %220
  %264 = phi i32 [ 4, %220 ], [ %262, %261 ]
  br label %265

265:                                              ; preds = %263, %214
  %266 = phi i32 [ 8, %214 ], [ %264, %263 ]
  br label %267

267:                                              ; preds = %265, %208
  %268 = phi i32 [ 8, %208 ], [ %266, %265 ]
  br label %269

269:                                              ; preds = %267, %202
  %270 = phi i32 [ 1, %202 ], [ %268, %267 ]
  br label %271

271:                                              ; preds = %269, %196
  %272 = phi i32 [ 1, %196 ], [ %270, %269 ]
  br label %273

273:                                              ; preds = %271, %190
  %274 = phi i32 [ 2, %190 ], [ %272, %271 ]
  br label %275

275:                                              ; preds = %273, %184
  %276 = phi i32 [ 2, %184 ], [ %274, %273 ]
  br label %277

277:                                              ; preds = %275, %178
  %278 = phi i32 [ 4, %178 ], [ %276, %275 ]
  br label %279

279:                                              ; preds = %277, %172
  %280 = phi i32 [ 8, %172 ], [ %278, %277 ]
  %281 = sext i32 %280 to i64
  %282 = sdiv i64 %167, %281
  %283 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %282, ptr %283, align 8, !tbaa !9
  br label %306

284:                                              ; preds = %34
  %285 = load ptr, ptr %12, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %285, i32 0, i32 25
  %287 = load i32, ptr %286, align 4, !tbaa !11
  %288 = icmp eq i32 %287, 3
  br i1 %288, label %289, label %302

289:                                              ; preds = %284
  %290 = load ptr, ptr %12, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %290, i32 0, i32 53
  %292 = load i64, ptr %291, align 8, !tbaa !22
  %293 = load i64, ptr %11, align 8, !tbaa !9
  %294 = mul nsw i64 %292, %293
  %295 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %294, ptr %295, align 8, !tbaa !9
  %296 = load ptr, ptr %12, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.libxsmm_gemm_def, ptr %296, i32 0, i32 54
  %298 = load i64, ptr %297, align 8, !tbaa !23
  %299 = load i64, ptr %11, align 8, !tbaa !9
  %300 = mul nsw i64 %298, %299
  %301 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %300, ptr %301, align 8, !tbaa !9
  br label %305

302:                                              ; preds = %284
  %303 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %303, align 8, !tbaa !9
  %304 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 0, ptr %304, align 8, !tbaa !9
  br label %305

305:                                              ; preds = %302, %289
  br label %306

306:                                              ; preds = %305, %279
  br label %307

307:                                              ; preds = %306, %17
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !13, i64 108}
!12 = !{!"libxsmm_gemm_def", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !14, i64 48, !14, i64 56, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !15, i64 124, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !13, i64 208, !13, i64 212, !13, i64 216, !13, i64 220, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236, !13, i64 240, !13, i64 244, !13, i64 248, !13, i64 252, !13, i64 256, !10, i64 264, !10, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !13, i64 320, !13, i64 324, !13, i64 328, !13, i64 332, !13, i64 336, !13, i64 340, !6, i64 344, !6, i64 352}
!13 = !{!"int", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!12, !6, i64 296}
!17 = !{!12, !6, i64 304}
!18 = !{!12, !6, i64 280}
!19 = !{!12, !13, i64 0}
!20 = !{!12, !6, i64 288}
!21 = !{!12, !13, i64 4}
!22 = !{!12, !10, i64 264}
!23 = !{!12, !10, i64 272}


; 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"

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_calculate_brgemm_offsets = external hidden unnamed_addr constant [119 x i8], align 1
@switch.table.libxsmm_calculate_brgemm_offsets.1 = private unnamed_addr constant [14 x i64] [i64 8, i64 4, i64 2, i64 2, i64 1, i64 1, i64 8, i64 8, i64 4, i64 4, i64 2, i64 2, i64 1, i64 1], align 8

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_calculate_brgemm_offsets(ptr nocapture noundef writeonly %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, i64 noundef %4, ptr nocapture noundef readonly %5) local_unnamed_addr #0 {
  %7 = getelementptr inbounds i8, ptr %5, i64 108
  %8 = load i32, ptr %7, align 4, !tbaa !5
  switch i32 %8, label %45 [
    i32 1, label %9
    i32 2, label %18
    i32 3, label %38
  ]

9:                                                ; preds = %6
  %10 = getelementptr inbounds i8, ptr %5, i64 296
  %11 = load ptr, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds ptr, ptr %11, i64 %4
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  store ptr %13, ptr %0, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %5, i64 304
  %15 = load ptr, ptr %14, align 8, !tbaa !16
  %16 = getelementptr inbounds ptr, ptr %15, i64 %4
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  store ptr %17, ptr %1, align 8, !tbaa !15
  store i64 0, ptr %2, align 8, !tbaa !17
  br label %46

18:                                               ; preds = %6
  %19 = load i32, ptr %5, align 8, !tbaa !18
  %20 = icmp ult i32 %19, 14
  br i1 %20, label %switch.lookup, label %21

21:                                               ; preds = %18
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 122, ptr noundef nonnull @__PRETTY_FUNCTION__.libxsmm_calculate_brgemm_offsets) #2
  unreachable

switch.lookup:                                    ; preds = %18
  %22 = getelementptr inbounds i8, ptr %5, i64 280
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %24 = getelementptr inbounds i64, ptr %23, i64 %4
  %25 = load i64, ptr %24, align 8, !tbaa !17
  %26 = zext nneg i32 %19 to i64
  %switch.gep = getelementptr inbounds [14 x i64], ptr @switch.table.libxsmm_calculate_brgemm_offsets.1, i64 0, i64 %26
  %switch.load = load i64, ptr %switch.gep, align 8
  %27 = sdiv i64 %25, %switch.load
  store i64 %27, ptr %2, align 8, !tbaa !17
  %28 = getelementptr inbounds i8, ptr %5, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !20
  %30 = icmp ult i32 %29, 14
  br i1 %30, label %switch.lookup73, label %31

31:                                               ; preds = %switch.lookup
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 123, ptr noundef nonnull @__PRETTY_FUNCTION__.libxsmm_calculate_brgemm_offsets) #2
  unreachable

switch.lookup73:                                  ; preds = %switch.lookup
  %32 = getelementptr inbounds i8, ptr %5, i64 288
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  %34 = getelementptr inbounds i64, ptr %33, i64 %4
  %35 = load i64, ptr %34, align 8, !tbaa !17
  %36 = zext nneg i32 %29 to i64
  %switch.gep74 = getelementptr inbounds [14 x i64], ptr @switch.table.libxsmm_calculate_brgemm_offsets.1, i64 0, i64 %36
  %switch.load75 = load i64, ptr %switch.gep74, align 8
  %37 = sdiv i64 %35, %switch.load75
  br label %46

38:                                               ; preds = %6
  %39 = getelementptr inbounds i8, ptr %5, i64 264
  %40 = load i64, ptr %39, align 8, !tbaa !22
  %41 = mul nsw i64 %40, %4
  store i64 %41, ptr %2, align 8, !tbaa !17
  %42 = getelementptr inbounds i8, ptr %5, i64 272
  %43 = load i64, ptr %42, align 8, !tbaa !23
  %44 = mul nsw i64 %43, %4
  br label %46

45:                                               ; preds = %6
  store i64 0, ptr %2, align 8, !tbaa !17
  br label %46

46:                                               ; preds = %switch.lookup73, %45, %38, %9
  %.sink = phi i64 [ %37, %switch.lookup73 ], [ 0, %45 ], [ %44, %38 ], [ 0, %9 ]
  store i64 %.sink, ptr %3, align 8, !tbaa !17
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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, !7, i64 108}
!6 = !{!"libxsmm_gemm_def", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !11, i64 124, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !7, i64 256, !13, i64 264, !13, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312, !7, i64 320, !7, i64 324, !7, i64 328, !7, i64 332, !7, i64 336, !7, i64 340, !12, i64 344, !12, i64 352}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long long", !8, i64 0}
!14 = !{!6, !12, i64 296}
!15 = !{!12, !12, i64 0}
!16 = !{!6, !12, i64 304}
!17 = !{!13, !13, i64 0}
!18 = !{!6, !7, i64 0}
!19 = !{!6, !12, i64 280}
!20 = !{!6, !7, i64 4}
!21 = !{!6, !12, i64 288}
!22 = !{!6, !13, i64 264}
!23 = !{!6, !13, i64 272}


; Effective O3 passes: ConstantMergePass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass