; LLVM IR from kazunetakahashi/atcoder :: 2017/0204_AGC010 (B)

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

@N = external dso_local global i64, align 8
@sum = external dso_local global i64, align 8
@times = external dso_local global i64, align 8
@A = external dso_local global [100010 x i64], align 16
@B = external dso_local global [100010 x i64], align 16
@D = external dso_local global [100010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

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

9:                                                ; preds = %26, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = load i64, ptr @N, align 8, !tbaa !9
  %13 = icmp slt i64 %11, %12
  br i1 %13, label %15, label %14

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

15:                                               ; preds = %9
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %17
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %21
  %23 = load i64, ptr %22, align 8, !tbaa !9
  %24 = load i64, ptr @sum, align 8, !tbaa !9
  %25 = add nsw i64 %24, %23
  store i64 %25, ptr @sum, align 8, !tbaa !9
  br label %26

26:                                               ; preds = %15
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !11

29:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %30 = load i64, ptr @N, align 8, !tbaa !9
  %31 = load i64, ptr @N, align 8, !tbaa !9
  %32 = add nsw i64 %31, 1
  %33 = mul nsw i64 %30, %32
  %34 = sdiv i64 %33, 2
  store i64 %34, ptr %3, align 8, !tbaa !9
  %35 = load i64, ptr @sum, align 8, !tbaa !9
  %36 = load i64, ptr %3, align 8, !tbaa !9
  %37 = srem i64 %35, %36
  %38 = icmp ne i64 %37, 0
  br i1 %38, label %39, label %42

39:                                               ; preds = %29
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %132

42:                                               ; preds = %29
  %43 = load i64, ptr @sum, align 8, !tbaa !9
  %44 = load i64, ptr %3, align 8, !tbaa !9
  %45 = sdiv i64 %43, %44
  store i64 %45, ptr @times, align 8, !tbaa !9
  %46 = load i64, ptr @A, align 16, !tbaa !9
  %47 = load i64, ptr @N, align 8, !tbaa !9
  %48 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %47
  store i64 %46, ptr %48, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %69, %42
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = load i64, ptr @N, align 8, !tbaa !9
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %49
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = sub nsw i64 %60, %64
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %67
  store i64 %65, ptr %68, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %55
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %5, align 4, !tbaa !5
  br label %49, !llvm.loop !13

72:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %86, %72
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = load i64, ptr @N, align 8, !tbaa !9
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %73
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %89

79:                                               ; preds = %73
  %80 = load i64, ptr @times, align 8, !tbaa !9
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = sub nsw i64 %84, %80
  store i64 %85, ptr %83, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %79
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %6, align 4, !tbaa !5
  br label %73, !llvm.loop !14

89:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %124, %89
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = load i64, ptr @N, align 8, !tbaa !9
  %94 = icmp slt i64 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %90
  store i32 11, ptr %4, align 4
  br label %127

96:                                               ; preds = %90
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = icmp sle i64 %100, 0
  br i1 %101, label %102, label %120

102:                                              ; preds = %96
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = load i64, ptr @N, align 8, !tbaa !9
  %108 = srem i64 %106, %107
  %109 = icmp eq i64 %108, 0
  br i1 %109, label %110, label %120

110:                                              ; preds = %102
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = load i64, ptr @N, align 8, !tbaa !9
  %116 = sdiv i64 %114, %115
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100010 x i64], ptr @D, i64 0, i64 %118
  store i64 %116, ptr %119, align 8, !tbaa !9
  br label %123

120:                                              ; preds = %102, %96
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %127

123:                                              ; preds = %110
  br label %124

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

127:                                              ; preds = %120, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %128 = load i32, ptr %4, align 4
  switch i32 %128, label %132 [
    i32 11, label %129
  ]

129:                                              ; preds = %127
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %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_)
  store i32 0, ptr %4, align 4
  br label %132

132:                                              ; preds = %129, %127, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  %133 = load i32, ptr %4, align 4
  switch i32 %133, label %136 [
    i32 0, label %134
    i32 1, label %134
  ]

134:                                              ; preds = %132, %132
  %135 = load i32, ptr %1, align 4
  ret i32 %135

136:                                              ; preds = %132
  unreachable
}

; 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)) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

@N = external dso_local global i64, align 8
@sum = external dso_local local_unnamed_addr global i64, align 8
@times = external dso_local local_unnamed_addr global i64, align 8
@A = external dso_local global [100010 x i64], align 16
@B = external dso_local local_unnamed_addr global [100010 x i64], align 16
@D = external dso_local local_unnamed_addr global [100010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %2 = load i64, ptr @N, align 8, !tbaa !5
  %3 = icmp sgt i64 %2, 0
  br i1 %3, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = load i64, ptr @sum, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %4 = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %14, %.lr.ph ]
  %.lcssa = phi i64 [ %2, %.._crit_edge_crit_edge ], [ %15, %.lr.ph ]
  %5 = add nsw i64 %.lcssa, 1
  %6 = mul nsw i64 %5, %.lcssa
  %7 = sdiv i64 %6, 2
  %8 = srem i64 %4, %7
  %9 = sdiv i64 %4, %7
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %17, label %.critedge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %10 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %indvars.iv
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %12 = load i64, ptr %10, align 8, !tbaa !5
  %13 = load i64, ptr @sum, align 8, !tbaa !5
  %14 = add nsw i64 %13, %12
  store i64 %14, ptr @sum, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i64, ptr @N, align 8, !tbaa !5
  %16 = icmp sgt i64 %15, %indvars.iv.next
  br i1 %16, label %.lr.ph, label %._crit_edge, !llvm.loop !9

17:                                               ; preds = %._crit_edge
  store i64 %9, ptr @times, align 8, !tbaa !5
  %18 = load i64, ptr @A, align 16, !tbaa !5
  %19 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %.lcssa
  store i64 %18, ptr %19, align 8, !tbaa !5
  %20 = icmp sgt i64 %.lcssa, 0
  br i1 %20, label %.lr.ph41.preheader, label %.critedge

.lr.ph41.preheader:                               ; preds = %17
  %min.iters.check = icmp ult i64 %.lcssa, 4
  br i1 %min.iters.check, label %.lr.ph41.preheader79, label %vector.ph

.lr.ph41.preheader79:                             ; preds = %middle.block, %.lr.ph41.preheader
  %.ph = phi i64 [ %18, %.lr.ph41.preheader ], [ %vector.recur.extract, %middle.block ]
  %indvars.iv49.ph = phi i64 [ 0, %.lr.ph41.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph41

vector.ph:                                        ; preds = %.lr.ph41.preheader
  %n.vec = and i64 %.lcssa, 9223372036854775804
  %vector.recur.init = insertelement <2 x i64> poison, i64 %18, i64 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <2 x i64> [ %vector.recur.init, %vector.ph ], [ %wide.load64, %vector.body ]
  %21 = or disjoint i64 %index, 1
  %22 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %21
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %wide.load = load <2 x i64>, ptr %22, align 8, !tbaa !5
  %wide.load64 = load <2 x i64>, ptr %23, align 8, !tbaa !5
  %24 = shufflevector <2 x i64> %vector.recur, <2 x i64> %wide.load, <2 x i32> <i32 1, i32 2>
  %25 = shufflevector <2 x i64> %wide.load, <2 x i64> %wide.load64, <2 x i32> <i32 1, i32 2>
  %26 = sub nsw <2 x i64> %wide.load, %24
  %27 = sub nsw <2 x i64> %wide.load64, %25
  %28 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %index
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store <2 x i64> %26, ptr %28, align 16, !tbaa !5
  store <2 x i64> %27, ptr %29, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %30 = icmp eq i64 %index.next, %n.vec
  br i1 %30, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %vector.recur.extract = extractelement <2 x i64> %wide.load64, i64 1
  %cmp.n = icmp eq i64 %.lcssa, %n.vec
  br i1 %cmp.n, label %.preheader37, label %.lr.ph41.preheader79

.preheader37:                                     ; preds = %.lr.ph41, %middle.block
  br i1 %20, label %.lr.ph43.preheader, label %.critedge

.lr.ph43.preheader:                               ; preds = %.preheader37
  %min.iters.check67 = icmp ult i64 %.lcssa, 4
  br i1 %min.iters.check67, label %.lr.ph43.preheader78, label %vector.ph68

.lr.ph43.preheader78:                             ; preds = %middle.block65, %.lr.ph43.preheader
  %indvars.iv52.ph = phi i64 [ 0, %.lr.ph43.preheader ], [ %n.vec70, %middle.block65 ]
  br label %.lr.ph43

vector.ph68:                                      ; preds = %.lr.ph43.preheader
  %n.vec70 = and i64 %.lcssa, 9223372036854775804
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %9, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body72

vector.body72:                                    ; preds = %vector.body72, %vector.ph68
  %index73 = phi i64 [ 0, %vector.ph68 ], [ %index.next76, %vector.body72 ]
  %31 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %index73
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %wide.load74 = load <2 x i64>, ptr %31, align 16, !tbaa !5
  %wide.load75 = load <2 x i64>, ptr %32, align 16, !tbaa !5
  %33 = sub nsw <2 x i64> %wide.load74, %broadcast.splat
  %34 = sub nsw <2 x i64> %wide.load75, %broadcast.splat
  store <2 x i64> %33, ptr %31, align 16, !tbaa !5
  store <2 x i64> %34, ptr %32, align 16, !tbaa !5
  %index.next76 = add nuw i64 %index73, 4
  %35 = icmp eq i64 %index.next76, %n.vec70
  br i1 %35, label %middle.block65, label %vector.body72, !llvm.loop !14

middle.block65:                                   ; preds = %vector.body72
  %cmp.n77 = icmp eq i64 %.lcssa, %n.vec70
  br i1 %cmp.n77, label %.preheader, label %.lr.ph43.preheader78

.lr.ph41:                                         ; preds = %.lr.ph41.preheader79, %.lr.ph41
  %36 = phi i64 [ %38, %.lr.ph41 ], [ %.ph, %.lr.ph41.preheader79 ]
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %.lr.ph41 ], [ %indvars.iv49.ph, %.lr.ph41.preheader79 ]
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %37 = getelementptr inbounds [100010 x i64], ptr @A, i64 0, i64 %indvars.iv.next50
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = sub nsw i64 %38, %36
  %40 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %indvars.iv49
  store i64 %39, ptr %40, align 8, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next50, %.lcssa
  br i1 %exitcond.not, label %.preheader37, label %.lr.ph41, !llvm.loop !15

.preheader:                                       ; preds = %.lr.ph43, %middle.block65
  br i1 %20, label %.lr.ph46, label %.critedge

.lr.ph43:                                         ; preds = %.lr.ph43.preheader78, %.lr.ph43
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %.lr.ph43 ], [ %indvars.iv52.ph, %.lr.ph43.preheader78 ]
  %41 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %indvars.iv52
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = sub nsw i64 %42, %9
  store i64 %43, ptr %41, align 8, !tbaa !5
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next53, %.lcssa
  br i1 %exitcond55.not, label %.preheader, label %.lr.ph43, !llvm.loop !16

.lr.ph46:                                         ; preds = %.preheader, %51
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %51 ], [ 0, %.preheader ]
  %44 = getelementptr inbounds [100010 x i64], ptr @B, i64 0, i64 %indvars.iv56
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = icmp slt i64 %45, 1
  br i1 %46, label %47, label %.critedge

47:                                               ; preds = %.lr.ph46
  %.nonneg = sub i64 0, %45
  %48 = urem i64 %.nonneg, %.lcssa
  %49 = udiv i64 %.nonneg, %.lcssa
  %50 = icmp eq i64 %48, 0
  br i1 %50, label %51, label %.critedge

51:                                               ; preds = %47
  %.neg36 = sub i64 0, %49
  %52 = getelementptr inbounds [100010 x i64], ptr @D, i64 0, i64 %indvars.iv56
  store i64 %.neg36, ptr %52, align 8, !tbaa !5
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next57, %.lcssa
  br i1 %exitcond59.not, label %.critedge, label %.lr.ph46, !llvm.loop !17

.critedge:                                        ; preds = %51, %.lr.ph46, %47, %.preheader, %.preheader37, %17, %._crit_edge
  %.str.sink = phi ptr [ @.str, %._crit_edge ], [ @.str.1, %17 ], [ @.str.1, %.preheader37 ], [ @.str.1, %.preheader ], [ @.str, %47 ], [ @.str, %.lr.ph46 ], [ @.str.1, %51 ]
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.sink)
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

; 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 #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr 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 #1 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)) #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 = { 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 = { 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 = !{!"long long", !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, !12, !13}
!15 = distinct !{!15, !10, !13, !12}
!16 = distinct !{!16, !10, !13, !12}
!17 = distinct !{!17, !10}


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