; LLVM IR from TheLartians/EasyIterator :: examples (fibonacci)

; 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_ostream" = type { ptr, %"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 }
%"struct.easy_iterator::WrappedIterator" = type { %"class.easy_iterator::Iterator", [8 x i8] }
%"class.easy_iterator::Iterator" = type <{ %"class.easy_iterator::IteratorPrototype", [8 x i8] }>
%"class.easy_iterator::IteratorPrototype" = type { [8 x i8], %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.easy_iterator::Iterator.1" }
%"class.easy_iterator::Iterator.1" = type <{ %"class.easy_iterator::IteratorPrototype.2", %"struct.easy_iterator::iterator_detail::WithState", [7 x i8] }>
%"class.easy_iterator::IteratorPrototype.2" = type { [8 x i8], %struct.Fibonacci }
%struct.Fibonacci = type { i64, i64 }
%"struct.easy_iterator::iterator_detail::WithState" = type { i8 }
%"struct.std::_Head_base.3" = type { %"struct.easy_iterator::RangeIterator" }
%"struct.easy_iterator::RangeIterator" = type { %"class.easy_iterator::IteratorPrototype.4", i64 }
%"class.easy_iterator::IteratorPrototype.4" = type { [8 x i8], i64 }
%"struct.easy_iterator::MakeIterable" = type { %"class.easy_iterator::Iterator.1" }
%"class.easy_iterator::Iterator.6" = type { [5 x i8] }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Tuple_impl.10", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base.11" }
%"struct.std::_Head_base.11" = type { i64 }
%"struct.std::_Head_base.12" = type { i64 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 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 ptr, align 8
  %3 = alloca %"struct.easy_iterator::WrappedIterator", align 8
  %4 = alloca %"struct.easy_iterator::MakeIterable", align 8
  %5 = alloca %"class.easy_iterator::Iterator", align 8
  %6 = alloca %"class.easy_iterator::Iterator.6", align 1
  %7 = alloca %"class.std::tuple.8", align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @_ZN13easy_iterator12MakeIterableI9FibonacciEC2IJEEEDpOT_(ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @_ZN13easy_iterator9enumerateINS_12MakeIterableI9FibonacciEEEEDaOT_(ptr dead_on_unwind writable sret(%"struct.easy_iterator::WrappedIterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  store ptr %3, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %5) #6
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(77) %10)
  call void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEC2EOSM_(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 8 dereferenceable(72) %11) #6
  call void @llvm.lifetime.start.p0(i64 5, ptr %6) #6
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(77) %12)
  call void @_ZN13easy_iterator8IteratorISt5tupleIJNS_12IterationEndES2_EENS_9increment16ByTupleIncrementENS_11dereference18ByTupleDereferenceENS_7compare23ByLastTupleElementMatchEEC2EOSA_(ptr noundef nonnull align 1 dereferenceable(5) %6, ptr noundef nonnull align 1 dereferenceable(5) %13) #6
  br label %14

14:                                               ; preds = %29, %0
  %15 = call noundef zeroext i1 @_ZN13easy_iteratorneIJSt5tupleIJNS_13RangeIteratorImEENS_8IteratorI9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEJS1_IJNS_12IterationEndESM_EESK_SL_EEEbRKNS_17IteratorPrototypeIDpT_EERKNSO_IDpT0_EE(ptr noundef nonnull align 8 dereferenceable(64) %5, ptr noundef nonnull align 1 dereferenceable(4) %6)
  br i1 %15, label %17, label %16

16:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 5, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %31

17:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  call void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEdeEv(ptr dead_on_unwind writable sret(%"class.std::tuple.8") align 8 %7, ptr noundef nonnull align 8 dereferenceable(72) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  store ptr %18, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  store ptr %19, ptr %9, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %20, i64 noundef %22)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @.str.1)
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = load i64, ptr %25, align 8, !tbaa !11
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef %26)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  br label %29

29:                                               ; preds = %17
  %30 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEppEv(ptr noundef nonnull align 8 dereferenceable(72) %5)
  br label %14

31:                                               ; preds = %16
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13easy_iterator9enumerateINS_12MakeIterableI9FibonacciEEEEDaOT_(ptr dead_on_unwind noalias writable sret(%"struct.easy_iterator::WrappedIterator") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13easy_iterator12MakeIterableI9FibonacciEC2IJEEEDpOT_(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(77)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEC2EOSM_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(5) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(77)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13easy_iterator8IteratorISt5tupleIJNS_12IterationEndES2_EENS_9increment16ByTupleIncrementENS_11dereference18ByTupleDereferenceENS_7compare23ByLastTupleElementMatchEEC2EOSA_(ptr noundef nonnull align 1 dereferenceable(5), ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13easy_iteratorneIJSt5tupleIJNS_13RangeIteratorImEENS_8IteratorI9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEJS1_IJNS_12IterationEndESM_EESK_SL_EEEbRKNS_17IteratorPrototypeIDpT_EERKNSO_IDpT0_EE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 1 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEdeEv(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.8") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16)) #3

; 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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEppEv(ptr noundef nonnull align 8 dereferenceable(72)) #2 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}


; 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_ostream" = type { ptr, %"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 }
%"struct.easy_iterator::WrappedIterator" = type { %"class.easy_iterator::Iterator", [8 x i8] }
%"class.easy_iterator::Iterator" = type <{ %"class.easy_iterator::IteratorPrototype", [8 x i8] }>
%"class.easy_iterator::IteratorPrototype" = type { [8 x i8], %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.easy_iterator::Iterator.1" }
%"class.easy_iterator::Iterator.1" = type <{ %"class.easy_iterator::IteratorPrototype.2", %"struct.easy_iterator::iterator_detail::WithState", [7 x i8] }>
%"class.easy_iterator::IteratorPrototype.2" = type { [8 x i8], %struct.Fibonacci }
%struct.Fibonacci = type { i64, i64 }
%"struct.easy_iterator::iterator_detail::WithState" = type { i8 }
%"struct.std::_Head_base.3" = type { %"struct.easy_iterator::RangeIterator" }
%"struct.easy_iterator::RangeIterator" = type { %"class.easy_iterator::IteratorPrototype.4", i64 }
%"class.easy_iterator::IteratorPrototype.4" = type { [8 x i8], i64 }
%"struct.easy_iterator::MakeIterable" = type { %"class.easy_iterator::Iterator.1" }
%"class.easy_iterator::Iterator.6" = type { [5 x i8] }
%"class.std::tuple.8" = type { %"struct.std::_Tuple_impl.9" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Tuple_impl.10", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Head_base.11" }
%"struct.std::_Head_base.11" = type { i64 }
%"struct.std::_Head_base.12" = type { i64 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 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 = alloca %"struct.easy_iterator::WrappedIterator", align 8
  %2 = alloca %"struct.easy_iterator::MakeIterable", align 8
  %3 = alloca %"class.easy_iterator::Iterator", align 8
  %4 = alloca %"class.easy_iterator::Iterator.6", align 1
  %5 = alloca %"class.std::tuple.8", align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @_ZN13easy_iterator12MakeIterableI9FibonacciEC2IJEEEDpOT_(ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @_ZN13easy_iterator9enumerateINS_12MakeIterableI9FibonacciEEEEDaOT_(ptr dead_on_unwind nonnull writable sret(%"struct.easy_iterator::WrappedIterator") align 8 %1, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #6
  %6 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(77) %1)
  call void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEC2EOSM_(ptr noundef nonnull align 8 dereferenceable(72) %3, ptr noundef nonnull align 8 dereferenceable(72) %6) #6
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %4) #6
  %7 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(77) %1)
  call void @_ZN13easy_iterator8IteratorISt5tupleIJNS_12IterationEndES2_EENS_9increment16ByTupleIncrementENS_11dereference18ByTupleDereferenceENS_7compare23ByLastTupleElementMatchEEC2EOSA_(ptr noundef nonnull align 1 dereferenceable(5) %4, ptr noundef nonnull align 1 dereferenceable(5) %7) #6
  %8 = call noundef zeroext i1 @_ZN13easy_iteratorneIJSt5tupleIJNS_13RangeIteratorImEENS_8IteratorI9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEJS1_IJNS_12IterationEndESM_EESK_SL_EEEbRKNS_17IteratorPrototypeIDpT_EERKNSO_IDpT0_EE(ptr noundef nonnull align 8 dereferenceable(64) %3, ptr noundef nonnull align 1 dereferenceable(4) %4)
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #6
  ret i32 0

.lr.ph:                                           ; preds = %0, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEdeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.8") align 8 %5, ptr noundef nonnull align 8 dereferenceable(72) %3)
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  %10 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  %11 = 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)
  %12 = load i64, ptr %9, align 8, !tbaa !5
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %12)
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.1)
  %15 = load i64, ptr %10, align 8, !tbaa !9
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %15)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %18 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEppEv(ptr noundef nonnull align 8 dereferenceable(72) %3)
  %19 = call noundef zeroext i1 @_ZN13easy_iteratorneIJSt5tupleIJNS_13RangeIteratorImEENS_8IteratorI9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEJS1_IJNS_12IterationEndESM_EESK_SL_EEEbRKNS_17IteratorPrototypeIDpT_EERKNSO_IDpT0_EE(ptr noundef nonnull align 8 dereferenceable(64) %3, ptr noundef nonnull align 1 dereferenceable(4) %4)
  br i1 %19, label %.lr.ph, label %._crit_edge
}

; 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 uwtable
declare dso_local void @_ZN13easy_iterator9enumerateINS_12MakeIterableI9FibonacciEEEEDaOT_(ptr dead_on_unwind noalias writable sret(%"struct.easy_iterator::WrappedIterator") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13easy_iterator12MakeIterableI9FibonacciEC2IJEEEDpOT_(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(77)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEC2EOSM_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(5) ptr @_ZNK13easy_iterator15WrappedIteratorINS_8IteratorISt5tupleIJNS_13RangeIteratorImEENS1_I9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENS6_16ByTupleIncrementENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEENS1_IS2_IJNS_12IterationEndESO_EESK_SL_SM_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(77)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13easy_iterator8IteratorISt5tupleIJNS_12IterationEndES2_EENS_9increment16ByTupleIncrementENS_11dereference18ByTupleDereferenceENS_7compare23ByLastTupleElementMatchEEC2EOSA_(ptr noundef nonnull align 1 dereferenceable(5), ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13easy_iteratorneIJSt5tupleIJNS_13RangeIteratorImEENS_8IteratorI9FibonacciNS_9increment12ByMemberCallIS5_MS5_FbvEXadL_ZNS5_7advanceEvEEEENS_11dereference12ByMemberCallIS5_MS5_KFyvEXadL_ZNKS5_5valueEvEEEENS_7compare7ByValueEEEEENSB_18ByTupleDereferenceENSG_23ByLastTupleElementMatchEEJS1_IJNS_12IterationEndESM_EESK_SL_EEEbRKNS_17IteratorPrototypeIDpT_EERKNSO_IDpT0_EE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEdeEv(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.8") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJmyEEONSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOS4_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; 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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN13easy_iterator8IteratorISt5tupleIJNS_13RangeIteratorImEENS0_I9FibonacciNS_9increment12ByMemberCallIS4_MS4_FbvEXadL_ZNS4_7advanceEvEEEENS_11dereference12ByMemberCallIS4_MS4_KFyvEXadL_ZNKS4_5valueEvEEEENS_7compare7ByValueEEEEENS5_16ByTupleIncrementENSA_18ByTupleDereferenceENSF_23ByLastTupleElementMatchEEppEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 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 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 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass