; LLVM IR from gulrak/filesystem :: test (impl_test)

; 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.ghc::filesystem::directory_iterator" = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.ghc::filesystem::recursive_directory_iterator" = type { %"class.std::shared_ptr.22" }
%"class.std::shared_ptr.22" = type { %"class.std::__shared_ptr.23" }
%"class.std::__shared_ptr.23" = type { ptr, %"class.std::__shared_count" }
%"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl" = type { i16, i8, %"class.std::stack" }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<ghc::filesystem::directory_iterator, std::allocator<ghc::filesystem::directory_iterator>>::_Deque_impl" }
%"struct.std::_Deque_base<ghc::filesystem::directory_iterator, std::allocator<ghc::filesystem::directory_iterator>>::_Deque_impl" = type { %"struct.std::_Deque_base<ghc::filesystem::directory_iterator, std::allocator<ghc::filesystem::directory_iterator>>::_Deque_impl_data" }
%"struct.std::_Deque_base<ghc::filesystem::directory_iterator, std::allocator<ghc::filesystem::directory_iterator>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem6detail18is_not_found_errorERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem18directory_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry10is_symlinkERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry12is_directoryERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK3ghc10filesystem28recursive_directory_iterator7optionsEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem28recursive_directory_iterator17recursion_pendingEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem28recursive_directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %8 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %9 = alloca i1, align 1
  %10 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  %12 = invoke noundef ptr @_ZNK3ghc10filesystem28recursive_directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %13 unwind label %124

13:                                               ; preds = %2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry10is_symlinkERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72) %12, ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  %16 = zext i1 %15 to i8
  store i8 %16, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #4
  br i1 %18, label %24, label %19

19:                                               ; preds = %13
  %20 = invoke noundef ptr @_ZNK3ghc10filesystem28recursive_directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %21 unwind label %124

21:                                               ; preds = %19
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry12is_directoryERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72) %20, ptr noundef nonnull align 8 dereferenceable(16) %22) #4
  br label %24

24:                                               ; preds = %21, %13
  %25 = phi i1 [ false, %13 ], [ %23, %21 ]
  %26 = zext i1 %25 to i8
  store i8 %26, ptr %6, align 1, !tbaa !9
  %27 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %34

29:                                               ; preds = %24
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call noundef zeroext i1 @_ZN3ghc10filesystem6detail18is_not_found_errorERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %30)
  br i1 %31, label %32, label %34

32:                                               ; preds = %29
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %33) #4
  br label %34

34:                                               ; preds = %32, %29, %24
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %35) #4
  br i1 %36, label %123, label %37

37:                                               ; preds = %34
  %38 = call noundef zeroext i1 @_ZNK3ghc10filesystem28recursive_directory_iterator17recursion_pendingEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  br i1 %38, label %39, label %63

39:                                               ; preds = %37
  %40 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %41 = trunc i8 %40 to i1
  br i1 %41, label %42, label %63

42:                                               ; preds = %39
  %43 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %44 = trunc i8 %43 to i1
  br i1 %44, label %45, label %50

45:                                               ; preds = %42
  %46 = call noundef zeroext i16 @_ZNK3ghc10filesystem28recursive_directory_iterator7optionsEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %47 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_17directory_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_NS0_12copy_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valueES4_E4typeES4_S4_(i16 noundef zeroext %46, i16 noundef zeroext 1)
          to label %48 unwind label %124

48:                                               ; preds = %45
  %49 = icmp ne i16 %47, 0
  br i1 %49, label %50, label %63

50:                                               ; preds = %48, %42
  %51 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %52 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %51) #4
  %53 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %52, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  %54 = invoke noundef ptr @_ZNK3ghc10filesystem28recursive_directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %55 unwind label %124

55:                                               ; preds = %50
  %56 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem15directory_entry4pathEv(ptr noundef nonnull align 8 dereferenceable(72) %54) #4
  %57 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %58 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %57) #4
  %59 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %58, i32 0, i32 0
  %60 = load i16, ptr %59, align 8, !tbaa !13
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathENS0_17directory_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(32) %56, i16 noundef zeroext %60, ptr noundef nonnull align 8 dereferenceable(16) %61) #4
  invoke void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) %53, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %62 unwind label %124

62:                                               ; preds = %55
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  br label %71

63:                                               ; preds = %48, %39, %37
  %64 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %64) #4
  %66 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %65, i32 0, i32 2
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %66)
          to label %68 unwind label %124

68:                                               ; preds = %63
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(16) %69) #4
  br label %71

71:                                               ; preds = %68, %62
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %72) #4
  br i1 %73, label %107, label %74

74:                                               ; preds = %71
  br label %75

75:                                               ; preds = %103, %74
  store i1 false, ptr %9, align 1
  store i1 false, ptr %10, align 1
  %76 = invoke noundef i32 @_ZNK3ghc10filesystem28recursive_directory_iterator5depthEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %77 unwind label %124

77:                                               ; preds = %75
  %78 = icmp ne i32 %76, 0
  br i1 %78, label %79, label %86

79:                                               ; preds = %77
  %80 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %81 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %80) #4
  %82 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %81, i32 0, i32 2
  %83 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %82)
          to label %84 unwind label %124

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  store i1 true, ptr %9, align 1
  call void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  store i1 true, ptr %10, align 1
  %85 = call noundef zeroext i1 @_ZNK3ghc10filesystem18directory_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(16) %8)
  br label %86

86:                                               ; preds = %84, %77
  %87 = phi i1 [ false, %77 ], [ %85, %84 ]
  %88 = load i1, ptr %10, align 1
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  br label %90

90:                                               ; preds = %89, %86
  %91 = load i1, ptr %9, align 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  br label %93

93:                                               ; preds = %92, %90
  br i1 %87, label %94, label %106

94:                                               ; preds = %93
  %95 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %96 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %95) #4
  %97 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %96, i32 0, i32 2
  invoke void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %97)
          to label %98 unwind label %124

98:                                               ; preds = %94
  %99 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %100 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %99) #4
  %101 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %100, i32 0, i32 2
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %101)
          to label %103 unwind label %124

103:                                              ; preds = %98
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %102, ptr noundef nonnull align 8 dereferenceable(16) %104) #4
  br label %75, !llvm.loop !23

106:                                              ; preds = %93
  br label %119

107:                                              ; preds = %71
  %108 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %109 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %108) #4
  %110 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %109, i32 0, i32 2
  %111 = invoke noundef zeroext i1 @_ZNKSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %110)
          to label %112 unwind label %124

112:                                              ; preds = %107
  br i1 %111, label %118, label %113

113:                                              ; preds = %112
  %114 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %115 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %114) #4
  %116 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %115, i32 0, i32 2
  invoke void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %116)
          to label %117 unwind label %124

117:                                              ; preds = %113
  br label %118

118:                                              ; preds = %117, %112
  br label %119

119:                                              ; preds = %118, %106
  %120 = getelementptr inbounds %"class.ghc::filesystem::recursive_directory_iterator", ptr %11, i32 0, i32 0
  %121 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %120) #4
  %122 = getelementptr inbounds %"struct.ghc::filesystem::recursive_directory_iterator::recursive_directory_iterator_impl", ptr %121, i32 0, i32 1
  store i8 1, ptr %122, align 2, !tbaa !25
  br label %123

123:                                              ; preds = %119, %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret ptr %11

124:                                              ; preds = %113, %107, %98, %94, %79, %75, %63, %55, %50, %45, %19, %2
  %125 = landingpad { ptr, i32 }
          catch ptr null
  %126 = extractvalue { ptr, i32 } %125, 0
  call void @__clang_call_terminate(ptr %126) #5
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZN3ghc10filesystemanINS0_17directory_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_NS0_12copy_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valueES4_E4typeES4_S4_(i16 noundef zeroext, i16 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

declare void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr)

declare void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathENS0_17directory_optionsERSt10error_code(ptr, ptr, i16, ptr)

declare void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr)

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 = { noinline noreturn nounwind uwtable "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implE", !15, i64 0, !10, i64 2, !16, i64 8}
!15 = !{!"_ZTSN3ghc10filesystem17directory_optionsE", !7, i64 0}
!16 = !{!"_ZTSSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE", !17, i64 0}
!17 = !{!"_ZTSSt5dequeIN3ghc10filesystem18directory_iteratorESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt11_Deque_baseIN3ghc10filesystem18directory_iteratorESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseIN3ghc10filesystem18directory_iteratorESaIS2_EE11_Deque_implE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseIN3ghc10filesystem18directory_iteratorESaIS2_EE16_Deque_impl_dataE", !6, i64 0, !21, i64 8, !22, i64 16, !22, i64 48}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt15_Deque_iteratorIN3ghc10filesystem18directory_iteratorERS2_PS2_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!14, !10, i64 2}


; 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.ghc::filesystem::directory_iterator" = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem6detail18is_not_found_errorERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem15directory_entry4pathEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry10is_symlinkERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry12is_directoryERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK3ghc10filesystem28recursive_directory_iterator7optionsEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem28recursive_directory_iterator17recursion_pendingEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem28recursive_directory_iterator9incrementERSt10error_code(ptr noundef nonnull returned align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %4 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %5 = invoke noundef ptr @_ZNK3ghc10filesystem28recursive_directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %6 unwind label %.loopexit.split-lp

6:                                                ; preds = %2
  %7 = tail call noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry10is_symlinkERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  %8 = tail call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  br i1 %8, label %13, label %9

9:                                                ; preds = %6
  %10 = invoke noundef ptr @_ZNK3ghc10filesystem28recursive_directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %11 unwind label %.loopexit.split-lp

11:                                               ; preds = %9
  %12 = tail call noundef zeroext i1 @_ZNK3ghc10filesystem15directory_entry12is_directoryERSt10error_code(ptr noundef nonnull align 8 dereferenceable(72) %10, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  br label %13

13:                                               ; preds = %11, %6
  %.not18.not = phi i1 [ false, %6 ], [ %12, %11 ]
  br i1 %7, label %14, label %17

14:                                               ; preds = %13
  %15 = tail call noundef zeroext i1 @_ZN3ghc10filesystem6detail18is_not_found_errorERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %1)
  br i1 %15, label %16, label %17

16:                                               ; preds = %14
  tail call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  br label %17

17:                                               ; preds = %16, %14, %13
  %18 = tail call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  br i1 %18, label %63, label %19

19:                                               ; preds = %17
  %20 = tail call noundef zeroext i1 @_ZNK3ghc10filesystem28recursive_directory_iterator17recursion_pendingEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %brmerge.not = and i1 %.not18.not, %20
  br i1 %brmerge.not, label %21, label %34

21:                                               ; preds = %19
  br i1 %7, label %22, label %25

22:                                               ; preds = %21
  %23 = tail call noundef zeroext i16 @_ZNK3ghc10filesystem28recursive_directory_iterator7optionsEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %24 = tail call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_17directory_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_NS0_12copy_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valueES4_E4typeES4_S4_(i16 noundef zeroext %23, i16 noundef zeroext 1)
  %.not = icmp eq i16 %24, 0
  br i1 %.not, label %34, label %25

25:                                               ; preds = %22, %21
  %26 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %27 = invoke noundef ptr @_ZNK3ghc10filesystem28recursive_directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %28 unwind label %.loopexit.split-lp

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %26, i64 8
  %30 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem15directory_entry4pathEv(ptr noundef nonnull align 8 dereferenceable(72) %27) #4
  %31 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %32 = load i16, ptr %31, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathENS0_17directory_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(32) %30, i16 noundef zeroext %32, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  invoke void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(80) %29, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %33 unwind label %.loopexit.split-lp

33:                                               ; preds = %28
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br label %39

34:                                               ; preds = %19, %22
  %35 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %36)
  %38 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  br label %39

39:                                               ; preds = %34, %33
  %40 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  br i1 %40, label %54, label %.preheader

.preheader:                                       ; preds = %39, %47
  %41 = invoke noundef i32 @_ZNK3ghc10filesystem28recursive_directory_iterator5depthEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %42 unwind label %.loopexit

42:                                               ; preds = %.preheader
  %.not16.not = icmp eq i32 %41, 0
  br i1 %.not16.not, label %.critedge.thread, label %.critedge

.critedge:                                        ; preds = %42
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %44)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  %46 = call noundef zeroext i1 @_ZNK3ghc10filesystem18directory_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br i1 %46, label %47, label %.critedge.thread

47:                                               ; preds = %.critedge
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  call void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %49)
  %50 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %51)
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  br label %.preheader, !llvm.loop !19

54:                                               ; preds = %39
  %55 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = call noundef zeroext i1 @_ZNKSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %56)
  br i1 %57, label %.critedge.thread, label %58

58:                                               ; preds = %54
  %59 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  call void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %60)
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %42, %.critedge, %54, %58
  %61 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  %62 = getelementptr inbounds i8, ptr %61, i64 2
  store i8 1, ptr %62, align 2, !tbaa !21
  br label %63

63:                                               ; preds = %.critedge.thread, %17
  ret ptr %0

.loopexit:                                        ; preds = %.preheader
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %64

.loopexit.split-lp:                               ; preds = %2, %9, %25, %28
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %64

64:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  %65 = extractvalue { ptr, i32 } %lpad.phi, 0
  call void @__clang_call_terminate(ptr %65) #5
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZN3ghc10filesystemanINS0_17directory_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_NS0_12copy_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valueES4_E4typeES4_S4_(i16 noundef zeroext, i16 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

declare void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathENS0_17directory_optionsERSt10error_code(ptr, ptr, i16, ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr) local_unnamed_addr

attributes #0 = { mustprogress 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 = { noinline noreturn nounwind uwtable "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTSN3ghc10filesystem28recursive_directory_iterator33recursive_directory_iterator_implE", !7, i64 0, !10, i64 2, !11, i64 8}
!7 = !{!"_ZTSN3ghc10filesystem17directory_optionsE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSSt5stackIN3ghc10filesystem18directory_iteratorESt5dequeIS2_SaIS2_EEE", !12, i64 0}
!12 = !{!"_ZTSSt5dequeIN3ghc10filesystem18directory_iteratorESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt11_Deque_baseIN3ghc10filesystem18directory_iteratorESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt11_Deque_baseIN3ghc10filesystem18directory_iteratorESaIS2_EE11_Deque_implE", !15, i64 0}
!15 = !{!"_ZTSNSt11_Deque_baseIN3ghc10filesystem18directory_iteratorESaIS2_EE16_Deque_impl_dataE", !16, i64 0, !17, i64 8, !18, i64 16, !18, i64 48}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTSSt15_Deque_iteratorIN3ghc10filesystem18directory_iteratorERS2_PS2_E", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !10, i64 2}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass