; LLVM IR from HarshCasper/NeoAlgo :: C/math (matrix_addition)

; 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 [60 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca [10 x [10 x i32]], align 16
  %8 = alloca [10 x [10 x i32]], align 16
  %9 = alloca [10 x [10 x i32]], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2, ptr noundef %3)
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4, ptr noundef %5)
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = icmp ne i32 %20, %21
  br i1 %22, label %27, label %23

23:                                               ; preds = %0
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = icmp ne i32 %24, %25
  br i1 %26, label %27, label %29

27:                                               ; preds = %23, %0
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  br label %123

29:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 400, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 400, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 400, ptr %9) #3
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %54, %29
  %32 = load i32, ptr %10, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %57

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %50, %36
  %38 = load i32, ptr %11, align 4, !tbaa !5
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %53

42:                                               ; preds = %37
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [10 x [10 x i32]], ptr %7, i64 0, i64 %44
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [10 x i32], ptr %45, i64 0, i64 %47
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %48)
  br label %50

50:                                               ; preds = %42
  %51 = load i32, ptr %11, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %11, align 4, !tbaa !5
  br label %37, !llvm.loop !9

53:                                               ; preds = %41
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %10, align 4, !tbaa !5
  br label %31, !llvm.loop !11

57:                                               ; preds = %35
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %82, %57
  %60 = load i32, ptr %12, align 4, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %85

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %78, %64
  %66 = load i32, ptr %13, align 4, !tbaa !5
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %81

70:                                               ; preds = %65
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [10 x [10 x i32]], ptr %8, i64 0, i64 %72
  %74 = load i32, ptr %13, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [10 x i32], ptr %73, i64 0, i64 %75
  %77 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %76)
  br label %78

78:                                               ; preds = %70
  %79 = load i32, ptr %13, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %13, align 4, !tbaa !5
  br label %65, !llvm.loop !12

81:                                               ; preds = %69
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %12, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %12, align 4, !tbaa !5
  br label %59, !llvm.loop !13

85:                                               ; preds = %63
  %86 = getelementptr inbounds [10 x [10 x i32]], ptr %9, i64 0, i64 0
  %87 = getelementptr inbounds [10 x [10 x i32]], ptr %7, i64 0, i64 0
  %88 = getelementptr inbounds [10 x [10 x i32]], ptr %8, i64 0, i64 0
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = load i32, ptr %5, align 4, !tbaa !5
  call void @matrix_add(ptr noundef %86, ptr noundef %87, ptr noundef %88, i32 noundef %89, i32 noundef %90, i32 noundef %91, i32 noundef %92)
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %119, %85
  %95 = load i32, ptr %14, align 4, !tbaa !5
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %122

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %114, %99
  %101 = load i32, ptr %15, align 4, !tbaa !5
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = icmp slt i32 %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %100
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %117

105:                                              ; preds = %100
  %106 = load i32, ptr %14, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [10 x [10 x i32]], ptr %9, i64 0, i64 %107
  %109 = load i32, ptr %15, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [10 x i32], ptr %108, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %112)
  br label %114

114:                                              ; preds = %105
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %15, align 4, !tbaa !5
  br label %100, !llvm.loop !14

117:                                              ; preds = %104
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %119

119:                                              ; preds = %117
  %120 = load i32, ptr %14, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %14, align 4, !tbaa !5
  br label %94, !llvm.loop !15

122:                                              ; preds = %98
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 400, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 400, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 400, ptr %7) #3
  br label %123

123:                                              ; preds = %122, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %124 = load i32, ptr %1, align 4
  ret i32 %124
}

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

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

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

; 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
declare dso_local void @matrix_add(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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 = { "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 }

!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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


; 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 [60 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [10 x [10 x i32]], align 16
  %6 = alloca [10 x [10 x i32]], align 16
  %7 = alloca [10 x [10 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %.not = icmp eq i32 %12, %13
  br i1 %.not, label %14, label %17

14:                                               ; preds = %0
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %.not26 = icmp eq i32 %15, %16
  br i1 %.not26, label %19, label %17

17:                                               ; preds = %14, %0
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %71

19:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %7) #3
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  %23 = load i32, ptr %2, align 4
  %24 = icmp sgt i32 %23, 0
  %or.cond68 = select i1 %22, i1 %24, i1 false
  br i1 %or.cond68, label %.preheader28, label %._crit_edge31

.preheader28:                                     ; preds = %19, %._crit_edge
  %25 = phi i32 [ %32, %._crit_edge ], [ %21, %19 ]
  %26 = phi i32 [ %33, %._crit_edge ], [ %23, %19 ]
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %._crit_edge ], [ 0, %19 ]
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

._crit_edge31:                                    ; preds = %._crit_edge, %19
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = icmp sgt i32 %29, 0
  %.pre62 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp sgt i32 %.pre62, 0
  %or.cond = select i1 %30, i1 %31, i1 false
  br i1 %or.cond, label %.preheader27, label %._crit_edge36

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader28
  %32 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %25, %.preheader28 ]
  %33 = phi i32 [ %38, %._crit_edge.loopexit ], [ %26, %.preheader28 ]
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %34 = sext i32 %32 to i64
  %35 = icmp slt i64 %indvars.iv.next47, %34
  br i1 %35, label %.preheader28, label %._crit_edge31, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader28, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader28 ]
  %36 = getelementptr inbounds [10 x [10 x i32]], ptr %5, i64 0, i64 %indvars.iv46, i64 %indvars.iv
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %36)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next, %39
  br i1 %40, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !12

.preheader27:                                     ; preds = %._crit_edge31, %._crit_edge34
  %41 = phi i32 [ %50, %._crit_edge34 ], [ %29, %._crit_edge31 ]
  %42 = phi i32 [ %51, %._crit_edge34 ], [ %.pre62, %._crit_edge31 ]
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %._crit_edge34 ], [ 0, %._crit_edge31 ]
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph33, label %._crit_edge34

._crit_edge36:                                    ; preds = %._crit_edge34, %._crit_edge31
  %44 = phi i32 [ %.pre62, %._crit_edge31 ], [ %51, %._crit_edge34 ]
  %.lcssa = phi i32 [ %29, %._crit_edge31 ], [ %50, %._crit_edge34 ]
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = load i32, ptr %2, align 4, !tbaa !5
  call void @matrix_add(ptr noundef nonnull %7, ptr noundef nonnull %5, ptr noundef nonnull %6, i32 noundef %45, i32 noundef %.lcssa, i32 noundef %46, i32 noundef %44)
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.preheader, label %._crit_edge41

._crit_edge34.loopexit:                           ; preds = %.lr.ph33
  %.pre61 = load i32, ptr %3, align 4, !tbaa !5
  br label %._crit_edge34

._crit_edge34:                                    ; preds = %._crit_edge34.loopexit, %.preheader27
  %50 = phi i32 [ %.pre61, %._crit_edge34.loopexit ], [ %41, %.preheader27 ]
  %51 = phi i32 [ %56, %._crit_edge34.loopexit ], [ %42, %.preheader27 ]
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %52 = sext i32 %50 to i64
  %53 = icmp slt i64 %indvars.iv.next53, %52
  br i1 %53, label %.preheader27, label %._crit_edge36, !llvm.loop !13

.lr.ph33:                                         ; preds = %.preheader27, %.lr.ph33
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %.lr.ph33 ], [ 0, %.preheader27 ]
  %54 = getelementptr inbounds [10 x [10 x i32]], ptr %6, i64 0, i64 %indvars.iv52, i64 %indvars.iv49
  %55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %54)
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next50, %57
  br i1 %58, label %.lr.ph33, label %._crit_edge34.loopexit, !llvm.loop !14

.preheader:                                       ; preds = %._crit_edge36, %._crit_edge39
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %._crit_edge39 ], [ 0, %._crit_edge36 ]
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph38, label %._crit_edge39

._crit_edge41:                                    ; preds = %._crit_edge39, %._crit_edge36
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %5) #3
  br label %71

._crit_edge39:                                    ; preds = %.lr.ph38, %.preheader
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next59, %63
  br i1 %64, label %.preheader, label %._crit_edge41, !llvm.loop !15

.lr.ph38:                                         ; preds = %.preheader, %.lr.ph38
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %.lr.ph38 ], [ 0, %.preheader ]
  %65 = getelementptr inbounds [10 x [10 x i32]], ptr %7, i64 0, i64 %indvars.iv58, i64 %indvars.iv55
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %66)
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next56, %69
  br i1 %70, label %.lr.ph38, label %._crit_edge39, !llvm.loop !16

71:                                               ; preds = %._crit_edge41, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; 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
declare dso_local void @matrix_add(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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