; LLVM IR from tangjz/acm-icpc :: hdu (5443)

; 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
@Log = external dso_local global [1001 x i32], align 16
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@st = external dso_local global [1001 x [11 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = 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 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %10

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

13:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %27

14:                                               ; preds = %10
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = ashr i32 %15, 1
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %17
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %22
  store i32 %20, ptr %23, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %14
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !9

27:                                               ; preds = %13
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %29

29:                                               ; preds = %134, %27
  %30 = load i32, ptr @t, align 4, !tbaa !5
  %31 = add nsw i32 %30, -1
  store i32 %31, ptr @t, align 4, !tbaa !5
  %32 = icmp ne i32 %30, 0
  br i1 %32, label %33, label %135

33:                                               ; preds = %29
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %35

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

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %49

40:                                               ; preds = %35
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %42
  %44 = getelementptr inbounds [11 x i32], ptr %43, i64 0, i64 0
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %44)
  br label %46

46:                                               ; preds = %40
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %3, align 4, !tbaa !5
  br label %35, !llvm.loop !11

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

50:                                               ; preds = %97, %49
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = shl i32 1, %51
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = icmp sle i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %50
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %100

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

57:                                               ; preds = %93, %56
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = shl i32 1, %60
  %62 = add nsw i32 %58, %61
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %57
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %96

66:                                               ; preds = %57
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %68
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [11 x i32], ptr %69, i64 0, i64 %72
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sub nsw i32 %75, 1
  %77 = shl i32 1, %76
  %78 = add nsw i32 %74, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %79
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [11 x i32], ptr %80, i64 0, i64 %83
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %73, ptr noundef nonnull align 4 dereferenceable(4) %84)
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %88
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [11 x i32], ptr %89, i64 0, i64 %91
  store i32 %86, ptr %92, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %66
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %6, align 4, !tbaa !5
  br label %57, !llvm.loop !12

96:                                               ; preds = %65
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %4, align 4, !tbaa !5
  br label %50, !llvm.loop !13

100:                                              ; preds = %55
  %101 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @q)
  br label %102

102:                                              ; preds = %106, %100
  %103 = load i32, ptr @q, align 4, !tbaa !5
  %104 = add nsw i32 %103, -1
  store i32 %104, ptr @q, align 4, !tbaa !5
  %105 = icmp ne i32 %103, 0
  br i1 %105, label %106, label %134

106:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %107 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %7, ptr noundef %8)
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = sub nsw i32 %108, %109
  %111 = add nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr %9, align 4, !tbaa !5
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %116
  %118 = load i32, ptr %9, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [11 x i32], ptr %117, i64 0, i64 %119
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = load i32, ptr %9, align 4, !tbaa !5
  %123 = shl i32 1, %122
  %124 = sub nsw i32 %121, %123
  %125 = add nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %126
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [11 x i32], ptr %127, i64 0, i64 %129
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %120, ptr noundef nonnull align 4 dereferenceable(4) %130)
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %132)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %102, !llvm.loop !14

134:                                              ; preds = %102
  br label %29, !llvm.loop !15

135:                                              ; preds = %29
  ret i32 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

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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
@Log = external dso_local local_unnamed_addr global [1001 x i32], align 16
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@st = external dso_local global [1001 x [11 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  br label %7

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

7:                                                ; preds = %7, %0
  %indvars.iv = phi i64 [ 2, %0 ], [ %indvars.iv.next.2, %7 ]
  %8 = lshr i64 %indvars.iv, 1
  %9 = and i64 %8, 2147483647
  %10 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %9
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = add nsw i32 %11, 1
  %13 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %indvars.iv
  store i32 %12, ptr %13, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = lshr i64 %indvars.iv.next, 1
  %15 = and i64 %14, 2147483647
  %16 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  %19 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %indvars.iv.next
  store i32 %18, ptr %19, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %20 = lshr i64 %indvars.iv.next.1, 1
  %21 = and i64 %20, 2147483647
  %22 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  %25 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %indvars.iv.next.1
  store i32 %24, ptr %25, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 1001
  br i1 %exitcond.not.2, label %3, label %7, !llvm.loop !9

.loopexit:                                        ; preds = %.lr.ph43, %._crit_edge40
  %26 = load i32, ptr @t, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %._crit_edge47, label %.lr.ph46, !llvm.loop !11

.lr.ph46:                                         ; preds = %3, %.loopexit
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %.not2633 = icmp slt i32 %29, 1
  br i1 %.not2633, label %._crit_edge40, label %.lr.ph

.preheader31:                                     ; preds = %.lr.ph
  %.not2738 = icmp slt i32 %32, 2
  br i1 %.not2738, label %._crit_edge40, label %.preheader

.lr.ph:                                           ; preds = %.lr.ph46, %.lr.ph
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %.lr.ph ], [ 1, %.lr.ph46 ]
  %30 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %indvars.iv49
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %30)
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %.not26.not = icmp slt i64 %indvars.iv49, %33
  br i1 %.not26.not, label %.lr.ph, label %.preheader31, !llvm.loop !12

.preheader:                                       ; preds = %.preheader31, %._crit_edge
  %34 = phi i32 [ %43, %._crit_edge ], [ %32, %.preheader31 ]
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %._crit_edge ], [ 1, %.preheader31 ]
  %35 = add nsw i64 %indvars.iv55, -1
  %36 = trunc nuw nsw i64 %35 to i32
  %37 = shl nuw i32 1, %36
  %.not2935.not = icmp slt i32 %37, %34
  br i1 %.not2935.not, label %.lr.ph37, label %._crit_edge

.lr.ph37:                                         ; preds = %.preheader
  %38 = add nuw nsw i32 %37, 1
  %39 = sext i32 %37 to i64
  br label %46

._crit_edge40:                                    ; preds = %._crit_edge, %.lr.ph46, %.preheader31
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @q)
  %41 = load i32, ptr @q, align 4, !tbaa !5
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr @q, align 4, !tbaa !5
  %.not2841 = icmp eq i32 %41, 0
  br i1 %.not2841, label %.loopexit, label %.lr.ph43

._crit_edge:                                      ; preds = %46, %.preheader
  %43 = phi i32 [ %34, %.preheader ], [ %55, %46 ]
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %44 = trunc nuw nsw i64 %indvars.iv55 to i32
  %45 = shl nuw i32 2, %44
  %.not27 = icmp sgt i32 %45, %43
  br i1 %.not27, label %._crit_edge40, label %.preheader, !llvm.loop !13

46:                                               ; preds = %.lr.ph37, %46
  %indvars.iv52 = phi i64 [ 1, %.lr.ph37 ], [ %indvars.iv.next53, %46 ]
  %47 = phi i32 [ %38, %.lr.ph37 ], [ %57, %46 ]
  %48 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %indvars.iv52, i64 %35
  %49 = sext i32 %47 to i64
  %50 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %49, i64 %35
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %indvars.iv52, i64 %indvars.iv55
  store i32 %52, ptr %53, align 4, !tbaa !5
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %54 = add nuw nsw i64 %indvars.iv.next53, %39
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %.not29 = icmp sgt i64 %54, %56
  %57 = trunc nsw i64 %54 to i32
  br i1 %.not29, label %._crit_edge, label %46, !llvm.loop !14

.lr.ph43:                                         ; preds = %._crit_edge40, %.lr.ph43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %58 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = load i32, ptr %1, align 4, !tbaa !5
  %61 = add i32 %59, 1
  %62 = sub i32 %61, %60
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [1001 x i32], ptr @Log, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sext i32 %60 to i64
  %67 = sext i32 %65 to i64
  %68 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %66, i64 %67
  %.neg = shl nsw i32 -1, %65
  %69 = add i32 %61, %.neg
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [1001 x [11 x i32]], ptr @st, i64 0, i64 %70, i64 %67
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %68, ptr noundef nonnull align 4 dereferenceable(4) %71)
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %73)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %75 = load i32, ptr @q, align 4, !tbaa !5
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr @q, align 4, !tbaa !5
  %.not28 = icmp eq i32 %75, 0
  br i1 %.not28, label %.loopexit, label %.lr.ph43, !llvm.loop !15

._crit_edge47:                                    ; preds = %.loopexit, %3
  ret i32 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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