; 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::path" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.ghc::filesystem::file_status" = type <{ i32, i16, [2 x i8] }>
%"class.std::error_code" = type { i32, ptr }
%"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 nounwind uwtable
declare dso_local { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6), ptr noundef nonnull align 4 dereferenceable(6)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3ghc10filesystem4path8filenameEv(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ghc10filesystemdvERKNS0_4pathES3_(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ghc10filesystem9canonicalERKNS0_4pathERSt10error_code(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem6statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::file_status") align 4, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem14symlink_statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::file_status") align 4, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem10is_symlinkENS0_11file_statusE(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3ghc10filesystem4copyERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i16 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::error_code", align 8
  %10 = alloca %"class.ghc::filesystem::file_status", align 4
  %11 = alloca %"class.ghc::filesystem::file_status", align 4
  %12 = alloca %"class.ghc::filesystem::file_status", align 4
  %13 = alloca %"class.ghc::filesystem::file_status", align 4
  %14 = alloca %"class.ghc::filesystem::file_status", align 4
  %15 = alloca %"class.std::error_code", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.ghc::filesystem::file_status", align 4
  %18 = alloca %"class.ghc::filesystem::file_status", align 4
  %19 = alloca %"class.ghc::filesystem::file_status", align 4
  %20 = alloca %"class.ghc::filesystem::file_status", align 4
  %21 = alloca i1, align 1
  %22 = alloca %"class.ghc::filesystem::file_status", align 4
  %23 = alloca i1, align 1
  %24 = alloca %"class.ghc::filesystem::file_status", align 4
  %25 = alloca i1, align 1
  %26 = alloca %"class.ghc::filesystem::file_status", align 4
  %27 = alloca i1, align 1
  %28 = alloca %"class.std::error_code", align 8
  %29 = alloca %"class.ghc::filesystem::file_status", align 4
  %30 = alloca %"class.ghc::filesystem::file_status", align 4
  %31 = alloca %"class.std::error_code", align 8
  %32 = alloca %"class.ghc::filesystem::file_status", align 4
  %33 = alloca %"class.ghc::filesystem::path", align 8
  %34 = alloca %"class.ghc::filesystem::file_status", align 4
  %35 = alloca %"class.ghc::filesystem::path", align 8
  %36 = alloca %"class.ghc::filesystem::path", align 8
  %37 = alloca %"class.ghc::filesystem::file_status", align 4
  %38 = alloca %"class.std::error_code", align 8
  %39 = alloca %"class.ghc::filesystem::file_status", align 4
  %40 = alloca %"class.ghc::filesystem::file_status", align 4
  %41 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %42 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %43 = alloca %"class.ghc::filesystem::path", align 8
  %44 = alloca %"class.ghc::filesystem::path", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i16 %2, ptr %7, align 2, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @_ZN3ghc10filesystem11file_statusC1Ev(ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @_ZN3ghc10filesystem11file_statusC1Ev(ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %45) #5
  %46 = load i16, ptr %7, align 2, !tbaa !9
  %47 = invoke noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext 32, i16 noundef zeroext 16)
          to label %48 unwind label %294

48:                                               ; preds = %4
  %49 = invoke noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %47, i16 noundef zeroext 128)
          to label %50 unwind label %294

50:                                               ; preds = %48
  %51 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %46, i16 noundef zeroext %49)
          to label %52 unwind label %294

52:                                               ; preds = %50
  %53 = icmp ne i16 %51, 0
  br i1 %53, label %54, label %58

54:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem14symlink_statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::file_status") align 4 %12, ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef nonnull align 8 dereferenceable(16) %56) #5
  %57 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %10, ptr noundef nonnull align 4 dereferenceable(6) %12) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %62

58:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem6statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::file_status") align 4 %13, ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef nonnull align 8 dereferenceable(16) %60) #5
  %61 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %10, ptr noundef nonnull align 4 dereferenceable(6) %13) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %62

62:                                               ; preds = %58, %54
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %14, ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  %63 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef %14) #5
  %64 = xor i1 %63, true
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %14) #5
  br i1 %64, label %65, label %76

65:                                               ; preds = %62
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %66) #5
  br i1 %67, label %75, label %68

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %69 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 2)
  %70 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 0
  %71 = extractvalue { i32, ptr } %69, 0
  store i32 %71, ptr %70, align 8
  %72 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 1
  %73 = extractvalue { i32, ptr } %69, 1
  store ptr %73, ptr %72, align 8
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %74, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %75

75:                                               ; preds = %68, %65
  store i32 1, ptr %16, align 4
  br label %293

76:                                               ; preds = %62
  %77 = load i16, ptr %7, align 2, !tbaa !9
  %78 = invoke noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext 32, i16 noundef zeroext 128)
          to label %79 unwind label %294

79:                                               ; preds = %76
  %80 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %77, i16 noundef zeroext %78)
          to label %81 unwind label %294

81:                                               ; preds = %79
  %82 = icmp ne i16 %80, 0
  br i1 %82, label %83, label %86

83:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem14symlink_statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::file_status") align 4 %17, ptr noundef nonnull align 8 dereferenceable(32) %84, ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  %85 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %11, ptr noundef nonnull align 4 dereferenceable(6) %17) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %89

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem6statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::file_status") align 4 %18, ptr noundef nonnull align 8 dereferenceable(32) %87, ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  %88 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %11, ptr noundef nonnull align 4 dereferenceable(6) %18) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %89

89:                                               ; preds = %86, %83
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %19, ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  %90 = call noundef zeroext i1 @_ZN3ghc10filesystem8is_otherENS0_11file_statusE(ptr noundef %19) #5
  store i1 false, ptr %21, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %25, align 1
  store i1 false, ptr %27, align 1
  br i1 %90, label %106, label %91

91:                                               ; preds = %89
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %20, ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  store i1 true, ptr %21, align 1
  %92 = call noundef zeroext i1 @_ZN3ghc10filesystem8is_otherENS0_11file_statusE(ptr noundef %20) #5
  br i1 %92, label %106, label %93

93:                                               ; preds = %91
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %22, ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  store i1 true, ptr %23, align 1
  %94 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef %22) #5
  br i1 %94, label %95, label %97

95:                                               ; preds = %93
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %24, ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  store i1 true, ptr %25, align 1
  %96 = call noundef zeroext i1 @_ZN3ghc10filesystem15is_regular_fileENS0_11file_statusE(ptr noundef %24) #5
  br i1 %96, label %106, label %97

97:                                               ; preds = %95, %93
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %26, ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  store i1 true, ptr %27, align 1
  %98 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef %26) #5
  br i1 %98, label %99, label %104

99:                                               ; preds = %97
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = call noundef zeroext i1 @_ZN3ghc10filesystem10equivalentERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %100, ptr noundef nonnull align 8 dereferenceable(32) %101, ptr noundef nonnull align 8 dereferenceable(16) %102) #5
  br label %104

104:                                              ; preds = %99, %97
  %105 = phi i1 [ false, %97 ], [ %103, %99 ]
  br label %106

106:                                              ; preds = %104, %95, %91, %89
  %107 = phi i1 [ true, %95 ], [ true, %91 ], [ true, %89 ], [ %105, %104 ]
  %108 = load i1, ptr %27, align 1
  br i1 %108, label %109, label %110

109:                                              ; preds = %106
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %26) #5
  br label %110

110:                                              ; preds = %109, %106
  %111 = load i1, ptr %25, align 1
  br i1 %111, label %112, label %113

112:                                              ; preds = %110
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %24) #5
  br label %113

113:                                              ; preds = %112, %110
  %114 = load i1, ptr %23, align 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %113
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %22) #5
  br label %116

116:                                              ; preds = %115, %113
  %117 = load i1, ptr %21, align 1
  br i1 %117, label %118, label %119

118:                                              ; preds = %116
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %20) #5
  br label %119

119:                                              ; preds = %118, %116
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %19) #5
  br i1 %107, label %120, label %127

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  %121 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 5)
  %122 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 0
  %123 = extractvalue { i32, ptr } %121, 0
  store i32 %123, ptr %122, align 8
  %124 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 1
  %125 = extractvalue { i32, ptr } %121, 1
  store ptr %125, ptr %124, align 8
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %126, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  br label %292

127:                                              ; preds = %119
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %29, ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  %128 = call noundef zeroext i1 @_ZN3ghc10filesystem10is_symlinkENS0_11file_statusE(ptr noundef %29) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %29) #5
  br i1 %128, label %129, label %156

129:                                              ; preds = %127
  %130 = load i16, ptr %7, align 2, !tbaa !9
  %131 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %130, i16 noundef zeroext 32)
          to label %132 unwind label %294

132:                                              ; preds = %129
  %133 = icmp eq i16 %131, 0
  br i1 %133, label %134, label %155

134:                                              ; preds = %132
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %30, ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  %135 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef %30) #5
  br i1 %135, label %141, label %136

136:                                              ; preds = %134
  %137 = load i16, ptr %7, align 2, !tbaa !9
  %138 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %137, i16 noundef zeroext 16)
          to label %139 unwind label %294

139:                                              ; preds = %136
  %140 = icmp ne i16 %138, 0
  br label %141

141:                                              ; preds = %139, %134
  %142 = phi i1 [ false, %134 ], [ %140, %139 ]
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %30) #5
  br i1 %142, label %143, label %147

143:                                              ; preds = %141
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem12copy_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %144, ptr noundef nonnull align 8 dereferenceable(32) %145, ptr noundef nonnull align 8 dereferenceable(16) %146) #5
  br label %154

147:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  %148 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 5)
  %149 = getelementptr inbounds { i32, ptr }, ptr %31, i32 0, i32 0
  %150 = extractvalue { i32, ptr } %148, 0
  store i32 %150, ptr %149, align 8
  %151 = getelementptr inbounds { i32, ptr }, ptr %31, i32 0, i32 1
  %152 = extractvalue { i32, ptr } %148, 1
  store ptr %152, ptr %151, align 8
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %153, ptr align 8 %31, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  br label %154

154:                                              ; preds = %147, %143
  br label %155

155:                                              ; preds = %154, %132
  br label %291

156:                                              ; preds = %127
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %32, ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  %157 = call noundef zeroext i1 @_ZN3ghc10filesystem15is_regular_fileENS0_11file_statusE(ptr noundef %32) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %32) #5
  br i1 %157, label %158, label %211

158:                                              ; preds = %156
  %159 = load i16, ptr %7, align 2, !tbaa !9
  %160 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %159, i16 noundef zeroext 64)
          to label %161 unwind label %294

161:                                              ; preds = %158
  %162 = icmp eq i16 %160, 0
  br i1 %162, label %163, label %210

163:                                              ; preds = %161
  %164 = load i16, ptr %7, align 2, !tbaa !9
  %165 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %164, i16 noundef zeroext 128)
          to label %166 unwind label %294

166:                                              ; preds = %163
  %167 = icmp ne i16 %165, 0
  br i1 %167, label %168, label %181

168:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #5
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32) %169)
  br i1 %170, label %171, label %174

171:                                              ; preds = %168
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3ghc10filesystem4pathC1ERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) %172)
          to label %173 unwind label %294

173:                                              ; preds = %171
  br label %178

174:                                              ; preds = %168
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3ghc10filesystem9canonicalERKNS0_4pathERSt10error_code(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %33, ptr noundef nonnull align 8 dereferenceable(32) %175, ptr noundef nonnull align 8 dereferenceable(16) %176)
          to label %177 unwind label %294

177:                                              ; preds = %174
  br label %178

178:                                              ; preds = %177, %173
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem14create_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) %179, ptr noundef nonnull align 8 dereferenceable(16) %180) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #5
  br label %209

181:                                              ; preds = %166
  %182 = load i16, ptr %7, align 2, !tbaa !9
  %183 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %182, i16 noundef zeroext 256)
          to label %184 unwind label %294

184:                                              ; preds = %181
  %185 = icmp ne i16 %183, 0
  br i1 %185, label %186, label %190

186:                                              ; preds = %184
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem16create_hard_linkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %187, ptr noundef nonnull align 8 dereferenceable(32) %188, ptr noundef nonnull align 8 dereferenceable(16) %189) #5
  br label %208

190:                                              ; preds = %184
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %34, ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  %191 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef %34) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %34) #5
  br i1 %191, label %192, label %201

192:                                              ; preds = %190
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #5
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #5
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK3ghc10filesystem4path8filenameEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %36, ptr noundef nonnull align 8 dereferenceable(32) %195)
          to label %196 unwind label %294

196:                                              ; preds = %192
  invoke void @_ZN3ghc10filesystemdvERKNS0_4pathES3_(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %35, ptr noundef nonnull align 8 dereferenceable(32) %194, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %197 unwind label %294

197:                                              ; preds = %196
  %198 = load i16, ptr %7, align 2, !tbaa !9
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = call noundef zeroext i1 @_ZN3ghc10filesystem9copy_fileERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %193, ptr noundef nonnull align 8 dereferenceable(32) %35, i16 noundef zeroext %198, ptr noundef nonnull align 8 dereferenceable(16) %199) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #5
  br label %207

201:                                              ; preds = %190
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = load i16, ptr %7, align 2, !tbaa !9
  %205 = load ptr, ptr %8, align 8, !tbaa !5
  %206 = call noundef zeroext i1 @_ZN3ghc10filesystem9copy_fileERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %202, ptr noundef nonnull align 8 dereferenceable(32) %203, i16 noundef zeroext %204, ptr noundef nonnull align 8 dereferenceable(16) %205) #5
  br label %207

207:                                              ; preds = %201, %197
  br label %208

208:                                              ; preds = %207, %186
  br label %209

209:                                              ; preds = %208, %178
  br label %210

210:                                              ; preds = %209, %161
  br label %290

211:                                              ; preds = %156
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %37, ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  %212 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef %37) #5
  br i1 %212, label %213, label %218

213:                                              ; preds = %211
  %214 = load i16, ptr %7, align 2, !tbaa !9
  %215 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %214, i16 noundef zeroext 128)
          to label %216 unwind label %294

216:                                              ; preds = %213
  %217 = icmp ne i16 %215, 0
  br label %218

218:                                              ; preds = %216, %211
  %219 = phi i1 [ false, %211 ], [ %217, %216 ]
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %37) #5
  br i1 %219, label %220, label %227

220:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #5
  %221 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 6)
  %222 = getelementptr inbounds { i32, ptr }, ptr %38, i32 0, i32 0
  %223 = extractvalue { i32, ptr } %221, 0
  store i32 %223, ptr %222, align 8
  %224 = getelementptr inbounds { i32, ptr }, ptr %38, i32 0, i32 1
  %225 = extractvalue { i32, ptr } %221, 1
  store ptr %225, ptr %224, align 8
  %226 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %226, ptr align 8 %38, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #5
  br label %289

227:                                              ; preds = %218
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %39, ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  %228 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef %39) #5
  br i1 %228, label %229, label %239

229:                                              ; preds = %227
  %230 = load i16, ptr %7, align 2, !tbaa !9
  %231 = icmp eq i16 %230, 0
  br i1 %231, label %237, label %232

232:                                              ; preds = %229
  %233 = load i16, ptr %7, align 2, !tbaa !9
  %234 = invoke noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %233, i16 noundef zeroext 8)
          to label %235 unwind label %294

235:                                              ; preds = %232
  %236 = icmp ne i16 %234, 0
  br label %237

237:                                              ; preds = %235, %229
  %238 = phi i1 [ true, %229 ], [ %236, %235 ]
  br label %239

239:                                              ; preds = %237, %227
  %240 = phi i1 [ false, %227 ], [ %238, %237 ]
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %39) #5
  br i1 %240, label %241, label %288

241:                                              ; preds = %239
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %40, ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  %242 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef %40) #5
  %243 = xor i1 %242, true
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %40) #5
  br i1 %243, label %244, label %253

244:                                              ; preds = %241
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = load ptr, ptr %5, align 8, !tbaa !5
  %247 = load ptr, ptr %8, align 8, !tbaa !5
  %248 = call noundef zeroext i1 @_ZN3ghc10filesystem16create_directoryERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %245, ptr noundef nonnull align 8 dereferenceable(32) %246, ptr noundef nonnull align 8 dereferenceable(16) %247) #5
  %249 = load ptr, ptr %8, align 8, !tbaa !5
  %250 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %249) #5
  br i1 %250, label %251, label %252

251:                                              ; preds = %244
  store i32 1, ptr %16, align 4
  br label %293

252:                                              ; preds = %244
  br label %253

253:                                              ; preds = %252, %241
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #5
  %254 = load ptr, ptr %5, align 8, !tbaa !5
  %255 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(32) %254, ptr noundef nonnull align 8 dereferenceable(16) %255) #5
  br label %256

256:                                              ; preds = %282, %253
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #5
  call void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #5
  %257 = invoke noundef zeroext i1 @_ZNK3ghc10filesystem18directory_iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %42)
          to label %258 unwind label %294

258:                                              ; preds = %256
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #5
  br i1 %257, label %260, label %259

259:                                              ; preds = %258
  store i32 2, ptr %16, align 4
  br label %285

260:                                              ; preds = %258
  %261 = load ptr, ptr %8, align 8, !tbaa !5
  %262 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %261) #5
  br i1 %262, label %277, label %263

263:                                              ; preds = %260
  %264 = invoke noundef ptr @_ZNK3ghc10filesystem18directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %265 unwind label %294

265:                                              ; preds = %263
  %266 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem15directory_entry4pathEv(ptr noundef nonnull align 8 dereferenceable(72) %264) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %43) #5
  %267 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %44) #5
  %268 = invoke noundef ptr @_ZNK3ghc10filesystem18directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %269 unwind label %294

269:                                              ; preds = %265
  %270 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem15directory_entry4pathEv(ptr noundef nonnull align 8 dereferenceable(72) %268) #5
  invoke void @_ZNK3ghc10filesystem4path8filenameEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %44, ptr noundef nonnull align 8 dereferenceable(32) %270)
          to label %271 unwind label %294

271:                                              ; preds = %269
  invoke void @_ZN3ghc10filesystemdvERKNS0_4pathES3_(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %43, ptr noundef nonnull align 8 dereferenceable(32) %267, ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %272 unwind label %294

272:                                              ; preds = %271
  %273 = load i16, ptr %7, align 2, !tbaa !9
  %274 = invoke noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %273, i16 noundef zeroext -32768)
          to label %275 unwind label %294

275:                                              ; preds = %272
  %276 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3ghc10filesystem4copyERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %266, ptr noundef nonnull align 8 dereferenceable(32) %43, i16 noundef zeroext %274, ptr noundef nonnull align 8 dereferenceable(16) %276) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #5
  br label %277

277:                                              ; preds = %275, %260
  %278 = load ptr, ptr %8, align 8, !tbaa !5
  %279 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %278) #5
  br i1 %279, label %280, label %281

280:                                              ; preds = %277
  store i32 1, ptr %16, align 4
  br label %285

281:                                              ; preds = %277
  br label %282

282:                                              ; preds = %281
  %283 = load ptr, ptr %8, align 8, !tbaa !5
  %284 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %283) #5
  br label %256, !llvm.loop !14

285:                                              ; preds = %280, %259
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  %286 = load i32, ptr %16, align 4
  switch i32 %286, label %293 [
    i32 2, label %287
  ]

287:                                              ; preds = %285
  br label %288

288:                                              ; preds = %287, %239
  br label %289

289:                                              ; preds = %288, %220
  br label %290

290:                                              ; preds = %289, %210
  br label %291

291:                                              ; preds = %290, %155
  br label %292

292:                                              ; preds = %291, %120
  store i32 1, ptr %16, align 4
  br label %293

293:                                              ; preds = %292, %285, %251, %75
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  ret void

294:                                              ; preds = %272, %271, %269, %265, %263, %256, %232, %213, %196, %192, %181, %174, %171, %163, %158, %136, %129, %79, %76, %50, %48, %4
  %295 = landingpad { ptr, i32 }
          catch ptr null
  %296 = extractvalue { ptr, i32 } %295, 0
  call void @__clang_call_terminate(ptr %296) #6
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem8is_otherENS0_11file_statusE(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem15is_regular_fileENS0_11file_statusE(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem10equivalentERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem12copy_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem14create_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem16create_hard_linkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem9copy_fileERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i16 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem16create_directoryERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3ghc10filesystem18directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 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)) #0 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)) #0 align 2

declare void @_ZN3ghc10filesystem4pathC1ERKS1_(ptr, ptr)

declare void @_ZN3ghc10filesystem4pathD1Ev(ptr)

declare void @_ZN3ghc10filesystem11file_statusC1Ev(ptr)

declare void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr, ptr)

declare void @_ZN3ghc10filesystem11file_statusD1Ev(ptr)

declare void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr)

declare void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathERSt10error_code(ptr, ptr, ptr)

declare void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr)

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!"_ZTSN3ghc10filesystem12copy_optionsE", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 8, i64 8, !5}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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::path" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.ghc::filesystem::file_status" = type <{ i32, i16, [2 x i8] }>
%"class.std::error_code" = type { i32, ptr }
%"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 nounwind uwtable
declare dso_local { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 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 nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6), ptr noundef nonnull align 4 dereferenceable(6)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3ghc10filesystem4path8filenameEv(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ghc10filesystemdvERKNS0_4pathES3_(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ghc10filesystem9canonicalERKNS0_4pathERSt10error_code(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem6statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::file_status") align 4, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem14symlink_statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::file_status") align 4, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem10is_symlinkENS0_11file_statusE(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3ghc10filesystem4copyERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i16 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(16) %3) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::error_code", align 8
  %6 = alloca %"class.ghc::filesystem::file_status", align 4
  %7 = alloca %"class.ghc::filesystem::file_status", align 4
  %8 = alloca %"class.ghc::filesystem::file_status", align 4
  %9 = alloca %"class.ghc::filesystem::file_status", align 4
  %10 = alloca %"class.ghc::filesystem::file_status", align 4
  %11 = alloca %"class.ghc::filesystem::file_status", align 4
  %12 = alloca %"class.ghc::filesystem::file_status", align 4
  %13 = alloca %"class.ghc::filesystem::file_status", align 4
  %14 = alloca %"class.ghc::filesystem::file_status", align 4
  %15 = alloca %"class.ghc::filesystem::file_status", align 4
  %16 = alloca %"class.ghc::filesystem::file_status", align 4
  %17 = alloca %"class.ghc::filesystem::file_status", align 4
  %18 = alloca %"class.ghc::filesystem::file_status", align 4
  %19 = alloca %"class.ghc::filesystem::file_status", align 4
  %20 = alloca %"class.ghc::filesystem::file_status", align 4
  %21 = alloca %"class.ghc::filesystem::path", align 8
  %22 = alloca %"class.ghc::filesystem::file_status", align 4
  %23 = alloca %"class.ghc::filesystem::path", align 8
  %24 = alloca %"class.ghc::filesystem::path", align 8
  %25 = alloca %"class.ghc::filesystem::file_status", align 4
  %26 = alloca %"class.ghc::filesystem::file_status", align 4
  %27 = alloca %"class.ghc::filesystem::file_status", align 4
  %28 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %29 = alloca %"class.ghc::filesystem::directory_iterator", align 8
  %30 = alloca %"class.ghc::filesystem::path", align 8
  %31 = alloca %"class.ghc::filesystem::path", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN3ghc10filesystem11file_statusC1Ev(ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN3ghc10filesystem11file_statusC1Ev(ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  %32 = call noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext 32, i16 noundef zeroext 16)
  %33 = call noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %32, i16 noundef zeroext 128)
  %34 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext %33)
  %.not = icmp eq i16 %34, 0
  br i1 %.not, label %37, label %35

35:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @_ZN3ghc10filesystem14symlink_statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::file_status") align 4 %8, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  %36 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %6, ptr noundef nonnull align 4 dereferenceable(6) %8) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %39

37:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @_ZN3ghc10filesystem6statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::file_status") align 4 %9, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  %38 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %6, ptr noundef nonnull align 4 dereferenceable(6) %9) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %39

39:                                               ; preds = %37, %35
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %10, ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  %40 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef nonnull %10) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %10) #4
  br i1 %40, label %47, label %41

41:                                               ; preds = %39
  %42 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br i1 %42, label %146, label %43

43:                                               ; preds = %41
  %44 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 2)
  %45 = extractvalue { i32, ptr } %44, 0
  %46 = extractvalue { i32, ptr } %44, 1
  store i32 %45, ptr %3, align 8, !tbaa !5
  %.sroa.419.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %46, ptr %.sroa.419.0..sroa_idx, align 8, !tbaa !9
  br label %146

47:                                               ; preds = %39
  %48 = call noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext 32, i16 noundef zeroext 128)
  %49 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext %48)
  %.not83 = icmp eq i16 %49, 0
  br i1 %.not83, label %52, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @_ZN3ghc10filesystem14symlink_statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::file_status") align 4 %11, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  %51 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %7, ptr noundef nonnull align 4 dereferenceable(6) %11) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br label %54

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @_ZN3ghc10filesystem6statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::file_status") align 4 %12, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  %53 = call noundef nonnull align 4 dereferenceable(6) ptr @_ZN3ghc10filesystem11file_statusaSEOS1_(ptr noundef nonnull align 4 dereferenceable(6) %7, ptr noundef nonnull align 4 dereferenceable(6) %12) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  br label %54

54:                                               ; preds = %52, %50
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %13, ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  %55 = call noundef zeroext i1 @_ZN3ghc10filesystem8is_otherENS0_11file_statusE(ptr noundef nonnull %13) #4
  br i1 %55, label %.sink.split, label %56

56:                                               ; preds = %54
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %14, ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  %57 = call noundef zeroext i1 @_ZN3ghc10filesystem8is_otherENS0_11file_statusE(ptr noundef nonnull %14) #4
  br i1 %57, label %.critedge107, label %58

58:                                               ; preds = %56
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %15, ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  %59 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef nonnull %15) #4
  br i1 %59, label %60, label %62

60:                                               ; preds = %58
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %16, ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  %61 = call noundef zeroext i1 @_ZN3ghc10filesystem15is_regular_fileENS0_11file_statusE(ptr noundef nonnull %16) #4
  br i1 %61, label %.thread, label %62

62:                                               ; preds = %60, %58
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %17, ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  %63 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef nonnull %17) #4
  br i1 %63, label %64, label %66

64:                                               ; preds = %62
  %65 = call noundef zeroext i1 @_ZN3ghc10filesystem10equivalentERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %17) #4
  br i1 %59, label %.thread, label %.thread99

66:                                               ; preds = %62
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %17) #4
  br i1 %59, label %.thread, label %.critedge108

.thread:                                          ; preds = %60, %64, %66
  %67 = phi i1 [ false, %66 ], [ %65, %64 ], [ true, %60 ]
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %16) #4
  br label %.thread99

.thread99:                                        ; preds = %64, %.thread
  %68 = phi i1 [ %67, %.thread ], [ %65, %64 ]
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %15) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %14) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %13) #4
  br i1 %68, label %69, label %73

.critedge107:                                     ; preds = %56
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %14) #4
  br label %.sink.split

.sink.split:                                      ; preds = %54, %.critedge107
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %13) #4
  br label %69

69:                                               ; preds = %.sink.split, %.thread99
  %70 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 5)
  %71 = extractvalue { i32, ptr } %70, 0
  %72 = extractvalue { i32, ptr } %70, 1
  store i32 %71, ptr %3, align 8, !tbaa !5
  %.sroa.413.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %72, ptr %.sroa.413.0..sroa_idx, align 8, !tbaa !9
  br label %146

.critedge108:                                     ; preds = %66
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %15) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %14) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %13) #4
  br label %73

73:                                               ; preds = %.critedge108, %.thread99
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %18, ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  %74 = call noundef zeroext i1 @_ZN3ghc10filesystem10is_symlinkENS0_11file_statusE(ptr noundef nonnull %18) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %18) #4
  br i1 %74, label %75, label %87

75:                                               ; preds = %73
  %76 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext 32)
  %77 = icmp eq i16 %76, 0
  br i1 %77, label %78, label %146

78:                                               ; preds = %75
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %19, ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  %79 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef nonnull %19) #4
  br i1 %79, label %.critedge, label %80

80:                                               ; preds = %78
  %81 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext 16)
  %.not88 = icmp eq i16 %81, 0
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %19) #4
  br i1 %.not88, label %83, label %82

82:                                               ; preds = %80
  call void @_ZN3ghc10filesystem12copy_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br label %146

.critedge:                                        ; preds = %78
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %19) #4
  br label %83

83:                                               ; preds = %.critedge, %80
  %84 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 5)
  %85 = extractvalue { i32, ptr } %84, 0
  %86 = extractvalue { i32, ptr } %84, 1
  store i32 %85, ptr %3, align 8, !tbaa !5
  %.sroa.410.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %86, ptr %.sroa.410.0..sroa_idx, align 8, !tbaa !9
  br label %146

87:                                               ; preds = %73
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %20, ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  %88 = call noundef zeroext i1 @_ZN3ghc10filesystem15is_regular_fileENS0_11file_statusE(ptr noundef nonnull %20) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %20) #4
  br i1 %88, label %89, label %110

89:                                               ; preds = %87
  %90 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext 64)
  %91 = icmp eq i16 %90, 0
  br i1 %91, label %92, label %146

92:                                               ; preds = %89
  %93 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext 128)
  %.not86 = icmp eq i16 %93, 0
  br i1 %.not86, label %99, label %94

94:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #4
  %95 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br i1 %95, label %96, label %97

96:                                               ; preds = %94
  invoke void @_ZN3ghc10filesystem4pathC1ERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %98 unwind label %.loopexit.split-lp

97:                                               ; preds = %94
  invoke void @_ZN3ghc10filesystem9canonicalERKNS0_4pathERSt10error_code(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %21, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %98 unwind label %.loopexit.split-lp

98:                                               ; preds = %97, %96
  call void @_ZN3ghc10filesystem14create_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #4
  br label %146

99:                                               ; preds = %92
  %100 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext 256)
  %.not87 = icmp eq i16 %100, 0
  br i1 %.not87, label %102, label %101

101:                                              ; preds = %99
  call void @_ZN3ghc10filesystem16create_hard_linkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br label %146

102:                                              ; preds = %99
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %22, ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  %103 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef nonnull %22) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %22) #4
  br i1 %103, label %104, label %108

104:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %23) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #4
  invoke void @_ZNK3ghc10filesystem4path8filenameEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %24, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %105 unwind label %.loopexit.split-lp

105:                                              ; preds = %104
  invoke void @_ZN3ghc10filesystemdvERKNS0_4pathES3_(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %23, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %106 unwind label %.loopexit.split-lp

106:                                              ; preds = %105
  %107 = call noundef zeroext i1 @_ZN3ghc10filesystem9copy_fileERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %23, i16 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #4
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #4
  br label %146

108:                                              ; preds = %102
  %109 = call noundef zeroext i1 @_ZN3ghc10filesystem9copy_fileERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i16 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br label %146

110:                                              ; preds = %87
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %25, ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  %111 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef nonnull %25) #4
  br i1 %111, label %112, label %.critedge2

112:                                              ; preds = %110
  %113 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext 128)
  %.not84 = icmp eq i16 %113, 0
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %25) #4
  br i1 %.not84, label %118, label %114

114:                                              ; preds = %112
  %115 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 6)
  %116 = extractvalue { i32, ptr } %115, 0
  %117 = extractvalue { i32, ptr } %115, 1
  store i32 %116, ptr %3, align 8, !tbaa !5
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %117, ptr %.sroa.47.0..sroa_idx, align 8, !tbaa !9
  br label %146

.critedge2:                                       ; preds = %110
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %25) #4
  br label %118

118:                                              ; preds = %.critedge2, %112
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %26, ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  %119 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef nonnull %26) #4
  br i1 %119, label %120, label %.critedge4

120:                                              ; preds = %118
  %121 = icmp eq i16 %2, 0
  br i1 %121, label %.critedge6, label %122

122:                                              ; preds = %120
  %123 = call noundef zeroext i16 @_ZN3ghc10filesystemanINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext 8)
  %.not85 = icmp eq i16 %123, 0
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %26) #4
  br i1 %.not85, label %146, label %124

.critedge6:                                       ; preds = %120
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %26) #4
  br label %124

124:                                              ; preds = %.critedge6, %122
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %27, ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  %125 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef nonnull %27) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %27) #4
  br i1 %125, label %129, label %126

126:                                              ; preds = %124
  %127 = call noundef zeroext i1 @_ZN3ghc10filesystem16create_directoryERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  %128 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br i1 %128, label %146, label %129

129:                                              ; preds = %126, %124
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #4
  call void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #4
  call void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #4
  %130 = call noundef zeroext i1 @_ZNK3ghc10filesystem18directory_iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %29)
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #4
  br i1 %130, label %.lr.ph, label %.critedge90

.lr.ph:                                           ; preds = %129, %142
  %131 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br i1 %131, label %140, label %132

132:                                              ; preds = %.lr.ph
  %133 = call noundef ptr @_ZNK3ghc10filesystem18directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %28)
  %134 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem15directory_entry4pathEv(ptr noundef nonnull align 8 dereferenceable(72) %133) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %30) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %31) #4
  %135 = call noundef ptr @_ZNK3ghc10filesystem18directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16) %28)
  %136 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem15directory_entry4pathEv(ptr noundef nonnull align 8 dereferenceable(72) %135) #4
  invoke void @_ZNK3ghc10filesystem4path8filenameEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %31, ptr noundef nonnull align 8 dereferenceable(32) %136)
          to label %137 unwind label %.loopexit

137:                                              ; preds = %132
  invoke void @_ZN3ghc10filesystemdvERKNS0_4pathES3_(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %30, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %138 unwind label %.loopexit

138:                                              ; preds = %137
  %139 = call noundef zeroext i16 @_ZN3ghc10filesystemorINS0_12copy_optionsEEENSt9enable_ifIXoooooosr3std7is_sameIT_NS0_5permsEEE5valuesr3std7is_sameIS4_NS0_12perm_optionsEEE5valuesr3std7is_sameIS4_S2_EE5valuesr3std7is_sameIS4_NS0_17directory_optionsEEE5valueES4_E4typeES4_S4_(i16 noundef zeroext %2, i16 noundef zeroext -32768)
  call void @_ZN3ghc10filesystem4copyERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %134, ptr noundef nonnull align 8 dereferenceable(32) %30, i16 noundef zeroext %139, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #4
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #4
  br label %140

140:                                              ; preds = %138, %.lr.ph
  %141 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  br i1 %141, label %145, label %142

142:                                              ; preds = %140
  %143 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ghc10filesystem18directory_iterator9incrementERSt10error_code(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #4
  call void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #4
  %144 = call noundef zeroext i1 @_ZNK3ghc10filesystem18directory_iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %29)
  call void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #4
  br i1 %144, label %.lr.ph, label %.critedge90, !llvm.loop !11

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

.critedge4:                                       ; preds = %118
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %26) #4
  br label %146

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

146:                                              ; preds = %145, %69, %98, %106, %108, %101, %89, %122, %.critedge4, %114, %75, %83, %82, %.critedge90, %126, %41, %43
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  ret void

.loopexit:                                        ; preds = %132, %137
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %147

.loopexit.split-lp:                               ; preds = %96, %97, %104, %105
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %147

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem8is_otherENS0_11file_statusE(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem15is_regular_fileENS0_11file_statusE(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem12copy_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem14create_symlinkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ghc10filesystem16create_hard_linkERKNS0_4pathES3_RSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3ghc10filesystem9copy_fileERKNS0_4pathES3_NS0_12copy_optionsERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i16 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3ghc10filesystem18directory_iteratorptEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 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 #0 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 #0 align 2

declare void @_ZN3ghc10filesystem4pathC1ERKS1_(ptr, ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem4pathD1Ev(ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem11file_statusC1Ev(ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr, ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem11file_statusD1Ev(ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem18directory_iteratorC1Ev(ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem18directory_iteratorC1ERKNS0_4pathERSt10error_code(ptr, ptr, ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem18directory_iteratorD1Ev(ptr) local_unnamed_addr

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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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