; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2015-16/Dec 2015/Bronze (15 Dec B1)

; 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_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }

@fout = external dso_local global %"class.std::basic_ofstream", align 8
@fin = external dso_local global %"class.std::basic_ifstream", align 8
@array1 = external dso_local global [101 x i32], align 16

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %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) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @fin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %14 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %14, ptr %6, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %24, %0
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %27

20:                                               ; preds = %15
  %21 = load i32, ptr %6, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [101 x i32], ptr @array1, i64 0, i64 %22
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %20
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %6, align 4, !tbaa !5
  br label %15, !llvm.loop !9

27:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %28 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %28, ptr %7, align 4, !tbaa !5
  br label %29

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

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %41

34:                                               ; preds = %29
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [101 x i32], ptr @array1, i64 0, i64 %36
  store i32 1, ptr %37, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %34
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %7, align 4, !tbaa !5
  br label %29, !llvm.loop !11

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

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

45:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %59

46:                                               ; preds = %42
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [101 x i32], ptr @array1, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %55

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

55:                                               ; preds = %52, %46
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %9, align 4, !tbaa !5
  br label %42, !llvm.loop !12

59:                                               ; preds = %45
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @fout, i32 noundef %60)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %62 = load i32, ptr %1, align 4
  ret i32 %62
}

; 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

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

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 = { 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_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }

@fout = external dso_local global %"class.std::basic_ofstream", align 8
@fin = external dso_local global %"class.std::basic_ifstream", align 8
@array1 = external dso_local local_unnamed_addr global [101 x i32], align 16

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

.lr.ph.preheader:                                 ; preds = %0
  %12 = sext i32 %9 to i64
  %wide.trip.count = sext i32 %10 to i64
  %13 = sub nsw i64 %wide.trip.count, %12
  %min.iters.check = icmp ult i64 %13, 8
  br i1 %min.iters.check, label %.lr.ph.preheader55, label %vector.ph

.lr.ph.preheader55:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ %12, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %13, -8
  %ind.end = add nsw i64 %n.vec, %12
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %index, %12
  %14 = getelementptr inbounds [101 x i32], ptr @array1, i64 0, i64 %offset.idx
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %14, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %15, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %16 = icmp eq i64 %index.next, %n.vec
  br i1 %16, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %13, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader55

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %.lr.ph18.preheader, label %.loopexit

.lr.ph18.preheader:                               ; preds = %._crit_edge
  %20 = sext i32 %17 to i64
  %wide.trip.count25 = sext i32 %18 to i64
  %21 = sub nsw i64 %wide.trip.count25, %20
  %min.iters.check33 = icmp ult i64 %21, 8
  br i1 %min.iters.check33, label %.lr.ph18.preheader54, label %vector.ph34

.lr.ph18.preheader54:                             ; preds = %middle.block31, %.lr.ph18.preheader
  %indvars.iv22.ph = phi i64 [ %20, %.lr.ph18.preheader ], [ %ind.end37, %middle.block31 ]
  br label %.lr.ph18

vector.ph34:                                      ; preds = %.lr.ph18.preheader
  %n.vec36 = and i64 %21, -8
  %ind.end37 = add nsw i64 %n.vec36, %20
  br label %vector.body39

vector.body39:                                    ; preds = %vector.body39, %vector.ph34
  %index40 = phi i64 [ 0, %vector.ph34 ], [ %index.next42, %vector.body39 ]
  %offset.idx41 = add i64 %index40, %20
  %22 = getelementptr inbounds [101 x i32], ptr @array1, i64 0, i64 %offset.idx41
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %22, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %23, align 4, !tbaa !5
  %index.next42 = add nuw i64 %index40, 8
  %24 = icmp eq i64 %index.next42, %n.vec36
  br i1 %24, label %middle.block31, label %vector.body39, !llvm.loop !13

middle.block31:                                   ; preds = %vector.body39
  %cmp.n43 = icmp eq i64 %21, %n.vec36
  br i1 %cmp.n43, label %.loopexit, label %.lr.ph18.preheader54

.lr.ph:                                           ; preds = %.lr.ph.preheader55, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader55 ]
  %25 = getelementptr inbounds [101 x i32], ptr @array1, i64 0, i64 %indvars.iv
  store i32 1, ptr %25, align 4, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

.lr.ph18:                                         ; preds = %.lr.ph18.preheader54, %.lr.ph18
  %indvars.iv22 = phi i64 [ %indvars.iv.next23, %.lr.ph18 ], [ %indvars.iv22.ph, %.lr.ph18.preheader54 ]
  %26 = getelementptr inbounds [101 x i32], ptr @array1, i64 0, i64 %indvars.iv22
  store i32 1, ptr %26, align 4, !tbaa !5
  %indvars.iv.next23 = add nsw i64 %indvars.iv22, 1
  %exitcond26.not = icmp eq i64 %indvars.iv.next23, %wide.trip.count25
  br i1 %exitcond26.not, label %.loopexit, label %.lr.ph18, !llvm.loop !15

.loopexit:                                        ; preds = %.lr.ph18, %._crit_edge, %middle.block31
  %wide.load51 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 16), align 16, !tbaa !5
  %27 = icmp eq <4 x i32> %wide.load51, <i32 1, i32 1, i32 1, i32 1>
  %28 = zext <4 x i1> %27 to <4 x i32>
  %wide.load51.1 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 48), align 16, !tbaa !5
  %29 = icmp eq <4 x i32> %wide.load51.1, <i32 1, i32 1, i32 1, i32 1>
  %30 = zext <4 x i1> %29 to <4 x i32>
  %31 = add nuw nsw <4 x i32> %28, %30
  %wide.load51.2 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 80), align 16, !tbaa !5
  %32 = icmp eq <4 x i32> %wide.load51.2, <i32 1, i32 1, i32 1, i32 1>
  %33 = zext <4 x i1> %32 to <4 x i32>
  %34 = add nuw nsw <4 x i32> %31, %33
  %wide.load51.3 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 112), align 16, !tbaa !5
  %35 = icmp eq <4 x i32> %wide.load51.3, <i32 1, i32 1, i32 1, i32 1>
  %36 = zext <4 x i1> %35 to <4 x i32>
  %37 = add nuw nsw <4 x i32> %34, %36
  %wide.load51.4 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 144), align 16, !tbaa !5
  %38 = icmp eq <4 x i32> %wide.load51.4, <i32 1, i32 1, i32 1, i32 1>
  %39 = zext <4 x i1> %38 to <4 x i32>
  %40 = add nuw nsw <4 x i32> %37, %39
  %wide.load51.5 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 176), align 16, !tbaa !5
  %41 = icmp eq <4 x i32> %wide.load51.5, <i32 1, i32 1, i32 1, i32 1>
  %42 = zext <4 x i1> %41 to <4 x i32>
  %43 = add nuw nsw <4 x i32> %40, %42
  %wide.load51.6 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 208), align 16, !tbaa !5
  %44 = icmp eq <4 x i32> %wide.load51.6, <i32 1, i32 1, i32 1, i32 1>
  %45 = zext <4 x i1> %44 to <4 x i32>
  %46 = add nuw nsw <4 x i32> %43, %45
  %wide.load51.7 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 240), align 16, !tbaa !5
  %47 = icmp eq <4 x i32> %wide.load51.7, <i32 1, i32 1, i32 1, i32 1>
  %48 = zext <4 x i1> %47 to <4 x i32>
  %49 = add <4 x i32> %46, %48
  %wide.load51.8 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 272), align 16, !tbaa !5
  %50 = icmp eq <4 x i32> %wide.load51.8, <i32 1, i32 1, i32 1, i32 1>
  %51 = zext <4 x i1> %50 to <4 x i32>
  %52 = add <4 x i32> %49, %51
  %wide.load51.9 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 304), align 16, !tbaa !5
  %53 = icmp eq <4 x i32> %wide.load51.9, <i32 1, i32 1, i32 1, i32 1>
  %54 = zext <4 x i1> %53 to <4 x i32>
  %55 = add <4 x i32> %52, %54
  %wide.load51.10 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 336), align 16, !tbaa !5
  %56 = icmp eq <4 x i32> %wide.load51.10, <i32 1, i32 1, i32 1, i32 1>
  %57 = zext <4 x i1> %56 to <4 x i32>
  %58 = add <4 x i32> %55, %57
  %wide.load51.11 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 368), align 16, !tbaa !5
  %59 = icmp eq <4 x i32> %wide.load51.11, <i32 1, i32 1, i32 1, i32 1>
  %60 = zext <4 x i1> %59 to <4 x i32>
  %61 = add <4 x i32> %58, %60
  %wide.load = load <4 x i32>, ptr @array1, align 16, !tbaa !5
  %62 = icmp eq <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %63 = zext <4 x i1> %62 to <4 x i32>
  %wide.load.1 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 32), align 16, !tbaa !5
  %64 = icmp eq <4 x i32> %wide.load.1, <i32 1, i32 1, i32 1, i32 1>
  %65 = zext <4 x i1> %64 to <4 x i32>
  %66 = add nuw nsw <4 x i32> %63, %65
  %wide.load.2 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 64), align 16, !tbaa !5
  %67 = icmp eq <4 x i32> %wide.load.2, <i32 1, i32 1, i32 1, i32 1>
  %68 = zext <4 x i1> %67 to <4 x i32>
  %69 = add nuw nsw <4 x i32> %66, %68
  %wide.load.3 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 96), align 16, !tbaa !5
  %70 = icmp eq <4 x i32> %wide.load.3, <i32 1, i32 1, i32 1, i32 1>
  %71 = zext <4 x i1> %70 to <4 x i32>
  %72 = add nuw nsw <4 x i32> %69, %71
  %wide.load.4 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 128), align 16, !tbaa !5
  %73 = icmp eq <4 x i32> %wide.load.4, <i32 1, i32 1, i32 1, i32 1>
  %74 = zext <4 x i1> %73 to <4 x i32>
  %75 = add nuw nsw <4 x i32> %72, %74
  %wide.load.5 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 160), align 16, !tbaa !5
  %76 = icmp eq <4 x i32> %wide.load.5, <i32 1, i32 1, i32 1, i32 1>
  %77 = zext <4 x i1> %76 to <4 x i32>
  %78 = add nuw nsw <4 x i32> %75, %77
  %wide.load.6 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 192), align 16, !tbaa !5
  %79 = icmp eq <4 x i32> %wide.load.6, <i32 1, i32 1, i32 1, i32 1>
  %80 = zext <4 x i1> %79 to <4 x i32>
  %81 = add nuw nsw <4 x i32> %78, %80
  %wide.load.7 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 224), align 16, !tbaa !5
  %82 = icmp eq <4 x i32> %wide.load.7, <i32 1, i32 1, i32 1, i32 1>
  %83 = zext <4 x i1> %82 to <4 x i32>
  %84 = add <4 x i32> %81, %83
  %wide.load.8 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 256), align 16, !tbaa !5
  %85 = icmp eq <4 x i32> %wide.load.8, <i32 1, i32 1, i32 1, i32 1>
  %86 = zext <4 x i1> %85 to <4 x i32>
  %87 = add <4 x i32> %84, %86
  %wide.load.9 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 288), align 16, !tbaa !5
  %88 = icmp eq <4 x i32> %wide.load.9, <i32 1, i32 1, i32 1, i32 1>
  %89 = zext <4 x i1> %88 to <4 x i32>
  %90 = add <4 x i32> %87, %89
  %wide.load.10 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 320), align 16, !tbaa !5
  %91 = icmp eq <4 x i32> %wide.load.10, <i32 1, i32 1, i32 1, i32 1>
  %92 = zext <4 x i1> %91 to <4 x i32>
  %93 = add <4 x i32> %90, %92
  %wide.load.11 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @array1, i64 352), align 16, !tbaa !5
  %94 = icmp eq <4 x i32> %wide.load.11, <i32 1, i32 1, i32 1, i32 1>
  %95 = zext <4 x i1> %94 to <4 x i32>
  %96 = add <4 x i32> %93, %95
  %bin.rdx = add <4 x i32> %61, %96
  %97 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @array1, i64 384), align 16, !tbaa !5
  %99 = icmp eq i32 %98, 1
  %100 = zext i1 %99 to i32
  %spec.select = add nuw nsw i32 %97, %100
  %101 = load i32, ptr getelementptr inbounds (i8, ptr @array1, i64 388), align 4, !tbaa !5
  %102 = icmp eq i32 %101, 1
  %103 = zext i1 %102 to i32
  %spec.select.1 = add nuw nsw i32 %spec.select, %103
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @array1, i64 392), align 8, !tbaa !5
  %105 = icmp eq i32 %104, 1
  %106 = zext i1 %105 to i32
  %spec.select.2 = add nuw nsw i32 %spec.select.1, %106
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @array1, i64 396), align 4, !tbaa !5
  %108 = icmp eq i32 %107, 1
  %109 = zext i1 %108 to i32
  %spec.select.3 = add nuw nsw i32 %spec.select.2, %109
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @fout, i32 noundef %spec.select.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0
}

; 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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11, !12}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10, !12, !11}


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