; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/数学算法 (快速幂运算)

; 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.matrix = type { [100 x [100 x i32]] }

@n = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK6matrixS1_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 4, ptr noundef nonnull align 4 dereferenceable(40000), ptr noundef nonnull align 4 dereferenceable(40000)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6matrixC2Ev(ptr noundef nonnull align 4 dereferenceable(40000)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000), i32 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplRK6matrixS1_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 4, ptr noundef nonnull align 4 dereferenceable(40000), ptr noundef nonnull align 4 dereferenceable(40000)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7pow_sum6matrixi(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 4, ptr noundef byval(%struct.matrix) align 8, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z7pow_sumxi(i64 noundef, i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca %struct.matrix, align 4
  %4 = alloca %struct.matrix, align 4
  %5 = alloca %struct.matrix, align 8
  %6 = alloca %struct.matrix, align 4
  %7 = alloca %struct.matrix, align 4
  %8 = alloca %struct.matrix, align 4
  %9 = alloca %struct.matrix, align 4
  %10 = alloca %struct.matrix, 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 8, ptr %2) #6
  %16 = call noundef i64 @_Z7pow_sumxi(i64 noundef 2, i32 noundef 10)
  store i64 %16, ptr %2, align 8, !tbaa !5
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef %17)
  store i32 2, ptr @n, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40000, ptr %3) #6
  call void @_ZN6matrixC2Ev(ptr noundef nonnull align 4 dereferenceable(40000) %3)
  %19 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %3, i32 noundef 0)
  %20 = getelementptr inbounds i32, ptr %19, i64 0
  store i32 4, ptr %20, align 4, !tbaa !9
  %21 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %3, i32 noundef 0)
  %22 = getelementptr inbounds i32, ptr %21, i64 1
  store i32 2, ptr %22, align 4, !tbaa !9
  %23 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %3, i32 noundef 1)
  %24 = getelementptr inbounds i32, ptr %23, i64 1
  store i32 7, ptr %24, align 4, !tbaa !9
  %25 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %3, i32 noundef 1)
  %26 = getelementptr inbounds i32, ptr %25, i64 0
  store i32 1, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40000, ptr %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %3, i64 40000, i1 false), !tbaa.struct !11
  call void @_Z7pow_sum6matrixi(ptr dead_on_unwind writable sret(%struct.matrix) align 4 %4, ptr noundef byval(%struct.matrix) align 8 %5, i32 noundef 3)
  call void @llvm.lifetime.start.p0(i64 40000, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 40000, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 40000, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 40000, ptr %9) #6
  call void @_ZmlRK6matrixS1_(ptr dead_on_unwind writable sret(%struct.matrix) align 4 %9, ptr noundef nonnull align 4 dereferenceable(40000) %3, ptr noundef nonnull align 4 dereferenceable(40000) %3)
  call void @_ZmlRK6matrixS1_(ptr dead_on_unwind writable sret(%struct.matrix) align 4 %8, ptr noundef nonnull align 4 dereferenceable(40000) %9, ptr noundef nonnull align 4 dereferenceable(40000) %3)
  call void @llvm.lifetime.start.p0(i64 40000, ptr %10) #6
  call void @_ZmlRK6matrixS1_(ptr dead_on_unwind writable sret(%struct.matrix) align 4 %10, ptr noundef nonnull align 4 dereferenceable(40000) %3, ptr noundef nonnull align 4 dereferenceable(40000) %3)
  call void @_ZplRK6matrixS1_(ptr dead_on_unwind writable sret(%struct.matrix) align 4 %7, ptr noundef nonnull align 4 dereferenceable(40000) %8, ptr noundef nonnull align 4 dereferenceable(40000) %10)
  call void @_ZplRK6matrixS1_(ptr dead_on_unwind writable sret(%struct.matrix) align 4 %6, ptr noundef nonnull align 4 dereferenceable(40000) %7, ptr noundef nonnull align 4 dereferenceable(40000) %3)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 %6, i64 40000, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 40000, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %51, %0
  %28 = load i32, ptr %11, align 4, !tbaa !9
  %29 = load i32, ptr @n, align 4, !tbaa !9
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %54

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %46, %32
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = load i32, ptr @n, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %49

38:                                               ; preds = %33
  %39 = load i32, ptr %11, align 4, !tbaa !9
  %40 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %4, i32 noundef %39)
  %41 = load i32, ptr %13, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %40, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %44)
  br label %46

46:                                               ; preds = %38
  %47 = load i32, ptr %13, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %13, align 4, !tbaa !9
  br label %33, !llvm.loop !13

49:                                               ; preds = %37
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %51

51:                                               ; preds = %49
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %11, align 4, !tbaa !9
  br label %27, !llvm.loop !15

54:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %79, %54
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = load i32, ptr @n, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %74, %60
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = load i32, ptr @n, align 4, !tbaa !9
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %77

66:                                               ; preds = %61
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %3, i32 noundef %67)
  %69 = load i32, ptr %15, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %72)
  br label %74

74:                                               ; preds = %66
  %75 = load i32, ptr %15, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %15, align 4, !tbaa !9
  br label %61, !llvm.loop !16

77:                                               ; preds = %65
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %79

79:                                               ; preds = %77
  %80 = load i32, ptr %14, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %14, align 4, !tbaa !9
  br label %55, !llvm.loop !17

82:                                               ; preds = %59
  %83 = call i32 @system(ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 40000, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %84 = load i32, ptr %1, align 4
  ret i32 %84
}

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

declare i32 @system(ptr noundef) #5

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

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 40000, !12}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.matrix = type { [100 x [100 x i32]] }

@n = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK6matrixS1_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 4, ptr noundef nonnull align 4 dereferenceable(40000), ptr noundef nonnull align 4 dereferenceable(40000)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6matrixC2Ev(ptr noundef nonnull align 4 dereferenceable(40000)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplRK6matrixS1_(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 4, ptr noundef nonnull align 4 dereferenceable(40000), ptr noundef nonnull align 4 dereferenceable(40000)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7pow_sum6matrixi(ptr dead_on_unwind noalias writable sret(%struct.matrix) align 4, ptr noundef byval(%struct.matrix) align 8, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z7pow_sumxi(i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca %struct.matrix, align 8
  %2 = alloca %struct.matrix, align 4
  %3 = alloca %struct.matrix, align 4
  %4 = alloca %struct.matrix, align 4
  %5 = alloca %struct.matrix, align 4
  %6 = alloca %struct.matrix, align 4
  %7 = alloca %struct.matrix, align 4
  %8 = tail call noundef i64 @_Z7pow_sumxi(i64 noundef 2, i32 noundef 10)
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %8)
  store i32 2, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %1) #7
  call void @_ZN6matrixC2Ev(ptr noundef nonnull align 4 dereferenceable(40000) %1)
  %10 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %1, i32 noundef 0)
  store i32 4, ptr %10, align 4, !tbaa !5
  %11 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %1, i32 noundef 0)
  %12 = getelementptr inbounds i8, ptr %11, i64 4
  store i32 2, ptr %12, align 4, !tbaa !5
  %13 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %1, i32 noundef 1)
  %14 = getelementptr inbounds i8, ptr %13, i64 4
  store i32 7, ptr %14, align 4, !tbaa !5
  %15 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %1, i32 noundef 1)
  store i32 1, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %2) #7
  call void @_Z7pow_sum6matrixi(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 4 %2, ptr noundef nonnull byval(%struct.matrix) align 8 %1, i32 noundef 3)
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %6) #7
  call void @_ZmlRK6matrixS1_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 4 %6, ptr noundef nonnull align 4 dereferenceable(40000) %1, ptr noundef nonnull align 4 dereferenceable(40000) %1)
  call void @_ZmlRK6matrixS1_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 4 %5, ptr noundef nonnull align 4 dereferenceable(40000) %6, ptr noundef nonnull align 4 dereferenceable(40000) %1)
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %7) #7
  call void @_ZmlRK6matrixS1_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 4 %7, ptr noundef nonnull align 4 dereferenceable(40000) %1, ptr noundef nonnull align 4 dereferenceable(40000) %1)
  call void @_ZplRK6matrixS1_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 4 %4, ptr noundef nonnull align 4 dereferenceable(40000) %5, ptr noundef nonnull align 4 dereferenceable(40000) %7)
  call void @_ZplRK6matrixS1_(ptr dead_on_unwind nonnull writable sret(%struct.matrix) align 4 %3, ptr noundef nonnull align 4 dereferenceable(40000) %4, ptr noundef nonnull align 4 dereferenceable(40000) %1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40000) %1, ptr noundef nonnull align 4 dereferenceable(40000) %3, i64 40000, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %3) #7
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader18, label %._crit_edge25

.preheader18:                                     ; preds = %0, %._crit_edge
  %18 = phi i32 [ %23, %._crit_edge ], [ %16, %0 ]
  %.01620 = phi i32 [ %22, %._crit_edge ], [ 0, %0 ]
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %._crit_edge

.preheader17:                                     ; preds = %._crit_edge
  %20 = icmp sgt i32 %23, 0
  br i1 %20, label %.preheader, label %._crit_edge25

._crit_edge:                                      ; preds = %.lr.ph, %.preheader18
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %22 = add nuw nsw i32 %.01620, 1
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %.preheader18, label %.preheader17, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader18, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader18 ]
  %25 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %2, i32 noundef %.01620)
  %26 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %27)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.preheader:                                       ; preds = %.preheader17, %._crit_edge23
  %32 = phi i32 [ %37, %._crit_edge23 ], [ %23, %.preheader17 ]
  %.01424 = phi i32 [ %36, %._crit_edge23 ], [ 0, %.preheader17 ]
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph22, label %._crit_edge23

._crit_edge25:                                    ; preds = %._crit_edge23, %0, %.preheader17
  %34 = call i32 @system(ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %1) #7
  ret i32 0

._crit_edge23:                                    ; preds = %.lr.ph22, %.preheader
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %36 = add nuw nsw i32 %.01424, 1
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %.preheader, label %._crit_edge25, !llvm.loop !14

.lr.ph22:                                         ; preds = %.preheader, %.lr.ph22
  %indvars.iv27 = phi i64 [ %indvars.iv.next28, %.lr.ph22 ], [ 0, %.preheader ]
  %39 = call noundef ptr @_ZN6matrixixEi(ptr noundef nonnull align 4 dereferenceable(40000) %1, i32 noundef %.01424)
  %40 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv27
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %41)
  %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next28, %44
  br i1 %45, label %.lr.ph22, label %._crit_edge23, !llvm.loop !15
}

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

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #6

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

!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++ TBAA"}
!9 = !{i64 0, i64 40000, !10}
!10 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass