; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1115_codefes2015_morning (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
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z2sqx(i64 noundef) #0

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

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

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %26

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

23:                                               ; preds = %18
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %4, align 4, !tbaa !5
  br label %13, !llvm.loop !9

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 800080, ptr %5) #7
  %27 = getelementptr inbounds [100010 x i64], ptr %5, i64 0, i64 0
  store i64 0, ptr %27, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %47, %26
  %29 = load i32, ptr %6, 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 %6) #7
  br label %50

33:                                               ; preds = %28
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100010 x i64], ptr %5, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !11
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !11
  %42 = add nsw i64 %37, %41
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100010 x i64], ptr %5, i64 0, i64 %45
  store i64 %42, ptr %46, align 8, !tbaa !11
  br label %47

47:                                               ; preds = %33
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %6, align 4, !tbaa !5
  br label %28, !llvm.loop !13

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

51:                                               ; preds = %66, %50
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %69

56:                                               ; preds = %51
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !11
  %63 = mul nsw i64 %58, %62
  %64 = load i64, ptr %7, align 8, !tbaa !11
  %65 = add nsw i64 %64, %63
  store i64 %65, ptr %7, align 8, !tbaa !11
  br label %66

66:                                               ; preds = %56
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %8, align 4, !tbaa !5
  br label %51, !llvm.loop !14

69:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %70 = load i64, ptr %7, align 8, !tbaa !11
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 2
  %73 = sext i32 %72 to i64
  %74 = call noundef i64 @_Z2sqx(i64 noundef %73)
  %75 = add nsw i64 %70, %74
  store i64 %75, ptr %9, align 8, !tbaa !11
  %76 = load i64, ptr %7, align 8, !tbaa !11
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i64 noundef %76)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %125, %69
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = load i32, ptr %2, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %128

84:                                               ; preds = %79
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100010 x i64], ptr %5, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !11
  %89 = load i64, ptr %7, align 8, !tbaa !11
  %90 = add nsw i64 %89, %88
  store i64 %90, ptr %7, align 8, !tbaa !11
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100010 x i64], ptr %5, i64 0, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100010 x i64], ptr %5, i64 0, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !11
  %99 = sub nsw i64 %94, %98
  %100 = load i64, ptr %7, align 8, !tbaa !11
  %101 = sub nsw i64 %100, %99
  store i64 %101, ptr %7, align 8, !tbaa !11
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = srem i32 %102, 2
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %124

105:                                              ; preds = %84
  %106 = load i64, ptr %7, align 8, !tbaa !11
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i64 noundef %106)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %109 = load i64, ptr %7, align 8, !tbaa !11
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = sub nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = call noundef i64 @_Z2sqx(i64 noundef %112)
  %114 = add nsw i64 %109, %113
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sub nsw i32 %115, %116
  %118 = sub nsw i32 %117, 2
  %119 = sext i32 %118 to i64
  %120 = call noundef i64 @_Z2sqx(i64 noundef %119)
  %121 = add nsw i64 %114, %120
  store i64 %121, ptr %11, align 8, !tbaa !11
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %123 = load i64, ptr %122, align 8, !tbaa !11
  store i64 %123, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %124

124:                                              ; preds = %105, %84
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %10, align 4, !tbaa !5
  br label %79, !llvm.loop !15

128:                                              ; preds = %83
  %129 = load i64, ptr %9, align 8, !tbaa !11
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %129)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 800080, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 800080, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %132 = load i32, ptr %1, align 4
  ret i32 %132
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 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)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z2sqx(i64 noundef) local_unnamed_addr #0

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

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 800080, ptr nonnull %3) #8
  store i64 0, ptr %3, align 16, !tbaa !9
  br label %._crit_edge39

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 800080, ptr nonnull %3) #8
  store i64 0, ptr %3, align 16, !tbaa !9
  %9 = icmp sgt i32 %13, 0
  br i1 %9, label %.lr.ph35.preheader, label %._crit_edge39

.lr.ph35.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %13 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %10 = icmp ult i32 %13, 4
  br i1 %10, label %.preheader.unr-lcssa, label %.lr.ph35.preheader.new

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

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

.preheader.unr-lcssa:                             ; preds = %.lr.ph35, %.lr.ph35.preheader
  %.unr = phi i64 [ 0, %.lr.ph35.preheader ], [ %44, %.lr.ph35 ]
  %indvars.iv49.unr = phi i64 [ 0, %.lr.ph35.preheader ], [ %indvars.iv.next50.3, %.lr.ph35 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph35.epil

.lr.ph35.epil:                                    ; preds = %.preheader.unr-lcssa, %.lr.ph35.epil
  %16 = phi i64 [ %19, %.lr.ph35.epil ], [ %.unr, %.preheader.unr-lcssa ]
  %indvars.iv49.epil = phi i64 [ %indvars.iv.next50.epil, %.lr.ph35.epil ], [ %indvars.iv49.unr, %.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph35.epil ], [ 0, %.preheader.unr-lcssa ]
  %17 = getelementptr inbounds [100010 x i64], ptr %2, i64 0, i64 %indvars.iv49.epil
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = add nsw i64 %18, %16
  %indvars.iv.next50.epil = add nuw nsw i64 %indvars.iv49.epil, 1
  %20 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %indvars.iv.next50.epil
  store i64 %19, ptr %20, align 8, !tbaa !9
  %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 %.preheader, label %.lr.ph35.epil, !llvm.loop !13

.preheader:                                       ; preds = %.lr.ph35.epil, %.preheader.unr-lcssa
  br i1 %9, label %.lr.ph38.preheader, label %._crit_edge39

.lr.ph38.preheader:                               ; preds = %.preheader
  %wide.trip.count55 = zext nneg i32 %13 to i64
  %min.iters.check = icmp ult i32 %13, 4
  br i1 %min.iters.check, label %.lr.ph38.preheader71, label %vector.ph

.lr.ph38.preheader71:                             ; preds = %middle.block, %.lr.ph38.preheader
  %indvars.iv52.ph = phi i64 [ 0, %.lr.ph38.preheader ], [ %n.vec, %middle.block ]
  %.02836.ph = phi i64 [ 0, %.lr.ph38.preheader ], [ %28, %middle.block ]
  br label %.lr.ph38

vector.ph:                                        ; preds = %.lr.ph38.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %25, %vector.body ]
  %vec.phi69 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %26, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %21 = getelementptr inbounds [100010 x i64], ptr %2, i64 0, i64 %index
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %wide.load = load <2 x i64>, ptr %21, align 16, !tbaa !9
  %wide.load70 = load <2 x i64>, ptr %22, align 16, !tbaa !9
  %23 = mul nsw <2 x i64> %wide.load, %vec.ind
  %24 = mul nsw <2 x i64> %wide.load70, %step.add
  %25 = add <2 x i64> %23, %vec.phi
  %26 = add <2 x i64> %24, %vec.phi69
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %27 = icmp eq i64 %index.next, %n.vec
  br i1 %27, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %26, %25
  %28 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge39, label %.lr.ph38.preheader71

.lr.ph35:                                         ; preds = %.lr.ph35, %.lr.ph35.preheader.new
  %29 = phi i64 [ 0, %.lr.ph35.preheader.new ], [ %44, %.lr.ph35 ]
  %indvars.iv49 = phi i64 [ 0, %.lr.ph35.preheader.new ], [ %indvars.iv.next50.3, %.lr.ph35 ]
  %niter = phi i64 [ 0, %.lr.ph35.preheader.new ], [ %niter.next.3, %.lr.ph35 ]
  %30 = getelementptr inbounds [100010 x i64], ptr %2, i64 0, i64 %indvars.iv49
  %31 = load i64, ptr %30, align 16, !tbaa !9
  %32 = add nsw i64 %31, %29
  %indvars.iv.next50 = or disjoint i64 %indvars.iv49, 1
  %33 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %indvars.iv.next50
  store i64 %32, ptr %33, align 8, !tbaa !9
  %34 = getelementptr inbounds [100010 x i64], ptr %2, i64 0, i64 %indvars.iv.next50
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = add nsw i64 %35, %32
  %indvars.iv.next50.1 = or disjoint i64 %indvars.iv49, 2
  %37 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %indvars.iv.next50.1
  store i64 %36, ptr %37, align 16, !tbaa !9
  %38 = getelementptr inbounds [100010 x i64], ptr %2, i64 0, i64 %indvars.iv.next50.1
  %39 = load i64, ptr %38, align 16, !tbaa !9
  %40 = add nsw i64 %39, %36
  %indvars.iv.next50.2 = or disjoint i64 %indvars.iv49, 3
  %41 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %indvars.iv.next50.2
  store i64 %40, ptr %41, align 8, !tbaa !9
  %42 = getelementptr inbounds [100010 x i64], ptr %2, i64 0, i64 %indvars.iv.next50.2
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = add nsw i64 %43, %40
  %indvars.iv.next50.3 = add nuw nsw i64 %indvars.iv49, 4
  %45 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %indvars.iv.next50.3
  store i64 %44, ptr %45, align 16, !tbaa !9
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.unr-lcssa, label %.lr.ph35, !llvm.loop !18

._crit_edge39:                                    ; preds = %.lr.ph38, %middle.block, %._crit_edge, %._crit_edge.thread, %.preheader
  %.lcssa6163 = phi i32 [ %13, %.preheader ], [ %13, %._crit_edge ], [ %7, %._crit_edge.thread ], [ %13, %middle.block ], [ %13, %.lr.ph38 ]
  %.028.lcssa = phi i64 [ 0, %.preheader ], [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %28, %middle.block ], [ %57, %.lr.ph38 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %46 = add nsw i32 %.lcssa6163, -2
  %47 = sext i32 %46 to i64
  %48 = call noundef i64 @_Z2sqx(i64 noundef %47)
  %49 = add nsw i64 %48, %.028.lcssa
  store i64 %49, ptr %4, align 8, !tbaa !9
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i64 noundef %.028.lcssa)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = icmp sgt i32 %52, 1
  br i1 %53, label %.lr.ph44, label %._crit_edge45

.lr.ph38:                                         ; preds = %.lr.ph38.preheader71, %.lr.ph38
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %.lr.ph38 ], [ %indvars.iv52.ph, %.lr.ph38.preheader71 ]
  %.02836 = phi i64 [ %57, %.lr.ph38 ], [ %.02836.ph, %.lr.ph38.preheader71 ]
  %54 = getelementptr inbounds [100010 x i64], ptr %2, i64 0, i64 %indvars.iv52
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = mul nsw i64 %55, %indvars.iv52
  %57 = add nsw i64 %56, %.02836
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %exitcond56.not = icmp eq i64 %indvars.iv.next53, %wide.trip.count55
  br i1 %exitcond56.not, label %._crit_edge39, label %.lr.ph38, !llvm.loop !19

._crit_edge45:                                    ; preds = %86, %._crit_edge39
  %58 = phi i64 [ %49, %._crit_edge39 ], [ %87, %86 ]
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %58)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 800080, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 800080, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

.lr.ph44:                                         ; preds = %._crit_edge39, %86
  %61 = phi i64 [ %87, %86 ], [ %49, %._crit_edge39 ]
  %62 = phi i32 [ %88, %86 ], [ %52, %._crit_edge39 ]
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %86 ], [ 1, %._crit_edge39 ]
  %.141 = phi i64 [ %69, %86 ], [ %.028.lcssa, %._crit_edge39 ]
  %63 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %indvars.iv57
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = add nsw i64 %64, %.141
  %66 = sext i32 %62 to i64
  %67 = getelementptr inbounds [100010 x i64], ptr %3, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %.neg = sub i64 %64, %68
  %69 = add i64 %65, %.neg
  %70 = trunc nuw nsw i64 %indvars.iv57 to i32
  %71 = and i32 %70, 1
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %86

73:                                               ; preds = %.lr.ph44
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, i64 noundef %69)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %76 = add nsw i64 %indvars.iv57, -1
  %77 = call noundef i64 @_Z2sqx(i64 noundef %76)
  %78 = add nsw i64 %77, %69
  %79 = load i32, ptr %1, align 4, !tbaa !5
  %reass.sub = sub i32 %79, %70
  %80 = add i32 %reass.sub, -2
  %81 = sext i32 %80 to i64
  %82 = call noundef i64 @_Z2sqx(i64 noundef %81)
  %83 = add nsw i64 %78, %82
  store i64 %83, ptr %5, align 8, !tbaa !9
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %85 = load i64, ptr %84, align 8, !tbaa !9
  store i64 %85, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %.lr.ph44, %73
  %87 = phi i64 [ %61, %.lr.ph44 ], [ %85, %73 ]
  %88 = phi i32 [ %62, %.lr.ph44 ], [ %.pre, %73 ]
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next58, %89
  br i1 %90, label %.lr.ph44, label %._crit_edge45, !llvm.loop !20
}

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

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 #3

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #4 align 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)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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


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