; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (5833（高斯消元）)

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

@prime = external dso_local global [2010 x i32], align 16
@A = external dso_local global [2010 x [2010 x i32]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4readv() #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4initi(i32 noundef) #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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5gaussPA2010_iii(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z5q_modxxx(i64 noundef, i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %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 i64, align 8
  %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 = load ptr, ptr @stdin, align 8, !tbaa !5
  %14 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %15 = call noundef i32 @_Z4initi(i32 noundef 2010)
  store i32 %15, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !9
  %16 = call noundef i32 @_Z4readv()
  store i32 %16, ptr %3, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %71, %0
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr %3, align 4, !tbaa !9
  %20 = icmp ne i32 %18, 0
  br i1 %20, label %21, label %87

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %22 = call noundef i32 @_Z4readv()
  store i32 %22, ptr %5, align 4, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 16 @A, i8 0, i64 16160400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %68, %21
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %71

28:                                               ; preds = %23
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %64, %28
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = load i32, ptr %2, align 4, !tbaa !9
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %67

35:                                               ; preds = %30
  br label %36

36:                                               ; preds = %45, %35
  %37 = load i64, ptr %7, align 8, !tbaa !11
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [2010 x i32], ptr @prime, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = srem i64 %37, %42
  %44 = icmp eq i64 %43, 0
  br i1 %44, label %45, label %63

45:                                               ; preds = %36
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %47 = load i32, ptr %46, align 4, !tbaa !9
  store i32 %47, ptr %6, align 4, !tbaa !9
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [2010 x i32], ptr @prime, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = load i64, ptr %7, align 8, !tbaa !11
  %54 = sdiv i64 %53, %52
  store i64 %54, ptr %7, align 8, !tbaa !11
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [2010 x [2010 x i32]], ptr @A, i64 0, i64 %56
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [2010 x i32], ptr %57, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = xor i32 %61, 1
  store i32 %62, ptr %60, align 4, !tbaa !9
  br label %36, !llvm.loop !13

63:                                               ; preds = %36
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %10, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %10, align 4, !tbaa !9
  br label %30, !llvm.loop !15

67:                                               ; preds = %34
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %8, align 4, !tbaa !9
  br label %23, !llvm.loop !16

71:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = call noundef i32 @_Z5gaussPA2010_iii(ptr noundef @A, i32 noundef %73, i32 noundef %74)
  store i32 %75, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %76 = load i32, ptr %5, align 4, !tbaa !9
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = sub nsw i32 %76, %77
  %79 = sext i32 %78 to i64
  %80 = call noundef i64 @_Z5q_modxxx(i64 noundef 2, i64 noundef %79, i64 noundef 1000000007)
  %81 = trunc i64 %80 to i32
  store i32 %81, ptr %12, align 4, !tbaa !9
  %82 = load i32, ptr %4, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %4, align 4, !tbaa !9
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = sub nsw i32 %84, 1
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %82, i32 noundef %85)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %17, !llvm.loop !17

87:                                               ; preds = %17
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %88 = load i32, ptr %1, align 4
  ret i32 %88
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #5

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

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

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

attributes #0 = { mustprogress 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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { "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 #6 = { 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 #7 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


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

@prime = external dso_local local_unnamed_addr global [2010 x i32], align 16
@A = external dso_local global [2010 x [2010 x i32]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4readv() local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4initi(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5gaussPA2010_iii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z5q_modxxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = load ptr, ptr @stdin, align 8, !tbaa !5
  %5 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %4)
  %6 = tail call noundef i32 @_Z4initi(i32 noundef 2010)
  %7 = tail call noundef i32 @_Z4readv()
  %.not20 = icmp eq i32 %7, 0
  br i1 %.not20, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %8 = add nsw i32 %7, -1
  %9 = icmp sgt i32 %6, 0
  br i1 %9, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %._crit_edge19.split.us.us
  %10 = phi i32 [ %23, %._crit_edge19.split.us.us ], [ %8, %.lr.ph ]
  %.01321.us = phi i32 [ %20, %._crit_edge19.split.us.us ], [ 1, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %11 = call noundef i32 @_Z4readv()
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16160400) @A, i8 0, i64 16160400, i1 false)
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.preheader.lr.ph.us.us.preheader, label %._crit_edge19.split.us.us

.preheader.lr.ph.us.us.preheader:                 ; preds = %.lr.ph.split.us
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %.preheader.lr.ph.us.us

._crit_edge19.split.us.us:                        ; preds = %._crit_edge15.us.us, %.lr.ph.split.us
  %13 = load i32, ptr %1, align 4, !tbaa !9
  %14 = add nsw i32 %13, 1
  %15 = call noundef i32 @_Z5gaussPA2010_iii(ptr noundef nonnull @A, i32 noundef %14, i32 noundef %11)
  %16 = sub nsw i32 %11, %15
  %17 = sext i32 %16 to i64
  %18 = call noundef i64 @_Z5q_modxxx(i64 noundef 2, i64 noundef %17, i64 noundef 1000000007)
  %19 = trunc i64 %18 to i32
  %20 = add nuw nsw i32 %.01321.us, 1
  %21 = add nsw i32 %19, -1
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.01321.us, i32 noundef %21)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %23 = add nsw i32 %10, -1
  %.not.us = icmp eq i32 %10, 0
  br i1 %.not.us, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !11

.preheader.lr.ph.us.us:                           ; preds = %.preheader.lr.ph.us.us.preheader, %._crit_edge15.us.us
  %indvars.iv = phi i64 [ 0, %.preheader.lr.ph.us.us.preheader ], [ %indvars.iv.next, %._crit_edge15.us.us ]
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !9
  %.pre = load i64, ptr %2, align 8, !tbaa !13
  br label %.preheader.us.us

._crit_edge.us.us:                                ; preds = %.lr.ph.us.us, %.preheader.us.us
  %25 = phi i64 [ %43, %.preheader.us.us ], [ %36, %.lr.ph.us.us ]
  %.lcssa.us.us = phi i32 [ %42, %.preheader.us.us ], [ %30, %.lr.ph.us.us ]
  %26 = add nsw i32 %.lcssa.us.us, 1
  store i32 %26, ptr %3, align 4, !tbaa !9
  %27 = icmp slt i32 %26, %6
  br i1 %27, label %.preheader.us.us, label %._crit_edge15.us.us, !llvm.loop !15

.lr.ph.us.us:                                     ; preds = %.preheader.us.us, %.lr.ph.us.us
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %29 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %29, ptr %1, align 4, !tbaa !9
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [2010 x i32], ptr @prime, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = load i64, ptr %2, align 8, !tbaa !13
  %36 = sdiv i64 %35, %34
  store i64 %36, ptr %2, align 8, !tbaa !13
  %37 = getelementptr inbounds [2010 x [2010 x i32]], ptr @A, i64 0, i64 %31, i64 %indvars.iv
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = xor i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !9
  %40 = srem i64 %36, %34
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %.lr.ph.us.us, label %._crit_edge.us.us, !llvm.loop !16

.preheader.us.us:                                 ; preds = %._crit_edge.us.us, %.preheader.lr.ph.us.us
  %42 = phi i32 [ %26, %._crit_edge.us.us ], [ 0, %.preheader.lr.ph.us.us ]
  %43 = phi i64 [ %25, %._crit_edge.us.us ], [ %.pre, %.preheader.lr.ph.us.us ]
  %44 = sext i32 %42 to i64
  %45 = getelementptr inbounds [2010 x i32], ptr @prime, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = srem i64 %43, %47
  %49 = icmp eq i64 %48, 0
  br i1 %49, label %.lr.ph.us.us, label %._crit_edge.us.us

._crit_edge15.us.us:                              ; preds = %._crit_edge.us.us
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond24.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond24.not, label %._crit_edge19.split.us.us, label %.preheader.lr.ph.us.us, !llvm.loop !17

.lr.ph.split:                                     ; preds = %.lr.ph, %._crit_edge19.split
  %50 = phi i32 [ %61, %._crit_edge19.split ], [ %8, %.lr.ph ]
  %.01321 = phi i32 [ %58, %._crit_edge19.split ], [ 1, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %51 = call noundef i32 @_Z4readv()
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16160400) @A, i8 0, i64 16160400, i1 false)
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph18, label %._crit_edge19.split

._crit_edge19.split:                              ; preds = %.lr.ph18, %.lr.ph.split
  %53 = call noundef i32 @_Z5gaussPA2010_iii(ptr noundef nonnull @A, i32 noundef 1, i32 noundef %51)
  %54 = sub nsw i32 %51, %53
  %55 = sext i32 %54 to i64
  %56 = call noundef i64 @_Z5q_modxxx(i64 noundef 2, i64 noundef %55, i64 noundef 1000000007)
  %57 = trunc i64 %56 to i32
  %58 = add nuw nsw i32 %.01321, 1
  %59 = add nsw i32 %57, -1
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.01321, i32 noundef %59)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %61 = add nsw i32 %50, -1
  %.not = icmp eq i32 %50, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !11

.lr.ph18:                                         ; preds = %.lr.ph.split, %.lr.ph18
  %.01216 = phi i32 [ %63, %.lr.ph18 ], [ 0, %.lr.ph.split ]
  %62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2)
  %63 = add nuw nsw i32 %.01216, 1
  %exitcond.not = icmp eq i32 %63, %51
  br i1 %exitcond.not, label %._crit_edge19.split, label %.lr.ph18, !llvm.loop !17

._crit_edge:                                      ; preds = %._crit_edge19.split, %._crit_edge19.split.us.us, %0
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

attributes #0 = { mustprogress 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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { "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 #6 = { 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 #7 = { 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 #8 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass