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

; 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::iterator" = type { %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.ghc::filesystem::path" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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 }

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; 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 i32 @_ZNK3ghc10filesystem11file_status4typeEv(ptr noundef nonnull align 4 dereferenceable(6)) #0 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3ghc10filesystem4pathcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathdVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #6 align 2

; 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 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 noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_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 @_ZN3ghc10filesystem12is_directoryERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN3ghc10filesystem18create_directoriesERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.ghc::filesystem::path", align 8
  %7 = alloca i8, align 1
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.ghc::filesystem::path", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %14 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::error_code", align 8
  %18 = alloca %"class.ghc::filesystem::file_status", align 4
  %19 = alloca %"class.ghc::filesystem::file_status", align 4
  %20 = alloca %"class.std::error_code", align 8
  %21 = alloca %"class.ghc::filesystem::file_status", align 4
  %22 = alloca %"class.std::error_code", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  call void @_ZN3ghc10filesystem4pathC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  store i8 0, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call noundef i64 @_ZNK3ghc10filesystem4path16root_name_lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  %27 = add i64 0, %26
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path18has_root_directoryEv(ptr noundef nonnull align 8 dereferenceable(32) %28)
  %30 = zext i1 %29 to i64
  %31 = select i1 %29, i32 1, i32 0
  %32 = sext i32 %31 to i64
  %33 = add i64 %27, %32
  store i64 %33, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path6nativeB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  %36 = load i64, ptr %8, align 8, !tbaa !11
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %35, i64 noundef 0, i64 noundef %36)
          to label %37 unwind label %109

37:                                               ; preds = %2
  %38 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathaSEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %39 unwind label %109

39:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %40, i32 0, i32 0
  %42 = load i64, ptr %8, align 8, !tbaa !11
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %41, i64 noundef %42, i64 noundef -1)
          to label %43 unwind label %109

43:                                               ; preds = %39
  invoke void @_ZN3ghc10filesystem4pathC1EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 2)
          to label %44 unwind label %109

44:                                               ; preds = %43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr %10, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %13) #7
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZNK3ghc10filesystem4path5beginEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path::iterator") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %45)
          to label %46 unwind label %109

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 72, ptr %14) #7
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZNK3ghc10filesystem4path3endEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path::iterator") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %47)
          to label %48 unwind label %109

48:                                               ; preds = %46
  br label %49

49:                                               ; preds = %101, %48
  %50 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path8iteratorneERKS2_(ptr noundef nonnull align 8 dereferenceable(72) %13, ptr noundef nonnull align 8 dereferenceable(72) %14)
  br i1 %50, label %52, label %51

51:                                               ; preds = %49
  store i32 2, ptr %15, align 4
  br label %102

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  %53 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(72) %13)
  invoke void @_ZNK3ghc10filesystem4pathcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %53)
          to label %54 unwind label %109

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathdVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %56 unwind label %109

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  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) %6, ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  %57 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br i1 %57, label %58, label %63

58:                                               ; preds = %56
  %59 = call noundef i32 @_ZNK3ghc10filesystem11file_status4typeEv(ptr noundef nonnull align 4 dereferenceable(6) %18) #7
  %60 = icmp ne i32 %59, 1
  br i1 %60, label %61, label %63

61:                                               ; preds = %58
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !13
  store i1 false, ptr %3, align 1
  store i32 1, ptr %15, align 4
  br label %93

63:                                               ; preds = %58, %56
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %19, ptr noundef nonnull align 4 dereferenceable(6) %18) #7
  %64 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef %19) #7
  %65 = xor i1 %64, true
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %19) #7
  br i1 %65, label %66, label %81

66:                                               ; preds = %63
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = call noundef zeroext i1 @_ZN3ghc10filesystem16create_directoryERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(16) %67) #7
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %69) #7
  br i1 %70, label %71, label %80

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  %72 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  br i1 %72, label %73, label %75

73:                                               ; preds = %71
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %74) #7
  br label %76

75:                                               ; preds = %71
  store i1 false, ptr %3, align 1
  store i32 1, ptr %15, align 4
  br label %77

76:                                               ; preds = %73
  store i32 0, ptr %15, align 4
  br label %77

77:                                               ; preds = %76, %75
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  %78 = load i32, ptr %15, align 4
  switch i32 %78, label %93 [
    i32 0, label %79
  ]

79:                                               ; preds = %77
  br label %80

80:                                               ; preds = %79, %66
  store i8 1, ptr %7, align 1, !tbaa !9
  br label %92

81:                                               ; preds = %63
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %21, ptr noundef nonnull align 4 dereferenceable(6) %18) #7
  %82 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef %21) #7
  %83 = xor i1 %82, true
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %21) #7
  br i1 %83, label %84, label %91

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %85 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 1)
  %86 = getelementptr inbounds { i32, ptr }, ptr %22, i32 0, i32 0
  %87 = extractvalue { i32, ptr } %85, 0
  store i32 %87, ptr %86, align 8
  %88 = getelementptr inbounds { i32, ptr }, ptr %22, i32 0, i32 1
  %89 = extractvalue { i32, ptr } %85, 1
  store ptr %89, ptr %88, align 8
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %90, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  store i1 false, ptr %3, align 1
  store i32 1, ptr %15, align 4
  br label %93

91:                                               ; preds = %81
  br label %92

92:                                               ; preds = %91, %80
  store i32 0, ptr %15, align 4
  br label %93

93:                                               ; preds = %92, %84, %77, %61
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  %94 = load i32, ptr %15, align 4
  switch i32 %94, label %96 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  store i32 0, ptr %15, align 4
  br label %96

96:                                               ; preds = %95, %93
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  %97 = load i32, ptr %15, align 4
  switch i32 %97, label %102 [
    i32 0, label %98
  ]

98:                                               ; preds = %96
  br label %99

99:                                               ; preds = %98
  %100 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN3ghc10filesystem4path8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(72) %13)
          to label %101 unwind label %109

101:                                              ; preds = %99
  br label %49

102:                                              ; preds = %96, %51
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %14) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %14) #7
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %13) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %103 = load i32, ptr %15, align 4
  switch i32 %103, label %107 [
    i32 2, label %104
  ]

104:                                              ; preds = %102
  %105 = load i8, ptr %7, align 1, !tbaa !9, !range !16, !noundef !17
  %106 = trunc i8 %105 to i1
  store i1 %106, ptr %3, align 1
  store i32 1, ptr %15, align 4
  br label %107

107:                                              ; preds = %104, %102
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  %108 = load i1, ptr %3, align 1
  ret i1 %108

109:                                              ; preds = %99, %54, %52, %46, %44, %43, %39, %37, %2
  %110 = landingpad { ptr, i32 }
          catch ptr null
  %111 = extractvalue { ptr, i32 } %110, 0
  call void @__clang_call_terminate(ptr %111) #8
  unreachable
}

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

declare void @_ZN3ghc10filesystem4pathC1Ev(ptr)

declare void @_ZN3ghc10filesystem4pathC1EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr, ptr, i32)

declare void @_ZN3ghc10filesystem4pathD1Ev(ptr)

declare void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr, ptr)

declare void @_ZN3ghc10filesystem11file_statusD1Ev(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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 4, !14, i64 8, i64 8, !5}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}


; 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::iterator" = type { %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator", %"class.ghc::filesystem::path" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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 }

; 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

; Function Attrs: mustprogress 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; 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 #3

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3ghc10filesystem4pathcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathdVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6 align 2

; 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 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 noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_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 @_ZN3ghc10filesystem12is_directoryERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN3ghc10filesystem18create_directoriesERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.ghc::filesystem::path", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.ghc::filesystem::path", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %8 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::error_code", align 8
  %11 = alloca %"class.ghc::filesystem::file_status", align 4
  %12 = alloca %"class.ghc::filesystem::file_status", align 4
  %13 = alloca %"class.std::error_code", align 8
  %14 = alloca %"class.ghc::filesystem::file_status", align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZN3ghc10filesystem4pathC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  %15 = call noundef i64 @_ZNK3ghc10filesystem4path16root_name_lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %16 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path18has_root_directoryEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %17 = zext i1 %16 to i64
  %18 = add i64 %15, %17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path6nativeB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %19, i64 noundef 0, i64 noundef %18)
          to label %20 unwind label %.loopexit.split-lp

20:                                               ; preds = %2
  %21 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathaSEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %22 unwind label %.loopexit.split-lp

22:                                               ; preds = %20
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %18, i64 noundef -1)
          to label %23 unwind label %.loopexit.split-lp

23:                                               ; preds = %22
  invoke void @_ZN3ghc10filesystem4pathC1EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 2)
          to label %24 unwind label %.loopexit.split-lp

24:                                               ; preds = %23
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #7
  invoke void @_ZNK3ghc10filesystem4path5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path::iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %25 unwind label %.loopexit.split-lp

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #7
  invoke void @_ZNK3ghc10filesystem4path3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path::iterator") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %25
  %.sroa.44.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  br label %26

26:                                               ; preds = %.preheader, %52
  %.024 = phi i1 [ %.226, %52 ], [ false, %.preheader ]
  %27 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path8iteratorneERKS2_(ptr noundef nonnull align 8 dereferenceable(72) %7, ptr noundef nonnull align 8 dereferenceable(72) %8)
  br i1 %27, label %28, label %54

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  %29 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(72) %7)
  invoke void @_ZNK3ghc10filesystem4pathcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %30 unwind label %.loopexit

30:                                               ; preds = %28
  %31 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathdVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %32 unwind label %.loopexit

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @_ZN3ghc10filesystem6statusERKNS0_4pathERSt10error_code(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::file_status") align 4 %11, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  %33 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  br i1 %33, label %34, label %37

34:                                               ; preds = %32
  %35 = call noundef i32 @_ZNK3ghc10filesystem11file_status4typeEv(ptr noundef nonnull align 4 dereferenceable(6) %11) #7
  %.not = icmp eq i32 %35, 1
  br i1 %.not, label %37, label %36

36:                                               ; preds = %34
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %10, i64 16, i1 false), !tbaa.struct !5
  br label %51

37:                                               ; preds = %34, %32
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %12, ptr noundef nonnull align 4 dereferenceable(6) %11) #7
  %38 = call noundef zeroext i1 @_ZN3ghc10filesystem6existsENS0_11file_statusE(ptr noundef nonnull %12) #7
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %12) #7
  br i1 %38, label %45, label %39

39:                                               ; preds = %37
  %40 = call noundef zeroext i1 @_ZN3ghc10filesystem16create_directoryERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  %41 = call noundef zeroext i1 @_ZNKSt10error_codecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  br i1 %41, label %42, label %51

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  %43 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryERKNS0_4pathERSt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br i1 %43, label %44, label %.critedge

44:                                               ; preds = %42
  call void @_ZNSt10error_code5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %51

45:                                               ; preds = %37
  call void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr noundef nonnull align 4 dereferenceable(6) %14, ptr noundef nonnull align 4 dereferenceable(6) %11) #7
  %46 = call noundef zeroext i1 @_ZN3ghc10filesystem12is_directoryENS0_11file_statusE(ptr noundef nonnull %14) #7
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %14) #7
  br i1 %46, label %51, label %47

47:                                               ; preds = %45
  %48 = call { i32, ptr } @_ZN3ghc10filesystem6detail15make_error_codeENS1_14portable_errorE(i32 noundef 1)
  %49 = extractvalue { i32, ptr } %48, 0
  %50 = extractvalue { i32, ptr } %48, 1
  store i32 %49, ptr %1, align 8, !tbaa !6
  store ptr %50, ptr %.sroa.44.0..sroa_idx, align 8, !tbaa !10
  br label %51

.critedge:                                        ; preds = %42
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %51

51:                                               ; preds = %45, %39, %.critedge, %44, %47, %36
  %cond1 = phi i1 [ false, %36 ], [ false, %47 ], [ false, %.critedge ], [ true, %39 ], [ true, %45 ], [ true, %44 ]
  %.226 = phi i1 [ %.024, %36 ], [ %.024, %47 ], [ %.024, %.critedge ], [ true, %39 ], [ %.024, %45 ], [ true, %44 ]
  call void @_ZN3ghc10filesystem11file_statusD1Ev(ptr noundef nonnull align 4 dereferenceable(6) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br i1 %cond1, label %52, label %54

52:                                               ; preds = %51
  %53 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN3ghc10filesystem4path8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(72) %7)
          to label %26 unwind label %.loopexit

54:                                               ; preds = %26, %51
  %.327 = phi i1 [ %.024, %26 ], [ %.226, %51 ]
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %8) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #7
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %7) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #7
  %not. = xor i1 %27, true
  %.6 = select i1 %not., i1 %.327, i1 false
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  ret i1 %.6

.loopexit:                                        ; preds = %28, %30, %52
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %55

.loopexit.split-lp:                               ; preds = %2, %20, %22, %23, %24, %25
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %55

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

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

declare void @_ZN3ghc10filesystem4pathC1Ev(ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem4pathC1EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS1_6formatE(ptr, ptr, i32) local_unnamed_addr

declare void @_ZN3ghc10filesystem4pathD1Ev(ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem11file_statusC1ERKS1_(ptr, ptr) local_unnamed_addr

declare void @_ZN3ghc10filesystem11file_statusD1Ev(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 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{i64 0, i64 4, !6, i64 8, i64 8, !10}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass