; LLVM IR from eyangch/competitive-programming :: Codeforces/1491 (e)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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
@fib = external dso_local global [30 x i32], align 16
@rfib = external dso_local global [1000000 x i32], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], 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 [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4fibtRSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24)) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %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 %"class.std::vector", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %12 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %14
  %16 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %18 = 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 %2) #6
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %19

19:                                               ; preds = %40, %0
  %20 = load i32, ptr %2, align 4, !tbaa !8
  %21 = load i32, ptr @N, align 4, !tbaa !8
  %22 = sub nsw i32 %21, 1
  %23 = icmp slt i32 %20, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %28 = load i32, ptr %3, align 4, !tbaa !8
  %29 = sub nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %32 = load i32, ptr %4, align 4, !tbaa !8
  %33 = sub nsw i32 %32, 1
  store i32 %33, ptr %5, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %34 = load i32, ptr %4, align 4, !tbaa !8
  %35 = sub nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %38 = load i32, ptr %3, align 4, !tbaa !8
  %39 = sub nsw i32 %38, 1
  store i32 %39, ptr %6, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %40

40:                                               ; preds = %25
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %2, align 4, !tbaa !8
  br label %19, !llvm.loop !11

43:                                               ; preds = %24
  store i32 1, ptr getelementptr inbounds ([30 x i32], ptr @fib, i64 0, i64 1), align 4, !tbaa !8
  store i32 1, ptr @fib, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 2, ptr %7, align 4, !tbaa !8
  br label %44

44:                                               ; preds = %70, %43
  %45 = load i32, ptr %7, align 4, !tbaa !8
  %46 = icmp slt i32 %45, 30
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %73

48:                                               ; preds = %44
  %49 = load i32, ptr %7, align 4, !tbaa !8
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [30 x i32], ptr @fib, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !8
  %54 = load i32, ptr %7, align 4, !tbaa !8
  %55 = sub nsw i32 %54, 2
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [30 x i32], ptr @fib, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %59 = add nsw i32 %53, %58
  %60 = load i32, ptr %7, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [30 x i32], ptr @fib, i64 0, i64 %61
  store i32 %59, ptr %62, align 4, !tbaa !8
  %63 = load i32, ptr %7, align 4, !tbaa !8
  %64 = load i32, ptr %7, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [30 x i32], ptr @fib, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !8
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %68
  store i32 %63, ptr %69, align 4, !tbaa !8
  br label %70

70:                                               ; preds = %48
  %71 = load i32, ptr %7, align 4, !tbaa !8
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %7, align 4, !tbaa !8
  br label %44, !llvm.loop !13

73:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %74

74:                                               ; preds = %81, %73
  %75 = load i32, ptr %9, align 4, !tbaa !8
  %76 = load i32, ptr @N, align 4, !tbaa !8
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %88

79:                                               ; preds = %74
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %80 unwind label %84

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %9, align 4, !tbaa !8
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %9, align 4, !tbaa !8
  br label %74, !llvm.loop !14

84:                                               ; preds = %79
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %10, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %102

88:                                               ; preds = %78
  %89 = invoke noundef zeroext i1 @_Z4fibtRSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %90 unwind label %98

90:                                               ; preds = %88
  %91 = zext i1 %89 to i64
  %92 = select i1 %89, ptr @.str, ptr @.str.2
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %92)
          to label %94 unwind label %98

94:                                               ; preds = %90
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @.str.3)
          to label %96 unwind label %98

96:                                               ; preds = %94
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  %97 = load i32, ptr %1, align 4
  ret i32 %97

98:                                               ; preds = %94, %90, %88
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %10, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %11, align 4
  br label %102

102:                                              ; preds = %98, %84
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %10, align 8
  %105 = load i32, ptr %11, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #0 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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
@fib = external dso_local local_unnamed_addr global [30 x i32], align 16
@rfib = external dso_local local_unnamed_addr global [1000000 x i32], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], 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 [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4fibtRSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = 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)
  %14 = load i32, ptr @N, align 4, !tbaa !8
  %15 = icmp sgt i32 %14, 1
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  store i32 1, ptr getelementptr inbounds (i8, ptr @fib, i64 4), align 4, !tbaa !8
  store i32 1, ptr @fib, align 16, !tbaa !8
  %16 = load i32, ptr @fib, align 16, !tbaa !8
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr getelementptr inbounds (i8, ptr @fib, i64 8), align 8, !tbaa !8
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %18
  store i32 2, ptr %19, align 4, !tbaa !8
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 4), align 4, !tbaa !8
  %21 = add nsw i32 %20, %17
  store i32 %21, ptr getelementptr inbounds (i8, ptr @fib, i64 12), align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %22
  store i32 3, ptr %23, align 4, !tbaa !8
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 8), align 8, !tbaa !8
  %25 = add nsw i32 %24, %21
  store i32 %25, ptr getelementptr inbounds (i8, ptr @fib, i64 16), align 16, !tbaa !8
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %26
  store i32 4, ptr %27, align 4, !tbaa !8
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 12), align 4, !tbaa !8
  %29 = add nsw i32 %28, %25
  store i32 %29, ptr getelementptr inbounds (i8, ptr @fib, i64 20), align 4, !tbaa !8
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %30
  store i32 5, ptr %31, align 4, !tbaa !8
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 16), align 16, !tbaa !8
  %33 = add nsw i32 %32, %29
  store i32 %33, ptr getelementptr inbounds (i8, ptr @fib, i64 24), align 8, !tbaa !8
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %34
  store i32 6, ptr %35, align 4, !tbaa !8
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 20), align 4, !tbaa !8
  %37 = add nsw i32 %36, %33
  store i32 %37, ptr getelementptr inbounds (i8, ptr @fib, i64 28), align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %38
  store i32 7, ptr %39, align 4, !tbaa !8
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 24), align 8, !tbaa !8
  %41 = add nsw i32 %40, %37
  store i32 %41, ptr getelementptr inbounds (i8, ptr @fib, i64 32), align 16, !tbaa !8
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %42
  store i32 8, ptr %43, align 4, !tbaa !8
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 28), align 4, !tbaa !8
  %45 = add nsw i32 %44, %41
  store i32 %45, ptr getelementptr inbounds (i8, ptr @fib, i64 36), align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %46
  store i32 9, ptr %47, align 4, !tbaa !8
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 32), align 16, !tbaa !8
  %49 = add nsw i32 %48, %45
  store i32 %49, ptr getelementptr inbounds (i8, ptr @fib, i64 40), align 8, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %50
  store i32 10, ptr %51, align 4, !tbaa !8
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 36), align 4, !tbaa !8
  %53 = add nsw i32 %52, %49
  store i32 %53, ptr getelementptr inbounds (i8, ptr @fib, i64 44), align 4, !tbaa !8
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %54
  store i32 11, ptr %55, align 4, !tbaa !8
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 40), align 8, !tbaa !8
  %57 = add nsw i32 %56, %53
  store i32 %57, ptr getelementptr inbounds (i8, ptr @fib, i64 48), align 16, !tbaa !8
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %58
  store i32 12, ptr %59, align 4, !tbaa !8
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 44), align 4, !tbaa !8
  %61 = add nsw i32 %60, %57
  store i32 %61, ptr getelementptr inbounds (i8, ptr @fib, i64 52), align 4, !tbaa !8
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %62
  store i32 13, ptr %63, align 4, !tbaa !8
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 48), align 16, !tbaa !8
  %65 = add nsw i32 %64, %61
  store i32 %65, ptr getelementptr inbounds (i8, ptr @fib, i64 56), align 8, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %66
  store i32 14, ptr %67, align 4, !tbaa !8
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 52), align 4, !tbaa !8
  %69 = add nsw i32 %68, %65
  store i32 %69, ptr getelementptr inbounds (i8, ptr @fib, i64 60), align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %70
  store i32 15, ptr %71, align 4, !tbaa !8
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 56), align 8, !tbaa !8
  %73 = add nsw i32 %72, %69
  store i32 %73, ptr getelementptr inbounds (i8, ptr @fib, i64 64), align 16, !tbaa !8
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %74
  store i32 16, ptr %75, align 4, !tbaa !8
  %76 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 60), align 4, !tbaa !8
  %77 = add nsw i32 %76, %73
  store i32 %77, ptr getelementptr inbounds (i8, ptr @fib, i64 68), align 4, !tbaa !8
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %78
  store i32 17, ptr %79, align 4, !tbaa !8
  %80 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 64), align 16, !tbaa !8
  %81 = add nsw i32 %80, %77
  store i32 %81, ptr getelementptr inbounds (i8, ptr @fib, i64 72), align 8, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %82
  store i32 18, ptr %83, align 4, !tbaa !8
  %84 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 68), align 4, !tbaa !8
  %85 = add nsw i32 %84, %81
  store i32 %85, ptr getelementptr inbounds (i8, ptr @fib, i64 76), align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %86
  store i32 19, ptr %87, align 4, !tbaa !8
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 72), align 8, !tbaa !8
  %89 = add nsw i32 %88, %85
  store i32 %89, ptr getelementptr inbounds (i8, ptr @fib, i64 80), align 16, !tbaa !8
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %90
  store i32 20, ptr %91, align 4, !tbaa !8
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 76), align 4, !tbaa !8
  %93 = add nsw i32 %92, %89
  store i32 %93, ptr getelementptr inbounds (i8, ptr @fib, i64 84), align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %94
  store i32 21, ptr %95, align 4, !tbaa !8
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 80), align 16, !tbaa !8
  %97 = add nsw i32 %96, %93
  store i32 %97, ptr getelementptr inbounds (i8, ptr @fib, i64 88), align 8, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %98
  store i32 22, ptr %99, align 4, !tbaa !8
  %100 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 84), align 4, !tbaa !8
  %101 = add nsw i32 %100, %97
  store i32 %101, ptr getelementptr inbounds (i8, ptr @fib, i64 92), align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %102
  store i32 23, ptr %103, align 4, !tbaa !8
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 88), align 8, !tbaa !8
  %105 = add nsw i32 %104, %101
  store i32 %105, ptr getelementptr inbounds (i8, ptr @fib, i64 96), align 16, !tbaa !8
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %106
  store i32 24, ptr %107, align 4, !tbaa !8
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 92), align 4, !tbaa !8
  %109 = add nsw i32 %108, %105
  store i32 %109, ptr getelementptr inbounds (i8, ptr @fib, i64 100), align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %110
  store i32 25, ptr %111, align 4, !tbaa !8
  %112 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 96), align 16, !tbaa !8
  %113 = add nsw i32 %112, %109
  store i32 %113, ptr getelementptr inbounds (i8, ptr @fib, i64 104), align 8, !tbaa !8
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %114
  store i32 26, ptr %115, align 4, !tbaa !8
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 100), align 4, !tbaa !8
  %117 = add nsw i32 %116, %113
  store i32 %117, ptr getelementptr inbounds (i8, ptr @fib, i64 108), align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %118
  store i32 27, ptr %119, align 4, !tbaa !8
  %120 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 104), align 8, !tbaa !8
  %121 = add nsw i32 %120, %117
  store i32 %121, ptr getelementptr inbounds (i8, ptr @fib, i64 112), align 16, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %122
  store i32 28, ptr %123, align 4, !tbaa !8
  %124 = load i32, ptr getelementptr inbounds (i8, ptr @fib, i64 108), align 4, !tbaa !8
  %125 = add nsw i32 %124, %121
  store i32 %125, ptr getelementptr inbounds (i8, ptr @fib, i64 116), align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1000000 x i32], ptr @rfib, i64 0, i64 %126
  store i32 29, ptr %127, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 0, ptr %6, align 4, !tbaa !8
  %128 = load i32, ptr @N, align 4, !tbaa !8
  %129 = icmp sgt i32 %128, 0
  br i1 %129, label %.lr.ph18, label %._crit_edge19

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.01315 = phi i32 [ %144, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %130 = 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)
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %130, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %132 = load i32, ptr %1, align 4, !tbaa !8
  %133 = add nsw i32 %132, -1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %134
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %136 = load i32, ptr %2, align 4, !tbaa !8
  %137 = add nsw i32 %136, -1
  store i32 %137, ptr %3, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %135, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %138 = load i32, ptr %2, align 4, !tbaa !8
  %139 = add nsw i32 %138, -1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %140
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %142 = load i32, ptr %1, align 4, !tbaa !8
  %143 = add nsw i32 %142, -1
  store i32 %143, ptr %4, align 4, !tbaa !8
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %141, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %144 = add nuw nsw i32 %.01315, 1
  %145 = load i32, ptr @N, align 4, !tbaa !8
  %146 = add nsw i32 %145, -1
  %147 = icmp slt i32 %144, %146
  br i1 %147, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge19:                                    ; preds = %149, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %148 = invoke noundef zeroext i1 @_Z4fibtRSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %156 unwind label %162

.lr.ph18:                                         ; preds = %._crit_edge, %149
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %149 unwind label %154

149:                                              ; preds = %.lr.ph18
  %150 = load i32, ptr %6, align 4, !tbaa !8
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %6, align 4, !tbaa !8
  %152 = load i32, ptr @N, align 4, !tbaa !8
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %.lr.ph18, label %._crit_edge19, !llvm.loop !13

154:                                              ; preds = %.lr.ph18
  %155 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %164

156:                                              ; preds = %._crit_edge19
  %157 = select i1 %148, ptr @.str, ptr @.str.2
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %157)
          to label %159 unwind label %162

159:                                              ; preds = %156
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %158, ptr noundef nonnull @.str.3)
          to label %161 unwind label %162

161:                                              ; preds = %159
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  ret i32 0

162:                                              ; preds = %159, %156, %._crit_edge19
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %164

164:                                              ; preds = %162, %154
  %.pn = phi { ptr, i32 } [ %155, %154 ], [ %163, %162 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #0 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

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

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass