; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-11-27 (E - Easy 2048 Again - tjz)

; 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
@f = external dso_local global [2 x [4096 x i32]], align 16
@.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 nounwind uwtable
declare dso_local void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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 i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %14

14:                                               ; preds = %169, %0
  %15 = load i32, ptr @t, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr @t, align 4, !tbaa !5
  %17 = icmp ne i32 %15, 0
  br i1 %17, label %18, label %172

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %21
  %23 = getelementptr inbounds [4096 x i32], ptr %22, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %23, i8 -1, i64 16384, i1 false)
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %25
  %27 = getelementptr inbounds [4096 x i32], ptr %26, i64 0, i64 0
  store i32 0, ptr %27, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  br label %28

28:                                               ; preds = %150, %18
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %36
  %38 = getelementptr inbounds [4096 x i32], ptr %37, i64 0, i64 0
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %40
  %42 = getelementptr inbounds [4096 x i32], ptr %41, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %42, i64 16384, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %142, %33
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = icmp slt i32 %44, 4096
  br i1 %45, label %47, label %46

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

47:                                               ; preds = %43
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %49
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [4096 x i32], ptr %50, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp eq i32 %54, -1
  br i1 %55, label %56, label %57

56:                                               ; preds = %47
  br label %142

57:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sub nsw i32 0, %59
  %61 = and i32 %58, %60
  store i32 %61, ptr %8, align 4, !tbaa !5
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = icmp sgt i32 %62, %63
  br i1 %64, label %65, label %83

65:                                               ; preds = %57
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %67
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = or i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [4096 x i32], ptr %68, i64 0, i64 %72
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %75
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [4096 x i32], ptr %76, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = add nsw i32 %80, %81
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %73, i32 noundef %82)
  br label %141

83:                                               ; preds = %57
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = icmp eq i32 %84, %85
  br i1 %86, label %87, label %124

87:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %88 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %88, ptr %10, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %100, %87
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = and i32 %90, %91
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %89
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %103

95:                                               ; preds = %89
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = shl i32 %96, 1
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = add nsw i32 %98, %97
  store i32 %99, ptr %9, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %95
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = shl i32 %101, 1
  store i32 %102, ptr %10, align 4, !tbaa !5
  br label %89, !llvm.loop !9

103:                                              ; preds = %94
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %105
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = load i32, ptr %5, align 4, !tbaa !5
  %109 = add nsw i32 %107, %108
  %110 = and i32 %109, 4095
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [4096 x i32], ptr %106, i64 0, i64 %111
  %113 = load i32, ptr %2, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %114
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [4096 x i32], ptr %115, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = load i32, ptr %5, align 4, !tbaa !5
  %121 = add nsw i32 %119, %120
  %122 = load i32, ptr %9, align 4, !tbaa !5
  %123 = add nsw i32 %121, %122
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %112, i32 noundef %123)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %140

124:                                              ; preds = %83
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %126
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [4096 x i32], ptr %127, i64 0, i64 %129
  %131 = load i32, ptr %2, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %132
  %134 = load i32, ptr %7, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [4096 x i32], ptr %133, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = load i32, ptr %5, align 4, !tbaa !5
  %139 = add nsw i32 %137, %138
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %130, i32 noundef %139)
  br label %140

140:                                              ; preds = %124, %103
  br label %141

141:                                              ; preds = %140, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %142

142:                                              ; preds = %141, %56
  %143 = load i32, ptr %7, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %7, align 4, !tbaa !5
  br label %43, !llvm.loop !11

145:                                              ; preds = %46
  %146 = load i32, ptr %2, align 4, !tbaa !5
  %147 = xor i32 %146, 1
  store i32 %147, ptr %2, align 4, !tbaa !5
  %148 = load i32, ptr %3, align 4, !tbaa !5
  %149 = xor i32 %148, 1
  store i32 %149, ptr %3, align 4, !tbaa !5
  br label %150

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

153:                                              ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %166, %153
  %155 = load i32, ptr %12, align 4, !tbaa !5
  %156 = icmp slt i32 %155, 4096
  br i1 %156, label %158, label %157

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

158:                                              ; preds = %154
  %159 = load i32, ptr %2, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %160
  %162 = load i32, ptr %12, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [4096 x i32], ptr %161, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef %165)
  br label %166

166:                                              ; preds = %158
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %12, align 4, !tbaa !5
  br label %154, !llvm.loop !13

169:                                              ; preds = %157
  %170 = load i32, ptr %11, align 4, !tbaa !5
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %170)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %14, !llvm.loop !14

172:                                              ; preds = %14
  ret i32 0
}

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

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

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

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

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

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

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 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = 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
@f = external dso_local global [2 x [4096 x i32]], align 16
@.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 nounwind uwtable
declare dso_local void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not59 = icmp eq i32 %4, 0
  br i1 %.not59, label %._crit_edge62, label %.lr.ph61

.lr.ph61:                                         ; preds = %0, %51
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16384) @f, i8 -1, i64 16384, i1 false)
  store i32 0, ptr @f, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph55, label %._crit_edge56

._crit_edge56:                                    ; preds = %15, %.lr.ph61
  %.039.lcssa = phi i32 [ 0, %.lr.ph61 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  %9 = zext nneg i32 %.039.lcssa to i64
  br label %56

.lr.ph55:                                         ; preds = %.lr.ph61, %15
  %.03953 = phi i32 [ %16, %15 ], [ 0, %.lr.ph61 ]
  %.04152 = phi i32 [ %18, %15 ], [ 0, %.lr.ph61 ]
  %.04251 = phi i32 [ %17, %15 ], [ 1, %.lr.ph61 ]
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %11 = zext nneg i32 %.04251 to i64
  %12 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %11
  %13 = zext nneg i32 %.03953 to i64
  %14 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16384) %12, ptr noundef nonnull align 16 dereferenceable(16384) %14, i64 16384, i1 false)
  br label %21

15:                                               ; preds = %50
  %16 = xor i32 %.03953, 1
  %17 = xor i32 %.04251, 1
  %18 = add nuw nsw i32 %.04152, 1
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %.lr.ph55, label %._crit_edge56, !llvm.loop !9

21:                                               ; preds = %.lr.ph55, %50
  %indvars.iv = phi i64 [ 0, %.lr.ph55 ], [ %indvars.iv.next, %50 ]
  %indvars64 = trunc i64 %indvars.iv to i32
  %22 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %13, i64 %indvars.iv
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = icmp eq i32 %23, -1
  br i1 %24, label %50, label %25

25:                                               ; preds = %21
  %26 = sub nsw i32 0, %indvars64
  %27 = and i32 %indvars64, %26
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = icmp sgt i32 %27, %28
  br i1 %29, label %30, label %35

30:                                               ; preds = %25
  %31 = or i32 %28, %indvars64
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %11, i64 %32
  %34 = add nsw i32 %28, %23
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %33, i32 noundef %34)
  br label %50

35:                                               ; preds = %25
  %36 = icmp eq i32 %27, %28
  br i1 %36, label %.preheader, label %46

.preheader:                                       ; preds = %35
  %.not4647 = icmp eq i32 %27, 0
  br i1 %.not4647, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %.038.lcssa = phi i32 [ 0, %.preheader ], [ %44, %.lr.ph ]
  %37 = add nsw i32 %27, %indvars64
  %38 = and i32 %37, 4095
  %39 = zext nneg i32 %38 to i64
  %40 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %11, i64 %39
  %41 = add nsw i32 %27, %23
  %42 = add nsw i32 %41, %.038.lcssa
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %40, i32 noundef %42)
  br label %50

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.03749 = phi i32 [ %43, %.lr.ph ], [ %27, %.preheader ]
  %.03848 = phi i32 [ %44, %.lr.ph ], [ 0, %.preheader ]
  %43 = shl i32 %.03749, 1
  %44 = add nsw i32 %43, %.03848
  %45 = and i32 %43, %indvars64
  %.not46 = icmp eq i32 %45, 0
  br i1 %.not46, label %._crit_edge, label %.lr.ph, !llvm.loop !11

46:                                               ; preds = %35
  %47 = zext nneg i32 %28 to i64
  %48 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %11, i64 %47
  %49 = add nsw i32 %28, %23
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %48, i32 noundef %49)
  br label %50

50:                                               ; preds = %30, %46, %._crit_edge, %21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 4096
  br i1 %exitcond.not, label %15, label %21, !llvm.loop !12

51:                                               ; preds = %56
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %52)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %54 = load i32, ptr @t, align 4, !tbaa !5
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %54, 0
  br i1 %.not, label %._crit_edge62, label %.lr.ph61, !llvm.loop !13

56:                                               ; preds = %._crit_edge56, %56
  %indvars.iv65 = phi i64 [ 0, %._crit_edge56 ], [ %indvars.iv.next66, %56 ]
  %57 = getelementptr inbounds [2 x [4096 x i32]], ptr @f, i64 0, i64 %9, i64 %indvars.iv65
  %58 = load i32, ptr %57, align 4, !tbaa !5
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef %58)
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond68.not = icmp eq i64 %indvars.iv.next66, 4096
  br i1 %exitcond68.not, label %51, label %56, !llvm.loop !14

._crit_edge62:                                    ; preds = %51, %0
  ret i32 0
}

; 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.start.p0(i64 immarg, ptr nocapture) #3

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

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

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

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

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 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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