; LLVM IR from tangjz/acm-icpc :: codeforces/complete (498E)

; 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.Mat = type { i32, i32, [128 x [128 x i32]] }

@A = external dso_local global %struct.Mat, align 4
@B = external dso_local global %struct.Mat, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef 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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Mat, align 4
  %11 = alloca %struct.Mat, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %23, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp slt i32 %13, 2
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %26

16:                                               ; preds = %12
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [128 x [128 x i32]], ptr getelementptr inbounds (%struct.Mat, ptr @A, i32 0, i32 2), i64 0, i64 %18
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [128 x i32], ptr %19, i64 0, i64 %21
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %16
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

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

27:                                               ; preds = %100, %26
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp sle i32 %28, 7
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %103

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = shl i32 1, %32
  store i32 %33, ptr %6, align 4, !tbaa !5
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  %35 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %35, ptr getelementptr inbounds (%struct.Mat, ptr @B, i32 0, i32 1), align 4, !tbaa !11
  store i32 %35, ptr @B, align 4, !tbaa !13
  store i32 %35, ptr getelementptr inbounds (%struct.Mat, ptr @A, i32 0, i32 1), align 4, !tbaa !11
  store i32 %35, ptr @A, align 4, !tbaa !13
  call void @_ZN3Mat5clearEv(ptr noundef nonnull align 4 dereferenceable(65544) @B)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %84, %31
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %87

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

42:                                               ; preds = %80, %41
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %47, label %46

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

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %76, %47
  %49 = load i32, ptr %9, align 4, !tbaa !5
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = ashr i32 %50, 1
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %48
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %79

54:                                               ; preds = %48
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = or i32 %55, %56
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = or i32 %57, %58
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = shl i32 %60, 1
  %62 = or i32 %59, %61
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = sub nsw i32 %63, 1
  %65 = icmp eq i32 %62, %64
  br i1 %65, label %66, label %75

66:                                               ; preds = %54
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [128 x [128 x i32]], ptr getelementptr inbounds (%struct.Mat, ptr @B, i32 0, i32 2), i64 0, i64 %68
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [128 x i32], ptr %69, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %72, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %66, %54
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %9, align 4, !tbaa !5
  br label %48, !llvm.loop !14

79:                                               ; preds = %53
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %8, align 4, !tbaa !5
  br label %42, !llvm.loop !15

83:                                               ; preds = %46
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %7, align 4, !tbaa !5
  br label %36, !llvm.loop !16

87:                                               ; preds = %40
  br label %88

88:                                               ; preds = %96, %87
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %99

91:                                               ; preds = %88
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = and i32 %92, 1
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %96

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 65544, ptr %10) #5
  call void @_ZNK3MatmlERKS_(ptr dead_on_unwind writable sret(%struct.Mat) align 4 %10, ptr noundef nonnull align 4 dereferenceable(65544) @A, ptr noundef nonnull align 4 dereferenceable(65544) @B)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @A, ptr align 4 %10, i64 65544, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 65544, ptr %10) #5
  br label %96

96:                                               ; preds = %95, %91
  call void @llvm.lifetime.start.p0(i64 65544, ptr %11) #5
  call void @_ZNK3MatmlERKS_(ptr dead_on_unwind writable sret(%struct.Mat) align 4 %11, ptr noundef nonnull align 4 dereferenceable(65544) @B, ptr noundef nonnull align 4 dereferenceable(65544) @B)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @B, ptr align 4 %11, i64 65544, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 65544, ptr %11) #5
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = ashr i32 %97, 1
  store i32 %98, ptr %5, align 4, !tbaa !5
  br label %88, !llvm.loop !19

99:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %3, align 4, !tbaa !5
  br label %27, !llvm.loop !20

103:                                              ; preds = %30
  %104 = load i32, ptr getelementptr inbounds (%struct.Mat, ptr @A, i32 0, i32 2), align 4, !tbaa !5
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %104)
  ret i32 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Mat5clearEv(ptr noundef nonnull align 4 dereferenceable(65544)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3MatmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.Mat) align 4, ptr noundef nonnull align 4 dereferenceable(65544), ptr noundef nonnull align 4 dereferenceable(65544)) #3 align 2

; 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) #4

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

attributes #0 = { 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 #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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 4}
!12 = !{!"_ZTS3Mat", !6, i64 0, !6, i64 4, !7, i64 8}
!13 = !{!12, !6, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 65536, !18}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !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"

%struct.Mat = type { i32, i32, [128 x [128 x i32]] }

@A = external dso_local global %struct.Mat, align 4
@B = external dso_local global %struct.Mat, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader32.preheader:
  %0 = alloca i32, align 4
  %1 = alloca %struct.Mat, align 4
  %2 = alloca %struct.Mat, align 4
  store i32 1, ptr getelementptr inbounds (i8, ptr @A, i64 8), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @A, i64 524), align 4, !tbaa !5
  br label %.preheader32

3:                                                ; preds = %._crit_edge
  %4 = load i32, ptr getelementptr inbounds (i8, ptr @A, i64 8), align 4, !tbaa !5
  %5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4)
  ret i32 0

.preheader32:                                     ; preds = %.preheader32.preheader, %._crit_edge
  %.02738 = phi i32 [ %49, %._crit_edge ], [ 1, %.preheader32.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #6
  %6 = shl nuw nsw i32 1, %.02738
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %0)
  store i32 %6, ptr getelementptr inbounds (i8, ptr @B, i64 4), align 4, !tbaa !9
  store i32 %6, ptr @B, align 4, !tbaa !11
  store i32 %6, ptr getelementptr inbounds (i8, ptr @A, i64 4), align 4, !tbaa !9
  store i32 %6, ptr @A, align 4, !tbaa !11
  call void @_ZN3Mat5clearEv(ptr noundef nonnull align 4 dereferenceable(65544) @B)
  %8 = lshr i32 %6, 1
  %9 = add nsw i32 %6, -1
  %umax = call i32 @llvm.umax.i32(i32 %8, i32 1)
  %wide.trip.count46 = zext nneg i32 %6 to i64
  %xtraiter = and i32 %umax, 1
  %10 = icmp ult i32 %.02738, 2
  %unroll_iter = and i32 %umax, 1073741822
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br label %.preheader31

.preheader31:                                     ; preds = %.preheader32, %14
  %indvars.iv43 = phi i64 [ 0, %.preheader32 ], [ %indvars.iv.next44, %14 ]
  %11 = trunc nuw nsw i64 %indvars.iv43 to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader31, %.epilog-lcssa
  %indvars.iv = phi i64 [ 0, %.preheader31 ], [ %indvars.iv.next, %.epilog-lcssa ]
  %12 = getelementptr inbounds [128 x [128 x i32]], ptr getelementptr inbounds (i8, ptr @B, i64 8), i64 0, i64 %indvars.iv43, i64 %indvars.iv
  %13 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %10, label %.unr-lcssa, label %.preheader.new

14:                                               ; preds = %.epilog-lcssa
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond47.not = icmp eq i64 %indvars.iv.next44, %wide.trip.count46
  br i1 %exitcond47.not, label %thread-pre-split, label %.preheader31, !llvm.loop !12

.unr-lcssa:                                       ; preds = %41, %.preheader
  %.034.unr = phi i32 [ 0, %.preheader ], [ %42, %41 ]
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa
  %15 = shl nuw i32 %.034.unr, 1
  %16 = or i32 %15, %11
  %17 = or i32 %16, %13
  %18 = or i32 %17, %.034.unr
  %19 = icmp eq i32 %18, %9
  br i1 %19, label %20, label %.epilog-lcssa

20:                                               ; preds = %.epil.preheader
  %21 = load i32, ptr %12, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %12, align 4, !tbaa !5
  br label %.epilog-lcssa

.epilog-lcssa:                                    ; preds = %.epil.preheader, %20, %.unr-lcssa
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond42.not = icmp eq i64 %indvars.iv.next, %wide.trip.count46
  br i1 %exitcond42.not, label %14, label %.preheader, !llvm.loop !14

.preheader.new:                                   ; preds = %.preheader, %41
  %.034 = phi i32 [ %42, %41 ], [ 0, %.preheader ]
  %niter = phi i32 [ %niter.next.1, %41 ], [ 0, %.preheader ]
  %23 = shl nuw i32 %.034, 1
  %24 = or i32 %23, %11
  %25 = or i32 %24, %13
  %26 = or i32 %25, %.034
  %27 = icmp eq i32 %26, %9
  br i1 %27, label %28, label %31

28:                                               ; preds = %.preheader.new
  %29 = load i32, ptr %12, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %12, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %.preheader.new, %28
  %32 = or disjoint i32 %.034, 1
  %33 = shl nuw i32 %32, 1
  %34 = or i32 %33, %11
  %35 = or i32 %34, %13
  %36 = or i32 %35, %32
  %37 = icmp eq i32 %36, %9
  br i1 %37, label %38, label %41

38:                                               ; preds = %31
  %39 = load i32, ptr %12, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %12, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %38, %31
  %42 = add nuw nsw i32 %.034, 2
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.unr-lcssa, label %.preheader.new, !llvm.loop !15

thread-pre-split:                                 ; preds = %14
  %.pr = load i32, ptr %0, align 4, !tbaa !5
  %.not37 = icmp eq i32 %.pr, 0
  br i1 %.not37, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %thread-pre-split, %46
  %43 = phi i32 [ %48, %46 ], [ %.pr, %thread-pre-split ]
  %44 = and i32 %43, 1
  %.not30 = icmp eq i32 %44, 0
  br i1 %.not30, label %46, label %45

45:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 65544, ptr nonnull %1) #6
  call void @_ZNK3MatmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Mat) align 4 %1, ptr noundef nonnull align 4 dereferenceable(65544) @A, ptr noundef nonnull align 4 dereferenceable(65544) @B)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(65544) @A, ptr noundef nonnull align 4 dereferenceable(65544) %1, i64 65544, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 65544, ptr nonnull %1) #6
  br label %46

46:                                               ; preds = %45, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 65544, ptr nonnull %2) #6
  call void @_ZNK3MatmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Mat) align 4 %2, ptr noundef nonnull align 4 dereferenceable(65544) @B, ptr noundef nonnull align 4 dereferenceable(65544) @B)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(65544) @B, ptr noundef nonnull align 4 dereferenceable(65544) %2, i64 65544, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 65544, ptr nonnull %2) #6
  %47 = load i32, ptr %0, align 4, !tbaa !5
  %48 = ashr i32 %47, 1
  store i32 %48, ptr %0, align 4, !tbaa !5
  %.not = icmp ult i32 %47, 2
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %46, %thread-pre-split
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #6
  %49 = add nuw nsw i32 %.02738, 1
  %exitcond48.not = icmp eq i32 %49, 8
  br i1 %exitcond48.not, label %3, label %.preheader32, !llvm.loop !19
}

; 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Mat5clearEv(ptr noundef nonnull align 4 dereferenceable(65544)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3MatmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.Mat) align 4, ptr noundef nonnull align 4 dereferenceable(65544), ptr noundef nonnull align 4 dereferenceable(65544)) local_unnamed_addr #3 align 2

; 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) #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #5

attributes #0 = { mustprogress norecurse 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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"_ZTS3Mat", !6, i64 0, !6, i64 4, !7, i64 8}
!11 = !{!10, !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 65536, !17}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}


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