; LLVM IR from tangjz/acm-icpc :: codeforces/gym (100506D)

; 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
@m = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@w = external dso_local global [7777 x i32], align 16
@f = external dso_local global [6 x [51 x i64]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [51 x i8], align 16
  %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
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %10

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

14:                                               ; preds = %10
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 0, i64 2448, i1 false)
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @m, ptr noundef @n, ptr noundef @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %30, %14
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 51, ptr %3) #5
  %22 = getelementptr inbounds [51 x i8], ptr %3, i64 0, i64 0
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %22)
  %24 = getelementptr inbounds [51 x i8], ptr %3, i64 0, i64 0
  %25 = call i64 @strlen(ptr noundef %24) #6
  %26 = trunc i64 %25 to i32
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [7777 x i32], ptr @w, i64 0, i64 %28
  store i32 %26, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 51, ptr %3) #5
  br label %30

30:                                               ; preds = %21
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !9

33:                                               ; preds = %20
  store i64 1, ptr @f, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %84, %33
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %87

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

40:                                               ; preds = %80, %39
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [7777 x i32], ptr @w, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %49, ptr %7, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %76, %45
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = icmp slt i32 %51, 51
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %79

54:                                               ; preds = %50
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = sub nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %57
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [7777 x i32], ptr @w, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = sub nsw i32 %59, %63
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [51 x i64], ptr %58, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %69
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [51 x i64], ptr %70, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !11
  %75 = add nsw i64 %74, %67
  store i64 %75, ptr %73, align 8, !tbaa !11
  br label %76

76:                                               ; preds = %54
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !5
  br label %50, !llvm.loop !13

79:                                               ; preds = %53
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %6, align 4, !tbaa !5
  br label %40, !llvm.loop !14

83:                                               ; preds = %44
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %4, align 4, !tbaa !5
  br label %34, !llvm.loop !15

87:                                               ; preds = %38
  br label %88

88:                                               ; preds = %92, %87
  %89 = load i32, ptr @q, align 4, !tbaa !5
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr @q, align 4, !tbaa !5
  %91 = icmp ne i32 %89, 0
  br i1 %91, label %92, label %102

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %93 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %8)
  %94 = load i32, ptr @n, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %95
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [51 x i64], ptr %96, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !11
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %100)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %88, !llvm.loop !16

102:                                              ; preds = %88
  br label %10, !llvm.loop !17

103:                                              ; preds = %10
  ret i32 0
}

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind willreturn memory(read) "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 }
attributes #6 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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
@m = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@w = external dso_local local_unnamed_addr global [7777 x i32], align 16
@f = external dso_local local_unnamed_addr global [6 x [51 x i64]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [51 x i8], align 16
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not33 = icmp eq i32 %4, 0
  br i1 %.not33, label %._crit_edge36, label %.lr.ph35

.loopexit:                                        ; preds = %.lr.ph32, %.preheader20
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %._crit_edge36, label %.lr.ph35, !llvm.loop !9

.lr.ph35:                                         ; preds = %0, %.loopexit
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2448) @f, i8 0, i64 2448, i1 false)
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @m, ptr noundef nonnull @n, ptr noundef nonnull @q)
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph35
  %.lcssa = phi i32 [ %9, %.lr.ph35 ], [ %56, %.lr.ph ]
  store i64 1, ptr @f, align 16, !tbaa !11
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %.not1829 = icmp sgt i32 %11, 0
  %12 = icmp sgt i32 %.lcssa, 0
  %or.cond = and i1 %.not1829, %12
  br i1 %or.cond, label %.preheader.us.preheader, label %.preheader20

.preheader.us.preheader:                          ; preds = %._crit_edge
  %13 = add nuw i32 %11, 1
  %wide.trip.count50 = zext i32 %13 to i64
  %wide.trip.count = zext nneg i32 %.lcssa to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge28.us
  %indvar = phi i64 [ 0, %.preheader.us.preheader ], [ %indvar.next, %._crit_edge28.us ]
  %indvars.iv47 = phi i64 [ 1, %.preheader.us.preheader ], [ %indvars.iv.next48, %._crit_edge28.us ]
  %14 = mul nuw nsw i64 %indvar, 408
  %gep = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 408), i64 %14
  %gep66 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 824), i64 %14
  %scevgep57 = getelementptr i8, ptr @f, i64 %14
  %gep67 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 416), i64 %14
  %15 = add nsw i64 %indvars.iv47, -1
  br label %16

16:                                               ; preds = %.preheader.us, %._crit_edge25.us
  %indvars.iv43 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next44, %._crit_edge25.us ]
  %17 = getelementptr inbounds [7777 x i32], ptr @w, i64 0, i64 %indvars.iv43
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = icmp slt i32 %18, 51
  br i1 %19, label %.lr.ph24.us.preheader, label %._crit_edge25.us

.lr.ph24.us.preheader:                            ; preds = %16
  %20 = sext i32 %18 to i64
  %21 = add i32 %18, 1
  %22 = zext i32 %21 to i64
  %23 = sub nsw i64 52, %22
  %min.iters.check = icmp ult i64 %23, 14
  br i1 %min.iters.check, label %.lr.ph24.us.preheader63, label %vector.scevcheck

.lr.ph24.us.preheader63:                          ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.lr.ph24.us.preheader
  %indvars.iv40.ph = phi i64 [ %20, %vector.memcheck ], [ %20, %vector.scevcheck ], [ %20, %.lr.ph24.us.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph24.us

vector.scevcheck:                                 ; preds = %.lr.ph24.us.preheader
  %24 = add i32 %18, 1
  %25 = zext i32 %24 to i64
  %26 = sub nsw i64 51, %25
  %27 = trunc i64 %26 to i32
  %28 = sub i32 -2, %18
  %29 = icmp ult i32 %28, %27
  %30 = icmp ugt i64 %26, 4294967295
  %31 = or i1 %29, %30
  br i1 %31, label %.lr.ph24.us.preheader63, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %32 = shl nsw i64 %20, 3
  %scevgep54 = getelementptr i8, ptr %gep, i64 %32
  %33 = add i32 %18, 1
  %34 = zext i32 %33 to i64
  %35 = sub nsw i64 %20, %34
  %36 = shl nsw i64 %35, 3
  %scevgep56 = getelementptr i8, ptr %gep66, i64 %36
  %37 = mul nsw i64 %34, -8
  %scevgep59 = getelementptr i8, ptr %gep67, i64 %37
  %bound0 = icmp ult ptr %scevgep54, %scevgep59
  %bound1 = icmp ult ptr %scevgep57, %scevgep56
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph24.us.preheader63, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %23, -4
  %ind.end = add nsw i64 %n.vec, %20
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %index, %20
  %38 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %15, i64 %index
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %wide.load = load <2 x i64>, ptr %38, align 8, !tbaa !11, !alias.scope !13
  %wide.load60 = load <2 x i64>, ptr %39, align 8, !tbaa !11, !alias.scope !13
  %40 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %indvars.iv47, i64 %offset.idx
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %wide.load61 = load <2 x i64>, ptr %40, align 8, !tbaa !11, !alias.scope !16, !noalias !13
  %wide.load62 = load <2 x i64>, ptr %41, align 8, !tbaa !11, !alias.scope !16, !noalias !13
  %42 = add nsw <2 x i64> %wide.load61, %wide.load
  %43 = add nsw <2 x i64> %wide.load62, %wide.load60
  store <2 x i64> %42, ptr %40, align 8, !tbaa !11, !alias.scope !16, !noalias !13
  store <2 x i64> %43, ptr %41, align 8, !tbaa !11, !alias.scope !16, !noalias !13
  %index.next = add nuw i64 %index, 4
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %23, %n.vec
  br i1 %cmp.n, label %._crit_edge25.us, label %.lr.ph24.us.preheader63

._crit_edge25.us:                                 ; preds = %.lr.ph24.us, %middle.block, %16
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next44, %wide.trip.count
  br i1 %exitcond46.not, label %._crit_edge28.us, label %16, !llvm.loop !21

.lr.ph24.us:                                      ; preds = %.lr.ph24.us.preheader63, %.lr.ph24.us
  %indvars.iv40 = phi i64 [ %indvars.iv.next41, %.lr.ph24.us ], [ %indvars.iv40.ph, %.lr.ph24.us.preheader63 ]
  %45 = sub nsw i64 %indvars.iv40, %20
  %46 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %15, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %indvars.iv47, i64 %indvars.iv40
  %49 = load i64, ptr %48, align 8, !tbaa !11
  %50 = add nsw i64 %49, %47
  store i64 %50, ptr %48, align 8, !tbaa !11
  %indvars.iv.next41 = add nsw i64 %indvars.iv40, 1
  %51 = and i64 %indvars.iv.next41, 4294967295
  %exitcond.not = icmp eq i64 %51, 51
  br i1 %exitcond.not, label %._crit_edge25.us, label %.lr.ph24.us, !llvm.loop !22

._crit_edge28.us:                                 ; preds = %._crit_edge25.us
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %exitcond51.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count50
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond51.not, label %.preheader20, label %.preheader.us, !llvm.loop !23

.lr.ph:                                           ; preds = %.lr.ph35, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph35 ]
  call void @llvm.lifetime.start.p0(i64 51, ptr nonnull %1) #5
  %52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1)
  %53 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #6
  %54 = trunc i64 %53 to i32
  %55 = getelementptr inbounds [7777 x i32], ptr @w, i64 0, i64 %indvars.iv
  store i32 %54, ptr %55, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 51, ptr nonnull %1) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %56 = load i32, ptr @m, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next, %57
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !24

.preheader20:                                     ; preds = %._crit_edge28.us, %._crit_edge
  %59 = load i32, ptr @q, align 4, !tbaa !5
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr @q, align 4, !tbaa !5
  %.not1931 = icmp eq i32 %59, 0
  br i1 %.not1931, label %.loopexit, label %.lr.ph32

.lr.ph32:                                         ; preds = %.preheader20, %.lr.ph32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [6 x [51 x i64]], ptr @f, i64 0, i64 %63, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %67)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %69 = load i32, ptr @q, align 4, !tbaa !5
  %70 = add nsw i32 %69, -1
  store i32 %70, ptr @q, align 4, !tbaa !5
  %.not19 = icmp eq i32 %69, 0
  br i1 %.not19, label %.loopexit, label %.lr.ph32, !llvm.loop !25

._crit_edge36:                                    ; preds = %.loopexit, %0
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

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

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

attributes #0 = { mustprogress nofree norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 }
attributes #6 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14}
!14 = distinct !{!14, !15}
!15 = distinct !{!15, !"LVerDomain"}
!16 = !{!17}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !10, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10, !19}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


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