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

; 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::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 }

@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathdVERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.ghc::filesystem::path", align 8
  %7 = alloca i1, align 1
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.ghc::filesystem::path", align 8
  %12 = alloca i1, align 1
  %13 = alloca i1, align 1
  %14 = alloca %"class.ghc::filesystem::path", align 8
  %15 = alloca i1, align 1
  %16 = alloca i1, align 1
  %17 = alloca %"class.ghc::filesystem::path", align 8
  %18 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %19 = alloca i8, align 1
  %20 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %21 = alloca %"class.ghc::filesystem::path::iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  br i1 %24, label %25, label %50

25:                                               ; preds = %2
  %26 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %27 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #5
  br i1 %27, label %49, label %28

28:                                               ; preds = %25
  %29 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %30 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %31 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %30) #5
  %32 = sub i64 %31, 1
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %29, i64 noundef %32)
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = sext i8 %34 to i32
  %36 = icmp ne i32 %35, 47
  br i1 %36, label %37, label %49

37:                                               ; preds = %28
  %38 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %39 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %40 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %39) #5
  %41 = sub i64 %40, 1
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef %41)
  %43 = load i8, ptr %42, align 1, !tbaa !9
  %44 = sext i8 %43 to i32
  %45 = icmp ne i32 %44, 58
  br i1 %45, label %46, label %49

46:                                               ; preds = %37
  %47 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %47, i8 noundef signext 47)
  br label %49

49:                                               ; preds = %46, %37, %28, %25
  store ptr %22, ptr %3, align 8
  br label %211

50:                                               ; preds = %2
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32) %51)
  store i1 false, ptr %7, align 1
  store i1 false, ptr %8, align 1
  store i1 false, ptr %12, align 1
  store i1 false, ptr %13, align 1
  store i1 false, ptr %15, align 1
  store i1 false, ptr %16, align 1
  br i1 %52, label %53, label %62

53:                                               ; preds = %50
  %54 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  store i1 true, ptr %7, align 1
  call void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %22)
  store i1 true, ptr %8, align 1
  %55 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %6, i32 0, i32 0
  %56 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef nonnull align 8 dereferenceable(32) %55) #5
  br i1 %56, label %73, label %57

57:                                               ; preds = %53
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %58, i32 0, i32 0
  %60 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef @.str.3)
          to label %61 unwind label %96

61:                                               ; preds = %57
  br i1 %60, label %73, label %62

62:                                               ; preds = %61, %50
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = invoke noundef zeroext i1 @_ZNK3ghc10filesystem4path13has_root_nameEv(ptr noundef nonnull align 8 dereferenceable(32) %63)
          to label %65 unwind label %96

65:                                               ; preds = %62
  br i1 %64, label %66, label %71

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  store i1 true, ptr %12, align 1
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %67)
          to label %68 unwind label %100

68:                                               ; preds = %66
  store i1 true, ptr %13, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  store i1 true, ptr %15, align 1
  invoke void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %69 unwind label %104

69:                                               ; preds = %68
  store i1 true, ptr %16, align 1
  %70 = call noundef zeroext i1 @_ZN3ghc10filesystemneERKNS0_4pathES3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %71

71:                                               ; preds = %69, %65
  %72 = phi i1 [ false, %65 ], [ %70, %69 ]
  br label %73

73:                                               ; preds = %71, %61, %53
  %74 = phi i1 [ true, %61 ], [ true, %53 ], [ %72, %71 ]
  %75 = load i1, ptr %16, align 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %77

77:                                               ; preds = %76, %73
  %78 = load i1, ptr %15, align 1
  br i1 %78, label %79, label %80

79:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %80

80:                                               ; preds = %79, %77
  %81 = load i1, ptr %13, align 1
  br i1 %81, label %82, label %83

82:                                               ; preds = %80
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %83

83:                                               ; preds = %82, %80
  %84 = load i1, ptr %12, align 1
  br i1 %84, label %85, label %86

85:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %86

86:                                               ; preds = %85, %83
  %87 = load i1, ptr %8, align 1
  br i1 %87, label %88, label %89

88:                                               ; preds = %86
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %89

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

91:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br label %92

92:                                               ; preds = %91, %89
  br i1 %74, label %93, label %125

93:                                               ; preds = %92
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4path6assignIS1_EERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %94)
  store ptr %22, ptr %3, align 8
  br label %211

96:                                               ; preds = %62, %57
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  br label %118

100:                                              ; preds = %66
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  br label %114

104:                                              ; preds = %68
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  %108 = load i1, ptr %15, align 1
  br i1 %108, label %109, label %110

109:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %110

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

112:                                              ; preds = %110
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %113

113:                                              ; preds = %112, %110
  br label %114

114:                                              ; preds = %113, %100
  %115 = load i1, ptr %12, align 1
  br i1 %115, label %116, label %117

116:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %117

117:                                              ; preds = %116, %114
  br label %118

118:                                              ; preds = %117, %96
  %119 = load i1, ptr %8, align 1
  br i1 %119, label %120, label %121

120:                                              ; preds = %118
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %121

121:                                              ; preds = %120, %118
  %122 = load i1, ptr %7, align 1
  br i1 %122, label %123, label %124

123:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br label %124

124:                                              ; preds = %123, %121
  br label %213

125:                                              ; preds = %92
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path18has_root_directoryEv(ptr noundef nonnull align 8 dereferenceable(32) %126)
  br i1 %127, label %128, label %135

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  call void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %22)
  %129 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4path6assignIS1_EERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %130 unwind label %131

130:                                              ; preds = %128
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  br label %145

131:                                              ; preds = %128
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  br label %213

135:                                              ; preds = %125
  %136 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path18has_root_directoryEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
  br i1 %136, label %139, label %137

137:                                              ; preds = %135
  %138 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
  br i1 %138, label %141, label %139

139:                                              ; preds = %137, %135
  %140 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path12has_filenameEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
  br i1 %140, label %141, label %144

141:                                              ; preds = %139, %137
  %142 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %143 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %142, i8 noundef signext 47)
  br label %144

144:                                              ; preds = %141, %139
  br label %145

145:                                              ; preds = %144, %130
  call void @llvm.lifetime.start.p0(i64 72, ptr %18) #5
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK3ghc10filesystem4path5beginEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path::iterator") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %146)
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 1, ptr %19, align 1, !tbaa !10
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = invoke noundef zeroext i1 @_ZNK3ghc10filesystem4path13has_root_nameEv(ptr noundef nonnull align 8 dereferenceable(32) %147)
          to label %149 unwind label %153

149:                                              ; preds = %145
  br i1 %148, label %150, label %157

150:                                              ; preds = %149
  %151 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN3ghc10filesystem4path8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(72) %18)
          to label %152 unwind label %153

152:                                              ; preds = %150
  br label %157

153:                                              ; preds = %179, %169, %150, %145
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %9, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %10, align 4
  br label %210

157:                                              ; preds = %152, %149
  br label %158

158:                                              ; preds = %199, %157
  call void @llvm.lifetime.start.p0(i64 72, ptr %20) #5
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK3ghc10filesystem4path3endEv(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path::iterator") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %159)
          to label %160 unwind label %183

160:                                              ; preds = %158
  %161 = invoke noundef zeroext i1 @_ZNK3ghc10filesystem4path8iteratorneERKS2_(ptr noundef nonnull align 8 dereferenceable(72) %18, ptr noundef nonnull align 8 dereferenceable(72) %20)
          to label %162 unwind label %187

162:                                              ; preds = %160
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %20) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %20) #5
  br i1 %161, label %163, label %209

163:                                              ; preds = %162
  %164 = load i8, ptr %19, align 1, !tbaa !10, !range !12, !noundef !13
  %165 = trunc i8 %164 to i1
  br i1 %165, label %192, label %166

166:                                              ; preds = %163
  %167 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %168 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %167) #5
  br i1 %168, label %179, label %169

169:                                              ; preds = %166
  %170 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %171 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %172 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %171) #5
  %173 = sub i64 %172, 1
  %174 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %170, i64 noundef %173)
          to label %175 unwind label %153

175:                                              ; preds = %169
  %176 = load i8, ptr %174, align 1, !tbaa !9
  %177 = sext i8 %176 to i32
  %178 = icmp eq i32 %177, 47
  br i1 %178, label %192, label %179

179:                                              ; preds = %175, %166
  %180 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %181 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %180, i8 noundef signext 47)
          to label %182 unwind label %153

182:                                              ; preds = %179
  br label %192

183:                                              ; preds = %158
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %9, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %10, align 4
  br label %191

187:                                              ; preds = %160
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %9, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %10, align 4
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %20) #5
  br label %191

191:                                              ; preds = %187, %183
  call void @llvm.lifetime.end.p0(i64 72, ptr %20) #5
  br label %210

192:                                              ; preds = %182, %175, %163
  store i8 0, ptr %19, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 72, ptr %21) #5
  invoke void @_ZN3ghc10filesystem4path8iteratorppEi(ptr dead_on_unwind writable sret(%"class.ghc::filesystem::path::iterator") align 8 %21, ptr noundef nonnull align 8 dereferenceable(72) %18, i32 noundef 0)
          to label %193 unwind label %200

193:                                              ; preds = %192
  %194 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(72) %21)
          to label %195 unwind label %204

195:                                              ; preds = %193
  %196 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path6nativeB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(32) %194) #5
  %197 = getelementptr inbounds %"class.ghc::filesystem::path", ptr %22, i32 0, i32 0
  %198 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %197, ptr noundef nonnull align 8 dereferenceable(32) %196)
          to label %199 unwind label %204

199:                                              ; preds = %195
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %21) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %21) #5
  br label %158, !llvm.loop !14

200:                                              ; preds = %192
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %9, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %10, align 4
  br label %208

204:                                              ; preds = %195, %193
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %9, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %10, align 4
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %21) #5
  br label %208

208:                                              ; preds = %204, %200
  call void @llvm.lifetime.end.p0(i64 72, ptr %21) #5
  br label %210

209:                                              ; preds = %162
  call void @_ZN3ghc10filesystem4path15check_long_pathEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
  store ptr %22, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %18) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #5
  br label %211

210:                                              ; preds = %208, %191, %153
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %18) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #5
  br label %213

211:                                              ; preds = %209, %93, %49
  %212 = load ptr, ptr %3, align 8
  ret ptr %212

213:                                              ; preds = %210, %131, %124
  %214 = load ptr, ptr %9, align 8
  %215 = load i32, ptr %10, align 4
  %216 = insertvalue { ptr, i32 } poison, ptr %214, 0
  %217 = insertvalue { ptr, i32 } %216, i32 %215, 1
  resume { ptr, i32 } %217
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4path6assignIS1_EERS1_RKT_(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)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem4path12has_filenameEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 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)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN3ghc10filesystem4path8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(72)) #2 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)) #1 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)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ghc10filesystem4path8iteratorppEi(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #2 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)) #1 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)) #1 align 2

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

declare void @_ZN3ghc10filesystem4pathD1Ev(ptr)

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

@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4pathdVERKS1_(ptr noundef nonnull returned align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.ghc::filesystem::path", align 8
  %4 = alloca %"class.ghc::filesystem::path", align 8
  %5 = alloca %"class.ghc::filesystem::path", align 8
  %6 = alloca %"class.ghc::filesystem::path", align 8
  %7 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %8 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %9 = alloca %"class.ghc::filesystem::path::iterator", align 8
  %10 = tail call noundef zeroext i1 @_ZNK3ghc10filesystem4path5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  br i1 %10, label %11, label %25

11:                                               ; preds = %2
  %12 = tail call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br i1 %12, label %96, label %13

13:                                               ; preds = %11
  %14 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  %15 = add i64 %14, -1
  %16 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %15)
  %17 = load i8, ptr %16, align 1, !tbaa !5
  %.not = icmp eq i8 %17, 47
  br i1 %.not, label %96, label %18

18:                                               ; preds = %13
  %19 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  %20 = add i64 %19, -1
  %21 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %20)
  %22 = load i8, ptr %21, align 1, !tbaa !5
  %.not48 = icmp eq i8 %22, 58
  br i1 %.not48, label %96, label %23

23:                                               ; preds = %18
  %24 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext 47)
  br label %96

25:                                               ; preds = %2
  %26 = tail call noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %26, label %27, label %.thread86

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %28 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br i1 %28, label %.thread64, label %29

29:                                               ; preds = %27
  %30 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.3)
          to label %31 unwind label %.thread58

31:                                               ; preds = %29
  br i1 %30, label %.thread64, label %32

32:                                               ; preds = %31
  %33 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path13has_root_nameEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %33, label %35, label %.thread

.thread86:                                        ; preds = %25
  %34 = tail call noundef zeroext i1 @_ZNK3ghc10filesystem4path13has_root_nameEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %34, label %35, label %.critedge52.thread

35:                                               ; preds = %.thread86, %32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  invoke void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %36 unwind label %42

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  invoke void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %.critedge50 unwind label %44

.thread64:                                        ; preds = %27, %31
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %39

.thread:                                          ; preds = %32
  br i1 %26, label %.thread65, label %.critedge52.thread

.thread65:                                        ; preds = %.thread
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %.critedge52.thread

.critedge50:                                      ; preds = %36
  %37 = call noundef zeroext i1 @_ZN3ghc10filesystemneERKNS0_4pathES3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br i1 %26, label %38, label %.critedge52

38:                                               ; preds = %.critedge50
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br i1 %37, label %39, label %.critedge52.thread

.critedge52:                                      ; preds = %.critedge50
  br i1 %37, label %39, label %.critedge52.thread

39:                                               ; preds = %.thread64, %38, %.critedge52
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4path6assignIS1_EERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  br label %96

.thread58:                                        ; preds = %29
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %47

42:                                               ; preds = %35
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %36
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %46

46:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br i1 %26, label %47, label %.critedge54

47:                                               ; preds = %.thread58, %46
  %.pn.pn61 = phi { ptr, i32 } [ %41, %.thread58 ], [ %.pn, %46 ]
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %.critedge54

.critedge52.thread:                               ; preds = %.thread86, %.thread, %.thread65, %38, %.critedge52
  %48 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path18has_root_directoryEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %48, label %49, label %54

49:                                               ; preds = %.critedge52.thread
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNK3ghc10filesystem4path9root_nameEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %50 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4path6assignIS1_EERS1_RKT_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %51 unwind label %52

51:                                               ; preds = %49
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %62

52:                                               ; preds = %49
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3ghc10filesystem4pathD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %.critedge54

54:                                               ; preds = %.critedge52.thread
  %55 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path18has_root_directoryEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br i1 %55, label %58, label %56

56:                                               ; preds = %54
  %57 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path11is_absoluteEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br i1 %57, label %60, label %58

58:                                               ; preds = %56, %54
  %59 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path12has_filenameEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  br i1 %59, label %60, label %62

60:                                               ; preds = %58, %56
  %61 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext 47)
  br label %62

62:                                               ; preds = %58, %60, %51
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #5
  call void @_ZNK3ghc10filesystem4path5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path::iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %63 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path13has_root_nameEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  br i1 %63, label %64, label %.peel.begin

64:                                               ; preds = %62
  %65 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN3ghc10filesystem4path8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(72) %7)
          to label %.peel.begin unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %84
  %lpad.loopexit72 = landingpad { ptr, i32 }
          cleanup
  br label %95

.loopexit.split-lp:                               ; preds = %64
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %95

.peel.begin:                                      ; preds = %64, %62
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #5
  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) %1)
          to label %66 unwind label %.loopexit.split-lp68

66:                                               ; preds = %.peel.begin
  %67 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path8iteratorneERKS2_(ptr noundef nonnull align 8 dereferenceable(72) %7, ptr noundef nonnull align 8 dereferenceable(72) %8)
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %8) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #5
  br i1 %67, label %68, label %.loopexit71

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %9) #5
  invoke void @_ZN3ghc10filesystem4path8iteratorppEi(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path::iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(72) %7, i32 noundef 0)
          to label %69 unwind label %.loopexit.split-lp76

69:                                               ; preds = %68
  %70 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(72) %9)
  %71 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path6nativeB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(32) %70) #5
  %72 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %71)
          to label %.peel.next unwind label %.loopexit.split-lp80

.peel.next:                                       ; preds = %69
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #5
  br label %73

73:                                               ; preds = %92, %.peel.next
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #5
  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) %1)
          to label %74 unwind label %.loopexit67

74:                                               ; preds = %73
  %75 = call noundef zeroext i1 @_ZNK3ghc10filesystem4path8iteratorneERKS2_(ptr noundef nonnull align 8 dereferenceable(72) %7, ptr noundef nonnull align 8 dereferenceable(72) %8)
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %8) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #5
  br i1 %75, label %76, label %.loopexit71

76:                                               ; preds = %74
  %77 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  br i1 %77, label %84, label %78

78:                                               ; preds = %76
  %79 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  %80 = add i64 %79, -1
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %80)
  %82 = load i8, ptr %81, align 1, !tbaa !5
  %83 = icmp eq i8 %82, 47
  br i1 %83, label %87, label %84

84:                                               ; preds = %78, %76
  %85 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 noundef signext 47)
          to label %87 unwind label %.loopexit

.loopexit67:                                      ; preds = %73
  %lpad.loopexit69 = landingpad { ptr, i32 }
          cleanup
  br label %86

.loopexit.split-lp68:                             ; preds = %.peel.begin
  %lpad.loopexit.split-lp70 = landingpad { ptr, i32 }
          cleanup
  br label %86

86:                                               ; preds = %.loopexit.split-lp68, %.loopexit67
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit69, %.loopexit67 ], [ %lpad.loopexit.split-lp70, %.loopexit.split-lp68 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #5
  br label %95

87:                                               ; preds = %84, %78
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %9) #5
  invoke void @_ZN3ghc10filesystem4path8iteratorppEi(ptr dead_on_unwind nonnull writable sret(%"class.ghc::filesystem::path::iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(72) %7, i32 noundef 0)
          to label %88 unwind label %.loopexit75

88:                                               ; preds = %87
  %89 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(72) %9)
  %90 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3ghc10filesystem4path6nativeB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(32) %89) #5
  %91 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %90)
          to label %92 unwind label %.loopexit79

92:                                               ; preds = %88
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #5
  br label %73, !llvm.loop !8

.loopexit75:                                      ; preds = %87
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %94

.loopexit.split-lp76:                             ; preds = %68
  %lpad.loopexit.split-lp77 = landingpad { ptr, i32 }
          cleanup
  br label %94

.loopexit79:                                      ; preds = %88
  %lpad.loopexit81 = landingpad { ptr, i32 }
          cleanup
  br label %93

.loopexit.split-lp80:                             ; preds = %69
  %lpad.loopexit.split-lp82 = landingpad { ptr, i32 }
          cleanup
  br label %93

93:                                               ; preds = %.loopexit.split-lp80, %.loopexit79
  %lpad.phi83 = phi { ptr, i32 } [ %lpad.loopexit81, %.loopexit79 ], [ %lpad.loopexit.split-lp82, %.loopexit.split-lp80 ]
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #5
  br label %94

94:                                               ; preds = %.loopexit75, %.loopexit.split-lp76, %93
  %.pn44 = phi { ptr, i32 } [ %lpad.phi83, %93 ], [ %lpad.loopexit, %.loopexit75 ], [ %lpad.loopexit.split-lp77, %.loopexit.split-lp76 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #5
  br label %95

.loopexit71:                                      ; preds = %74, %66
  call void @_ZN3ghc10filesystem4path15check_long_pathEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %7) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #5
  br label %96

95:                                               ; preds = %.loopexit, %.loopexit.split-lp, %94, %86
  %.pn44.pn = phi { ptr, i32 } [ %.pn44, %94 ], [ %lpad.phi, %86 ], [ %lpad.loopexit72, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN3ghc10filesystem4path8iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %7) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #5
  br label %.critedge54

96:                                               ; preds = %11, %13, %18, %23, %.loopexit71, %39
  ret ptr %0

.critedge54:                                      ; preds = %46, %47, %95, %52
  %.pn44.pn.pn = phi { ptr, i32 } [ %.pn44.pn, %95 ], [ %53, %52 ], [ %.pn.pn61, %47 ], [ %.pn, %46 ]
  resume { ptr, i32 } %.pn44.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #2 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 #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3ghc10filesystem4path6assignIS1_EERS1_RKT_(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 #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3ghc10filesystem4path12has_filenameEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 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 #2 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 #2 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 #1 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 #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ghc10filesystem4path8iteratorppEi(ptr dead_on_unwind noalias writable sret(%"class.ghc::filesystem::path::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #2 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 #1 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 #1 align 2

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

declare void @_ZN3ghc10filesystem4pathD1Ev(ptr) local_unnamed_addr

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopFullUnrollPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass