; LLVM IR from reyadussalahin/problem-solving :: dynamic_programming/coin_change/loj/F1231 (Solution)

; 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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [64 x [1024 x i32]], align 16
  %3 = alloca [64 x i32], align 16
  %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 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 262144, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 256, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %150, %0
  %18 = load i32, ptr %5, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %7, ptr noundef %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %34, %22
  %25 = load i32, ptr %9, align 4, !tbaa !5
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = icmp sle i32 %25, %26
  br i1 %27, label %29, label %28

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

29:                                               ; preds = %24
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [64 x i32], ptr %3, i64 0, i64 %31
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %32)
  br label %34

34:                                               ; preds = %29
  %35 = load i32, ptr %9, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %9, align 4, !tbaa !5
  br label %24, !llvm.loop !9

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

38:                                               ; preds = %48, %37
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %51

43:                                               ; preds = %38
  %44 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 0
  %45 = load i32, ptr %10, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1024 x i32], ptr %44, i64 0, i64 %46
  store i32 0, ptr %47, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %43
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %10, align 4, !tbaa !5
  br label %38, !llvm.loop !11

51:                                               ; preds = %42
  %52 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 0
  %53 = getelementptr inbounds [1024 x i32], ptr %52, i64 0, i64 0
  store i32 1, ptr %53, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %136, %51
  %55 = load i32, ptr %11, align 4, !tbaa !5
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = icmp sle i32 %55, %56
  br i1 %57, label %59, label %58

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

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %60 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %132, %59
  %62 = load i32, ptr %13, align 4, !tbaa !5
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %61
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 %69
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1024 x i32], ptr %70, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 %76
  %78 = load i32, ptr %13, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1024 x i32], ptr %77, i64 0, i64 %79
  store i32 %74, ptr %80, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [64 x i32], ptr %3, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %128, %66
  %86 = load i32, ptr %15, align 4, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = icmp sle i32 %86, %87
  br i1 %88, label %89, label %93

89:                                               ; preds = %85
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = load i32, ptr %14, align 4, !tbaa !5
  %92 = icmp sge i32 %90, %91
  br label %93

93:                                               ; preds = %89, %85
  %94 = phi i1 [ false, %85 ], [ %92, %89 ]
  br i1 %94, label %96, label %95

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

96:                                               ; preds = %93
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 %98
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1024 x i32], ptr %99, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 %106
  %108 = load i32, ptr %13, align 4, !tbaa !5
  %109 = load i32, ptr %14, align 4, !tbaa !5
  %110 = sub nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [1024 x i32], ptr %107, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = add nsw i32 %103, %113
  %115 = srem i32 %114, 100000007
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 %117
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [1024 x i32], ptr %118, i64 0, i64 %120
  store i32 %115, ptr %121, align 4, !tbaa !5
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [64 x i32], ptr %3, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = add nsw i32 %126, %125
  store i32 %127, ptr %14, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %96
  %129 = load i32, ptr %15, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %15, align 4, !tbaa !5
  br label %85, !llvm.loop !12

131:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %13, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %13, align 4, !tbaa !5
  br label %61, !llvm.loop !13

135:                                              ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %11, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %11, align 4, !tbaa !5
  br label %54, !llvm.loop !14

139:                                              ; preds = %58
  %140 = load i32, ptr %5, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  %142 = load i32, ptr %7, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [64 x [1024 x i32]], ptr %2, i64 0, i64 %143
  %145 = load i32, ptr %8, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [1024 x i32], ptr %144, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %141, i32 noundef %148)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %150

150:                                              ; preds = %139
  %151 = load i32, ptr %5, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %5, align 4, !tbaa !5
  br label %17, !llvm.loop !15

153:                                              ; preds = %21
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 256, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 262144, ptr %2) #3
  %154 = load i32, ptr %1, align 4
  ret i32 %154
}

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

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

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 = { 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 = 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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [64 x [1024 x i32]], align 16
  %2 = alloca [64 x i32], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 262144, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph62, label %._crit_edge63

._crit_edge63:                                    ; preds = %._crit_edge59, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 262144, ptr nonnull %1) #4
  ret i32 0

.lr.ph62:                                         ; preds = %0, %._crit_edge59
  %.03760 = phi i32 [ %22, %._crit_edge59 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %11 = load i32, ptr %4, align 4, !tbaa !5
  %.not41 = icmp slt i32 %11, 1
  br i1 %.not41, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %.lr.ph62
  %12 = phi i32 [ %11, %.lr.ph62 ], [ %19, %.lr.ph ]
  %13 = load i32, ptr %5, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph44.preheader, label %._crit_edge

.lr.ph44.preheader:                               ; preds = %.preheader
  %15 = zext nneg i32 %13 to i64
  %16 = shl nuw nsw i64 %15, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %1, i8 0, i64 %16, i1 false), !tbaa !5
  br label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph62, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph62 ]
  %17 = getelementptr inbounds [64 x i32], ptr %2, i64 0, i64 %indvars.iv
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %17)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not.not, label %.lr.ph, label %.preheader, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph44.preheader, %.preheader
  store i32 1, ptr %1, align 16, !tbaa !5
  %.not3955 = icmp slt i32 %12, 1
  br i1 %.not3955, label %._crit_edge.._crit_edge59_crit_edge, label %.lr.ph58

._crit_edge.._crit_edge59_crit_edge:              ; preds = %._crit_edge
  %.pre = sext i32 %12 to i64
  br label %._crit_edge59

._crit_edge59:                                    ; preds = %._crit_edge54, %._crit_edge.._crit_edge59_crit_edge
  %.pre-phi = phi i64 [ %.pre, %._crit_edge.._crit_edge59_crit_edge ], [ %46, %._crit_edge54 ]
  %21 = phi i32 [ %13, %._crit_edge.._crit_edge59_crit_edge ], [ %30, %._crit_edge54 ]
  %22 = add nuw nsw i32 %.03760, 1
  %23 = sext i32 %21 to i64
  %24 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %.pre-phi, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %22, i32 noundef %25)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = icmp slt i32 %22, %27
  br i1 %28, label %.lr.ph62, label %._crit_edge63, !llvm.loop !11

.lr.ph58:                                         ; preds = %._crit_edge, %._crit_edge54
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge54 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %.not4050 = icmp slt i32 %30, 0
  br i1 %.not4050, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %.lr.ph58
  %31 = add nsw i64 %indvars.iv83, -1
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %.fr64 = freeze i32 %32
  %33 = icmp sgt i32 %.fr64, 0
  br i1 %33, label %.lr.ph53.split.preheader, label %.lr.ph53.split.us.preheader

.lr.ph53.split.us.preheader:                      ; preds = %.lr.ph53
  %34 = add nuw i32 %30, 1
  %wide.trip.count = zext i32 %34 to i64
  %min.iters.check = icmp ult i32 %30, 3
  br i1 %min.iters.check, label %.lr.ph53.split.us.preheader92, label %vector.ph

.lr.ph53.split.us.preheader92:                    ; preds = %middle.block, %.lr.ph53.split.us.preheader
  %indvars.iv72.ph = phi i64 [ 0, %.lr.ph53.split.us.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph53.split.us

vector.ph:                                        ; preds = %.lr.ph53.split.us.preheader
  %n.vec = and i64 %wide.trip.count, 4294967292
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %35 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %31, i64 %index
  %wide.load = load <4 x i32>, ptr %35, align 16, !tbaa !5
  %36 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %indvars.iv83, i64 %index
  store <4 x i32> %wide.load, ptr %36, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge54, label %.lr.ph53.split.us.preheader92

.lr.ph53.split.preheader:                         ; preds = %.lr.ph53
  %38 = getelementptr inbounds [64 x i32], ptr %2, i64 0, i64 %indvars.iv83
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = add nuw i32 %30, 1
  %wide.trip.count81 = zext i32 %41 to i64
  br label %.lr.ph53.split

.lr.ph53.split.us:                                ; preds = %.lr.ph53.split.us.preheader92, %.lr.ph53.split.us
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %.lr.ph53.split.us ], [ %indvars.iv72.ph, %.lr.ph53.split.us.preheader92 ]
  %42 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %31, i64 %indvars.iv72
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %indvars.iv83, i64 %indvars.iv72
  store i32 %43, ptr %44, align 4, !tbaa !5
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge54, label %.lr.ph53.split.us, !llvm.loop !15

._crit_edge54:                                    ; preds = %.lr.ph53.split.us, %._crit_edge49, %middle.block, %.lr.ph58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %.not39.not = icmp slt i64 %indvars.iv83, %46
  br i1 %.not39.not, label %.lr.ph58, label %._crit_edge59, !llvm.loop !16

.lr.ph53.split:                                   ; preds = %.lr.ph53.split.preheader, %._crit_edge49
  %indvars.iv78 = phi i64 [ 0, %.lr.ph53.split.preheader ], [ %indvars.iv.next79, %._crit_edge49 ]
  %47 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %31, i64 %indvars.iv78
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %indvars.iv83, i64 %indvars.iv78
  store i32 %48, ptr %49, align 4, !tbaa !5
  %.not = icmp slt i64 %indvars.iv78, %40
  br i1 %.not, label %._crit_edge49, label %.lr.ph48

._crit_edge49:                                    ; preds = %.lr.ph48, %.lr.ph53.split
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %._crit_edge54, label %.lr.ph53.split, !llvm.loop !17

.lr.ph48:                                         ; preds = %.lr.ph53.split, %.lr.ph48
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %.lr.ph48 ], [ %40, %.lr.ph53.split ]
  %50 = phi i32 [ %55, %.lr.ph48 ], [ %48, %.lr.ph53.split ]
  %.046 = phi i32 [ %56, %.lr.ph48 ], [ 1, %.lr.ph53.split ]
  %51 = sub nsw i64 %indvars.iv78, %indvars.iv75
  %52 = getelementptr inbounds [64 x [1024 x i32]], ptr %1, i64 0, i64 %31, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, %50
  %55 = srem i32 %54, 100000007
  store i32 %55, ptr %49, align 4, !tbaa !5
  %indvars.iv.next76 = add nsw i64 %indvars.iv75, %40
  %56 = add nuw nsw i32 %.046, 1
  %57 = icmp slt i32 %.046, %.fr64
  %58 = icmp sge i64 %indvars.iv78, %indvars.iv.next76
  %59 = select i1 %57, i1 %58, i1 false
  br i1 %59, label %.lr.ph48, label %._crit_edge49, !llvm.loop !18
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { mustprogress nofree 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10, !14, !13}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass