; LLVM IR from tangjz/acm-icpc :: TDL_training/2016-05-22 (I - Space Cat - dby)

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

@dp = external dso_local global [100005 x [2 x i64]], align 16
@c = external dso_local global [100005 x i32], align 16
@f = external dso_local global [100005 x i32], align 16
@n = 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 [6 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
  store i32 0, ptr %1, align 4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %19, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %14, label %13

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

14:                                               ; preds = %9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [100005 x i32], ptr @c, i64 0, i64 %16
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %17)
  br label %19

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

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

23:                                               ; preds = %33, %22
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %36

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

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %3, align 4, !tbaa !5
  br label %23, !llvm.loop !11

36:                                               ; preds = %27
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 -1, i64 1600080, i1 false)
  store i64 0, ptr @dp, align 16, !tbaa !12
  %37 = load i32, ptr @c, align 16, !tbaa !5
  %38 = load i32, ptr @f, align 16, !tbaa !5
  %39 = sub nsw i32 %37, %38
  %40 = sext i32 %39 to i64
  store i64 %40, ptr getelementptr inbounds ([2 x i64], ptr @dp, i64 0, i64 1), align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %171, %36
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %174

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

47:                                               ; preds = %109, %46
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = icmp slt i32 %48, 2
  br i1 %49, label %51, label %50

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

51:                                               ; preds = %47
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sub nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %54
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [2 x i64], ptr %55, i64 0, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !12
  %60 = icmp ne i64 %59, -1
  br i1 %60, label %61, label %108

61:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %71

64:                                               ; preds = %61
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100005 x i32], ptr @f, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  br label %77

71:                                               ; preds = %61
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sub nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100005 x i32], ptr @c, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %71, %64
  %78 = phi i32 [ %70, %64 ], [ %76, %71 ]
  store i32 %78, ptr %7, align 4, !tbaa !5
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100005 x i32], ptr @f, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = icmp sgt i32 %79, %83
  br i1 %84, label %85, label %107

85:                                               ; preds = %77
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = load i32, ptr %4, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100005 x i32], ptr @c, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = icmp sle i32 %86, %90
  br i1 %91, label %92, label %107

92:                                               ; preds = %85
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %94
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2 x i64], ptr %95, i64 0, i64 %97
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %101
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [2 x i64], ptr %102, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !12
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %98, i64 noundef %106)
  br label %107

107:                                              ; preds = %92, %85, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %108

108:                                              ; preds = %107, %51
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %6, align 4, !tbaa !5
  br label %47, !llvm.loop !14

112:                                              ; preds = %50
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %114
  %116 = getelementptr inbounds [2 x i64], ptr %115, i64 0, i64 0
  %117 = load i64, ptr %116, align 16, !tbaa !12
  %118 = icmp ne i64 %117, -1
  br i1 %118, label %119, label %141

119:                                              ; preds = %112
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %121
  %123 = getelementptr inbounds [2 x i64], ptr %122, i64 0, i64 1
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %125
  %127 = getelementptr inbounds [2 x i64], ptr %126, i64 0, i64 0
  %128 = load i64, ptr %127, align 16, !tbaa !12
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100005 x i32], ptr @c, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = add nsw i64 %128, %133
  %135 = load i32, ptr %4, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100005 x i32], ptr @f, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = sub nsw i64 %134, %139
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %123, i64 noundef %140)
  br label %141

141:                                              ; preds = %119, %112
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %143
  %145 = getelementptr inbounds [2 x i64], ptr %144, i64 0, i64 1
  %146 = load i64, ptr %145, align 8, !tbaa !12
  %147 = icmp ne i64 %146, -1
  br i1 %147, label %148, label %170

148:                                              ; preds = %141
  %149 = load i32, ptr %4, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %150
  %152 = getelementptr inbounds [2 x i64], ptr %151, i64 0, i64 0
  %153 = load i32, ptr %4, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %154
  %156 = getelementptr inbounds [2 x i64], ptr %155, i64 0, i64 1
  %157 = load i64, ptr %156, align 8, !tbaa !12
  %158 = load i32, ptr %4, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100005 x i32], ptr @c, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = add nsw i64 %157, %162
  %164 = load i32, ptr %4, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100005 x i32], ptr @f, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = sub nsw i64 %163, %168
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %152, i64 noundef %169)
  br label %170

170:                                              ; preds = %148, %141
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %4, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %4, align 4, !tbaa !5
  br label %41, !llvm.loop !15

174:                                              ; preds = %45
  %175 = load i32, ptr @n, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 1
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %177
  %179 = getelementptr inbounds [2 x i64], ptr %178, i64 0, i64 0
  %180 = load i64, ptr %179, align 16, !tbaa !12
  %181 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %180)
  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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!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"

@dp = external dso_local global [100005 x [2 x i64]], align 16
@c = external dso_local global [100005 x i32], align 16
@f = external dso_local global [100005 x i32], align 16
@n = 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 [6 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %._crit_edge

.preheader44:                                     ; preds = %.lr.ph
  %4 = icmp sgt i32 %7, 0
  br i1 %4, label %.lr.ph47, label %._crit_edge

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

._crit_edge:                                      ; preds = %.lr.ph47, %0, %.preheader44
  %10 = phi i32 [ %7, %.preheader44 ], [ %2, %0 ], [ %18, %.lr.ph47 ]
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1600080) getelementptr inbounds (i8, ptr @dp, i64 16), i8 -1, i64 1600064, i1 false)
  store i64 0, ptr @dp, align 16, !tbaa !11
  %11 = load i32, ptr @c, align 16, !tbaa !5
  %12 = load i32, ptr @f, align 16, !tbaa !5
  %13 = sub nsw i32 %11, %12
  %14 = sext i32 %13 to i64
  store i64 %14, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !11
  %15 = icmp sgt i32 %10, 1
  br i1 %15, label %.preheader, label %._crit_edge50

.lr.ph47:                                         ; preds = %.preheader44, %.lr.ph47
  %indvars.iv53 = phi i64 [ %indvars.iv.next54, %.lr.ph47 ], [ 0, %.preheader44 ]
  %16 = getelementptr inbounds [100005 x i32], ptr @f, i64 0, i64 %indvars.iv53
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next54, %19
  br i1 %20, label %.lr.ph47, label %._crit_edge, !llvm.loop !13

.preheader:                                       ; preds = %._crit_edge, %72
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %72 ], [ 1, %._crit_edge ]
  %21 = add nsw i64 %indvars.iv59, -1
  %22 = getelementptr inbounds [100005 x i32], ptr @c, i64 0, i64 %21
  %23 = getelementptr inbounds [100005 x i32], ptr @f, i64 0, i64 %indvars.iv59
  %24 = getelementptr inbounds [100005 x i32], ptr @c, i64 0, i64 %indvars.iv59
  %25 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %21, i64 0
  %26 = load i64, ptr %25, align 16, !tbaa !11
  %.not41 = icmp eq i64 %26, -1
  br i1 %.not41, label %40, label %32

._crit_edge50:                                    ; preds = %72, %._crit_edge
  %.lcssa = phi i32 [ %10, %._crit_edge ], [ %73, %72 ]
  %27 = add nsw i32 %.lcssa, -1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %28
  %30 = load i64, ptr %29, align 16, !tbaa !11
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %30)
  ret i32 0

32:                                               ; preds = %.preheader
  %33 = getelementptr inbounds [100005 x i32], ptr @f, i64 0, i64 %21
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr %23, align 4, !tbaa !5
  %.not62 = icmp slt i32 %34, %35
  br i1 %.not62, label %40, label %36

36:                                               ; preds = %32
  %37 = load i32, ptr %24, align 4, !tbaa !5
  %.not42.not = icmp slt i32 %34, %37
  br i1 %.not42.not, label %38, label %40

38:                                               ; preds = %36
  %39 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv59, i64 0
  tail call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %39, i64 noundef %26)
  br label %40

40:                                               ; preds = %32, %36, %38, %.preheader
  %41 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %21, i64 1
  %42 = load i64, ptr %41, align 8, !tbaa !11
  %.not41.1 = icmp eq i64 %42, -1
  br i1 %.not41.1, label %51, label %43

43:                                               ; preds = %40
  %44 = load i32, ptr %22, align 4, !tbaa !5
  %45 = load i32, ptr %23, align 4, !tbaa !5
  %46 = icmp sgt i32 %44, %45
  br i1 %46, label %47, label %51

47:                                               ; preds = %43
  %48 = load i32, ptr %24, align 4, !tbaa !5
  %.not42.1 = icmp sgt i32 %44, %48
  br i1 %.not42.1, label %51, label %49

49:                                               ; preds = %47
  %50 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv59, i64 1
  tail call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %50, i64 noundef %42)
  br label %51

51:                                               ; preds = %49, %47, %43, %40
  %52 = getelementptr inbounds [100005 x [2 x i64]], ptr @dp, i64 0, i64 %indvars.iv59
  %53 = load i64, ptr %52, align 16, !tbaa !11
  %.not = icmp eq i64 %53, -1
  br i1 %.not, label %62, label %54

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %52, i64 8
  %56 = load i32, ptr %24, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = add nsw i64 %53, %57
  %59 = load i32, ptr %23, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = sub i64 %58, %60
  tail call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %55, i64 noundef %61)
  br label %62

62:                                               ; preds = %54, %51
  %63 = getelementptr inbounds i8, ptr %52, i64 8
  %64 = load i64, ptr %63, align 8, !tbaa !11
  %.not40 = icmp eq i64 %64, -1
  br i1 %.not40, label %72, label %65

65:                                               ; preds = %62
  %66 = load i32, ptr %24, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = add nsw i64 %64, %67
  %69 = load i32, ptr %23, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = sub i64 %68, %70
  tail call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %52, i64 noundef %71)
  br label %72

72:                                               ; preds = %62, %65
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %73 = load i32, ptr @n, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next60, %74
  br i1 %75, label %.preheader, label %._crit_edge50, !llvm.loop !14
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3

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

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 nounwind willreturn memory(argmem: write) }
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" }

!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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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