; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Company Contests/Walmart Algo 2016/Problem F/F.ll (Z5solvev)

; 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 i32, align 4
@a = external dso_local global [100100 x i64], align 16
@dp1 = external dso_local global [100100 x i64], align 16
@dp2 = external dso_local global [100100 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z6getfibx(i64 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %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) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %11

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

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

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

21:                                               ; preds = %16
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %1, align 4, !tbaa !5
  br label %11, !llvm.loop !9

24:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %37, %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %32
  store i64 0, ptr %33, align 8, !tbaa !11
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %35
  store i64 0, ptr %36, align 8, !tbaa !11
  br label %37

37:                                               ; preds = %30
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !13

40:                                               ; preds = %29
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !11
  %45 = add nsw i64 %44, 1
  %46 = call noundef i64 @_Z6getfibx(i64 noundef %45)
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %48
  store i64 %46, ptr %49, align 8, !tbaa !11
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = call noundef i64 @_Z6getfibx(i64 noundef %53)
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %56
  store i64 %54, ptr %57, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = sub nsw i32 %58, 1
  store i32 %59, ptr %3, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %135, %40
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %64, label %63

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

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = add nsw i64 %68, 1
  %70 = call noundef i64 @_Z6getfibx(i64 noundef %69)
  store i64 %70, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !11
  %75 = call noundef i64 @_Z6getfibx(i64 noundef %74)
  store i64 %75, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = sub nsw i64 %79, 1
  %81 = call noundef i64 @_Z6getfibx(i64 noundef %80)
  store i64 %81, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %86 = sub nsw i64 %85, 2
  %87 = call noundef i64 @_Z6getfibx(i64 noundef %86)
  store i64 %87, ptr %7, align 8, !tbaa !11
  %88 = load i64, ptr %4, align 8, !tbaa !11
  %89 = load i64, ptr %4, align 8, !tbaa !11
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = mul nsw i64 %89, %94
  %96 = srem i64 %95, 1000000007
  %97 = load i64, ptr %5, align 8, !tbaa !11
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !11
  %103 = mul nsw i64 %97, %102
  %104 = srem i64 %103, 1000000007
  %105 = add nsw i64 %96, %104
  %106 = srem i64 %105, 1000000007
  %107 = add nsw i64 %88, %106
  %108 = srem i64 %107, 1000000007
  %109 = load i32, ptr %3, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %110
  store i64 %108, ptr %111, align 8, !tbaa !11
  %112 = load i64, ptr %5, align 8, !tbaa !11
  %113 = load i64, ptr %5, align 8, !tbaa !11
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !11
  %119 = mul nsw i64 %113, %118
  %120 = srem i64 %119, 1000000007
  %121 = add nsw i64 %112, %120
  %122 = load i64, ptr %6, align 8, !tbaa !11
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !11
  %128 = mul nsw i64 %122, %127
  %129 = srem i64 %128, 1000000007
  %130 = add nsw i64 %121, %129
  %131 = srem i64 %130, 1000000007
  %132 = load i32, ptr %3, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %133
  store i64 %131, ptr %134, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %135

135:                                              ; preds = %64
  %136 = load i32, ptr %3, align 4, !tbaa !5
  %137 = add nsw i32 %136, -1
  store i32 %137, ptr %3, align 4, !tbaa !5
  br label %60, !llvm.loop !14

138:                                              ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %157, %138
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = load i32, ptr @n, align 4, !tbaa !5
  %142 = icmp sle i32 %140, %141
  br i1 %142, label %144, label %143

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

144:                                              ; preds = %139
  %145 = load i32, ptr %9, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !11
  %149 = load i64, ptr %8, align 8, !tbaa !11
  %150 = add nsw i64 %149, %148
  store i64 %150, ptr %8, align 8, !tbaa !11
  %151 = load i64, ptr %8, align 8, !tbaa !11
  %152 = icmp sge i64 %151, 1000000007
  br i1 %152, label %153, label %156

153:                                              ; preds = %144
  %154 = load i64, ptr %8, align 8, !tbaa !11
  %155 = sub nsw i64 %154, 1000000007
  store i64 %155, ptr %8, align 8, !tbaa !11
  br label %156

156:                                              ; preds = %153, %144
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %9, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %9, align 4, !tbaa !5
  br label %139, !llvm.loop !15

160:                                              ; preds = %143
  %161 = load i64, ptr %8, align 8, !tbaa !11
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %161)
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  ret void
}

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = 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" }

@n = external dso_local global i32, align 4
@a = external dso_local global [100100 x i64], align 16
@dp1 = external dso_local local_unnamed_addr global [100100 x i64], align 16
@dp2 = external dso_local local_unnamed_addr global [100100 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #1 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %.not42 = icmp slt i32 %2, 1
  br i1 %.not42, label %.preheader41, label %.lr.ph

.preheader41:                                     ; preds = %.lr.ph, %0
  %.lcssa = phi i32 [ %2, %0 ], [ %8, %.lr.ph ]
  %.not3944 = icmp slt i32 %.lcssa, 0
  br i1 %.not3944, label %._crit_edge, label %.lr.ph46.preheader

.lr.ph46.preheader:                               ; preds = %.preheader41
  %3 = add nuw i32 %.lcssa, 1
  %4 = zext i32 %3 to i64
  %5 = shl nuw nsw i64 %4, 3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @dp2, i8 0, i64 %5, i1 false), !tbaa !9
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @dp1, i8 0, i64 %5, i1 false), !tbaa !9
  br label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %6 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %indvars.iv
  %7 = 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) %6)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %.not.not = icmp slt i64 %indvars.iv, %9
  br i1 %.not.not, label %.lr.ph, label %.preheader41, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph46.preheader, %.preheader41
  %10 = sext i32 %.lcssa to i64
  %11 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %10
  %12 = load i64, ptr %11, align 8, !tbaa !9
  %13 = add nsw i64 %12, 1
  %14 = tail call noundef i64 @_Z6getfibx(i64 noundef %13)
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %16
  store i64 %14, ptr %17, align 8, !tbaa !9
  %18 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %16
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = tail call noundef i64 @_Z6getfibx(i64 noundef %19)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %22
  store i64 %20, ptr %23, align 8, !tbaa !9
  %24 = icmp sgt i32 %21, 1
  br i1 %24, label %.lr.ph49.preheader, label %.preheader

.lr.ph49.preheader:                               ; preds = %._crit_edge
  %25 = zext nneg i32 %21 to i64
  br label %.lr.ph49

.preheader.loopexit:                              ; preds = %.lr.ph49
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %._crit_edge
  %26 = phi i32 [ %.pre, %.preheader.loopexit ], [ %21, %._crit_edge ]
  %.not4050 = icmp slt i32 %26, 1
  br i1 %.not4050, label %._crit_edge54, label %.lr.ph53.preheader

.lr.ph53.preheader:                               ; preds = %.preheader
  %27 = zext nneg i32 %26 to i64
  %xtraiter = and i64 %27, 3
  %28 = icmp ult i32 %26, 4
  br i1 %28, label %._crit_edge54.loopexit.unr-lcssa, label %.lr.ph53.preheader.new

.lr.ph53.preheader.new:                           ; preds = %.lr.ph53.preheader
  %unroll_iter = and i64 %27, 2147483644
  br label %.lr.ph53

.lr.ph49:                                         ; preds = %.lr.ph49.preheader, %.lr.ph49
  %indvars.iv61 = phi i64 [ %25, %.lr.ph49.preheader ], [ %indvars.iv.next62, %.lr.ph49 ]
  %indvars.iv.next62 = add nsw i64 %indvars.iv61, -1
  %29 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %indvars.iv.next62
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = add nsw i64 %30, 1
  %32 = tail call noundef i64 @_Z6getfibx(i64 noundef %31)
  %33 = load i64, ptr %29, align 8, !tbaa !9
  %34 = tail call noundef i64 @_Z6getfibx(i64 noundef %33)
  %35 = load i64, ptr %29, align 8, !tbaa !9
  %36 = add nsw i64 %35, -1
  %37 = tail call noundef i64 @_Z6getfibx(i64 noundef %36)
  %38 = load i64, ptr %29, align 8, !tbaa !9
  %39 = add nsw i64 %38, -2
  %40 = tail call noundef i64 @_Z6getfibx(i64 noundef %39)
  %41 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %indvars.iv61
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = mul nsw i64 %42, %32
  %44 = srem i64 %43, 1000000007
  %45 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %indvars.iv61
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = mul nsw i64 %46, %34
  %48 = srem i64 %47, 1000000007
  %49 = add nsw i64 %48, %44
  %.lhs.trunc = trunc nsw i64 %49 to i32
  %50 = srem i32 %.lhs.trunc, 1000000007
  %.sext = sext i32 %50 to i64
  %51 = add nsw i64 %32, %.sext
  %52 = srem i64 %51, 1000000007
  %53 = getelementptr inbounds [100100 x i64], ptr @dp1, i64 0, i64 %indvars.iv.next62
  store i64 %52, ptr %53, align 8, !tbaa !9
  %54 = mul nsw i64 %42, %34
  %55 = srem i64 %54, 1000000007
  %56 = add nsw i64 %55, %34
  %57 = mul nsw i64 %46, %37
  %58 = srem i64 %57, 1000000007
  %59 = add nsw i64 %56, %58
  %60 = srem i64 %59, 1000000007
  %61 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %indvars.iv.next62
  store i64 %60, ptr %61, align 8, !tbaa !9
  %62 = icmp ugt i64 %indvars.iv61, 2
  br i1 %62, label %.lr.ph49, label %.preheader.loopexit, !llvm.loop !13

._crit_edge54.loopexit.unr-lcssa:                 ; preds = %.lr.ph53, %.lr.ph53.preheader
  %spec.select.lcssa.ph = phi i64 [ poison, %.lr.ph53.preheader ], [ %spec.select.3, %.lr.ph53 ]
  %indvars.iv64.unr = phi i64 [ 1, %.lr.ph53.preheader ], [ %indvars.iv.next65.3, %.lr.ph53 ]
  %.03251.unr = phi i64 [ 0, %.lr.ph53.preheader ], [ %spec.select.3, %.lr.ph53 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge54, label %.lr.ph53.epil

.lr.ph53.epil:                                    ; preds = %._crit_edge54.loopexit.unr-lcssa, %.lr.ph53.epil
  %indvars.iv64.epil = phi i64 [ %indvars.iv.next65.epil, %.lr.ph53.epil ], [ %indvars.iv64.unr, %._crit_edge54.loopexit.unr-lcssa ]
  %.03251.epil = phi i64 [ %spec.select.epil, %.lr.ph53.epil ], [ %.03251.unr, %._crit_edge54.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph53.epil ], [ 0, %._crit_edge54.loopexit.unr-lcssa ]
  %63 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %indvars.iv64.epil
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = add nsw i64 %64, %.03251.epil
  %66 = icmp sgt i64 %65, 1000000006
  %67 = add nsw i64 %65, -1000000007
  %spec.select.epil = select i1 %66, i64 %67, i64 %65
  %indvars.iv.next65.epil = add nuw nsw i64 %indvars.iv64.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge54, label %.lr.ph53.epil, !llvm.loop !14

._crit_edge54:                                    ; preds = %._crit_edge54.loopexit.unr-lcssa, %.lr.ph53.epil, %.preheader
  %.032.lcssa = phi i64 [ 0, %.preheader ], [ %spec.select.lcssa.ph, %._crit_edge54.loopexit.unr-lcssa ], [ %spec.select.epil, %.lr.ph53.epil ]
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.032.lcssa)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret void

.lr.ph53:                                         ; preds = %.lr.ph53, %.lr.ph53.preheader.new
  %indvars.iv64 = phi i64 [ 1, %.lr.ph53.preheader.new ], [ %indvars.iv.next65.3, %.lr.ph53 ]
  %.03251 = phi i64 [ 0, %.lr.ph53.preheader.new ], [ %spec.select.3, %.lr.ph53 ]
  %niter = phi i64 [ 0, %.lr.ph53.preheader.new ], [ %niter.next.3, %.lr.ph53 ]
  %70 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %indvars.iv64
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = add nsw i64 %71, %.03251
  %73 = icmp sgt i64 %72, 1000000006
  %74 = add nsw i64 %72, -1000000007
  %spec.select = select i1 %73, i64 %74, i64 %72
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %75 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %indvars.iv.next65
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = add nsw i64 %76, %spec.select
  %78 = icmp sgt i64 %77, 1000000006
  %79 = add nsw i64 %77, -1000000007
  %spec.select.1 = select i1 %78, i64 %79, i64 %77
  %indvars.iv.next65.1 = add nuw nsw i64 %indvars.iv64, 2
  %80 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %indvars.iv.next65.1
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = add nsw i64 %81, %spec.select.1
  %83 = icmp sgt i64 %82, 1000000006
  %84 = add nsw i64 %82, -1000000007
  %spec.select.2 = select i1 %83, i64 %84, i64 %82
  %indvars.iv.next65.2 = add nuw nsw i64 %indvars.iv64, 3
  %85 = getelementptr inbounds [100100 x i64], ptr @dp2, i64 0, i64 %indvars.iv.next65.2
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = add nsw i64 %86, %spec.select.2
  %88 = icmp sgt i64 %87, 1000000006
  %89 = add nsw i64 %87, -1000000007
  %spec.select.3 = select i1 %88, i64 %89, i64 %87
  %indvars.iv.next65.3 = add nuw nsw i64 %indvars.iv64, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge54.loopexit.unr-lcssa, label %.lr.ph53, !llvm.loop !16
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass