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

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@rt = external dso_local global [200001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildRiii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) #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 uwtable
declare dso_local void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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
  store i32 0, ptr %1, align 4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %11 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z5buildRiii(ptr noundef nonnull align 4 dereferenceable(4) @rt, i32 noundef 1, i32 noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %128, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @m, align 4, !tbaa !5
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %131

17:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4)
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp eq i32 %19, 2
  br i1 %20, label %21, label %23

21:                                               ; preds = %17
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5)
  br label %25

23:                                               ; preds = %17
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5, ptr noundef %6)
  br label %25

25:                                               ; preds = %23, %21
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sub nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %32
  store i32 %30, ptr %33, align 4, !tbaa !5
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 1
  br i1 %35, label %36, label %92

36:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %39, i32 noundef %40, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 %41, ptr %5, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %44, i32 noundef %45, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i32 %46, ptr %6, align 4, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = icmp eq i32 %47, %48
  br i1 %49, label %50, label %51

50:                                               ; preds = %36
  store i32 4, ptr %3, align 4
  br label %89

51:                                               ; preds = %36
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %55, label %62

55:                                               ; preds = %51
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %57
  %59 = load i32, ptr @n, align 4, !tbaa !5
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %58, i32 noundef 1, i32 noundef %59, i32 noundef %60, i32 noundef %61)
  br label %88

62:                                               ; preds = %51
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = icmp sgt i32 %63, %64
  br i1 %65, label %66, label %73

66:                                               ; preds = %62
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %68
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = load i32, ptr %6, align 4, !tbaa !5
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %69, i32 noundef 1, i32 noundef %70, i32 noundef %71, i32 noundef %72)
  br label %87

73:                                               ; preds = %62
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %75
  %77 = load i32, ptr @n, align 4, !tbaa !5
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr %7, align 4, !tbaa !5
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %76, i32 noundef 1, i32 noundef %77, i32 noundef %78, i32 noundef %80)
  %81 = load i32, ptr %2, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %82
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %83, i32 noundef 1, i32 noundef %84, i32 noundef %85, i32 noundef %86)
  br label %87

87:                                               ; preds = %73, %66
  br label %88

88:                                               ; preds = %87, %55
  store i32 0, ptr %3, align 4
  br label %89

89:                                               ; preds = %88, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %90 = load i32, ptr %3, align 4
  switch i32 %90, label %125 [
    i32 0, label %91
  ]

91:                                               ; preds = %89
  br label %124

92:                                               ; preds = %25
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = icmp eq i32 %93, 2
  br i1 %94, label %95, label %103

95:                                               ; preds = %92
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = load i32, ptr %2, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %101
  store i32 %99, ptr %102, align 4, !tbaa !5
  br label %123

103:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %105
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %106, i32 noundef %107, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 %108, ptr %5, align 4, !tbaa !5
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %110
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %111, i32 noundef %112, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 %113, ptr %6, align 4, !tbaa !5
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = icmp eq i32 %114, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %103
  br label %119

118:                                              ; preds = %103
  br label %119

119:                                              ; preds = %118, %117
  %120 = phi ptr [ @.str.2, %117 ], [ @.str.3, %118 ]
  %121 = getelementptr inbounds [2 x i8], ptr %120, i64 0, i64 0
  %122 = call i32 @puts(ptr noundef %121)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %123

123:                                              ; preds = %119, %95
  br label %124

124:                                              ; preds = %123, %91
  store i32 0, ptr %3, align 4
  br label %125

125:                                              ; preds = %124, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %126 = load i32, ptr %3, align 4
  switch i32 %126, label %132 [
    i32 0, label %127
    i32 4, label %128
  ]

127:                                              ; preds = %125
  br label %128

128:                                              ; preds = %127, %125
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

131:                                              ; preds = %16
  ret i32 0

132:                                              ; preds = %125
  unreachable
}

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

declare i32 @puts(ptr noundef) #3

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 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@rt = external dso_local global [200001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildRiii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) 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 uwtable
declare dso_local void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  tail call void @_Z5buildRiii(ptr noundef nonnull align 4 dereferenceable(4) @rt, i32 noundef 1, i32 noundef %8)
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %.not21 = icmp slt i32 %9, 1
  br i1 %.not21, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %58, %0
  ret i32 0

.lr.ph:                                           ; preds = %0, %58
  %indvars.iv = phi i64 [ %indvars.iv.next, %58 ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = icmp eq i32 %11, 2
  br i1 %12, label %13, label %15

13:                                               ; preds = %.lr.ph
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  br label %17

15:                                               ; preds = %.lr.ph
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %3)
  br label %17

17:                                               ; preds = %15, %13
  %18 = add nsw i64 %indvars.iv, -1
  %19 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %indvars.iv
  store i32 %20, ptr %21, align 4, !tbaa !5
  %22 = load i32, ptr %1, align 4, !tbaa !5
  switch i32 %22, label %50 [
    i32 1, label %23
    i32 2, label %45
  ]

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef %24, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i32 %25, ptr %2, align 4, !tbaa !5
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i32 %27, ptr %3, align 4, !tbaa !5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %.not20 = icmp eq i32 %28, %27
  br i1 %.not20, label %.critedge, label %29

29:                                               ; preds = %23
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %33, label %35

33:                                               ; preds = %29
  %34 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef 1, i32 noundef %34, i32 noundef %27, i32 noundef %28)
  br label %44

35:                                               ; preds = %29
  %36 = icmp sgt i32 %30, %31
  %37 = load i32, ptr @n, align 4, !tbaa !5
  br i1 %36, label %38, label %39

38:                                               ; preds = %35
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef 1, i32 noundef %37, i32 noundef %28, i32 noundef %27)
  br label %44

39:                                               ; preds = %35
  %40 = add nsw i32 %30, -1
  store i32 %40, ptr %4, align 4, !tbaa !5
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef 1, i32 noundef %37, i32 noundef %28, i32 noundef %40)
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z6updateRiiiii(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef 1, i32 noundef %41, i32 noundef %42, i32 noundef %43)
  br label %44

44:                                               ; preds = %33, %39, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %58

45:                                               ; preds = %17
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [200001 x i32], ptr @rt, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %49, ptr %21, align 4, !tbaa !5
  br label %58

50:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef %51, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i32 %52, ptr %2, align 4, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = call noundef i32 @_Z8dsu_findRiiS_(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef %53, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i32 %54, ptr %3, align 4, !tbaa !5
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = icmp eq i32 %55, %54
  %.str.2..str.3 = select i1 %56, ptr @.str.2, ptr @.str.3
  %57 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2..str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %58

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

58:                                               ; preds = %44, %50, %45, %.critedge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %59 = load i32, ptr @m, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %.not.not = icmp slt i64 %indvars.iv, %60
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9
}

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

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

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 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 #3 = { 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 #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass