; LLVM IR from libxsmm/libxsmm :: samples/utilities/wrap (dgemm)

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

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [162 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @init(i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) #0

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  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
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = icmp eq i32 2, %26
  br i1 %27, label %28, label %33

28:                                               ; preds = %2
  %29 = load ptr, ptr %5, align 8, !tbaa !9
  %30 = getelementptr inbounds ptr, ptr %29, i64 1
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call i32 @atoi(ptr noundef %31) #8
  br label %34

33:                                               ; preds = %2
  br label %34

34:                                               ; preds = %33, %28
  %35 = phi i32 [ %32, %28 ], [ 0, %33 ]
  store i32 %35, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = icmp slt i32 0, %36
  br i1 %37, label %38, label %40

38:                                               ; preds = %34
  %39 = load i32, ptr %6, align 4, !tbaa !5
  br label %41

40:                                               ; preds = %34
  br label %41

41:                                               ; preds = %40, %38
  %42 = phi i32 [ %39, %38 ], [ 500, %40 ]
  store i32 %42, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = icmp slt i32 2, %43
  br i1 %44, label %45, label %50

45:                                               ; preds = %41
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %46, i64 1
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = call i32 @atoi(ptr noundef %48) #8
  br label %51

50:                                               ; preds = %41
  br label %51

51:                                               ; preds = %50, %45
  %52 = phi i32 [ %49, %45 ], [ 23, %50 ]
  store i32 %52, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = icmp slt i32 3, %53
  br i1 %54, label %55, label %60

55:                                               ; preds = %51
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = getelementptr inbounds ptr, ptr %56, i64 3
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = call i32 @atoi(ptr noundef %58) #8
  br label %62

60:                                               ; preds = %51
  %61 = load i32, ptr %8, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %60, %55
  %63 = phi i32 [ %59, %55 ], [ %61, %60 ]
  store i32 %63, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = icmp slt i32 2, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %62
  %67 = load ptr, ptr %5, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i64 2
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = call i32 @atoi(ptr noundef %69) #8
  br label %73

71:                                               ; preds = %62
  %72 = load i32, ptr %9, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %71, %66
  %74 = phi i32 [ %70, %66 ], [ %72, %71 ]
  store i32 %74, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = icmp slt i32 4, %75
  br i1 %76, label %77, label %82

77:                                               ; preds = %73
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = getelementptr inbounds ptr, ptr %78, i64 4
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = call i32 @atoi(ptr noundef %80) #8
  br label %84

82:                                               ; preds = %73
  %83 = load i32, ptr %8, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %82, %77
  %85 = phi i32 [ %81, %77 ], [ %83, %82 ]
  store i32 %85, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %86 = load i32, ptr %4, align 4, !tbaa !5
  %87 = icmp slt i32 5, %86
  br i1 %87, label %88, label %93

88:                                               ; preds = %84
  %89 = load ptr, ptr %5, align 8, !tbaa !9
  %90 = getelementptr inbounds ptr, ptr %89, i64 5
  %91 = load ptr, ptr %90, align 8, !tbaa !9
  %92 = call i32 @atoi(ptr noundef %91) #8
  br label %95

93:                                               ; preds = %84
  %94 = load i32, ptr %9, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %93, %88
  %96 = phi i32 [ %92, %88 ], [ %94, %93 ]
  store i32 %96, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = icmp slt i32 6, %97
  br i1 %98, label %99, label %104

99:                                               ; preds = %95
  %100 = load ptr, ptr %5, align 8, !tbaa !9
  %101 = getelementptr inbounds ptr, ptr %100, i64 6
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = call i32 @atoi(ptr noundef %102) #8
  br label %106

104:                                              ; preds = %95
  %105 = load i32, ptr %8, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %104, %99
  %107 = phi i32 [ %103, %99 ], [ %105, %104 ]
  store i32 %107, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %108 = load i32, ptr %4, align 4, !tbaa !5
  %109 = icmp slt i32 7, %108
  br i1 %109, label %110, label %115

110:                                              ; preds = %106
  %111 = load ptr, ptr %5, align 8, !tbaa !9
  %112 = getelementptr inbounds ptr, ptr %111, i64 7
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = call double @atof(ptr noundef %113) #8
  br label %116

115:                                              ; preds = %106
  br label %116

116:                                              ; preds = %115, %110
  %117 = phi double [ %114, %110 ], [ 1.000000e+00, %115 ]
  store double %117, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = icmp slt i32 8, %118
  br i1 %119, label %120, label %125

120:                                              ; preds = %116
  %121 = load ptr, ptr %5, align 8, !tbaa !9
  %122 = getelementptr inbounds ptr, ptr %121, i64 8
  %123 = load ptr, ptr %122, align 8, !tbaa !9
  %124 = call double @atof(ptr noundef %123) #8
  br label %126

125:                                              ; preds = %116
  br label %126

126:                                              ; preds = %125, %120
  %127 = phi double [ %124, %120 ], [ 1.000000e+00, %125 ]
  store double %127, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  store i8 78, ptr %16, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  store i8 78, ptr %17, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %128 = load i32, ptr %11, align 4, !tbaa !5
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = mul nsw i32 %128, %129
  store i32 %130, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = mul nsw i32 %131, %132
  store i32 %133, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = load i32, ptr %10, align 4, !tbaa !5
  %136 = mul nsw i32 %134, %135
  store i32 %136, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %137 = load i32, ptr %18, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = mul i64 8, %138
  %140 = call noalias ptr @malloc(i64 noundef %139) #9
  store ptr %140, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %141 = load i32, ptr %19, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = mul i64 8, %142
  %144 = call noalias ptr @malloc(i64 noundef %143) #9
  store ptr %144, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %145 = load i32, ptr %20, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = mul i64 8, %146
  %148 = call noalias ptr @malloc(i64 noundef %147) #9
  store ptr %148, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store double 1.000000e+00, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %149 = load ptr, ptr %21, align 8, !tbaa !9
  %150 = icmp ne ptr null, %149
  br i1 %150, label %151, label %158

151:                                              ; preds = %126
  %152 = load ptr, ptr %22, align 8, !tbaa !9
  %153 = icmp ne ptr null, %152
  br i1 %153, label %154, label %158

154:                                              ; preds = %151
  %155 = load ptr, ptr %23, align 8, !tbaa !9
  %156 = icmp ne ptr null, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %154
  br label %159

158:                                              ; preds = %154, %151, %126
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 79, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

159:                                              ; preds = %157
  %160 = load i32, ptr %4, align 4, !tbaa !5
  %161 = icmp slt i32 9, %160
  br i1 %161, label %162, label %167

162:                                              ; preds = %159
  %163 = load ptr, ptr %5, align 8, !tbaa !9
  %164 = getelementptr inbounds ptr, ptr %163, i64 9
  %165 = load ptr, ptr %164, align 8, !tbaa !9
  %166 = call i32 @atoi(ptr noundef %165) #8
  store i32 %166, ptr %7, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %162, %159
  %168 = load i32, ptr %8, align 4, !tbaa !5
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = load i32, ptr %9, align 4, !tbaa !5
  %171 = load double, ptr %14, align 8, !tbaa !11
  %172 = load ptr, ptr %21, align 8, !tbaa !9
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = load ptr, ptr %22, align 8, !tbaa !9
  %175 = load i32, ptr %12, align 4, !tbaa !5
  %176 = load double, ptr %15, align 8, !tbaa !11
  %177 = load ptr, ptr %23, align 8, !tbaa !9
  %178 = load i32, ptr %13, align 4, !tbaa !5
  %179 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef 78, i32 noundef 78, i32 noundef %168, i32 noundef %169, i32 noundef %170, double noundef %171, ptr noundef %172, i32 noundef %173, ptr noundef %174, i32 noundef %175, double noundef %176, ptr noundef %177, i32 noundef %178)
  %180 = load ptr, ptr %21, align 8, !tbaa !9
  %181 = load i32, ptr %8, align 4, !tbaa !5
  %182 = load i32, ptr %9, align 4, !tbaa !5
  %183 = load i32, ptr %11, align 4, !tbaa !5
  call void @init(i32 noundef 42, ptr noundef %180, i32 noundef %181, i32 noundef %182, i32 noundef %183, double noundef 1.000000e+00)
  %184 = load ptr, ptr %22, align 8, !tbaa !9
  %185 = load i32, ptr %9, align 4, !tbaa !5
  %186 = load i32, ptr %10, align 4, !tbaa !5
  %187 = load i32, ptr %12, align 4, !tbaa !5
  call void @init(i32 noundef 24, ptr noundef %184, i32 noundef %185, i32 noundef %186, i32 noundef %187, double noundef 1.000000e+00)
  %188 = load ptr, ptr %23, align 8, !tbaa !9
  %189 = load i32, ptr %8, align 4, !tbaa !5
  %190 = load i32, ptr %10, align 4, !tbaa !5
  %191 = load i32, ptr %13, align 4, !tbaa !5
  call void @init(i32 noundef 0, ptr noundef %188, i32 noundef %189, i32 noundef %190, i32 noundef %191, double noundef 1.000000e+00)
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %200, %167
  %193 = load i32, ptr %25, align 4, !tbaa !5
  %194 = load i32, ptr %7, align 4, !tbaa !5
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %196, label %203

196:                                              ; preds = %192
  %197 = load ptr, ptr %21, align 8, !tbaa !9
  %198 = load ptr, ptr %22, align 8, !tbaa !9
  %199 = load ptr, ptr %23, align 8, !tbaa !9
  call void @dgemm_(ptr noundef %16, ptr noundef %17, ptr noundef %8, ptr noundef %10, ptr noundef %9, ptr noundef %14, ptr noundef %197, ptr noundef %11, ptr noundef %198, ptr noundef %12, ptr noundef %15, ptr noundef %199, ptr noundef %13)
  br label %200

200:                                              ; preds = %196
  %201 = load i32, ptr %25, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %25, align 4, !tbaa !5
  br label %192, !llvm.loop !14

203:                                              ; preds = %192
  %204 = load i32, ptr %7, align 4, !tbaa !5
  %205 = icmp slt i32 0, %204
  br i1 %205, label %206, label %209

206:                                              ; preds = %203
  %207 = load i32, ptr %7, align 4, !tbaa !5
  %208 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %207)
  br label %212

209:                                              ; preds = %203
  %210 = load ptr, ptr @stderr, align 8, !tbaa !9
  %211 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.4) #7
  br label %212

212:                                              ; preds = %209, %206
  %213 = load ptr, ptr %21, align 8, !tbaa !9
  call void @free(ptr noundef %213) #7
  %214 = load ptr, ptr %22, align 8, !tbaa !9
  call void @free(ptr noundef %214) #7
  %215 = load ptr, ptr %23, align 8, !tbaa !9
  call void @free(ptr noundef %215) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret i32 0
}

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #2

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #2

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

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

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

declare void @dgemm_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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 [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [162 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @init(i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = icmp eq i32 %0, 2
  br i1 %13, label %14, label %19

14:                                               ; preds = %2
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call i32 @atoi(ptr nocapture noundef %16) #8
  %.fr = freeze i32 %17
  %18 = icmp sgt i32 %.fr, 0
  %spec.select = select i1 %18, i32 %.fr, i32 500
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 23, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 23, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  br label %.thread66

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  %20 = icmp sgt i32 %0, 2
  br i1 %20, label %21, label %.thread60

.thread60:                                        ; preds = %19
  store i32 23, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 23, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  br label %.thread66

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = tail call i32 @atoi(ptr nocapture noundef %23) #8
  store i32 %24, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %29, label %25

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %1, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = tail call i32 @atoi(ptr nocapture noundef %27) #8
  br label %29

.thread66:                                        ; preds = %.thread60, %14
  %.ph65 = phi i32 [ %spec.select, %14 ], [ 500, %.thread60 ]
  store i32 23, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  br label %.thread73

29:                                               ; preds = %21, %25
  %.ph58 = phi i32 [ %24, %21 ], [ %28, %25 ]
  store i32 %.ph58, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %30 = getelementptr inbounds i8, ptr %1, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = tail call i32 @atoi(ptr nocapture noundef %31) #8
  store i32 %32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  %33 = icmp ugt i32 %0, 4
  br i1 %33, label %36, label %.thread73

.thread73:                                        ; preds = %29, %.thread66
  %34 = phi i32 [ %24, %29 ], [ 23, %.thread66 ]
  %35 = phi i32 [ %.ph58, %29 ], [ 23, %.thread66 ]
  %.ph68 = phi i32 [ %32, %29 ], [ 23, %.thread66 ]
  %.ph70 = phi i32 [ 500, %29 ], [ %.ph65, %.thread66 ]
  store i32 %34, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  br label %.thread81

36:                                               ; preds = %29
  %37 = getelementptr inbounds i8, ptr %1, i64 32
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = tail call i32 @atoi(ptr nocapture noundef %38) #8
  store i32 %39, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %.not100 = icmp eq i32 %0, 5
  br i1 %.not100, label %.thread81, label %42

.thread81:                                        ; preds = %36, %.thread73
  %40 = phi i32 [ %24, %36 ], [ %34, %.thread73 ]
  %41 = phi i32 [ %.ph58, %36 ], [ %35, %.thread73 ]
  %.ph75 = phi i32 [ %39, %36 ], [ %34, %.thread73 ]
  %.ph77 = phi i32 [ 500, %36 ], [ %.ph70, %.thread73 ]
  %.ph79 = phi i32 [ %32, %36 ], [ %.ph68, %.thread73 ]
  store i32 %41, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  br label %.thread90

42:                                               ; preds = %36
  %43 = getelementptr inbounds i8, ptr %1, i64 40
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = tail call i32 @atoi(ptr nocapture noundef %44) #8
  store i32 %45, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  %46 = icmp ugt i32 %0, 6
  br i1 %46, label %49, label %.thread90

.thread90:                                        ; preds = %42, %.thread81
  %47 = phi i32 [ %24, %42 ], [ %40, %.thread81 ]
  %48 = phi i32 [ %.ph58, %42 ], [ %41, %.thread81 ]
  %.ph83 = phi i32 [ %45, %42 ], [ %41, %.thread81 ]
  %.ph84 = phi i32 [ %32, %42 ], [ %.ph79, %.thread81 ]
  %.ph86 = phi i32 [ 500, %42 ], [ %.ph77, %.thread81 ]
  %.ph88 = phi i32 [ %39, %42 ], [ %.ph75, %.thread81 ]
  store i32 %47, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  br label %.thread99

49:                                               ; preds = %42
  %50 = getelementptr inbounds i8, ptr %1, i64 48
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = tail call i32 @atoi(ptr nocapture noundef %51) #8
  store i32 %52, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %.not101 = icmp eq i32 %0, 7
  br i1 %.not101, label %.thread99, label %55

.thread99:                                        ; preds = %.thread90, %49
  %53 = phi i32 [ %47, %.thread90 ], [ %24, %49 ]
  %54 = phi i32 [ %48, %.thread90 ], [ %.ph58, %49 ]
  %.ph92 = phi i32 [ %47, %.thread90 ], [ %52, %49 ]
  %.ph93 = phi i32 [ %.ph88, %.thread90 ], [ %39, %49 ]
  %.ph95 = phi i32 [ %.ph86, %.thread90 ], [ 500, %49 ]
  %.ph97 = phi i32 [ %.ph84, %.thread90 ], [ %32, %49 ]
  %.ph98 = phi i32 [ %.ph83, %.thread90 ], [ %45, %49 ]
  store double 1.000000e+00, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  br label %64

55:                                               ; preds = %49
  %56 = getelementptr inbounds i8, ptr %1, i64 56
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = tail call double @atof(ptr noundef %57) #8
  store double %58, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %59 = icmp ugt i32 %0, 8
  br i1 %59, label %60, label %64

60:                                               ; preds = %55
  %61 = getelementptr inbounds i8, ptr %1, i64 64
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = tail call double @atof(ptr noundef %62) #8
  br label %64

64:                                               ; preds = %.thread99, %55, %60
  %65 = phi i32 [ %24, %60 ], [ %24, %55 ], [ %53, %.thread99 ]
  %66 = phi i32 [ %.ph58, %60 ], [ %.ph58, %55 ], [ %54, %.thread99 ]
  %67 = phi double [ %58, %60 ], [ %58, %55 ], [ 1.000000e+00, %.thread99 ]
  %68 = phi i32 [ %45, %60 ], [ %45, %55 ], [ %.ph98, %.thread99 ]
  %69 = phi i32 [ %32, %60 ], [ %32, %55 ], [ %.ph97, %.thread99 ]
  %70 = phi i32 [ 500, %60 ], [ 500, %55 ], [ %.ph95, %.thread99 ]
  %71 = phi i32 [ %39, %60 ], [ %39, %55 ], [ %.ph93, %.thread99 ]
  %72 = phi i32 [ %52, %60 ], [ %52, %55 ], [ %.ph92, %.thread99 ]
  %73 = phi double [ %63, %60 ], [ 1.000000e+00, %55 ], [ 1.000000e+00, %.thread99 ]
  store double %73, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #9
  store i8 78, ptr %11, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #9
  store i8 78, ptr %12, align 1, !tbaa !13
  %74 = mul nsw i32 %71, %66
  %75 = mul nsw i32 %69, %68
  %76 = mul nsw i32 %72, %69
  %77 = sext i32 %74 to i64
  %78 = shl nsw i64 %77, 3
  %79 = tail call noalias ptr @malloc(i64 noundef %78) #10
  %80 = sext i32 %75 to i64
  %81 = shl nsw i64 %80, 3
  %82 = tail call noalias ptr @malloc(i64 noundef %81) #10
  %83 = sext i32 %76 to i64
  %84 = shl nsw i64 %83, 3
  %85 = tail call noalias ptr @malloc(i64 noundef %84) #10
  %86 = icmp ne ptr %79, null
  %87 = icmp ne ptr %82, null
  %or.cond = and i1 %86, %87
  %88 = icmp ne ptr %85, null
  %or.cond3 = and i1 %or.cond, %88
  br i1 %or.cond3, label %90, label %89

89:                                               ; preds = %64
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 79, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

90:                                               ; preds = %64
  %91 = icmp sgt i32 %0, 9
  br i1 %91, label %92, label %96

92:                                               ; preds = %90
  %93 = getelementptr inbounds i8, ptr %1, i64 72
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = tail call i32 @atoi(ptr nocapture noundef %94) #8
  br label %96

96:                                               ; preds = %92, %90
  %.047 = phi i32 [ %95, %92 ], [ %70, %90 ]
  %97 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 78, i32 noundef 78, i32 noundef %65, i32 noundef %69, i32 noundef %66, double noundef %67, ptr noundef nonnull %79, i32 noundef %71, ptr noundef nonnull %82, i32 noundef %68, double noundef %73, ptr noundef nonnull %85, i32 noundef %72)
  tail call void @init(i32 noundef 42, ptr noundef nonnull %79, i32 noundef %65, i32 noundef %66, i32 noundef %71, double noundef 1.000000e+00)
  tail call void @init(i32 noundef 24, ptr noundef nonnull %82, i32 noundef %66, i32 noundef %69, i32 noundef %68, double noundef 1.000000e+00)
  tail call void @init(i32 noundef 0, ptr noundef nonnull %85, i32 noundef %65, i32 noundef %69, i32 noundef %72, double noundef 1.000000e+00)
  %98 = icmp sgt i32 %.047, 0
  br i1 %98, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %96, %.lr.ph
  %.0102 = phi i32 [ %99, %.lr.ph ], [ 0, %96 ]
  call void @dgemm_(ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef nonnull %9, ptr noundef nonnull %79, ptr noundef nonnull %6, ptr noundef nonnull %82, ptr noundef nonnull %7, ptr noundef nonnull %10, ptr noundef nonnull %85, ptr noundef nonnull %8) #9
  %99 = add nuw nsw i32 %.0102, 1
  %exitcond.not = icmp eq i32 %99, %.047
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph
  br i1 %98, label %100, label %._crit_edge.thread

100:                                              ; preds = %._crit_edge
  %101 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.047)
  br label %104

._crit_edge.thread:                               ; preds = %96, %._crit_edge
  %102 = load ptr, ptr @stderr, align 8, !tbaa !5
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef nonnull @.str.4) #12
  br label %104

104:                                              ; preds = %._crit_edge.thread, %100
  call void @free(ptr noundef %79) #9
  call void @free(ptr noundef %82) #9
  call void @free(ptr noundef %85) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  ret i32 0
}

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

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

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

declare void @dgemm_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 willreturn memory(read) }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { noreturn nounwind }
attributes #12 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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