; LLVM IR from hbirchtree/coffeecutie :: src/peripheral/platform/platforms/posix (file)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__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] }

@.str = external hidden unnamed_addr constant [3 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

declare void @_ZNK8platform3url3UrldeB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(80)) #1

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8platform4file5posix6DirFun5MkDirERKNS_3url3UrlEbRN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS7_17domain_error_codeIiNS0_20posix_error_categoryEEEEE(ptr noundef nonnull align 8 dereferenceable(80) %0, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(112) %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [255 x i8], align 16
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  %17 = zext i1 %1 to i8
  store i8 %17, ptr %6, align 1, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #8
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK8platform3url3UrldeB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(80) %18)
  %19 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %20 = trunc i8 %19 to i1
  br i1 %20, label %35, label %21

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  %22 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  %23 = call i32 @mkdir(ptr noundef %22, i32 noundef 504) #8
  %24 = icmp eq i32 %23, 0
  %25 = zext i1 %24 to i8
  store i8 %25, ptr %9, align 1, !tbaa !9
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = invoke noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112) %26)
          to label %28 unwind label %31

28:                                               ; preds = %21
  %29 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %30 = trunc i8 %29 to i1
  store i1 %30, ptr %4, align 1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  br label %100

31:                                               ; preds = %21
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %10, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  br label %102

35:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 255, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %36 = getelementptr inbounds [255 x i8], ptr %13, i64 0, i64 0
  %37 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  %38 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %36, i64 noundef 255, ptr noundef @.str, ptr noundef %37) #8
  %39 = getelementptr inbounds [255 x i8], ptr %13, i64 0, i64 0
  %40 = call i64 @strlen(ptr noundef %39) #9
  store i64 %40, ptr %15, align 8, !tbaa !13
  %41 = load i64, ptr %15, align 8, !tbaa !13
  %42 = sub i64 %41, 1
  %43 = getelementptr inbounds [255 x i8], ptr %13, i64 0, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !15
  %45 = sext i8 %44 to i32
  %46 = icmp eq i32 %45, 47
  br i1 %46, label %47, label %51

47:                                               ; preds = %35
  %48 = load i64, ptr %15, align 8, !tbaa !13
  %49 = sub i64 %48, 1
  %50 = getelementptr inbounds [255 x i8], ptr %13, i64 0, i64 %49
  store i8 0, ptr %50, align 1, !tbaa !15
  br label %51

51:                                               ; preds = %47, %35
  %52 = getelementptr inbounds [255 x i8], ptr %13, i64 0, i64 0
  %53 = getelementptr inbounds i8, ptr %52, i64 1
  store ptr %53, ptr %14, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %76, %51
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = load i8, ptr %55, align 1, !tbaa !15
  %57 = icmp ne i8 %56, 0
  br i1 %57, label %58, label %79

58:                                               ; preds = %54
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = load i8, ptr %59, align 1, !tbaa !15
  %61 = sext i8 %60 to i32
  %62 = icmp eq i32 %61, 47
  br i1 %62, label %63, label %75

63:                                               ; preds = %58
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  store i8 0, ptr %64, align 1, !tbaa !15
  %65 = getelementptr inbounds [255 x i8], ptr %13, i64 0, i64 0
  %66 = call i32 @mkdir(ptr noundef %65, i32 noundef 448) #8
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = invoke noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112) %67)
          to label %69 unwind label %71

69:                                               ; preds = %63
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  store i8 47, ptr %70, align 1, !tbaa !15
  br label %75

71:                                               ; preds = %63
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %10, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %11, align 4
  br label %99

75:                                               ; preds = %69, %58
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i32 1
  store ptr %78, ptr %14, align 8, !tbaa !5
  br label %54, !llvm.loop !16

79:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #8
  %80 = getelementptr inbounds [255 x i8], ptr %13, i64 0, i64 0
  %81 = call i32 @mkdir(ptr noundef %80, i32 noundef 448) #8
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %87, label %83

83:                                               ; preds = %79
  %84 = call ptr @__errno_location() #10
  %85 = load i32, ptr %84, align 4, !tbaa !18
  %86 = icmp eq i32 %85, 17
  br label %87

87:                                               ; preds = %83, %79
  %88 = phi i1 [ true, %79 ], [ %86, %83 ]
  %89 = zext i1 %88 to i8
  store i8 %89, ptr %16, align 1, !tbaa !9
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = invoke noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112) %90)
          to label %92 unwind label %95

92:                                               ; preds = %87
  %93 = load i8, ptr %16, align 1, !tbaa !9, !range !11, !noundef !12
  %94 = trunc i8 %93 to i1
  store i1 %94, ptr %4, align 1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 255, ptr %13) #8
  br label %100

95:                                               ; preds = %87
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %10, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  br label %99

99:                                               ; preds = %95, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 255, ptr %13) #8
  br label %102

100:                                              ; preds = %92, %28
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  %101 = load i1, ptr %4, align 1
  ret i1 %101

102:                                              ; preds = %99, %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %10, align 8
  %105 = load i32, ptr %11, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112)) #5

; Function Attrs: nounwind
declare i32 @mkdir(ptr noundef, i32 noundef) #6

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #6

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #7

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__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] }

@.str = external hidden unnamed_addr constant [3 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

declare void @_ZNK8platform3url3UrldeB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8platform4file5posix6DirFun5MkDirERKNS_3url3UrlEbRN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS7_17domain_error_codeIiNS0_20posix_error_categoryEEEEE(ptr noundef nonnull align 8 dereferenceable(80) %0, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(112) %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca [255 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNK8platform3url3UrldeB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(80) %0)
  br i1 %1, label %14, label %6

6:                                                ; preds = %3
  %7 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  %8 = call i32 @mkdir(ptr noundef %7, i32 noundef 504) #8
  %9 = invoke noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112) %2)
          to label %10 unwind label %12

10:                                               ; preds = %6
  %11 = icmp eq i32 %8, 0
  br label %44

12:                                               ; preds = %6
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %45

14:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 255, ptr nonnull %5) #8
  %15 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  %16 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 255, ptr noundef nonnull @.str, ptr noundef %15) #8
  %17 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %5) #9
  %18 = add i64 %17, -1
  %19 = getelementptr inbounds [255 x i8], ptr %5, i64 0, i64 %18
  %20 = load i8, ptr %19, align 1, !tbaa !5
  %21 = icmp eq i8 %20, 47
  %spec.store.select = select i1 %21, i8 0, i8 %20
  store i8 %spec.store.select, ptr %19, align 1
  br label %22

22:                                               ; preds = %.backedge, %14
  %.pn23 = phi ptr [ %5, %14 ], [ %.017, %.backedge ]
  %.017 = getelementptr inbounds i8, ptr %.pn23, i64 1
  %23 = load i8, ptr %.017, align 1, !tbaa !5
  switch i8 %23, label %.backedge [
    i8 0, label %30
    i8 47, label %24
  ]

.backedge:                                        ; preds = %22, %27
  br label %22, !llvm.loop !8

24:                                               ; preds = %22
  store i8 0, ptr %.017, align 1, !tbaa !5
  %25 = call i32 @mkdir(ptr noundef nonnull %5, i32 noundef 448) #8
  %26 = invoke noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112) %2)
          to label %27 unwind label %28

27:                                               ; preds = %24
  store i8 47, ptr %.017, align 1, !tbaa !5
  br label %.backedge

28:                                               ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %43

30:                                               ; preds = %22
  %31 = call i32 @mkdir(ptr noundef nonnull %5, i32 noundef 448) #8
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %37, label %33

33:                                               ; preds = %30
  %34 = tail call ptr @__errno_location() #10
  %35 = load i32, ptr %34, align 4, !tbaa !10
  %36 = icmp eq i32 %35, 17
  br label %37

37:                                               ; preds = %33, %30
  %38 = phi i1 [ true, %30 ], [ %36, %33 ]
  %39 = invoke noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112) %2)
          to label %40 unwind label %41

40:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 255, ptr nonnull %5) #8
  br label %44

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

43:                                               ; preds = %41, %28
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 255, ptr nonnull %5) #8
  br label %45

44:                                               ; preds = %40, %10
  %.0 = phi i1 [ %38, %40 ], [ %11, %10 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  ret i1 %.0

45:                                               ; preds = %43, %12
  %.pn.pn = phi { ptr, i32 } [ %.pn, %43 ], [ %13, %12 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN8platform4file5posix16collect_error_toIN9stl_types24nested_domain_error_codeINS0_9FileErrorENS0_19file_error_categoryENS3_17domain_error_codeIiNS0_20posix_error_categoryEEEEEEEbRT_(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @mkdir(ptr nocapture noundef readonly, i32 noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #7

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

!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}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}


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