; LLVM IR from tangjz/acm-icpc :: lydsy (1142)

; 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
@m = external dso_local global i32, align 4
@row = external dso_local global [1001 x i32], align 16
@col = external dso_local global [1001 x i32], align 16
@idx = external dso_local global [2000001 x i32], align 16
@.str = external hidden unnamed_addr constant [4 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 i8, align 1
  %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
  store i32 0, ptr %1, align 4
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) @t)
  br label %11

11:                                               ; preds = %146, %0
  %12 = load i32, ptr @t, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr @t, align 4, !tbaa !5
  %14 = icmp ne i32 %12, 0
  br i1 %14, label %15, label %150

15:                                               ; preds = %11
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #5
  store i8 1, ptr %2, align 1, !tbaa !9
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = mul i64 %17, 4
  call void @llvm.memset.p0.i64(ptr align 16 @row, i8 -1, i64 %18, i1 false)
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = mul i64 %20, 4
  call void @llvm.memset.p0.i64(ptr align 16 @col, i8 -1, i64 %21, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @idx, i8 -1, i64 8000004, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %22

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

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

29:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) %4)
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1000000
  store i32 %32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [2000001 x i32], ptr @idx, i64 0, i64 %33
  store i32 %30, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %35

35:                                               ; preds = %29
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %3, align 4, !tbaa !5
  br label %22, !llvm.loop !11

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

39:                                               ; preds = %138, %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %134, %44
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = load i32, ptr @m, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %137

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) %8)
  %51 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %52 = trunc i8 %51 to i1
  br i1 %52, label %53, label %67

53:                                               ; preds = %50
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1000000
  store i32 %55, ptr %8, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [2000001 x i32], ptr @idx, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp ne i32 %58, -1
  %60 = zext i1 %59 to i32
  %61 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %62 = trunc i8 %61 to i1
  %63 = zext i1 %62 to i32
  %64 = and i32 %63, %60
  %65 = icmp ne i32 %64, 0
  %66 = zext i1 %65 to i8
  store i8 %66, ptr %2, align 1, !tbaa !9
  br label %67

67:                                               ; preds = %53, %50
  %68 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %69 = trunc i8 %68 to i1
  br i1 %69, label %70, label %133

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [2000001 x i32], ptr @idx, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr @m, align 4, !tbaa !5
  %76 = sdiv i32 %74, %75
  store i32 %76, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [2000001 x i32], ptr @idx, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = load i32, ptr @m, align 4, !tbaa !5
  %82 = srem i32 %80, %81
  store i32 %82, ptr %10, align 4, !tbaa !5
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1001 x i32], ptr @row, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp eq i32 %86, -1
  br i1 %87, label %95, label %88

88:                                               ; preds = %70
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1001 x i32], ptr @row, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = icmp eq i32 %92, %93
  br label %95

95:                                               ; preds = %88, %70
  %96 = phi i1 [ true, %70 ], [ %94, %88 ]
  %97 = zext i1 %96 to i32
  %98 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %99 = trunc i8 %98 to i1
  %100 = zext i1 %99 to i32
  %101 = and i32 %100, %97
  %102 = icmp ne i32 %101, 0
  %103 = zext i1 %102 to i8
  store i8 %103, ptr %2, align 1, !tbaa !9
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [1001 x i32], ptr @col, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = icmp eq i32 %107, -1
  br i1 %108, label %116, label %109

109:                                              ; preds = %95
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [1001 x i32], ptr @col, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = icmp eq i32 %113, %114
  br label %116

116:                                              ; preds = %109, %95
  %117 = phi i1 [ true, %95 ], [ %115, %109 ]
  %118 = zext i1 %117 to i32
  %119 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %120 = trunc i8 %119 to i1
  %121 = zext i1 %120 to i32
  %122 = and i32 %121, %118
  %123 = icmp ne i32 %122, 0
  %124 = zext i1 %123 to i8
  store i8 %124, ptr %2, align 1, !tbaa !9
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = load i32, ptr %5, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [1001 x i32], ptr @row, i64 0, i64 %127
  store i32 %125, ptr %128, align 4, !tbaa !5
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [1001 x i32], ptr @col, i64 0, i64 %131
  store i32 %129, ptr %132, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %133

133:                                              ; preds = %116, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %7, align 4, !tbaa !5
  br label %45, !llvm.loop !15

137:                                              ; preds = %49
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %5, align 4, !tbaa !5
  br label %39, !llvm.loop !16

141:                                              ; preds = %43
  %142 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %143 = trunc i8 %142 to i1
  br i1 %143, label %144, label %145

144:                                              ; preds = %141
  br label %146

145:                                              ; preds = %141
  br label %146

146:                                              ; preds = %145, %144
  %147 = phi ptr [ @.str, %144 ], [ @.str.1, %145 ]
  %148 = getelementptr inbounds [4 x i8], ptr %147, i64 0, i64 0
  %149 = call i32 @puts(ptr noundef %148)
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #5
  br label %11, !llvm.loop !17

150:                                              ; preds = %11
  ret i32 0
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4)) #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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

declare i32 @puts(ptr noundef) #4

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 = { inlinehint 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; 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
@m = external dso_local global i32, align 4
@row = external dso_local local_unnamed_addr global [1001 x i32], align 16
@col = external dso_local local_unnamed_addr global [1001 x i32], align 16
@idx = external dso_local local_unnamed_addr global [2000001 x i32], align 16
@.str = external hidden unnamed_addr constant [4 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() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  tail call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) @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_edge35
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) @m)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = shl nsw i64 %6, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @row, i8 -1, i64 %7, i1 false)
  %8 = load i32, ptr @m, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = shl nsw i64 %9, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @col, i8 -1, i64 %10, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(8000004) @idx, i8 -1, i64 8000004, i1 false)
  %11 = mul nsw i32 %8, %5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %.preheader28

.preheader28:                                     ; preds = %.lr.ph, %.lr.ph39
  %13 = phi i32 [ %8, %.lr.ph39 ], [ %23, %.lr.ph ]
  %14 = phi i32 [ %5, %.lr.ph39 ], [ %22, %.lr.ph ]
  %15 = icmp sgt i32 %14, 0
  %16 = icmp sgt i32 %13, 0
  %or.cond = and i1 %15, %16
  br i1 %or.cond, label %.preheader, label %._crit_edge35

.lr.ph:                                           ; preds = %.lr.ph39, %.lr.ph
  %.02329 = phi i32 [ %21, %.lr.ph ], [ 0, %.lr.ph39 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) %1)
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1000000
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [2000001 x i32], ptr @idx, i64 0, i64 %19
  store i32 %.02329, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %21 = add nuw nsw i32 %.02329, 1
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = mul nsw i32 %23, %22
  %25 = icmp slt i32 %21, %24
  br i1 %25, label %.lr.ph, label %.preheader28, !llvm.loop !9

.preheader:                                       ; preds = %.preheader28, %._crit_edge
  %26 = phi i32 [ %35, %._crit_edge ], [ %14, %.preheader28 ]
  %27 = phi i32 [ %36, %._crit_edge ], [ %13, %.preheader28 ]
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %._crit_edge ], [ 0, %.preheader28 ]
  %.034 = phi i8 [ %.1.lcssa, %._crit_edge ], [ 1, %.preheader28 ]
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph32, label %._crit_edge

.lr.ph32:                                         ; preds = %.preheader
  %29 = getelementptr inbounds [1001 x i32], ptr @row, i64 0, i64 %indvars.iv42
  br label %39

._crit_edge35:                                    ; preds = %._crit_edge, %.preheader28
  %.0.lcssa = phi i8 [ 1, %.preheader28 ], [ %.1.lcssa, %._crit_edge ]
  %30 = trunc nuw i8 %.0.lcssa to i1
  %31 = select i1 %30, ptr @.str, ptr @.str.1
  %32 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %31)
  %33 = load i32, ptr @t, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %._crit_edge40, label %.lr.ph39, !llvm.loop !11

._crit_edge.loopexit:                             ; preds = %68
  %.pre44 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %35 = phi i32 [ %26, %.preheader ], [ %.pre44, %._crit_edge.loopexit ]
  %36 = phi i32 [ %27, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %.1.lcssa = phi i8 [ %.034, %.preheader ], [ %.3, %._crit_edge.loopexit ]
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %37 = sext i32 %35 to i64
  %38 = icmp slt i64 %indvars.iv.next43, %37
  br i1 %38, label %.preheader, label %._crit_edge35, !llvm.loop !12

39:                                               ; preds = %.lr.ph32, %68
  %indvars.iv = phi i64 [ 0, %.lr.ph32 ], [ %indvars.iv.next, %68 ]
  %.131 = phi i8 [ %.034, %.lr.ph32 ], [ %.3, %68 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4) %2)
  %40 = trunc nuw i8 %.131 to i1
  br i1 %40, label %41, label %49

41:                                               ; preds = %39
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1000000
  store i32 %43, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [2000001 x i32], ptr @idx, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp ne i32 %46, -1
  %48 = zext i1 %47 to i8
  br label %49

49:                                               ; preds = %41, %39
  %.2 = phi i8 [ %48, %41 ], [ %.131, %39 ]
  %50 = trunc nuw i8 %.2 to i1
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br i1 %50, label %51, label %68

51:                                               ; preds = %49
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2000001 x i32], ptr @idx, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sdiv i32 %55, %.pre
  %57 = srem i32 %55, %.pre
  %58 = load i32, ptr %29, align 4, !tbaa !5
  %59 = icmp eq i32 %58, -1
  %60 = icmp eq i32 %58, %56
  %spec.select = select i1 %59, i1 true, i1 %60
  %61 = getelementptr inbounds [1001 x i32], ptr @col, i64 0, i64 %indvars.iv
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp eq i32 %62, -1
  %64 = icmp eq i32 %62, %57
  %65 = select i1 %63, i1 true, i1 %64
  %66 = and i1 %spec.select, %65
  %67 = zext i1 %66 to i8
  store i32 %56, ptr %29, align 4, !tbaa !5
  store i32 %57, ptr %61, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %51, %49
  %.3 = phi i8 [ %67, %51 ], [ %.2, %49 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %69 = sext i32 %.pre to i64
  %70 = icmp slt i64 %indvars.iv.next, %69
  br i1 %70, label %39, label %._crit_edge.loopexit, !llvm.loop !14

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6fastIO4readERi(ptr noundef nonnull align 4 dereferenceable(4)) 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4

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 = { inlinehint 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !10}


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