; LLVM IR from tangjz/acm-icpc :: hdu/6358.ll (Z6matPowRA9_A9_ii)

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

@_ZZ6matPowRA9_A9_iiE3tmp = external hidden global [9 x [9 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6matMulPA9_iS0_RA9_S_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(324)) #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: mustprogress nounwind uwtable
define dso_local void @_Z6matPowRA9_A9_ii(ptr noundef nonnull align 4 dereferenceable(324) %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #2
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %8

8:                                                ; preds = %47, %2
  %9 = load i32, ptr %5, align 4, !tbaa !9
  %10 = icmp slt i32 %9, 8
  br i1 %10, label %12, label %11

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

12:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %43, %12
  %14 = load i32, ptr %7, align 4, !tbaa !9
  %15 = icmp slt i32 %14, 8
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  br label %46

17:                                               ; preds = %13
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [9 x [9 x i32]], ptr %18, i64 0, i64 %20
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [9 x i32], ptr %21, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [9 x [9 x i32]], ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 0, i64 %27
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [9 x i32], ptr %28, i64 0, i64 %30
  store i32 %25, ptr %31, align 4, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = icmp eq i32 %32, %33
  %35 = zext i1 %34 to i32
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [9 x [9 x i32]], ptr %36, i64 0, i64 %38
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [9 x i32], ptr %39, i64 0, i64 %41
  store i32 %35, ptr %42, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %17
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %7, align 4, !tbaa !9
  br label %13, !llvm.loop !11

46:                                               ; preds = %16
  br label %47

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

50:                                               ; preds = %11
  br label %51

51:                                               ; preds = %63, %50
  %52 = load i32, ptr %4, align 4, !tbaa !9
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %54, label %66

54:                                               ; preds = %51
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = and i32 %55, 1
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %62

58:                                               ; preds = %54
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds [9 x [9 x i32]], ptr %59, i64 0, i64 0
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_Z6matMulPA9_iS0_RA9_S_(ptr noundef %60, ptr noundef @_ZZ6matPowRA9_A9_iiE3tmp, ptr noundef nonnull align 4 dereferenceable(324) %61)
  br label %62

62:                                               ; preds = %58, %54
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = ashr i32 %64, 1
  store i32 %65, ptr %4, align 4, !tbaa !9
  call void @_Z6matMulPA9_iS0_RA9_S_(ptr noundef @_ZZ6matPowRA9_A9_iiE3tmp, ptr noundef @_ZZ6matPowRA9_A9_iiE3tmp, ptr noundef nonnull align 4 dereferenceable(324) @_ZZ6matPowRA9_A9_iiE3tmp)
  br label %51, !llvm.loop !14

66:                                               ; preds = %51
  ret void
}

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


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

@_ZZ6matPowRA9_A9_iiE3tmp = external hidden global [9 x [9 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6matMulPA9_iS0_RA9_S_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(324)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z6matPowRA9_A9_ii(ptr noundef nonnull align 4 dereferenceable(324) %0, i32 noundef %1) local_unnamed_addr #0 {
.preheader20:
  %2 = load i32, ptr %0, align 4, !tbaa !5
  store i32 %2, ptr @_ZZ6matPowRA9_A9_iiE3tmp, align 16, !tbaa !5
  store i32 1, ptr %0, align 4, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  %4 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %4, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 4), align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %6, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 8), align 8, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 12
  %8 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %8, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 12), align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %10, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 16), align 16, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 20
  %12 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %12, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 20), align 4, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %14, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 24), align 8, !tbaa !5
  store i32 0, ptr %13, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 28
  %16 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %16, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 28), align 4, !tbaa !5
  store i32 0, ptr %15, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 36
  %18 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %18, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 36), align 4, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  %20 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %20, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 40), align 8, !tbaa !5
  store i32 1, ptr %19, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 44
  %22 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %22, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 44), align 4, !tbaa !5
  store i32 0, ptr %21, align 4, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  %24 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %24, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 48), align 16, !tbaa !5
  store i32 0, ptr %23, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %0, i64 52
  %26 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %26, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 52), align 4, !tbaa !5
  store i32 0, ptr %25, align 4, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %0, i64 56
  %28 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %28, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 56), align 8, !tbaa !5
  store i32 0, ptr %27, align 4, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %0, i64 60
  %30 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %30, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 60), align 4, !tbaa !5
  store i32 0, ptr %29, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %0, i64 64
  %32 = load i32, ptr %31, align 4, !tbaa !5
  store i32 %32, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 64), align 16, !tbaa !5
  store i32 0, ptr %31, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %0, i64 72
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 72), align 8, !tbaa !5
  store i32 0, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %0, i64 76
  %36 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %36, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 76), align 4, !tbaa !5
  store i32 0, ptr %35, align 4, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %0, i64 80
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 80), align 16, !tbaa !5
  store i32 1, ptr %37, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %0, i64 84
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 84), align 4, !tbaa !5
  store i32 0, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %0, i64 88
  %42 = load i32, ptr %41, align 4, !tbaa !5
  store i32 %42, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 88), align 8, !tbaa !5
  store i32 0, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %0, i64 92
  %44 = load i32, ptr %43, align 4, !tbaa !5
  store i32 %44, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 92), align 4, !tbaa !5
  store i32 0, ptr %43, align 4, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %0, i64 96
  %46 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %46, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 96), align 16, !tbaa !5
  store i32 0, ptr %45, align 4, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %0, i64 100
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 100), align 4, !tbaa !5
  store i32 0, ptr %47, align 4, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %0, i64 108
  %50 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %50, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 108), align 4, !tbaa !5
  store i32 0, ptr %49, align 4, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %0, i64 112
  %52 = load i32, ptr %51, align 4, !tbaa !5
  store i32 %52, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 112), align 16, !tbaa !5
  store i32 0, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %0, i64 116
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 116), align 4, !tbaa !5
  store i32 0, ptr %53, align 4, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %0, i64 120
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %56, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 120), align 8, !tbaa !5
  store i32 1, ptr %55, align 4, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %0, i64 124
  %58 = load i32, ptr %57, align 4, !tbaa !5
  store i32 %58, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 124), align 4, !tbaa !5
  store i32 0, ptr %57, align 4, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %0, i64 128
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 128), align 16, !tbaa !5
  store i32 0, ptr %59, align 4, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %0, i64 132
  %62 = load i32, ptr %61, align 4, !tbaa !5
  store i32 %62, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 132), align 4, !tbaa !5
  store i32 0, ptr %61, align 4, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %0, i64 136
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 136), align 8, !tbaa !5
  store i32 0, ptr %63, align 4, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %0, i64 144
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 144), align 16, !tbaa !5
  store i32 0, ptr %65, align 4, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %0, i64 148
  %68 = load i32, ptr %67, align 4, !tbaa !5
  store i32 %68, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 148), align 4, !tbaa !5
  store i32 0, ptr %67, align 4, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %0, i64 152
  %70 = load i32, ptr %69, align 4, !tbaa !5
  store i32 %70, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 152), align 8, !tbaa !5
  store i32 0, ptr %69, align 4, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %0, i64 156
  %72 = load i32, ptr %71, align 4, !tbaa !5
  store i32 %72, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 156), align 4, !tbaa !5
  store i32 0, ptr %71, align 4, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %0, i64 160
  %74 = load i32, ptr %73, align 4, !tbaa !5
  store i32 %74, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 160), align 16, !tbaa !5
  store i32 1, ptr %73, align 4, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %0, i64 164
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 164), align 4, !tbaa !5
  store i32 0, ptr %75, align 4, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %0, i64 168
  %78 = load i32, ptr %77, align 4, !tbaa !5
  store i32 %78, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 168), align 8, !tbaa !5
  store i32 0, ptr %77, align 4, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %0, i64 172
  %80 = load i32, ptr %79, align 4, !tbaa !5
  store i32 %80, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 172), align 4, !tbaa !5
  store i32 0, ptr %79, align 4, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %0, i64 180
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 180), align 4, !tbaa !5
  store i32 0, ptr %81, align 4, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %0, i64 184
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 184), align 8, !tbaa !5
  store i32 0, ptr %83, align 4, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %0, i64 188
  %86 = load i32, ptr %85, align 4, !tbaa !5
  store i32 %86, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 188), align 4, !tbaa !5
  store i32 0, ptr %85, align 4, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %0, i64 192
  %88 = load i32, ptr %87, align 4, !tbaa !5
  store i32 %88, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 192), align 16, !tbaa !5
  store i32 0, ptr %87, align 4, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %0, i64 196
  %90 = load i32, ptr %89, align 4, !tbaa !5
  store i32 %90, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 196), align 4, !tbaa !5
  store i32 0, ptr %89, align 4, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %0, i64 200
  %92 = load i32, ptr %91, align 4, !tbaa !5
  store i32 %92, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 200), align 8, !tbaa !5
  store i32 1, ptr %91, align 4, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %0, i64 204
  %94 = load i32, ptr %93, align 4, !tbaa !5
  store i32 %94, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 204), align 4, !tbaa !5
  store i32 0, ptr %93, align 4, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %0, i64 208
  %96 = load i32, ptr %95, align 4, !tbaa !5
  store i32 %96, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 208), align 16, !tbaa !5
  store i32 0, ptr %95, align 4, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %0, i64 216
  %98 = load i32, ptr %97, align 4, !tbaa !5
  store i32 %98, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 216), align 8, !tbaa !5
  store i32 0, ptr %97, align 4, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %0, i64 220
  %100 = load i32, ptr %99, align 4, !tbaa !5
  store i32 %100, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 220), align 4, !tbaa !5
  store i32 0, ptr %99, align 4, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %0, i64 224
  %102 = load i32, ptr %101, align 4, !tbaa !5
  store i32 %102, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 224), align 16, !tbaa !5
  store i32 0, ptr %101, align 4, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %0, i64 228
  %104 = load i32, ptr %103, align 4, !tbaa !5
  store i32 %104, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 228), align 4, !tbaa !5
  store i32 0, ptr %103, align 4, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %0, i64 232
  %106 = load i32, ptr %105, align 4, !tbaa !5
  store i32 %106, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 232), align 8, !tbaa !5
  store i32 0, ptr %105, align 4, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %0, i64 236
  %108 = load i32, ptr %107, align 4, !tbaa !5
  store i32 %108, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 236), align 4, !tbaa !5
  store i32 0, ptr %107, align 4, !tbaa !5
  %109 = getelementptr inbounds i8, ptr %0, i64 240
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 240), align 16, !tbaa !5
  store i32 1, ptr %109, align 4, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %0, i64 244
  %112 = load i32, ptr %111, align 4, !tbaa !5
  store i32 %112, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 244), align 4, !tbaa !5
  store i32 0, ptr %111, align 4, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %0, i64 252
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 252), align 4, !tbaa !5
  store i32 0, ptr %113, align 4, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %0, i64 256
  %116 = load i32, ptr %115, align 4, !tbaa !5
  store i32 %116, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 256), align 16, !tbaa !5
  store i32 0, ptr %115, align 4, !tbaa !5
  %117 = getelementptr inbounds i8, ptr %0, i64 260
  %118 = load i32, ptr %117, align 4, !tbaa !5
  store i32 %118, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 260), align 4, !tbaa !5
  store i32 0, ptr %117, align 4, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %0, i64 264
  %120 = load i32, ptr %119, align 4, !tbaa !5
  store i32 %120, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 264), align 8, !tbaa !5
  store i32 0, ptr %119, align 4, !tbaa !5
  %121 = getelementptr inbounds i8, ptr %0, i64 268
  %122 = load i32, ptr %121, align 4, !tbaa !5
  store i32 %122, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 268), align 4, !tbaa !5
  store i32 0, ptr %121, align 4, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %0, i64 272
  %124 = load i32, ptr %123, align 4, !tbaa !5
  store i32 %124, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 272), align 16, !tbaa !5
  store i32 0, ptr %123, align 4, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %0, i64 276
  %126 = load i32, ptr %125, align 4, !tbaa !5
  store i32 %126, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 276), align 4, !tbaa !5
  store i32 0, ptr %125, align 4, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %0, i64 280
  %128 = load i32, ptr %127, align 4, !tbaa !5
  store i32 %128, ptr getelementptr inbounds (i8, ptr @_ZZ6matPowRA9_A9_iiE3tmp, i64 280), align 8, !tbaa !5
  store i32 1, ptr %127, align 4, !tbaa !5
  %129 = icmp sgt i32 %1, 0
  br i1 %129, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader20, %132
  %.01923 = phi i32 [ %133, %132 ], [ %1, %.preheader20 ]
  %130 = and i32 %.01923, 1
  %.not = icmp eq i32 %130, 0
  br i1 %.not, label %132, label %131

131:                                              ; preds = %.lr.ph
  tail call void @_Z6matMulPA9_iS0_RA9_S_(ptr noundef nonnull %0, ptr noundef nonnull @_ZZ6matPowRA9_A9_iiE3tmp, ptr noundef nonnull align 4 dereferenceable(324) %0)
  br label %132

132:                                              ; preds = %.lr.ph, %131
  %133 = lshr i32 %.01923, 1
  tail call void @_Z6matMulPA9_iS0_RA9_S_(ptr noundef nonnull @_ZZ6matPowRA9_A9_iiE3tmp, ptr noundef nonnull @_ZZ6matPowRA9_A9_iiE3tmp, ptr noundef nonnull align 4 dereferenceable(324) @_ZZ6matPowRA9_A9_iiE3tmp)
  %.not24 = icmp ult i32 %.01923, 2
  br i1 %.not24, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %132, %.preheader20
  ret void
}

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

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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