; LLVM IR from simonaertssen/MIT-6.172-Performance-Engineering-of-Software-Systems :: Week 1 Introduction/matrix-multiply (testbed)

; 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.timespec = type { i64, i64 }
%struct.matrix = type { i32, i32, ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [48 x i8], align 1
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca [20 x ptr], align 16
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %struct.timespec, align 8
  %34 = alloca %struct.timespec, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1000, ptr %14, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %50, %47, %2
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = call i32 @getopt(i32 noundef %38, ptr noundef %39, ptr noundef @.str) #7
  store i32 %40, ptr %6, align 4, !tbaa !5
  %41 = icmp ne i32 %40, -1
  br i1 %41, label %42, label %51

42:                                               ; preds = %37
  %43 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %43, label %47 [
    i32 117, label %44
    i32 112, label %45
    i32 122, label %46
  ]

44:                                               ; preds = %42
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %50

45:                                               ; preds = %42
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %50

46:                                               ; preds = %42
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %50

47:                                               ; preds = %42
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %48)
  br label %37, !llvm.loop !11

50:                                               ; preds = %46, %45, %44
  br label %37, !llvm.loop !11

51:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 16, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 160, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %69, %51
  %53 = load i32, ptr %17, align 4, !tbaa !5
  %54 = icmp slt i32 %53, 20
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %72

56:                                               ; preds = %52
  %57 = load i32, ptr %15, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noalias ptr @malloc(i64 noundef %58) #8
  %60 = load i32, ptr %17, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [20 x ptr], ptr %16, i64 0, i64 %61
  store ptr %59, ptr %62, align 8, !tbaa !9
  %63 = load i32, ptr %17, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [20 x ptr], ptr %16, i64 0, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = load i32, ptr %15, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  call void @llvm.memset.p0.i64(ptr align 4 %66, i8 1, i64 %68, i1 false)
  br label %69

69:                                               ; preds = %56
  %70 = load i32, ptr %17, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %17, align 4, !tbaa !5
  br label %52, !llvm.loop !13

72:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %97, %72
  %74 = load i32, ptr %19, align 4, !tbaa !5
  %75 = icmp slt i32 %74, 20
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 8, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %100

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %93, %77
  %79 = load i32, ptr %21, align 4, !tbaa !5
  %80 = icmp slt i32 %79, 4
  br i1 %80, label %82, label %81

81:                                               ; preds = %78
  store i32 11, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %96

82:                                               ; preds = %78
  %83 = load i32, ptr %19, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [20 x ptr], ptr %16, i64 0, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = load i32, ptr %21, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = load i32, ptr %18, align 4, !tbaa !5
  %92 = add nsw i32 %91, %90
  store i32 %92, ptr %18, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %82
  %94 = load i32, ptr %21, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %21, align 4, !tbaa !5
  br label %78, !llvm.loop !14

96:                                               ; preds = %81
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %19, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %19, align 4, !tbaa !5
  br label %73, !llvm.loop !15

100:                                              ; preds = %76
  %101 = load i32, ptr %18, align 4, !tbaa !5
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %105, label %103

103:                                              ; preds = %100
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %105

105:                                              ; preds = %103, %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %115, %105
  %107 = load i32, ptr %22, align 4, !tbaa !5
  %108 = icmp slt i32 %107, 20
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  store i32 14, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %118

110:                                              ; preds = %106
  %111 = load i32, ptr %22, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [20 x ptr], ptr %16, i64 0, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  call void @free(ptr noundef %114) #7
  br label %115

115:                                              ; preds = %110
  %116 = load i32, ptr %22, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %22, align 4, !tbaa !5
  br label %106, !llvm.loop !16

118:                                              ; preds = %109
  %119 = load ptr, ptr @stderr, align 8, !tbaa !9
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef @.str.3) #7
  %121 = call ptr @make_matrix(i32 noundef 1000, i32 noundef 1000)
  store ptr %121, ptr %11, align 8, !tbaa !9
  %122 = call ptr @make_matrix(i32 noundef 1000, i32 noundef 1000)
  store ptr %122, ptr %12, align 8, !tbaa !9
  %123 = call ptr @make_matrix(i32 noundef 1000, i32 noundef 1000)
  store ptr %123, ptr %13, align 8, !tbaa !9
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %195

126:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %157, %126
  %128 = load i32, ptr %23, align 4, !tbaa !5
  %129 = load ptr, ptr %11, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.matrix, ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 8, !tbaa !17
  %132 = icmp slt i32 %128, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %127
  store i32 17, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %160

134:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %153, %134
  %136 = load i32, ptr %24, align 4, !tbaa !5
  %137 = load ptr, ptr %11, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.matrix, ptr %137, i32 0, i32 1
  %139 = load i32, ptr %138, align 4, !tbaa !19
  %140 = icmp slt i32 %136, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %135
  store i32 20, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %156

142:                                              ; preds = %135
  %143 = load ptr, ptr %11, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.matrix, ptr %143, i32 0, i32 2
  %145 = load ptr, ptr %144, align 8, !tbaa !20
  %146 = load i32, ptr %23, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %145, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !9
  %150 = load i32, ptr %24, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i32, ptr %149, i64 %151
  store i32 0, ptr %152, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %142
  %154 = load i32, ptr %24, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %24, align 4, !tbaa !5
  br label %135, !llvm.loop !21

156:                                              ; preds = %141
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %23, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %23, align 4, !tbaa !5
  br label %127, !llvm.loop !22

160:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %191, %160
  %162 = load i32, ptr %25, align 4, !tbaa !5
  %163 = load ptr, ptr %12, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.matrix, ptr %163, i32 0, i32 0
  %165 = load i32, ptr %164, align 8, !tbaa !17
  %166 = icmp slt i32 %162, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %161
  store i32 23, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %194

168:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %187, %168
  %170 = load i32, ptr %26, align 4, !tbaa !5
  %171 = load ptr, ptr %12, align 8, !tbaa !9
  %172 = getelementptr inbounds %struct.matrix, ptr %171, i32 0, i32 1
  %173 = load i32, ptr %172, align 4, !tbaa !19
  %174 = icmp slt i32 %170, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %169
  store i32 26, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %190

176:                                              ; preds = %169
  %177 = load ptr, ptr %12, align 8, !tbaa !9
  %178 = getelementptr inbounds %struct.matrix, ptr %177, i32 0, i32 2
  %179 = load ptr, ptr %178, align 8, !tbaa !20
  %180 = load i32, ptr %25, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds ptr, ptr %179, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !9
  %184 = load i32, ptr %26, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds i32, ptr %183, i64 %185
  store i32 0, ptr %186, align 4, !tbaa !5
  br label %187

187:                                              ; preds = %176
  %188 = load i32, ptr %26, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %26, align 4, !tbaa !5
  br label %169, !llvm.loop !23

190:                                              ; preds = %175
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %25, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %25, align 4, !tbaa !5
  br label %161, !llvm.loop !24

194:                                              ; preds = %167
  br label %268

195:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %196

196:                                              ; preds = %228, %195
  %197 = load i32, ptr %27, align 4, !tbaa !5
  %198 = load ptr, ptr %11, align 8, !tbaa !9
  %199 = getelementptr inbounds %struct.matrix, ptr %198, i32 0, i32 0
  %200 = load i32, ptr %199, align 8, !tbaa !17
  %201 = icmp slt i32 %197, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %196
  store i32 29, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %231

203:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %204

204:                                              ; preds = %224, %203
  %205 = load i32, ptr %28, align 4, !tbaa !5
  %206 = load ptr, ptr %11, align 8, !tbaa !9
  %207 = getelementptr inbounds %struct.matrix, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 4, !tbaa !19
  %209 = icmp slt i32 %205, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %204
  store i32 32, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %227

211:                                              ; preds = %204
  %212 = call i32 @rand_r(ptr noundef %10) #7
  %213 = srem i32 %212, 10
  %214 = load ptr, ptr %11, align 8, !tbaa !9
  %215 = getelementptr inbounds %struct.matrix, ptr %214, i32 0, i32 2
  %216 = load ptr, ptr %215, align 8, !tbaa !20
  %217 = load i32, ptr %27, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds ptr, ptr %216, i64 %218
  %220 = load ptr, ptr %219, align 8, !tbaa !9
  %221 = load i32, ptr %28, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i32, ptr %220, i64 %222
  store i32 %213, ptr %223, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %211
  %225 = load i32, ptr %28, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %28, align 4, !tbaa !5
  br label %204, !llvm.loop !25

227:                                              ; preds = %210
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %27, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %27, align 4, !tbaa !5
  br label %196, !llvm.loop !26

231:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %232

232:                                              ; preds = %264, %231
  %233 = load i32, ptr %29, align 4, !tbaa !5
  %234 = load ptr, ptr %12, align 8, !tbaa !9
  %235 = getelementptr inbounds %struct.matrix, ptr %234, i32 0, i32 0
  %236 = load i32, ptr %235, align 8, !tbaa !17
  %237 = icmp slt i32 %233, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %232
  store i32 35, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %267

239:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %240

240:                                              ; preds = %260, %239
  %241 = load i32, ptr %30, align 4, !tbaa !5
  %242 = load ptr, ptr %12, align 8, !tbaa !9
  %243 = getelementptr inbounds %struct.matrix, ptr %242, i32 0, i32 1
  %244 = load i32, ptr %243, align 4, !tbaa !19
  %245 = icmp slt i32 %241, %244
  br i1 %245, label %247, label %246

246:                                              ; preds = %240
  store i32 38, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %263

247:                                              ; preds = %240
  %248 = call i32 @rand_r(ptr noundef %10) #7
  %249 = srem i32 %248, 10
  %250 = load ptr, ptr %12, align 8, !tbaa !9
  %251 = getelementptr inbounds %struct.matrix, ptr %250, i32 0, i32 2
  %252 = load ptr, ptr %251, align 8, !tbaa !20
  %253 = load i32, ptr %29, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds ptr, ptr %252, i64 %254
  %256 = load ptr, ptr %255, align 8, !tbaa !9
  %257 = load i32, ptr %30, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds i32, ptr %256, i64 %258
  store i32 %249, ptr %259, align 4, !tbaa !5
  br label %260

260:                                              ; preds = %247
  %261 = load i32, ptr %30, align 4, !tbaa !5
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %30, align 4, !tbaa !5
  br label %240, !llvm.loop !27

263:                                              ; preds = %246
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr %29, align 4, !tbaa !5
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %29, align 4, !tbaa !5
  br label %232, !llvm.loop !28

267:                                              ; preds = %238
  br label %268

268:                                              ; preds = %267, %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %269

269:                                              ; preds = %299, %268
  %270 = load i32, ptr %31, align 4, !tbaa !5
  %271 = load ptr, ptr %13, align 8, !tbaa !9
  %272 = getelementptr inbounds %struct.matrix, ptr %271, i32 0, i32 0
  %273 = load i32, ptr %272, align 8, !tbaa !17
  %274 = icmp slt i32 %270, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %269
  store i32 41, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %302

276:                                              ; preds = %269
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %277

277:                                              ; preds = %295, %276
  %278 = load i32, ptr %32, align 4, !tbaa !5
  %279 = load ptr, ptr %13, align 8, !tbaa !9
  %280 = getelementptr inbounds %struct.matrix, ptr %279, i32 0, i32 1
  %281 = load i32, ptr %280, align 4, !tbaa !19
  %282 = icmp slt i32 %278, %281
  br i1 %282, label %284, label %283

283:                                              ; preds = %277
  store i32 44, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %298

284:                                              ; preds = %277
  %285 = load ptr, ptr %13, align 8, !tbaa !9
  %286 = getelementptr inbounds %struct.matrix, ptr %285, i32 0, i32 2
  %287 = load ptr, ptr %286, align 8, !tbaa !20
  %288 = load i32, ptr %31, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds ptr, ptr %287, i64 %289
  %291 = load ptr, ptr %290, align 8, !tbaa !9
  %292 = load i32, ptr %32, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds i32, ptr %291, i64 %293
  store i32 0, ptr %294, align 4, !tbaa !5
  br label %295

295:                                              ; preds = %284
  %296 = load i32, ptr %32, align 4, !tbaa !5
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %32, align 4, !tbaa !5
  br label %277, !llvm.loop !29

298:                                              ; preds = %283
  br label %299

299:                                              ; preds = %298
  %300 = load i32, ptr %31, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %31, align 4, !tbaa !5
  br label %269, !llvm.loop !30

302:                                              ; preds = %275
  %303 = load i32, ptr %8, align 4, !tbaa !5
  %304 = icmp ne i32 %303, 0
  br i1 %304, label %305, label %312

305:                                              ; preds = %302
  %306 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %307 = load ptr, ptr %11, align 8, !tbaa !9
  call void @print_matrix(ptr noundef %307)
  %308 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %309 = load ptr, ptr %12, align 8, !tbaa !9
  call void @print_matrix(ptr noundef %309)
  %310 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %311 = load ptr, ptr %13, align 8, !tbaa !9
  call void @print_matrix(ptr noundef %311)
  br label %312

312:                                              ; preds = %305, %302
  %313 = load ptr, ptr @stderr, align 8, !tbaa !9
  %314 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %313, ptr noundef @.str.7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #7
  %315 = call { i64, i64 } @gettime()
  %316 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 0
  %317 = extractvalue { i64, i64 } %315, 0
  store i64 %317, ptr %316, align 8
  %318 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 1
  %319 = extractvalue { i64, i64 } %315, 1
  store i64 %319, ptr %318, align 8
  %320 = load ptr, ptr %11, align 8, !tbaa !9
  %321 = load ptr, ptr %12, align 8, !tbaa !9
  %322 = load ptr, ptr %13, align 8, !tbaa !9
  %323 = call i32 @matrix_multiply_run(ptr noundef %320, ptr noundef %321, ptr noundef %322)
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #7
  %324 = call { i64, i64 } @gettime()
  %325 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 0
  %326 = extractvalue { i64, i64 } %324, 0
  store i64 %326, ptr %325, align 8
  %327 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 1
  %328 = extractvalue { i64, i64 } %324, 1
  store i64 %328, ptr %327, align 8
  %329 = load i32, ptr %8, align 4, !tbaa !5
  %330 = icmp ne i32 %329, 0
  br i1 %330, label %331, label %336

331:                                              ; preds = %312
  %332 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %333 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %334 = load ptr, ptr %13, align 8, !tbaa !9
  call void @print_matrix(ptr noundef %334)
  %335 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  br label %336

336:                                              ; preds = %331, %312
  %337 = load i32, ptr %7, align 4, !tbaa !5
  %338 = icmp ne i32 %337, 0
  br i1 %338, label %339, label %352

339:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %340 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 0
  %341 = load i64, ptr %340, align 8
  %342 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 1
  %343 = load i64, ptr %342, align 8
  %344 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 0
  %345 = load i64, ptr %344, align 8
  %346 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 1
  %347 = load i64, ptr %346, align 8
  %348 = call double @tdiff(i64 %341, i64 %343, i64 %345, i64 %347)
  store double %348, ptr %35, align 8, !tbaa !31
  %349 = load double, ptr %35, align 8, !tbaa !31
  %350 = fmul double %349, 1.000000e+06
  %351 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %350)
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %364

352:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %353 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 0
  %354 = load i64, ptr %353, align 8
  %355 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 1
  %356 = load i64, ptr %355, align 8
  %357 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 0
  %358 = load i64, ptr %357, align 8
  %359 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 1
  %360 = load i64, ptr %359, align 8
  %361 = call double @tdiff(i64 %354, i64 %356, i64 %358, i64 %360)
  store double %361, ptr %36, align 8, !tbaa !31
  %362 = load double, ptr %36, align 8, !tbaa !31
  %363 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, double noundef %362)
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  br label %364

364:                                              ; preds = %352, %339
  %365 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free_matrix(ptr noundef %365)
  %366 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free_matrix(ptr noundef %366)
  %367 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free_matrix(ptr noundef %367)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 160, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %368 = load i32, ptr %3, align 4
  ret i32 %368
}

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

declare ptr @make_matrix(i32 noundef, i32 noundef) #3

; Function Attrs: nounwind
declare i32 @rand_r(ptr noundef) #2

declare void @print_matrix(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden { i64, i64 } @gettime() #6

declare i32 @matrix_multiply_run(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @tdiff(i64, i64, i64, i64) #6

declare void @free_matrix(ptr noundef) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { inlinehint 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 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !6, i64 0}
!18 = !{!"", !6, i64 0, !6, i64 4, !10, i64 8}
!19 = !{!18, !6, i64 4}
!20 = !{!18, !10, i64 8}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = !{!32, !32, i64 0}
!32 = !{!"double", !7, i64 0}


; 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 [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [34 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %.outer.outer

.outer.outer:                                     ; preds = %.loopexit215, %2
  %.not110 = phi i1 [ false, %.loopexit215 ], [ true, %2 ]
  %.088.ph.ph = phi i32 [ %.088.ph.ph231, %.loopexit215 ], [ 0, %2 ]
  %.0.ph.ph = phi i32 [ %.0.ph, %.loopexit215 ], [ 0, %2 ]
  br label %.outer.outer230

.outer.outer230:                                  ; preds = %4, %.outer.outer
  %.088.ph.ph231 = phi i32 [ %.088.ph.ph, %.outer.outer ], [ 1, %4 ]
  %.0.ph.ph232 = phi i32 [ %.0.ph.ph, %.outer.outer ], [ %.0.ph, %4 ]
  br label %.outer

.outer:                                           ; preds = %.outer.outer230, %.loopexit124.loopexit
  %.0.ph = phi i32 [ 1, %.loopexit124.loopexit ], [ %.0.ph.ph232, %.outer.outer230 ]
  br label %4

4:                                                ; preds = %.outer, %6
  %5 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #6
  switch i32 %5, label %6 [
    i32 -1, label %.preheader122.preheader._crit_edge
    i32 117, label %.loopexit124.loopexit
    i32 112, label %.outer.outer230
    i32 122, label %.loopexit215
  ], !llvm.loop !9

6:                                                ; preds = %4
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %5)
  br label %4, !llvm.loop !9

.loopexit215:                                     ; preds = %4
  br label %.outer.outer, !llvm.loop !9

.loopexit124.loopexit:                            ; preds = %4
  br label %.outer, !llvm.loop !9

.preheader122.preheader._crit_edge:               ; preds = %4
  %.pre = load ptr, ptr @stderr, align 8, !tbaa !11
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %.pre, ptr noundef nonnull @.str.3) #7
  %9 = tail call ptr @make_matrix(i32 noundef 1000, i32 noundef 1000) #6
  %10 = tail call ptr @make_matrix(i32 noundef 1000, i32 noundef 1000) #6
  %11 = tail call ptr @make_matrix(i32 noundef 1000, i32 noundef 1000) #6
  %12 = load i32, ptr %9, align 8, !tbaa !13
  %13 = icmp sgt i32 %12, 0
  br i1 %.not110, label %.preheader116, label %.preheader121

.preheader121:                                    ; preds = %.preheader122.preheader._crit_edge
  br i1 %13, label %.preheader120.lr.ph, label %.preheader118

.preheader120.lr.ph:                              ; preds = %.preheader121
  %14 = getelementptr inbounds i8, ptr %9, i64 4
  %15 = getelementptr inbounds i8, ptr %9, i64 8
  %16 = load i32, ptr %14, align 4, !tbaa !15
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader120, label %.preheader118

.preheader116:                                    ; preds = %.preheader122.preheader._crit_edge
  br i1 %13, label %.preheader115.lr.ph, label %.preheader114

.preheader115.lr.ph:                              ; preds = %.preheader116
  %18 = getelementptr inbounds i8, ptr %9, i64 4
  %19 = getelementptr inbounds i8, ptr %9, i64 8
  %20 = load i32, ptr %18, align 4, !tbaa !15
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.preheader115, label %.preheader114

.preheader120:                                    ; preds = %.preheader120.lr.ph, %._crit_edge
  %22 = phi i32 [ %34, %._crit_edge ], [ %12, %.preheader120.lr.ph ]
  %23 = phi i32 [ %35, %._crit_edge ], [ %16, %.preheader120.lr.ph ]
  %indvars.iv162 = phi i64 [ %indvars.iv.next163, %._crit_edge ], [ 0, %.preheader120.lr.ph ]
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader120
  %25 = load ptr, ptr %15, align 8, !tbaa !16
  %26 = getelementptr inbounds ptr, ptr %25, i64 %indvars.iv162
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  br label %38

.preheader118:                                    ; preds = %._crit_edge, %.preheader120.lr.ph, %.preheader121
  %28 = load i32, ptr %10, align 8, !tbaa !13
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.preheader117.lr.ph, label %.loopexit

.preheader117.lr.ph:                              ; preds = %.preheader118
  %30 = getelementptr inbounds i8, ptr %10, i64 4
  %31 = getelementptr inbounds i8, ptr %10, i64 8
  %32 = load i32, ptr %30, align 4, !tbaa !15
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.preheader117, label %.loopexit

._crit_edge.loopexit:                             ; preds = %38
  %.pre209 = load i32, ptr %9, align 8, !tbaa !13
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader120
  %34 = phi i32 [ %.pre209, %._crit_edge.loopexit ], [ %22, %.preheader120 ]
  %35 = phi i32 [ %40, %._crit_edge.loopexit ], [ %23, %.preheader120 ]
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %36 = sext i32 %34 to i64
  %37 = icmp slt i64 %indvars.iv.next163, %36
  br i1 %37, label %.preheader120, label %.preheader118, !llvm.loop !17

38:                                               ; preds = %.lr.ph, %38
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %38 ]
  %39 = getelementptr inbounds i32, ptr %27, i64 %indvars.iv
  store i32 0, ptr %39, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %14, align 4, !tbaa !15
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %38, label %._crit_edge.loopexit, !llvm.loop !19

.preheader117:                                    ; preds = %.preheader117.lr.ph, %._crit_edge135
  %43 = phi i32 [ %49, %._crit_edge135 ], [ %28, %.preheader117.lr.ph ]
  %44 = phi i32 [ %50, %._crit_edge135 ], [ %32, %.preheader117.lr.ph ]
  %indvars.iv168 = phi i64 [ %indvars.iv.next169, %._crit_edge135 ], [ 0, %.preheader117.lr.ph ]
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph134, label %._crit_edge135

.lr.ph134:                                        ; preds = %.preheader117
  %46 = load ptr, ptr %31, align 8, !tbaa !16
  %47 = getelementptr inbounds ptr, ptr %46, i64 %indvars.iv168
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  br label %53

._crit_edge135.loopexit:                          ; preds = %53
  %.pre210 = load i32, ptr %10, align 8, !tbaa !13
  br label %._crit_edge135

._crit_edge135:                                   ; preds = %._crit_edge135.loopexit, %.preheader117
  %49 = phi i32 [ %.pre210, %._crit_edge135.loopexit ], [ %43, %.preheader117 ]
  %50 = phi i32 [ %55, %._crit_edge135.loopexit ], [ %44, %.preheader117 ]
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %51 = sext i32 %49 to i64
  %52 = icmp slt i64 %indvars.iv.next169, %51
  br i1 %52, label %.preheader117, label %.loopexit, !llvm.loop !20

53:                                               ; preds = %.lr.ph134, %53
  %indvars.iv165 = phi i64 [ 0, %.lr.ph134 ], [ %indvars.iv.next166, %53 ]
  %54 = getelementptr inbounds i32, ptr %48, i64 %indvars.iv165
  store i32 0, ptr %54, align 4, !tbaa !5
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %55 = load i32, ptr %30, align 4, !tbaa !15
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next166, %56
  br i1 %57, label %53, label %._crit_edge135.loopexit, !llvm.loop !21

.preheader115:                                    ; preds = %.preheader115.lr.ph, %._crit_edge139
  %58 = phi i32 [ %67, %._crit_edge139 ], [ %12, %.preheader115.lr.ph ]
  %59 = phi i32 [ %68, %._crit_edge139 ], [ %20, %.preheader115.lr.ph ]
  %indvars.iv174 = phi i64 [ %indvars.iv.next175, %._crit_edge139 ], [ 0, %.preheader115.lr.ph ]
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph138, label %._crit_edge139

.preheader114:                                    ; preds = %._crit_edge139, %.preheader115.lr.ph, %.preheader116
  %61 = load i32, ptr %10, align 8, !tbaa !13
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %.preheader113.lr.ph, label %.loopexit

.preheader113.lr.ph:                              ; preds = %.preheader114
  %63 = getelementptr inbounds i8, ptr %10, i64 4
  %64 = getelementptr inbounds i8, ptr %10, i64 8
  %65 = load i32, ptr %63, align 4, !tbaa !15
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.preheader113, label %.loopexit

._crit_edge139.loopexit:                          ; preds = %.lr.ph138
  %.pre211 = load i32, ptr %9, align 8, !tbaa !13
  br label %._crit_edge139

._crit_edge139:                                   ; preds = %._crit_edge139.loopexit, %.preheader115
  %67 = phi i32 [ %.pre211, %._crit_edge139.loopexit ], [ %58, %.preheader115 ]
  %68 = phi i32 [ %77, %._crit_edge139.loopexit ], [ %59, %.preheader115 ]
  %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
  %69 = sext i32 %67 to i64
  %70 = icmp slt i64 %indvars.iv.next175, %69
  br i1 %70, label %.preheader115, label %.preheader114, !llvm.loop !22

.lr.ph138:                                        ; preds = %.preheader115, %.lr.ph138
  %indvars.iv171 = phi i64 [ %indvars.iv.next172, %.lr.ph138 ], [ 0, %.preheader115 ]
  %71 = call i32 @rand_r(ptr noundef nonnull %3) #6
  %72 = srem i32 %71, 10
  %73 = load ptr, ptr %19, align 8, !tbaa !16
  %74 = getelementptr inbounds ptr, ptr %73, i64 %indvars.iv174
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = getelementptr inbounds i32, ptr %75, i64 %indvars.iv171
  store i32 %72, ptr %76, align 4, !tbaa !5
  %indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
  %77 = load i32, ptr %18, align 4, !tbaa !15
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next172, %78
  br i1 %79, label %.lr.ph138, label %._crit_edge139.loopexit, !llvm.loop !23

.preheader113:                                    ; preds = %.preheader113.lr.ph, %._crit_edge143
  %80 = phi i32 [ %83, %._crit_edge143 ], [ %61, %.preheader113.lr.ph ]
  %81 = phi i32 [ %84, %._crit_edge143 ], [ %65, %.preheader113.lr.ph ]
  %indvars.iv180 = phi i64 [ %indvars.iv.next181, %._crit_edge143 ], [ 0, %.preheader113.lr.ph ]
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.lr.ph142, label %._crit_edge143

._crit_edge143.loopexit:                          ; preds = %.lr.ph142
  %.pre212 = load i32, ptr %10, align 8, !tbaa !13
  br label %._crit_edge143

._crit_edge143:                                   ; preds = %._crit_edge143.loopexit, %.preheader113
  %83 = phi i32 [ %.pre212, %._crit_edge143.loopexit ], [ %80, %.preheader113 ]
  %84 = phi i32 [ %93, %._crit_edge143.loopexit ], [ %81, %.preheader113 ]
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %85 = sext i32 %83 to i64
  %86 = icmp slt i64 %indvars.iv.next181, %85
  br i1 %86, label %.preheader113, label %.loopexit, !llvm.loop !24

.lr.ph142:                                        ; preds = %.preheader113, %.lr.ph142
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %.lr.ph142 ], [ 0, %.preheader113 ]
  %87 = call i32 @rand_r(ptr noundef nonnull %3) #6
  %88 = srem i32 %87, 10
  %89 = load ptr, ptr %64, align 8, !tbaa !16
  %90 = getelementptr inbounds ptr, ptr %89, i64 %indvars.iv180
  %91 = load ptr, ptr %90, align 8, !tbaa !11
  %92 = getelementptr inbounds i32, ptr %91, i64 %indvars.iv177
  store i32 %88, ptr %92, align 4, !tbaa !5
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %93 = load i32, ptr %63, align 4, !tbaa !15
  %94 = sext i32 %93 to i64
  %95 = icmp slt i64 %indvars.iv.next178, %94
  br i1 %95, label %.lr.ph142, label %._crit_edge143.loopexit, !llvm.loop !25

.loopexit:                                        ; preds = %._crit_edge135, %._crit_edge143, %.preheader113.lr.ph, %.preheader117.lr.ph, %.preheader118, %.preheader114
  %96 = load i32, ptr %11, align 8, !tbaa !13
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.preheader.lr.ph, label %._crit_edge149

.preheader.lr.ph:                                 ; preds = %.loopexit
  %98 = getelementptr inbounds i8, ptr %11, i64 4
  %99 = getelementptr inbounds i8, ptr %11, i64 8
  %100 = load i32, ptr %98, align 4, !tbaa !15
  %101 = icmp sgt i32 %100, 0
  br i1 %101, label %.preheader, label %._crit_edge149

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge147
  %102 = phi i32 [ %108, %._crit_edge147 ], [ %96, %.preheader.lr.ph ]
  %103 = phi i32 [ %109, %._crit_edge147 ], [ %100, %.preheader.lr.ph ]
  %indvars.iv186 = phi i64 [ %indvars.iv.next187, %._crit_edge147 ], [ 0, %.preheader.lr.ph ]
  %104 = icmp sgt i32 %103, 0
  br i1 %104, label %.lr.ph146, label %._crit_edge147

.lr.ph146:                                        ; preds = %.preheader
  %105 = load ptr, ptr %99, align 8, !tbaa !16
  %106 = getelementptr inbounds ptr, ptr %105, i64 %indvars.iv186
  %107 = load ptr, ptr %106, align 8, !tbaa !11
  br label %112

._crit_edge149:                                   ; preds = %._crit_edge147, %.preheader.lr.ph, %.loopexit
  %.not111 = icmp eq i32 %.088.ph.ph231, 0
  br i1 %.not111, label %121, label %117

._crit_edge147.loopexit:                          ; preds = %112
  %.pre213 = load i32, ptr %11, align 8, !tbaa !13
  br label %._crit_edge147

._crit_edge147:                                   ; preds = %._crit_edge147.loopexit, %.preheader
  %108 = phi i32 [ %.pre213, %._crit_edge147.loopexit ], [ %102, %.preheader ]
  %109 = phi i32 [ %114, %._crit_edge147.loopexit ], [ %103, %.preheader ]
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %110 = sext i32 %108 to i64
  %111 = icmp slt i64 %indvars.iv.next187, %110
  br i1 %111, label %.preheader, label %._crit_edge149, !llvm.loop !26

112:                                              ; preds = %.lr.ph146, %112
  %indvars.iv183 = phi i64 [ 0, %.lr.ph146 ], [ %indvars.iv.next184, %112 ]
  %113 = getelementptr inbounds i32, ptr %107, i64 %indvars.iv183
  store i32 0, ptr %113, align 4, !tbaa !5
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %114 = load i32, ptr %98, align 4, !tbaa !15
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next184, %115
  br i1 %116, label %112, label %._crit_edge147.loopexit, !llvm.loop !27

117:                                              ; preds = %._crit_edge149
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @print_matrix(ptr noundef nonnull %9) #6
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  call void @print_matrix(ptr noundef %10) #6
  %120 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @print_matrix(ptr noundef nonnull %11) #6
  br label %121

121:                                              ; preds = %117, %._crit_edge149
  %122 = load ptr, ptr @stderr, align 8, !tbaa !11
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef nonnull @.str.7) #7
  %124 = call { i64, i64 } @gettime()
  %125 = extractvalue { i64, i64 } %124, 0
  %126 = extractvalue { i64, i64 } %124, 1
  %127 = call i32 @matrix_multiply_run(ptr noundef nonnull %9, ptr noundef %10, ptr noundef nonnull %11) #6
  %128 = call { i64, i64 } @gettime()
  %129 = extractvalue { i64, i64 } %128, 0
  %130 = extractvalue { i64, i64 } %128, 1
  br i1 %.not111, label %135, label %131

131:                                              ; preds = %121
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %133 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  call void @print_matrix(ptr noundef nonnull %11) #6
  %134 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  br label %135

135:                                              ; preds = %131, %121
  %.not112 = icmp eq i32 %.0.ph, 0
  %136 = call double @tdiff(i64 %125, i64 %126, i64 %129, i64 %130)
  br i1 %.not112, label %140, label %137

137:                                              ; preds = %135
  %138 = fmul double %136, 1.000000e+06
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %138)
  br label %142

140:                                              ; preds = %135
  %141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %136)
  br label %142

142:                                              ; preds = %140, %137
  call void @free_matrix(ptr noundef nonnull %9) #6
  call void @free_matrix(ptr noundef %10) #6
  call void @free_matrix(ptr noundef nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i32 0
}

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

declare ptr @make_matrix(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @rand_r(ptr noundef) local_unnamed_addr #2

declare void @print_matrix(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden { i64, i64 } @gettime() local_unnamed_addr #5

declare i32 @matrix_multiply_run(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @tdiff(i64, i64, i64, i64) local_unnamed_addr #5

declare void @free_matrix(ptr noundef) local_unnamed_addr #4

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { cold 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !6, i64 4, !12, i64 8}
!15 = !{!14, !6, i64 4}
!16 = !{!14, !12, i64 8}
!17 = distinct !{!17, !10, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10, !18}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10, !18}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10, !18}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10, !18}
!27 = distinct !{!27, !10}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass