; LLVM IR from ACM-VIT/Algos-for-all-Amigos :: Computer_Science/2_Competitive_Programming/Codeforces/800_rating (p10_Cherry)

; 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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local 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 ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %121, %0
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = call ptr @llvm.stacksave.p0()
  store ptr %26, ptr %6, align 8
  %27 = alloca i32, i64 %25, align 16
  store i64 %25, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %38, %22
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %27, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
  br label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %8, align 4, !tbaa !5
  br label %28, !llvm.loop !9

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %114, %41
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %117

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %48 = load i32, ptr %10, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %11, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %110, %47
  %51 = load i32, ptr %11, align 4, !tbaa !5
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %113

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %56 = load i32, ptr %10, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %27, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  store i32 %59, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %27, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  store i32 %63, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %14, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %96, %55
  %67 = load i32, ptr %14, align 4, !tbaa !5
  %68 = load i32, ptr %11, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %99

71:                                               ; preds = %66
  %72 = load i32, ptr %13, align 4, !tbaa !5
  %73 = load i32, ptr %14, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %27, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp slt i32 %72, %76
  br i1 %77, label %78, label %83

78:                                               ; preds = %71
  %79 = load i32, ptr %14, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %27, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr %13, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %78, %71
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = load i32, ptr %14, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %27, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = icmp sgt i32 %84, %88
  br i1 %89, label %90, label %95

90:                                               ; preds = %83
  %91 = load i32, ptr %14, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %27, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  store i32 %94, ptr %12, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %90, %83
  br label %96

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

99:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = load i32, ptr %13, align 4, !tbaa !5
  %102 = mul nsw i32 %100, %101
  %103 = sext i32 %102 to i64
  store i64 %103, ptr %15, align 8, !tbaa !11
  %104 = load i64, ptr %9, align 8, !tbaa !11
  %105 = load i64, ptr %15, align 8, !tbaa !11
  %106 = icmp slt i64 %104, %105
  br i1 %106, label %107, label %109

107:                                              ; preds = %99
  %108 = load i64, ptr %15, align 8, !tbaa !11
  store i64 %108, ptr %9, align 8, !tbaa !11
  br label %109

109:                                              ; preds = %107, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %11, align 4, !tbaa !5
  br label %50, !llvm.loop !14

113:                                              ; preds = %54
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %10, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %10, align 4, !tbaa !5
  br label %42, !llvm.loop !15

117:                                              ; preds = %46
  %118 = load i64, ptr %9, align 8, !tbaa !11
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %118)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %120 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %120)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %121

121:                                              ; preds = %117
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %3, align 4, !tbaa !5
  br label %17, !llvm.loop !16

124:                                              ; preds = %21
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %125 = load i32, ptr %1, align 4
  ret i32 %125
}

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { 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 = { 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 = { nocallback nofree nosync nounwind willreturn }
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/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}


; 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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph61, label %._crit_edge62

._crit_edge62:                                    ; preds = %._crit_edge57, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

.lr.ph61:                                         ; preds = %0, %._crit_edge57
  %.03759 = phi i32 [ %21, %._crit_edge57 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = zext i32 %7 to i64
  %9 = call ptr @llvm.stacksave.p0()
  %10 = alloca i32, i64 %8, align 16
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge57

.preheader:                                       ; preds = %.lr.ph
  %13 = icmp sgt i32 %17, 0
  br i1 %13, label %.lr.ph56.preheader, label %._crit_edge57

.lr.ph56.preheader:                               ; preds = %.preheader
  %14 = zext nneg i32 %17 to i64
  %wide.trip.count = zext nneg i32 %17 to i64
  br label %.lr.ph56

.lr.ph:                                           ; preds = %.lr.ph61, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph61 ]
  %15 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = icmp slt i64 %indvars.iv.next, %18
  br i1 %19, label %.lr.ph, label %.preheader, !llvm.loop !9

.loopexit:                                        ; preds = %._crit_edge, %.lr.ph56
  %.135.lcssa = phi i64 [ %.03454, %.lr.ph56 ], [ %spec.select, %._crit_edge ]
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count
  br i1 %exitcond78.not, label %._crit_edge57, label %.lr.ph56, !llvm.loop !11

._crit_edge57:                                    ; preds = %.loopexit, %.lr.ph61, %.preheader
  %.034.lcssa = phi i64 [ 0, %.preheader ], [ 0, %.lr.ph61 ], [ %.135.lcssa, %.loopexit ]
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %.034.lcssa)
  call void @llvm.stackrestore.p0(ptr %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %21 = add nuw nsw i32 %.03759, 1
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %.lr.ph61, label %._crit_edge62, !llvm.loop !12

.lr.ph56:                                         ; preds = %.lr.ph56.preheader, %.loopexit
  %indvars.iv75 = phi i64 [ 0, %.lr.ph56.preheader ], [ %indvars.iv.next76, %.loopexit ]
  %indvars.iv65 = phi i64 [ 1, %.lr.ph56.preheader ], [ %indvars.iv.next66, %.loopexit ]
  %.03454 = phi i64 [ 0, %.lr.ph56.preheader ], [ %.135.lcssa, %.loopexit ]
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %24 = icmp ult i64 %indvars.iv.next76, %14
  br i1 %24, label %.lr.ph52, label %.loopexit

.lr.ph52:                                         ; preds = %.lr.ph56
  %25 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv75
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %26, i64 0
  %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %minmax.ident.splatinsert83 = insertelement <4 x i32> poison, i32 %26, i64 0
  %minmax.ident.splat84 = shufflevector <4 x i32> %minmax.ident.splatinsert83, <4 x i32> poison, <4 x i32> zeroinitializer
  %27 = getelementptr i32, ptr %10, i64 %indvars.iv65
  br label %28

28:                                               ; preds = %.lr.ph52, %._crit_edge
  %indvar = phi i64 [ 0, %.lr.ph52 ], [ %indvar.next, %._crit_edge ]
  %indvars.iv70 = phi i64 [ %indvars.iv65, %.lr.ph52 ], [ %indvars.iv.next71, %._crit_edge ]
  %.13549 = phi i64 [ %.03454, %.lr.ph52 ], [ %spec.select, %._crit_edge ]
  %29 = icmp ult i64 %indvars.iv.next76, %indvars.iv70
  br i1 %29, label %.lr.ph46.preheader, label %._crit_edge

.lr.ph46.preheader:                               ; preds = %28
  %min.iters.check = icmp ult i64 %indvar, 8
  br i1 %min.iters.check, label %.lr.ph46.preheader88, label %vector.ph

.lr.ph46.preheader88:                             ; preds = %middle.block, %.lr.ph46.preheader
  %indvars.iv67.ph = phi i64 [ %indvars.iv65, %.lr.ph46.preheader ], [ %ind.end, %middle.block ]
  %.02944.ph = phi i32 [ %26, %.lr.ph46.preheader ], [ %37, %middle.block ]
  %.03043.ph = phi i32 [ %26, %.lr.ph46.preheader ], [ %38, %middle.block ]
  br label %.lr.ph46

vector.ph:                                        ; preds = %.lr.ph46.preheader
  %n.vec = and i64 %indvar, -8
  %ind.end = add i64 %indvars.iv65, %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %32, %vector.body ]
  %vec.phi80 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %33, %vector.body ]
  %vec.phi81 = phi <4 x i32> [ %minmax.ident.splat84, %vector.ph ], [ %34, %vector.body ]
  %vec.phi82 = phi <4 x i32> [ %minmax.ident.splat84, %vector.ph ], [ %35, %vector.body ]
  %30 = getelementptr i32, ptr %27, i64 %index
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load = load <4 x i32>, ptr %30, align 4, !tbaa !5
  %wide.load85 = load <4 x i32>, ptr %31, align 4, !tbaa !5
  %32 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load)
  %33 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi80, <4 x i32> %wide.load85)
  %34 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi81, <4 x i32> %wide.load)
  %35 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi82, <4 x i32> %wide.load85)
  %index.next = add nuw i64 %index, 8
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %32, <4 x i32> %33)
  %37 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
  %rdx.minmax86 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %34, <4 x i32> %35)
  %38 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax86)
  %cmp.n = icmp eq i64 %indvar, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph46.preheader88

._crit_edge:                                      ; preds = %.lr.ph46, %middle.block, %28
  %.030.lcssa = phi i32 [ %26, %28 ], [ %38, %middle.block ], [ %.131, %.lr.ph46 ]
  %.029.lcssa = phi i32 [ %26, %28 ], [ %37, %middle.block ], [ %spec.select41, %.lr.ph46 ]
  %39 = mul nsw i32 %.029.lcssa, %.030.lcssa
  %40 = sext i32 %39 to i64
  %spec.select = call i64 @llvm.smax.i64(i64 %.13549, i64 %40)
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond74.not, label %.loopexit, label %28, !llvm.loop !16

.lr.ph46:                                         ; preds = %.lr.ph46.preheader88, %.lr.ph46
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.lr.ph46 ], [ %indvars.iv67.ph, %.lr.ph46.preheader88 ]
  %.02944 = phi i32 [ %spec.select41, %.lr.ph46 ], [ %.02944.ph, %.lr.ph46.preheader88 ]
  %.03043 = phi i32 [ %.131, %.lr.ph46 ], [ %.03043.ph, %.lr.ph46.preheader88 ]
  %41 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv67
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %spec.select41 = call i32 @llvm.smax.i32(i32 %.02944, i32 %42)
  %.131 = call i32 @llvm.smin.i32(i32 %.03043, i32 %42)
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next68, %indvars.iv70
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph46, !llvm.loop !17
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>) #4

attributes #0 = { nofree 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 = { mustprogress nocallback nofree nosync nounwind willreturn }
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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !15, !14}


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