; LLVM IR from tangjz/acm-icpc :: self_training/2015-03-03 (L)

; 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
@f = external dso_local global [65 x [66 x i32]], align 16
@g = external dso_local global [65 x [66 x i32]], align 16
@stack = external dso_local global [66 x [65 x i32]], align 16
@l = external dso_local global [67 x i32], align 16
@r = external dso_local global [67 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4moveiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare i32 @printf(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: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 15, i64 17160, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %9

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

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

13:                                               ; preds = %9
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [66 x i32], ptr getelementptr inbounds ([65 x [66 x i32]], ptr @f, i64 0, i64 1), i64 0, i64 %15
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %17

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

20:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 2, ptr %3, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %106, %20
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = icmp slt i32 %22, 65
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %109

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

26:                                               ; preds = %102, %25
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 66
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %98, %30
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

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

36:                                               ; preds = %31
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [66 x i32], ptr %39, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sub nsw i32 %44, %45
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %47
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [66 x i32], ptr %48, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %55
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [66 x i32], ptr %56, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = mul nsw i32 %60, 2
  %62 = add nsw i32 %53, %61
  %63 = icmp sgt i32 %43, %62
  br i1 %63, label %64, label %97

64:                                               ; preds = %36
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sub nsw i32 %65, %66
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %68
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [66 x i32], ptr %69, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [66 x i32], ptr %77, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = mul nsw i32 %81, 2
  %83 = add nsw i32 %74, %82
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %85
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [66 x i32], ptr %86, i64 0, i64 %88
  store i32 %83, ptr %89, align 4, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [65 x [66 x i32]], ptr @g, i64 0, i64 %92
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [66 x i32], ptr %93, i64 0, i64 %95
  store i32 %90, ptr %96, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %64, %36
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %6, align 4, !tbaa !5
  br label %31, !llvm.loop !11

101:                                              ; preds = %35
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %5, align 4, !tbaa !5
  br label %26, !llvm.loop !12

105:                                              ; preds = %29
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %3, align 4, !tbaa !5
  br label %21, !llvm.loop !13

109:                                              ; preds = %24
  %110 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @t)
  br label %111

111:                                              ; preds = %164, %109
  %112 = load i32, ptr @t, align 4, !tbaa !5
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr @t, align 4, !tbaa !5
  %114 = icmp ne i32 %112, 0
  br i1 %114, label %115, label %168

115:                                              ; preds = %111
  %116 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef @n, ptr noundef @m)
  %117 = load i32, ptr @n, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %118
  %120 = load i32, ptr @m, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [66 x i32], ptr %119, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %123)
  call void @llvm.memset.p0.i64(ptr align 16 @stack, i8 0, i64 17160, i1 false)
  %125 = load i32, ptr @m, align 4, !tbaa !5
  %126 = load i32, ptr @m, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [67 x i32], ptr @l, i64 0, i64 %128
  store i32 %125, ptr %129, align 4, !tbaa !5
  store i32 1, ptr @r, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %146, %115
  %131 = load i32, ptr %7, align 4, !tbaa !5
  %132 = load i32, ptr @m, align 4, !tbaa !5
  %133 = icmp sle i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %149

135:                                              ; preds = %130
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = sub nsw i32 %136, 1
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [67 x i32], ptr @l, i64 0, i64 %139
  store i32 %137, ptr %140, align 4, !tbaa !5
  %141 = load i32, ptr %7, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  %143 = load i32, ptr %7, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [67 x i32], ptr @r, i64 0, i64 %144
  store i32 %142, ptr %145, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %135
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %7, align 4, !tbaa !5
  br label %130, !llvm.loop !14

149:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %150 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %150, ptr %8, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %161, %149
  %152 = load i32, ptr %8, align 4, !tbaa !5
  %153 = icmp sgt i32 %152, 0
  br i1 %153, label %155, label %154

154:                                              ; preds = %151
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %164

155:                                              ; preds = %151
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = load i32, ptr getelementptr inbounds ([66 x [65 x i32]], ptr @stack, i64 0, i64 1), align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr getelementptr inbounds ([66 x [65 x i32]], ptr @stack, i64 0, i64 1), align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [65 x i32], ptr getelementptr inbounds ([66 x [65 x i32]], ptr @stack, i64 0, i64 1), i64 0, i64 %159
  store i32 %156, ptr %160, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %155
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = add nsw i32 %162, -1
  store i32 %163, ptr %8, align 4, !tbaa !5
  br label %151, !llvm.loop !15

164:                                              ; preds = %154
  %165 = load i32, ptr @n, align 4, !tbaa !5
  %166 = load i32, ptr @m, align 4, !tbaa !5
  %167 = load i32, ptr @m, align 4, !tbaa !5
  call void @_Z4moveiiii(i32 noundef %165, i32 noundef %166, i32 noundef 1, i32 noundef %167)
  br label %111, !llvm.loop !16

168:                                              ; preds = %111
  ret i32 0
}

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

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

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 = { "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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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
@m = external dso_local global i32, align 4
@f = external dso_local local_unnamed_addr global [65 x [66 x i32]], align 16
@g = external dso_local local_unnamed_addr global [65 x [66 x i32]], align 16
@stack = external dso_local local_unnamed_addr global [66 x [65 x i32]], align 16
@l = external dso_local local_unnamed_addr global [67 x i32], align 16
@r = external dso_local local_unnamed_addr global [67 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
.preheader43.preheader:
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(17160) @f, i8 15, i64 17160, i1 false)
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 268), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 284), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 300), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 316), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 332), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 348), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 364), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 380), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 396), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 412), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 428), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 444), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 460), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 476), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 492), align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @f, i64 508), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 524), align 4, !tbaa !5
  br label %.preheader43

.preheader43:                                     ; preds = %.preheader43.preheader, %7
  %indvars.iv65 = phi i64 [ 2, %.preheader43.preheader ], [ %indvars.iv.next66, %7 ]
  br label %.preheader

0:                                                ; preds = %7
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not55 = icmp eq i32 %2, 0
  br i1 %.not55, label %._crit_edge58, label %.lr.ph57

.preheader:                                       ; preds = %.preheader43, %8
  %indvars.iv61 = phi i64 [ 3, %.preheader43 ], [ %indvars.iv.next62, %8 ]
  %4 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %indvars.iv65, i64 %indvars.iv61
  %5 = add nsw i64 %indvars.iv61, -1
  %.promoted = load i32, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds [65 x [66 x i32]], ptr @g, i64 0, i64 %indvars.iv65, i64 %indvars.iv61
  br label %9

7:                                                ; preds = %8
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond68.not = icmp eq i64 %indvars.iv.next66, 65
  br i1 %exitcond68.not, label %0, label %.preheader43, !llvm.loop !9

8:                                                ; preds = %21
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond64.not = icmp eq i64 %indvars.iv.next62, 66
  br i1 %exitcond64.not, label %7, label %.preheader, !llvm.loop !11

9:                                                ; preds = %.preheader, %21
  %indvars.iv = phi i64 [ 1, %.preheader ], [ %indvars.iv.next, %21 ]
  %10 = phi i32 [ %.promoted, %.preheader ], [ %22, %21 ]
  %11 = sub nsw i64 %indvars.iv65, %indvars.iv
  %12 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %11, i64 %5
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %indvars.iv, i64 %indvars.iv61
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = shl nsw i32 %15, 1
  %17 = add nsw i32 %16, %13
  %18 = icmp sgt i32 %10, %17
  br i1 %18, label %19, label %21

19:                                               ; preds = %9
  store i32 %17, ptr %4, align 4, !tbaa !5
  %20 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %20, ptr %6, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %9, %19
  %22 = phi i32 [ %10, %9 ], [ %17, %19 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv65
  br i1 %exitcond.not, label %8, label %9, !llvm.loop !12

.lr.ph57:                                         ; preds = %0, %._crit_edge54
  %23 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = load i32, ptr @m, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [65 x [66 x i32]], ptr @f, i64 0, i64 %25, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %29)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(17160) @stack, i8 0, i64 17160, i1 false)
  %31 = load i32, ptr @m, align 4, !tbaa !5
  %32 = add i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [67 x i32], ptr @l, i64 0, i64 %33
  store i32 %31, ptr %34, align 4, !tbaa !5
  store i32 1, ptr @r, align 16, !tbaa !5
  %.not4249 = icmp slt i32 %31, 1
  br i1 %.not4249, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph57
  %wide.trip.count = zext i32 %32 to i64
  %35 = add nsw i64 %wide.trip.count, -1
  %min.iters.check = icmp ult i32 %32, 9
  br i1 %min.iters.check, label %.lr.ph.preheader78, label %vector.ph

.lr.ph.preheader78:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv69.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %35, -8
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i64> [ <i64 1, i64 2, i64 3, i64 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.ind74 = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next77, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %36 = getelementptr inbounds [67 x i32], ptr @l, i64 0, i64 %offset.idx
  %37 = add <4 x i32> %vec.ind74, <i32 -1, i32 -1, i32 -1, i32 -1>
  %38 = add <4 x i32> %vec.ind74, <i32 3, i32 3, i32 3, i32 3>
  %39 = getelementptr inbounds i8, ptr %36, i64 16
  store <4 x i32> %37, ptr %36, align 4, !tbaa !5
  store <4 x i32> %38, ptr %39, align 4, !tbaa !5
  %40 = getelementptr inbounds [67 x i32], ptr @r, i64 0, i64 %offset.idx
  %41 = trunc <4 x i64> %vec.ind to <4 x i32>
  %42 = add <4 x i32> %41, <i32 1, i32 1, i32 1, i32 1>
  %43 = trunc <4 x i64> %vec.ind to <4 x i32>
  %44 = add <4 x i32> %43, <i32 5, i32 5, i32 5, i32 5>
  %45 = getelementptr inbounds i8, ptr %40, i64 16
  store <4 x i32> %42, ptr %40, align 4, !tbaa !5
  store <4 x i32> %44, ptr %45, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %vec.ind.next77 = add <4 x i32> %vec.ind74, <i32 8, i32 8, i32 8, i32 8>
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %35, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader78

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.lr.ph57
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph53.preheader, label %._crit_edge54

.lr.ph53.preheader:                               ; preds = %._crit_edge
  %xtraiter = and i32 %47, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph53.prol.loopexit, label %.lr.ph53.prol

.lr.ph53.prol:                                    ; preds = %.lr.ph53.preheader
  %49 = load i32, ptr getelementptr inbounds (i8, ptr @stack, i64 260), align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr getelementptr inbounds (i8, ptr @stack, i64 260), align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [65 x i32], ptr getelementptr inbounds (i8, ptr @stack, i64 260), i64 0, i64 %51
  store i32 %47, ptr %52, align 4, !tbaa !5
  %53 = add nsw i32 %47, -1
  br label %.lr.ph53.prol.loopexit

.lr.ph53.prol.loopexit:                           ; preds = %.lr.ph53.prol, %.lr.ph53.preheader
  %.051.unr = phi i32 [ %47, %.lr.ph53.preheader ], [ %53, %.lr.ph53.prol ]
  %54 = icmp eq i32 %47, 1
  br i1 %54, label %._crit_edge54, label %.lr.ph53

.lr.ph:                                           ; preds = %.lr.ph.preheader78, %.lr.ph
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %.lr.ph ], [ %indvars.iv69.ph, %.lr.ph.preheader78 ]
  %55 = getelementptr inbounds [67 x i32], ptr @l, i64 0, i64 %indvars.iv69
  %56 = trunc i64 %indvars.iv69 to i32
  %57 = add i32 %56, -1
  store i32 %57, ptr %55, align 4, !tbaa !5
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %58 = getelementptr inbounds [67 x i32], ptr @r, i64 0, i64 %indvars.iv69
  %59 = trunc nuw i64 %indvars.iv.next70 to i32
  store i32 %59, ptr %58, align 4, !tbaa !5
  %exitcond72.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count
  br i1 %exitcond72.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge54:                                    ; preds = %.lr.ph53.prol.loopexit, %.lr.ph53, %._crit_edge
  tail call void @_Z4moveiiii(i32 noundef %47, i32 noundef %31, i32 noundef 1, i32 noundef %31)
  %60 = load i32, ptr @t, align 4, !tbaa !5
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %60, 0
  br i1 %.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !17

.lr.ph53:                                         ; preds = %.lr.ph53.prol.loopexit, %.lr.ph53
  %.051 = phi i32 [ %71, %.lr.ph53 ], [ %.051.unr, %.lr.ph53.prol.loopexit ]
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @stack, i64 260), align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr getelementptr inbounds (i8, ptr @stack, i64 260), align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [65 x i32], ptr getelementptr inbounds (i8, ptr @stack, i64 260), i64 0, i64 %64
  store i32 %.051, ptr %65, align 4, !tbaa !5
  %66 = add nsw i32 %.051, -1
  %67 = load i32, ptr getelementptr inbounds (i8, ptr @stack, i64 260), align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr getelementptr inbounds (i8, ptr @stack, i64 260), align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [65 x i32], ptr getelementptr inbounds (i8, ptr @stack, i64 260), i64 0, i64 %69
  store i32 %66, ptr %70, align 4, !tbaa !5
  %71 = add nsw i32 %.051, -2
  %72 = icmp ugt i32 %66, 1
  br i1 %72, label %.lr.ph53, label %._crit_edge54, !llvm.loop !18

._crit_edge58:                                    ; preds = %._crit_edge54, %0
  ret i32 0
}

; 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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 = { 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 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }

!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, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10, !15, !14}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass