; LLVM IR from kazunetakahashi/atcoder :: 2017/1216_ARC087 (C)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [100010 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca [100010 x i32], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 400040, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %11

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

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

16:                                               ; preds = %11
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %18
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
  br label %21

21:                                               ; preds = %16
  %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 %11, !llvm.loop !9

24:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 400040, ptr %5) #5
  %25 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 0
  %26 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 0
  %27 = getelementptr inbounds i32, ptr %26, i64 100010
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %25, ptr noundef %27, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %28

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

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

33:                                               ; preds = %28
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = icmp sgt i32 %37, %38
  br i1 %39, label %40, label %43

40:                                               ; preds = %33
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %7, align 4, !tbaa !5
  br label %52

43:                                               ; preds = %33
  %44 = load i32, ptr %8, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %49, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %43, %40
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %8, align 4, !tbaa !5
  br label %28, !llvm.loop !11

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

57:                                               ; preds = %86, %56
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = icmp sle i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %89

62:                                               ; preds = %57
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = icmp sge i32 %66, %67
  br i1 %68, label %69, label %78

69:                                               ; preds = %62
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = sub nsw i32 %73, %74
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = add nsw i32 %76, %75
  store i32 %77, ptr %7, align 4, !tbaa !5
  br label %85

78:                                               ; preds = %62
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100010 x i32], ptr %5, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = add nsw i32 %83, %82
  store i32 %84, ptr %7, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %78, %69
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %9, align 4, !tbaa !5
  br label %57, !llvm.loop !12

89:                                               ; preds = %61
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 400040, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 400040, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %93 = load i32, ptr %1, align 4
  ret i32 %93
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca [100010 x i32], align 16
  %3 = alloca [100010 x i32], align 16
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %2) #6
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %3) #6
  %8 = getelementptr inbounds i8, ptr %3, i64 400040
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %3, ptr noundef nonnull %8, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph31.preheader, label %._crit_edge37

.lr.ph31.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %9 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %11 = icmp eq i32 %9, 1
  br i1 %11, label %.lr.ph36.preheader.unr-lcssa, label %.lr.ph31.preheader.new

.lr.ph31.preheader.new:                           ; preds = %.lr.ph31.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph31

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %12 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = icmp slt i64 %indvars.iv.next, %15
  br i1 %16, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph36.preheader.unr-lcssa:                     ; preds = %64, %.lr.ph31.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph31.preheader ], [ %.1.1, %64 ]
  %indvars.iv40.unr = phi i64 [ 0, %.lr.ph31.preheader ], [ %indvars.iv.next41.1, %64 ]
  %.02028.unr = phi i32 [ 0, %.lr.ph31.preheader ], [ %.1.1, %64 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph36.preheader, label %.lr.ph31.epil

.lr.ph31.epil:                                    ; preds = %.lr.ph36.preheader.unr-lcssa
  %17 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv40.unr
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, %9
  br i1 %19, label %25, label %20

20:                                               ; preds = %.lr.ph31.epil
  %21 = sext i32 %18 to i64
  %22 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !5
  br label %.lr.ph36.preheader

25:                                               ; preds = %.lr.ph31.epil
  %26 = add nsw i32 %.02028.unr, 1
  br label %.lr.ph36.preheader

.lr.ph36.preheader:                               ; preds = %20, %25, %.lr.ph36.preheader.unr-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %.lr.ph36.preheader.unr-lcssa ], [ %26, %25 ], [ %.02028.unr, %20 ]
  %27 = add nuw i32 %9, 1
  %wide.trip.count46 = zext i32 %27 to i64
  %28 = zext nneg i32 %9 to i64
  %min.iters.check = icmp ult i32 %9, 8
  br i1 %min.iters.check, label %.lr.ph36.preheader57, label %vector.ph

.lr.ph36.preheader57:                             ; preds = %middle.block, %.lr.ph36.preheader
  %indvars.iv43.ph = phi i64 [ 1, %.lr.ph36.preheader ], [ %ind.end, %middle.block ]
  %.234.ph = phi i32 [ %.1.lcssa, %.lr.ph36.preheader ], [ %43, %middle.block ]
  br label %.lr.ph36

vector.ph:                                        ; preds = %.lr.ph36.preheader
  %n.vec = and i64 %28, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  %29 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.1.lcssa, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i64> [ <i64 1, i64 2, i64 3, i64 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %29, %vector.ph ], [ %40, %vector.body ]
  %vec.phi51 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %41, %vector.body ]
  %vec.ind52 = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next55, %vector.body ]
  %step.add = add <4 x i64> %vec.ind, <i64 4, i64 4, i64 4, i64 4>
  %step.add53 = add <4 x i32> %vec.ind52, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %30 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %offset.idx
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load = load <4 x i32>, ptr %30, align 4, !tbaa !5
  %wide.load56 = load <4 x i32>, ptr %31, align 4, !tbaa !5
  %32 = sext <4 x i32> %wide.load to <4 x i64>
  %33 = sext <4 x i32> %wide.load56 to <4 x i64>
  %34 = icmp sgt <4 x i64> %vec.ind, %32
  %35 = icmp sgt <4 x i64> %step.add, %33
  %36 = select <4 x i1> %34, <4 x i32> zeroinitializer, <4 x i32> %vec.ind52
  %37 = select <4 x i1> %35, <4 x i32> zeroinitializer, <4 x i32> %step.add53
  %38 = add <4 x i32> %wide.load, %vec.phi
  %39 = add <4 x i32> %wide.load56, %vec.phi51
  %40 = sub <4 x i32> %38, %36
  %41 = sub <4 x i32> %39, %37
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %vec.ind.next55 = add <4 x i32> %vec.ind52, <i32 8, i32 8, i32 8, i32 8>
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %41, %40
  %43 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %28
  br i1 %cmp.n, label %._crit_edge37, label %.lr.ph36.preheader57

.lr.ph31:                                         ; preds = %64, %.lr.ph31.preheader.new
  %indvars.iv40 = phi i64 [ 0, %.lr.ph31.preheader.new ], [ %indvars.iv.next41.1, %64 ]
  %.02028 = phi i32 [ 0, %.lr.ph31.preheader.new ], [ %.1.1, %64 ]
  %niter = phi i64 [ 0, %.lr.ph31.preheader.new ], [ %niter.next.1, %64 ]
  %44 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv40
  %45 = load i32, ptr %44, align 8, !tbaa !5
  %46 = icmp sgt i32 %45, %9
  br i1 %46, label %47, label %49

47:                                               ; preds = %.lr.ph31
  %48 = add nsw i32 %.02028, 1
  br label %.lr.ph31.1

49:                                               ; preds = %.lr.ph31
  %50 = sext i32 %45 to i64
  %51 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 4, !tbaa !5
  br label %.lr.ph31.1

.lr.ph31.1:                                       ; preds = %47, %49
  %.1 = phi i32 [ %48, %47 ], [ %.02028, %49 ]
  %indvars.iv.next41 = or disjoint i64 %indvars.iv40, 1
  %54 = getelementptr inbounds [100010 x i32], ptr %2, i64 0, i64 %indvars.iv.next41
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, %9
  br i1 %56, label %62, label %57

57:                                               ; preds = %.lr.ph31.1
  %58 = sext i32 %55 to i64
  %59 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %59, align 4, !tbaa !5
  br label %64

62:                                               ; preds = %.lr.ph31.1
  %63 = add nsw i32 %.1, 1
  br label %64

64:                                               ; preds = %62, %57
  %.1.1 = phi i32 [ %63, %62 ], [ %.1, %57 ]
  %indvars.iv.next41.1 = add nuw nsw i64 %indvars.iv40, 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 %.lr.ph36.preheader.unr-lcssa, label %.lr.ph31, !llvm.loop !14

._crit_edge37:                                    ; preds = %.lr.ph36, %middle.block, %._crit_edge
  %.2.lcssa = phi i32 [ 0, %._crit_edge ], [ %43, %middle.block ], [ %.3, %.lr.ph36 ]
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.2.lcssa)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph36:                                         ; preds = %.lr.ph36.preheader57, %.lr.ph36
  %indvars.iv43 = phi i64 [ %indvars.iv.next44, %.lr.ph36 ], [ %indvars.iv43.ph, %.lr.ph36.preheader57 ]
  %.234 = phi i32 [ %.3, %.lr.ph36 ], [ %.234.ph, %.lr.ph36.preheader57 ]
  %67 = getelementptr inbounds [100010 x i32], ptr %3, i64 0, i64 %indvars.iv43
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %.not26 = icmp sgt i64 %indvars.iv43, %69
  %70 = trunc nuw nsw i64 %indvars.iv43 to i32
  %71 = select i1 %.not26, i32 0, i32 %70
  %.pn = add i32 %68, %.234
  %.3 = sub i32 %.pn, %71
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond47.not = icmp eq i64 %indvars.iv.next44, %wide.trip.count46
  br i1 %exitcond47.not, label %._crit_edge37, label %.lr.ph36, !llvm.loop !15
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !13, !12}


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