; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/182 Division 1/Problem B/B.ll (Z5checki)

; 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
@inf = external dso_local global i32, align 4
@g = external dso_local global [101 x [101 x i32]], align 16
@dis = external dso_local global [101 x i32], align 16
@v = external dso_local global [101 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5checki(i32 noundef %0) #0 {
  %2 = alloca i1, align 1
  %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
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 2, ptr %4, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %21, %1
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %24

17:                                               ; preds = %12
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %19
  store i32 -1, ptr %20, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %17
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %4, align 4, !tbaa !5
  br label %12, !llvm.loop !9

24:                                               ; preds = %16
  %25 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %25, ptr getelementptr inbounds ([101 x i32], ptr @dis, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @v, i8 0, i64 404, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %101, %24
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 5, ptr %6, align 4
  br label %104

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %32 = load i32, ptr @inf, align 4, !tbaa !5
  %33 = sub nsw i32 0, %32
  store i32 %33, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %59, %31
  %35 = load i32, ptr %9, 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 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %62

39:                                               ; preds = %34
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %58

45:                                               ; preds = %39
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = icmp sgt i32 %49, %50
  br i1 %51, label %52, label %58

52:                                               ; preds = %45
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %56, ptr %8, align 4, !tbaa !5
  %57 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %57, ptr %7, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %52, %45, %39
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %9, align 4, !tbaa !5
  br label %34, !llvm.loop !11

62:                                               ; preds = %38
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp eq i32 %63, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %62
  store i32 5, ptr %6, align 4
  br label %98

67:                                               ; preds = %62
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %69
  store i32 1, ptr %70, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %94, %67
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = load i32, ptr @n, align 4, !tbaa !5
  %74 = icmp sle i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %97

76:                                               ; preds = %71
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [101 x [101 x i32]], ptr @g, i64 0, i64 %82
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [101 x i32], ptr %83, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = add nsw i32 %80, %87
  store i32 %88, ptr %11, align 4, !tbaa !5
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %79, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %92
  store i32 %90, ptr %93, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %94

94:                                               ; preds = %76
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !5
  br label %71, !llvm.loop !12

97:                                               ; preds = %75
  store i32 0, ptr %6, align 4
  br label %98

98:                                               ; preds = %97, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %99 = load i32, ptr %6, align 4
  switch i32 %99, label %104 [
    i32 0, label %100
  ]

100:                                              ; preds = %98
  br label %101

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

104:                                              ; preds = %98, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr @n, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp sge i32 %109, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %105
  store i1 true, ptr %2, align 1
  br label %113

112:                                              ; preds = %105
  store i1 false, ptr %2, align 1
  br label %113

113:                                              ; preds = %112, %111
  %114 = load i1, ptr %2, align 1
  ret i1 %114
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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

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


; 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 local_unnamed_addr global i32, align 4
@inf = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local local_unnamed_addr global [101 x [101 x i32]], align 16
@dis = external dso_local global [101 x i32], align 16
@v = external dso_local local_unnamed_addr global [101 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z5checki(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %.not37 = icmp slt i32 %3, 2
  br i1 %.not37, label %._crit_edge, label %.lr.ph55.preheader

._crit_edge:                                      ; preds = %1
  store i32 %0, ptr getelementptr inbounds (i8, ptr @dis, i64 4), align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) @v, i8 0, i64 404, i1 false)
  br label %.critedge

.lr.ph55.preheader:                               ; preds = %1
  %4 = add nsw i32 %3, -1
  %5 = zext nneg i32 %4 to i64
  %6 = shl nuw nsw i64 %5, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @dis, i64 8), i8 -1, i64 %6, i1 false), !tbaa !5
  store i32 %0, ptr getelementptr inbounds (i8, ptr @dis, i64 4), align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) @v, i8 0, i64 404, i1 false)
  br label %.lr.ph55

.lr.ph55:                                         ; preds = %.lr.ph55.preheader, %._crit_edge51
  %7 = phi i32 [ %50, %._crit_edge51 ], [ %3, %.lr.ph55.preheader ]
  %.02553 = phi i32 [ %.126.lcssa6569, %._crit_edge51 ], [ undef, %.lr.ph55.preheader ]
  %.02852 = phi i32 [ %51, %._crit_edge51 ], [ 1, %.lr.ph55.preheader ]
  %.not3339 = icmp slt i32 %7, 1
  br i1 %.not3339, label %._crit_edge45.thread, label %.lr.ph44.preheader

.lr.ph44.preheader:                               ; preds = %.lr.ph55
  %8 = load i32, ptr @inf, align 4, !tbaa !5
  %9 = sub nsw i32 0, %8
  %10 = zext nneg i32 %7 to i64
  %xtraiter = and i64 %10, 1
  %11 = icmp eq i32 %7, 1
  br i1 %11, label %._crit_edge45.unr-lcssa, label %.lr.ph44.preheader.new

.lr.ph44.preheader.new:                           ; preds = %.lr.ph44.preheader
  %unroll_iter = and i64 %10, 2147483646
  br label %.lr.ph44

._crit_edge45.unr-lcssa:                          ; preds = %38, %.lr.ph44.preheader
  %.2.lcssa.ph = phi i32 [ poison, %.lr.ph44.preheader ], [ %.2.1, %38 ]
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph44.preheader ], [ %.1.1, %38 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph44.preheader ], [ %indvars.iv.next.1, %38 ]
  %.02441.unr = phi i32 [ %9, %.lr.ph44.preheader ], [ %.1.1, %38 ]
  %.12640.unr = phi i32 [ %.02553, %.lr.ph44.preheader ], [ %.2.1, %38 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge45, label %.lr.ph44.epil

.lr.ph44.epil:                                    ; preds = %._crit_edge45.unr-lcssa
  %12 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %indvars.iv.unr
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %._crit_edge45

15:                                               ; preds = %.lr.ph44.epil
  %16 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %indvars.iv.unr
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, %.02441.unr
  %19 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %spec.select.epil = select i1 %18, i32 %19, i32 %.12640.unr
  %spec.select36.epil = call i32 @llvm.smax.i32(i32 %17, i32 %.02441.unr)
  br label %._crit_edge45

._crit_edge45:                                    ; preds = %.lr.ph44.epil, %15, %._crit_edge45.unr-lcssa
  %.2.lcssa = phi i32 [ %.2.lcssa.ph, %._crit_edge45.unr-lcssa ], [ %.12640.unr, %.lr.ph44.epil ], [ %spec.select.epil, %15 ]
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge45.unr-lcssa ], [ %.02441.unr, %.lr.ph44.epil ], [ %spec.select36.epil, %15 ]
  %.not35 = icmp eq i32 %.2.lcssa, %7
  br i1 %.not35, label %.critedge, label %39

._crit_edge45.thread:                             ; preds = %.lr.ph55
  %.not3564 = icmp eq i32 %.02553, %7
  br i1 %.not3564, label %.critedge, label %.thread

.thread:                                          ; preds = %._crit_edge45.thread
  %20 = sext i32 %.02553 to i64
  %21 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %20
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %._crit_edge51

.lr.ph44:                                         ; preds = %38, %.lr.ph44.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph44.preheader.new ], [ %indvars.iv.next.1, %38 ]
  %.02441 = phi i32 [ %9, %.lr.ph44.preheader.new ], [ %.1.1, %38 ]
  %.12640 = phi i32 [ %.02553, %.lr.ph44.preheader.new ], [ %.2.1, %38 ]
  %niter = phi i64 [ 0, %.lr.ph44.preheader.new ], [ %niter.next.1, %38 ]
  %22 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %indvars.iv
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %.lr.ph44.1

25:                                               ; preds = %.lr.ph44
  %26 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %indvars.iv
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, %.02441
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %28, i32 %29, i32 %.12640
  %spec.select36 = call i32 @llvm.smax.i32(i32 %27, i32 %.02441)
  br label %.lr.ph44.1

.lr.ph44.1:                                       ; preds = %25, %.lr.ph44
  %.2 = phi i32 [ %.12640, %.lr.ph44 ], [ %spec.select, %25 ]
  %.1 = phi i32 [ %.02441, %.lr.ph44 ], [ %spec.select36, %25 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %indvars.iv.next
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %38

33:                                               ; preds = %.lr.ph44.1
  %34 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %indvars.iv.next
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp sgt i32 %35, %.1
  %37 = trunc nuw nsw i64 %indvars.iv.next to i32
  %spec.select.1 = select i1 %36, i32 %37, i32 %.2
  %spec.select36.1 = call i32 @llvm.smax.i32(i32 %35, i32 %.1)
  br label %38

38:                                               ; preds = %33, %.lr.ph44.1
  %.2.1 = phi i32 [ %.2, %.lr.ph44.1 ], [ %spec.select.1, %33 ]
  %.1.1 = phi i32 [ %.1, %.lr.ph44.1 ], [ %spec.select36.1, %33 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge45.unr-lcssa, label %.lr.ph44, !llvm.loop !9

39:                                               ; preds = %._crit_edge45
  %40 = sext i32 %.2.lcssa to i64
  %41 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %40
  store i32 1, ptr %41, align 4, !tbaa !5
  br i1 %.not3339, label %._crit_edge51, label %.lr.ph50

.lr.ph50:                                         ; preds = %39, %.lr.ph50
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph50 ], [ 1, %39 ]
  %42 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %indvars.iv59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %43 = getelementptr inbounds [101 x [101 x i32]], ptr @g, i64 0, i64 %40, i64 %indvars.iv59
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, %.1.lcssa
  store i32 %45, ptr %2, align 4, !tbaa !5
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %47 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %47, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %.not34.not = icmp slt i64 %indvars.iv59, %49
  br i1 %.not34.not, label %.lr.ph50, label %._crit_edge51, !llvm.loop !11

._crit_edge51:                                    ; preds = %.lr.ph50, %.thread, %39
  %.126.lcssa6569 = phi i32 [ %.2.lcssa, %39 ], [ %.02553, %.thread ], [ %.2.lcssa, %.lr.ph50 ]
  %50 = phi i32 [ %7, %39 ], [ %7, %.thread ], [ %48, %.lr.ph50 ]
  %51 = add nuw nsw i32 %.02852, 1
  %52 = icmp slt i32 %51, %50
  br i1 %52, label %.lr.ph55, label %.critedge, !llvm.loop !12

.critedge:                                        ; preds = %._crit_edge51, %._crit_edge45, %._crit_edge45.thread, %._crit_edge
  %53 = phi i32 [ %3, %._crit_edge ], [ %7, %._crit_edge45.thread ], [ %50, %._crit_edge51 ], [ %7, %._crit_edge45 ]
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x i32], ptr @dis, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = icmp sgt i32 %56, -1
  ret i1 %57
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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}


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