; LLVM IR from tangjz/acm-icpc :: lydsy (2225)

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

%struct.Point = type { i32, i32, i32 }

@n = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@f = external dso_local global [100010 x i32], align 16
@p = external dso_local global [100010 x i32], align 16
@bit = external dso_local global [100010 x i32], align 16
@a = external dso_local global [100010 x %struct.Point], 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solveii(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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
  br label %6

6:                                                ; preds = %117, %0
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %8 = icmp eq i32 %7, 1
  br i1 %8, label %9, label %123

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

10:                                               ; preds = %46, %9
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = icmp sle i32 %11, %12
  br i1 %13, label %15, label %14

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

15:                                               ; preds = %10
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %17
  %19 = getelementptr inbounds %struct.Point, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %21
  %23 = getelementptr inbounds %struct.Point, ptr %22, i32 0, i32 2
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %19, ptr noundef %23)
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %26
  %28 = getelementptr inbounds %struct.Point, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100010 x i32], ptr @bit, i64 0, i64 %31
  store i32 %29, ptr %32, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %35
  %37 = getelementptr inbounds %struct.Point, ptr %36, i32 0, i32 0
  store i32 %33, ptr %37, align 4, !tbaa !11
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100010 x i32], ptr @p, i64 0, i64 %41
  store i32 %39, ptr %42, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %44
  store i32 1, ptr %45, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %15
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !12

49:                                               ; preds = %14
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %52
  store i32 0, ptr %53, align 4, !tbaa !5
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr @bit, i64 %55
  %57 = getelementptr inbounds i32, ptr %56, i64 1
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef getelementptr inbounds (i32, ptr @bit, i64 1), ptr noundef %57)
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i32, ptr @bit, i64 %59
  %61 = getelementptr inbounds i32, ptr %60, i64 1
  %62 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef getelementptr inbounds (i32, ptr @bit, i64 1), ptr noundef %61)
  %63 = ptrtoint ptr %62 to i64
  %64 = sub i64 %63, ptrtoint (ptr @bit to i64)
  %65 = sdiv exact i64 %64, 4
  %66 = sub nsw i64 %65, 1
  %67 = trunc i64 %66 to i32
  store i32 %67, ptr @tot, 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 %68

68:                                               ; preds = %91, %49
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %73, label %72

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

73:                                               ; preds = %68
  %74 = load i32, ptr @tot, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr @bit, i64 %75
  %77 = getelementptr inbounds i32, ptr %76, i64 1
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %79
  %81 = getelementptr inbounds %struct.Point, ptr %80, i32 0, i32 2
  %82 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef getelementptr inbounds (i32, ptr @bit, i64 1), ptr noundef %77, ptr noundef nonnull align 4 dereferenceable(4) %81)
  %83 = ptrtoint ptr %82 to i64
  %84 = sub i64 %83, ptrtoint (ptr @bit to i64)
  %85 = sdiv exact i64 %84, 4
  %86 = trunc i64 %85 to i32
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %88
  %90 = getelementptr inbounds %struct.Point, ptr %89, i32 0, i32 2
  store i32 %86, ptr %90, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %73
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %3, align 4, !tbaa !5
  br label %68, !llvm.loop !14

94:                                               ; preds = %72
  %95 = load i32, ptr @n, align 4, !tbaa !5
  call void @_Z5solveii(i32 noundef 1, i32 noundef %95)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %114, %94
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = load i32, ptr @n, align 4, !tbaa !5
  %99 = icmp sle i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %117

101:                                              ; preds = %96
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = load i32, ptr %5, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp slt i32 %105, %109
  br i1 %110, label %111, label %113

111:                                              ; preds = %101
  %112 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %112, ptr %4, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %111, %101
  br label %114

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

117:                                              ; preds = %100
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %121)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %6, !llvm.loop !16

123:                                              ; preds = %6
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = { inlinehint 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 = !{!10, !6, i64 8}
!10 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


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

%struct.Point = type { i32, i32, i32 }

@n = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local local_unnamed_addr global [100010 x i32], align 16
@p = external dso_local local_unnamed_addr global [100010 x i32], align 16
@bit = external dso_local global [100010 x i32], align 16
@a = external dso_local global [100010 x %struct.Point], 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 uwtable
declare dso_local void @_Z5solveii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %2 = icmp eq i32 %1, 1
  br i1 %2, label %.preheader, label %._crit_edge45

.preheader:                                       ; preds = %0, %._crit_edge41
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %.not28 = icmp slt i32 %3, 1
  br i1 %.not28, label %.preheader.._crit_edge_crit_edge, label %.lr.ph

.preheader.._crit_edge_crit_edge:                 ; preds = %.preheader
  %.pre = add nsw i32 %3, 1
  %.pre55 = sext i32 %3 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader.._crit_edge_crit_edge
  %.pre-phi56 = phi i64 [ %.pre55, %.preheader.._crit_edge_crit_edge ], [ %26, %.lr.ph ]
  %.pre-phi = phi i32 [ %.pre, %.preheader.._crit_edge_crit_edge ], [ %23, %.lr.ph ]
  %4 = sext i32 %.pre-phi to i64
  %5 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %4
  store i32 0, ptr %5, align 4, !tbaa !5
  %gep43 = getelementptr i32, ptr getelementptr inbounds (i8, ptr @bit, i64 4), i64 %.pre-phi56
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 4), ptr noundef nonnull %gep43)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %gep44 = getelementptr i32, ptr getelementptr inbounds (i8, ptr @bit, i64 4), i64 %7
  %8 = tail call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 4), ptr noundef nonnull %gep44)
  %9 = ptrtoint ptr %8 to i64
  %10 = sub i64 %9, ptrtoint (ptr @bit to i64)
  %11 = lshr exact i64 %10, 2
  %12 = trunc i64 %11 to i32
  %13 = add i32 %12, -1
  store i32 %13, ptr @tot, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %.not2530 = icmp slt i32 %14, 1
  br i1 %.not2530, label %._crit_edge34, label %.lr.ph33

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader ]
  %15 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  %17 = getelementptr inbounds i8, ptr %15, i64 8
  %18 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %16, ptr noundef nonnull %17)
  %19 = load i32, ptr %17, align 4, !tbaa !9
  %20 = getelementptr inbounds [100010 x i32], ptr @bit, i64 0, i64 %indvars.iv
  store i32 %19, ptr %20, align 4, !tbaa !5
  %21 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %21, ptr %15, align 4, !tbaa !11
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  %24 = getelementptr inbounds [100010 x i32], ptr @p, i64 0, i64 %indvars.iv
  store i32 %23, ptr %24, align 4, !tbaa !5
  %25 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv
  store i32 1, ptr %25, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = sext i32 %22 to i64
  %.not.not = icmp slt i64 %indvars.iv, %26
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge34:                                    ; preds = %.lr.ph33, %._crit_edge
  %.lcssa27 = phi i32 [ %14, %._crit_edge ], [ %40, %.lr.ph33 ]
  tail call void @_Z5solveii(i32 noundef 1, i32 noundef %.lcssa27)
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %.not2636 = icmp slt i32 %27, 2
  br i1 %.not2636, label %._crit_edge41, label %.lr.ph40.preheader

.lr.ph40.preheader:                               ; preds = %._crit_edge34
  %28 = add nuw i32 %27, 1
  %wide.trip.count = zext i32 %28 to i64
  %29 = add nsw i64 %wide.trip.count, -2
  %30 = add nsw i64 %wide.trip.count, -3
  %xtraiter = and i64 %29, 3
  %31 = icmp ult i64 %30, 3
  br i1 %31, label %._crit_edge41.loopexit.unr-lcssa, label %.lr.ph40.preheader.new

.lr.ph40.preheader.new:                           ; preds = %.lr.ph40.preheader
  %unroll_iter = and i64 %29, -4
  br label %.lr.ph40

.lr.ph33:                                         ; preds = %._crit_edge, %.lr.ph33
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %.lr.ph33 ], [ 1, %._crit_edge ]
  %32 = load i32, ptr @tot, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @bit, i64 4), i64 %33
  %34 = getelementptr inbounds [100010 x %struct.Point], ptr @a, i64 0, i64 %indvars.iv49, i32 2
  %35 = tail call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 4), ptr noundef nonnull %gep, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %36 = ptrtoint ptr %35 to i64
  %37 = sub i64 %36, ptrtoint (ptr @bit to i64)
  %38 = lshr exact i64 %37, 2
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %34, align 4, !tbaa !9
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %.not25.not = icmp slt i64 %indvars.iv49, %41
  br i1 %.not25.not, label %.lr.ph33, label %._crit_edge34, !llvm.loop !14

._crit_edge41.loopexit.unr-lcssa:                 ; preds = %.lr.ph40, %.lr.ph40.preheader
  %spec.select.lcssa.ph = phi i32 [ poison, %.lr.ph40.preheader ], [ %spec.select.3, %.lr.ph40 ]
  %indvars.iv52.unr = phi i64 [ 2, %.lr.ph40.preheader ], [ %indvars.iv.next53.3, %.lr.ph40 ]
  %.02037.unr = phi i32 [ 1, %.lr.ph40.preheader ], [ %spec.select.3, %.lr.ph40 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge41, label %.lr.ph40.epil

.lr.ph40.epil:                                    ; preds = %._crit_edge41.loopexit.unr-lcssa, %.lr.ph40.epil
  %indvars.iv52.epil = phi i64 [ %indvars.iv.next53.epil, %.lr.ph40.epil ], [ %indvars.iv52.unr, %._crit_edge41.loopexit.unr-lcssa ]
  %.02037.epil = phi i32 [ %spec.select.epil, %.lr.ph40.epil ], [ %.02037.unr, %._crit_edge41.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph40.epil ], [ 0, %._crit_edge41.loopexit.unr-lcssa ]
  %42 = sext i32 %.02037.epil to i64
  %43 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv52.epil
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp slt i32 %44, %46
  %48 = trunc nuw nsw i64 %indvars.iv52.epil to i32
  %spec.select.epil = select i1 %47, i32 %48, i32 %.02037.epil
  %indvars.iv.next53.epil = add nuw nsw i64 %indvars.iv52.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge41, label %.lr.ph40.epil, !llvm.loop !15

._crit_edge41:                                    ; preds = %._crit_edge41.loopexit.unr-lcssa, %.lr.ph40.epil, %._crit_edge34
  %.020.lcssa = phi i32 [ 1, %._crit_edge34 ], [ %spec.select.lcssa.ph, %._crit_edge41.loopexit.unr-lcssa ], [ %spec.select.epil, %.lr.ph40.epil ]
  %49 = sext i32 %.020.lcssa to i64
  %50 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %51)
  %53 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %.preheader, label %._crit_edge45, !llvm.loop !17

.lr.ph40:                                         ; preds = %.lr.ph40, %.lr.ph40.preheader.new
  %indvars.iv52 = phi i64 [ 2, %.lr.ph40.preheader.new ], [ %indvars.iv.next53.3, %.lr.ph40 ]
  %.02037 = phi i32 [ 1, %.lr.ph40.preheader.new ], [ %spec.select.3, %.lr.ph40 ]
  %niter = phi i64 [ 0, %.lr.ph40.preheader.new ], [ %niter.next.3, %.lr.ph40 ]
  %55 = sext i32 %.02037 to i64
  %56 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv52
  %59 = load i32, ptr %58, align 8, !tbaa !5
  %60 = icmp slt i32 %57, %59
  %61 = trunc nuw nsw i64 %indvars.iv52 to i32
  %spec.select = select i1 %60, i32 %61, i32 %.02037
  %indvars.iv.next53 = or disjoint i64 %indvars.iv52, 1
  %62 = sext i32 %spec.select to i64
  %63 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv.next53
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = icmp slt i32 %64, %66
  %68 = trunc nuw nsw i64 %indvars.iv.next53 to i32
  %spec.select.1 = select i1 %67, i32 %68, i32 %spec.select
  %indvars.iv.next53.1 = add nuw nsw i64 %indvars.iv52, 2
  %69 = sext i32 %spec.select.1 to i64
  %70 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv.next53.1
  %73 = load i32, ptr %72, align 8, !tbaa !5
  %74 = icmp slt i32 %71, %73
  %75 = trunc nuw nsw i64 %indvars.iv.next53.1 to i32
  %spec.select.2 = select i1 %74, i32 %75, i32 %spec.select.1
  %indvars.iv.next53.2 = add nuw nsw i64 %indvars.iv52, 3
  %76 = sext i32 %spec.select.2 to i64
  %77 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv.next53.2
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = icmp slt i32 %78, %80
  %82 = trunc nuw nsw i64 %indvars.iv.next53.2 to i32
  %spec.select.3 = select i1 %81, i32 %82, i32 %spec.select.2
  %indvars.iv.next53.3 = add nuw nsw i64 %indvars.iv52, 4
  %niter.next.3 = add nuw i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge41.loopexit.unr-lcssa, label %.lr.ph40, !llvm.loop !18

._crit_edge45:                                    ; preds = %._crit_edge41, %0
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, 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 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 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 #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 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" }

!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 = !{!10, !6, i64 8}
!10 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


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