; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK54/ANURRZ (rrz)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@b = external dso_local global [1100 x i32], align 16
@dp = external dso_local global [1100 x [1100 x i32]], align 16
@MOD = external dso_local global i32, align 4
@temp = external dso_local global i32, 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
  store i32 0, ptr %1, align 4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %8

8:                                                ; preds = %127, %0
  %9 = load i32, ptr @t, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr @t, align 4, !tbaa !5
  %11 = icmp ne i32 %9, 0
  br i1 %11, label %12, label %134

12:                                               ; preds = %8
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %24, %12
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %27

19:                                               ; preds = %14
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [1100 x i32], ptr @b, i64 0, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %22)
  br label %24

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

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

28:                                               ; preds = %124, %27
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %127

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1100 x i32], ptr @b, i64 0, i64 %35
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr @temp, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %39 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %39, ptr %5, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %52, %33
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = load i32, ptr @temp, align 4, !tbaa !5
  %43 = icmp sgt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %55

45:                                               ; preds = %40
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %47
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [1100 x i32], ptr %48, i64 0, i64 %50
  store i32 0, ptr %51, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %45
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %5, align 4, !tbaa !5
  br label %40, !llvm.loop !11

55:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1100 x i32], ptr @b, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  store i32 %59, ptr %6, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %111, %55
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %114

64:                                               ; preds = %60
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1100 x i32], ptr %68, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %75
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1100 x i32], ptr %76, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = add nsw i32 %73, %81
  %83 = load i32, ptr @MOD, align 4, !tbaa !5
  %84 = srem i32 %82, %83
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %86
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1100 x i32], ptr %87, i64 0, i64 %89
  store i32 %84, ptr %90, align 4, !tbaa !5
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %92
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [1100 x i32], ptr %93, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = load i32, ptr @MOD, align 4, !tbaa !5
  %99 = icmp sge i32 %97, %98
  br i1 %99, label %100, label %110

100:                                              ; preds = %64
  %101 = load i32, ptr @MOD, align 4, !tbaa !5
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %103
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [1100 x i32], ptr %104, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sub nsw i32 %108, %101
  store i32 %109, ptr %107, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %100, %64
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr %6, align 4, !tbaa !5
  br label %60, !llvm.loop !12

114:                                              ; preds = %63
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %116
  %118 = getelementptr inbounds [1100 x i32], ptr %117, i64 0, i64 1
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %121
  %123 = getelementptr inbounds [1100 x i32], ptr %122, i64 0, i64 0
  store i32 %119, ptr %123, align 16, !tbaa !5
  br label %124

124:                                              ; preds = %114
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %3, align 4, !tbaa !5
  br label %28, !llvm.loop !13

127:                                              ; preds = %32
  %128 = load i32, ptr @n, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %129
  %131 = getelementptr inbounds [1100 x i32], ptr %130, i64 0, i64 0
  %132 = load i32, ptr %131, align 16, !tbaa !5
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %132)
  br label %8, !llvm.loop !14

134:                                              ; preds = %8
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@b = external dso_local global [1100 x i32], align 16
@dp = external dso_local local_unnamed_addr global [1100 x [1100 x i32]], align 16
@MOD = external dso_local local_unnamed_addr global i32, align 4
@temp = external dso_local local_unnamed_addr global i32, 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 {
  %1 = alloca i32, align 4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %3 = load i32, ptr @t, align 4, !tbaa !5
  %4 = add nsw i32 %3, -1
  store i32 %4, ptr @t, align 4, !tbaa !5
  %.not37 = icmp eq i32 %3, 0
  br i1 %.not37, label %._crit_edge40, label %.lr.ph39

.lr.ph39:                                         ; preds = %0, %._crit_edge36
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not1822 = icmp slt i32 %6, 1
  br i1 %.not1822, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %.lr.ph39
  store i32 1, ptr @dp, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  br label %._crit_edge36

._crit_edge:                                      ; preds = %.lr.ph
  store i32 1, ptr @dp, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 1, ptr %1, align 4, !tbaa !5
  %.not1932 = icmp slt i32 %9, 1
  br i1 %.not1932, label %._crit_edge36, label %.lr.ph35

.lr.ph:                                           ; preds = %.lr.ph39, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph39 ]
  %7 = getelementptr inbounds [1100 x i32], ptr @b, i64 0, i64 %indvars.iv
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %.not18.not = icmp slt i64 %indvars.iv, %10
  br i1 %.not18.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge36:                                    ; preds = %._crit_edge31, %._crit_edge.thread, %._crit_edge
  %.lcssa = phi i32 [ %9, %._crit_edge ], [ %6, %._crit_edge.thread ], [ %21, %._crit_edge31 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %11 = sext i32 %.lcssa to i64
  %12 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %11
  %13 = load i32, ptr %12, align 16, !tbaa !5
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %13)
  %15 = load i32, ptr @t, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %._crit_edge40, label %.lr.ph39, !llvm.loop !11

.lr.ph35:                                         ; preds = %._crit_edge, %._crit_edge31
  %storemerge33 = phi i32 [ %71, %._crit_edge31 ], [ 1, %._crit_edge ]
  %17 = sext i32 %storemerge33 to i64
  %18 = getelementptr inbounds [1100 x i32], ptr @b, i64 0, i64 %17
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %20 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %20, ptr @temp, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, %20
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %23 = sext i32 %.pre to i64
  br i1 %22, label %.lr.ph26, label %._crit_edge27

.lr.ph26:                                         ; preds = %.lr.ph35
  %24 = mul nsw i64 %23, 4400
  %25 = sext i32 %21 to i64
  %26 = shl nsw i64 %25, 2
  %27 = add nsw i64 %24, %26
  %28 = xor i32 %20, -1
  %29 = add i32 %21, %28
  %30 = zext i32 %29 to i64
  %31 = shl nuw nsw i64 %30, 2
  %32 = sub nsw i64 %27, %31
  %scevgep = getelementptr i8, ptr @dp, i64 %32
  %33 = add nuw nsw i64 %31, 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %33, i1 false), !tbaa !5
  br label %._crit_edge27

._crit_edge27:                                    ; preds = %.lr.ph35, %.lr.ph26
  %34 = getelementptr inbounds [1100 x i32], ptr @b, i64 0, i64 %23
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph30, label %._crit_edge31

.lr.ph30:                                         ; preds = %._crit_edge27
  %37 = add nsw i32 %.pre, -1
  %38 = sext i32 %37 to i64
  %39 = load i32, ptr @MOD, align 4, !tbaa !5
  %.fr = freeze i32 %39
  %.not20 = icmp sgt i32 %.fr, -1
  %40 = zext nneg i32 %35 to i64
  %41 = mul nsw i64 %23, 4400
  %42 = shl nuw nsw i64 %40, 2
  %43 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @dp, i64 4), i64 %41
  %scevgep62 = getelementptr i8, ptr %43, i64 %42
  %load_initial63 = load i32, ptr %scevgep62, align 4
  br i1 %.not20, label %.lr.ph30.split.us.preheader, label %.lr.ph30.split.preheader

.lr.ph30.split.preheader:                         ; preds = %.lr.ph30
  %xtraiter = and i64 %40, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph30.split.prol.loopexit, label %.lr.ph30.split.prol

.lr.ph30.split.prol:                              ; preds = %.lr.ph30.split.preheader
  %indvars.iv.next48.prol = add nsw i64 %40, -1
  %44 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %38, i64 %indvars.iv.next48.prol
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = add nsw i32 %load_initial63, %45
  %47 = srem i32 %46, %.fr
  %48 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %23, i64 %40
  %49 = sub nsw i32 %47, %.fr
  store i32 %49, ptr %48, align 4, !tbaa !5
  br label %.lr.ph30.split.prol.loopexit

.lr.ph30.split.prol.loopexit:                     ; preds = %.lr.ph30.split.prol, %.lr.ph30.split.preheader
  %store_forwarded.unr = phi i32 [ %load_initial63, %.lr.ph30.split.preheader ], [ %49, %.lr.ph30.split.prol ]
  %indvars.iv47.unr = phi i64 [ %40, %.lr.ph30.split.preheader ], [ %indvars.iv.next48.prol, %.lr.ph30.split.prol ]
  %50 = icmp eq i32 %35, 1
  br i1 %50, label %._crit_edge31, label %.lr.ph30.split

.lr.ph30.split.us.preheader:                      ; preds = %.lr.ph30
  %xtraiter68 = and i64 %40, 1
  %lcmp.mod69.not = icmp eq i64 %xtraiter68, 0
  br i1 %lcmp.mod69.not, label %.lr.ph30.split.us.prol.loopexit, label %.lr.ph30.split.us.prol

.lr.ph30.split.us.prol:                           ; preds = %.lr.ph30.split.us.preheader
  %indvars.iv.next51.prol = add nsw i64 %40, -1
  %51 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %38, i64 %indvars.iv.next51.prol
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %load_initial63, %52
  %54 = srem i32 %53, %.fr
  %55 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %23, i64 %40
  store i32 %54, ptr %55, align 4, !tbaa !5
  br label %.lr.ph30.split.us.prol.loopexit

.lr.ph30.split.us.prol.loopexit:                  ; preds = %.lr.ph30.split.us.prol, %.lr.ph30.split.us.preheader
  %store_forwarded64.unr = phi i32 [ %load_initial63, %.lr.ph30.split.us.preheader ], [ %54, %.lr.ph30.split.us.prol ]
  %indvars.iv50.unr = phi i64 [ %40, %.lr.ph30.split.us.preheader ], [ %indvars.iv.next51.prol, %.lr.ph30.split.us.prol ]
  %56 = icmp eq i32 %35, 1
  br i1 %56, label %._crit_edge31, label %.lr.ph30.split.us

.lr.ph30.split.us:                                ; preds = %.lr.ph30.split.us.prol.loopexit, %.lr.ph30.split.us
  %store_forwarded64 = phi i32 [ %65, %.lr.ph30.split.us ], [ %store_forwarded64.unr, %.lr.ph30.split.us.prol.loopexit ]
  %indvars.iv50 = phi i64 [ %indvars.iv.next51.1, %.lr.ph30.split.us ], [ %indvars.iv50.unr, %.lr.ph30.split.us.prol.loopexit ]
  %indvars.iv.next51 = add nsw i64 %indvars.iv50, -1
  %57 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %38, i64 %indvars.iv.next51
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = add nsw i32 %store_forwarded64, %58
  %60 = srem i32 %59, %.fr
  %61 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %23, i64 %indvars.iv50
  store i32 %60, ptr %61, align 4, !tbaa !5
  %indvars.iv.next51.1 = add nsw i64 %indvars.iv50, -2
  %62 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %38, i64 %indvars.iv.next51.1
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %60, %63
  %65 = srem i32 %64, %.fr
  %66 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %23, i64 %indvars.iv.next51
  store i32 %65, ptr %66, align 4, !tbaa !5
  %67 = icmp ugt i64 %indvars.iv.next51, 1
  br i1 %67, label %.lr.ph30.split.us, label %._crit_edge31, !llvm.loop !12

._crit_edge31:                                    ; preds = %.lr.ph30.split.prol.loopexit, %.lr.ph30.split, %.lr.ph30.split.us.prol.loopexit, %.lr.ph30.split.us, %._crit_edge27
  %68 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %23
  %69 = getelementptr inbounds i8, ptr %68, i64 4
  %70 = load i32, ptr %69, align 4, !tbaa !5
  store i32 %70, ptr %68, align 16, !tbaa !5
  %71 = add nsw i32 %.pre, 1
  store i32 %71, ptr %1, align 4, !tbaa !5
  %.not19.not = icmp slt i32 %.pre, %21
  br i1 %.not19.not, label %.lr.ph35, label %._crit_edge36, !llvm.loop !13

.lr.ph30.split:                                   ; preds = %.lr.ph30.split.prol.loopexit, %.lr.ph30.split
  %store_forwarded = phi i32 [ %83, %.lr.ph30.split ], [ %store_forwarded.unr, %.lr.ph30.split.prol.loopexit ]
  %indvars.iv47 = phi i64 [ %indvars.iv.next48.1, %.lr.ph30.split ], [ %indvars.iv47.unr, %.lr.ph30.split.prol.loopexit ]
  %indvars.iv.next48 = add nsw i64 %indvars.iv47, -1
  %72 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %38, i64 %indvars.iv.next48
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = add nsw i32 %store_forwarded, %73
  %75 = srem i32 %74, %.fr
  %76 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %23, i64 %indvars.iv47
  %77 = sub nsw i32 %75, %.fr
  store i32 %77, ptr %76, align 4, !tbaa !5
  %indvars.iv.next48.1 = add nsw i64 %indvars.iv47, -2
  %78 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %38, i64 %indvars.iv.next48.1
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = add nsw i32 %77, %79
  %81 = srem i32 %80, %.fr
  %82 = getelementptr inbounds [1100 x [1100 x i32]], ptr @dp, i64 0, i64 %23, i64 %indvars.iv.next48
  %83 = sub nsw i32 %81, %.fr
  store i32 %83, ptr %82, align 4, !tbaa !5
  %84 = icmp ugt i64 %indvars.iv.next48, 1
  br i1 %84, label %.lr.ph30.split, label %._crit_edge31, !llvm.loop !12

._crit_edge40:                                    ; preds = %._crit_edge36, %0
  ret i32 0
}

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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: write) }
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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass