; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/363 Division 1/Problem A (A)

; 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
@dp = external dso_local global [101 x [3 x i32]], align 16
@a = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 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
  store i32 0, ptr %1, align 4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %7

7:                                                ; preds = %17, %0
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp sle i32 %8, %9
  br i1 %10, label %12, label %11

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

12:                                               ; preds = %7
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %14
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %15)
  br label %17

17:                                               ; preds = %12
  %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 %7, !llvm.loop !9

20:                                               ; preds = %11
  store i32 1000000000, ptr getelementptr inbounds ([3 x i32], ptr @dp, i64 0, i64 2), align 8, !tbaa !5
  store i32 1000000000, ptr getelementptr inbounds ([3 x i32], ptr @dp, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %157, %20
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = sub nsw i32 %27, 1
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %29
  %31 = getelementptr inbounds [3 x i32], ptr %30, i64 0, i64 0
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sub nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %36
  %38 = getelementptr inbounds [3 x i32], ptr %37, i64 0, i64 1
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %41
  %43 = getelementptr inbounds [3 x i32], ptr %42, i64 0, i64 2
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %5, align 4, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %50
  %52 = getelementptr inbounds [3 x i32], ptr %51, i64 0, i64 0
  store i32 %48, ptr %52, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %67

58:                                               ; preds = %26
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %60
  %62 = getelementptr inbounds [3 x i32], ptr %61, i64 0, i64 2
  store i32 1000000000, ptr %62, align 4, !tbaa !5
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %64
  %66 = getelementptr inbounds [3 x i32], ptr %65, i64 0, i64 1
  store i32 1000000000, ptr %66, align 4, !tbaa !5
  br label %156

67:                                               ; preds = %26
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp eq i32 %71, 1
  br i1 %72, label %73, label %94

73:                                               ; preds = %67
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %75
  %77 = getelementptr inbounds [3 x i32], ptr %76, i64 0, i64 2
  store i32 1000000000, ptr %77, align 4, !tbaa !5
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %80
  %82 = getelementptr inbounds [3 x i32], ptr %81, i64 0, i64 0
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %85
  %87 = getelementptr inbounds [3 x i32], ptr %86, i64 0, i64 2
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %82, ptr noundef nonnull align 4 dereferenceable(4) %87)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %91
  %93 = getelementptr inbounds [3 x i32], ptr %92, i64 0, i64 1
  store i32 %89, ptr %93, align 4, !tbaa !5
  br label %155

94:                                               ; preds = %67
  %95 = load i32, ptr %3, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = icmp eq i32 %98, 2
  br i1 %99, label %100, label %121

100:                                              ; preds = %94
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = sub nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %103
  %105 = getelementptr inbounds [3 x i32], ptr %104, i64 0, i64 0
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %108
  %110 = getelementptr inbounds [3 x i32], ptr %109, i64 0, i64 1
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %105, ptr noundef nonnull align 4 dereferenceable(4) %110)
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %114
  %116 = getelementptr inbounds [3 x i32], ptr %115, i64 0, i64 2
  store i32 %112, ptr %116, align 4, !tbaa !5
  %117 = load i32, ptr %3, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %118
  %120 = getelementptr inbounds [3 x i32], ptr %119, i64 0, i64 1
  store i32 1000000000, ptr %120, align 4, !tbaa !5
  br label %154

121:                                              ; preds = %94
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = sub nsw i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %124
  %126 = getelementptr inbounds [3 x i32], ptr %125, i64 0, i64 0
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = sub nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %129
  %131 = getelementptr inbounds [3 x i32], ptr %130, i64 0, i64 1
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %126, ptr noundef nonnull align 4 dereferenceable(4) %131)
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = load i32, ptr %3, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %135
  %137 = getelementptr inbounds [3 x i32], ptr %136, i64 0, i64 2
  store i32 %133, ptr %137, align 4, !tbaa !5
  %138 = load i32, ptr %3, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %140
  %142 = getelementptr inbounds [3 x i32], ptr %141, i64 0, i64 0
  %143 = load i32, ptr %3, align 4, !tbaa !5
  %144 = sub nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %145
  %147 = getelementptr inbounds [3 x i32], ptr %146, i64 0, i64 2
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %142, ptr noundef nonnull align 4 dereferenceable(4) %147)
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = load i32, ptr %3, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %151
  %153 = getelementptr inbounds [3 x i32], ptr %152, i64 0, i64 1
  store i32 %149, ptr %153, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %121, %100
  br label %155

155:                                              ; preds = %154, %73
  br label %156

156:                                              ; preds = %155, %58
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %3, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %3, align 4, !tbaa !5
  br label %21, !llvm.loop !11

160:                                              ; preds = %25
  %161 = load i32, ptr @n, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %162
  %164 = getelementptr inbounds [3 x i32], ptr %163, i64 0, i64 0
  %165 = load i32, ptr @n, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %166
  %168 = getelementptr inbounds [3 x i32], ptr %167, i64 0, i64 1
  %169 = load i32, ptr @n, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %170
  %172 = getelementptr inbounds [3 x i32], ptr %171, i64 0, i64 2
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %168, ptr noundef nonnull align 4 dereferenceable(4) %172)
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %164, ptr noundef nonnull align 4 dereferenceable(4) %173)
  %175 = load i32, ptr %174, align 4, !tbaa !5
  call void @_Z2trIiJEEvT_DpRKT0_(i32 noundef %175)
  ret i32 0
}

declare i32 @__isoc99_scanf(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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIiJEEvT_DpRKT0_(i32 noundef) #4

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 = { 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 #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}


; 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
@dp = external dso_local global [101 x [3 x i32]], align 16
@a = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not32 = icmp slt i32 %4, 1
  br i1 %.not32, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  store i32 1000000000, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !5
  store i32 1000000000, ptr getelementptr inbounds (i8, ptr @dp, i64 4), align 4, !tbaa !5
  br label %._crit_edge.._crit_edge38_crit_edge

._crit_edge:                                      ; preds = %.lr.ph
  store i32 1000000000, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !5
  store i32 1000000000, ptr getelementptr inbounds (i8, ptr @dp, i64 4), align 4, !tbaa !5
  %.not3134 = icmp slt i32 %8, 1
  br i1 %.not3134, label %._crit_edge.._crit_edge38_crit_edge, label %.lr.ph37

._crit_edge.._crit_edge38_crit_edge:              ; preds = %._crit_edge.thread, %._crit_edge
  %5 = phi i32 [ %4, %._crit_edge.thread ], [ %8, %._crit_edge ]
  %.pre = sext i32 %5 to i64
  br label %._crit_edge38

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %6 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %.not.not = icmp slt i64 %indvars.iv, %9
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge38:                                    ; preds = %46, %._crit_edge.._crit_edge38_crit_edge
  %.pre-phi = phi i64 [ %.pre, %._crit_edge.._crit_edge38_crit_edge ], [ %49, %46 ]
  %10 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %.pre-phi
  %11 = getelementptr inbounds i8, ptr %10, i64 4
  %12 = getelementptr inbounds i8, ptr %10, i64 8
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %15 = load i32, ptr %14, align 4, !tbaa !5
  call void @_Z2trIiJEEvT_DpRKT0_(i32 noundef %15)
  ret i32 0

.lr.ph37:                                         ; preds = %._crit_edge, %46
  %indvars.iv41 = phi i64 [ %indvars.iv.next42, %46 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %16 = add nsw i64 %indvars.iv41, -1
  %17 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %20 = getelementptr inbounds i8, ptr %17, i64 4
  %21 = getelementptr inbounds i8, ptr %17, i64 8
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %2, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = getelementptr inbounds [101 x [3 x i32]], ptr @dp, i64 0, i64 %indvars.iv41
  store i32 %26, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %28 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv41
  %29 = load i32, ptr %28, align 4, !tbaa !5
  switch i32 %29, label %40 [
    i32 0, label %30
    i32 1, label %32
    i32 2, label %36
  ]

30:                                               ; preds = %.lr.ph37
  %31 = getelementptr inbounds i8, ptr %27, i64 8
  store i32 1000000000, ptr %31, align 4, !tbaa !5
  br label %46

32:                                               ; preds = %.lr.ph37
  %33 = getelementptr inbounds i8, ptr %27, i64 8
  store i32 1000000000, ptr %33, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  br label %46

36:                                               ; preds = %.lr.ph37
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %27, i64 8
  store i32 %38, ptr %39, align 4, !tbaa !5
  br label %46

40:                                               ; preds = %.lr.ph37
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %27, i64 8
  store i32 %42, ptr %43, align 4, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %45 = load i32, ptr %44, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %30, %36, %40, %32
  %.sink = phi i32 [ 1000000000, %30 ], [ 1000000000, %36 ], [ %45, %40 ], [ %35, %32 ]
  %47 = getelementptr inbounds i8, ptr %27, i64 4
  store i32 %.sink, ptr %47, align 4, !tbaa !5
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %.not31.not = icmp slt i64 %indvars.iv41, %49
  br i1 %.not31.not, label %.lr.ph37, label %._crit_edge38, !llvm.loop !11
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIiJEEvT_DpRKT0_(i32 noundef) local_unnamed_addr #4

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


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