; LLVM IR from ctlst-tech/catpilot :: os/fatfs/core (ff)

; 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"

%struct.DIR = type { %struct.FFOBJID, i32, i32, i32, ptr, [12 x i8], i32, ptr }
%struct.FFOBJID = type { ptr, i16, i8, i8, i32, i32, i32 }
%struct.FATFS = type { i8, i8, i8, i8, i8, i8, i16, i16, i16, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [512 x i8] }

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

; Function Attrs: nounwind uwtable
declare hidden i32 @mount_volume(ptr noundef, ptr noundef, i8 noundef zeroext) #1

; Function Attrs: nounwind uwtable
declare hidden void @unlock_volume(ptr noundef, i32 noundef) #1

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

declare ptr @ff_memalloc(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @follow_path(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @chk_share(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @ld_clust(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @remove_chain(ptr noundef, i32 noundef, i32 noundef) #1

declare void @ff_memfree(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @sync_fs(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @dir_sdi(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @dir_read(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @f_unlink(ptr noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.DIR, align 8
  %7 = alloca %struct.DIR, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 72, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %11 = call i32 @mount_volume(ptr noundef %3, ptr noundef %5, i8 noundef zeroext 2)
  store i32 %11, ptr %4, align 4, !tbaa !9
  %12 = load i32, ptr %4, align 4, !tbaa !9
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %132

14:                                               ; preds = %1
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %17 = getelementptr inbounds %struct.FFOBJID, ptr %16, i32 0, i32 0
  store ptr %15, ptr %17, align 8, !tbaa !11
  %18 = call ptr @ff_memalloc(i32 noundef 512)
  store ptr %18, ptr %9, align 8, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %23, label %21

21:                                               ; preds = %14
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  call void @unlock_volume(ptr noundef %22, i32 noundef 17)
  store i32 17, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %136

23:                                               ; preds = %14
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.FATFS, ptr %25, i32 0, i32 9
  store ptr %24, ptr %26, align 8, !tbaa !15
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = call i32 @follow_path(ptr noundef %6, ptr noundef %27)
  store i32 %28, ptr %4, align 4, !tbaa !9
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %39

31:                                               ; preds = %23
  %32 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 5
  %33 = getelementptr inbounds [12 x i8], ptr %32, i64 0, i64 11
  %34 = load i8, ptr %33, align 1, !tbaa !17
  %35 = zext i8 %34 to i32
  %36 = and i32 %35, 32
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %31
  store i32 6, ptr %4, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %38, %31, %23
  %40 = load i32, ptr %4, align 4, !tbaa !9
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %44

42:                                               ; preds = %39
  %43 = call i32 @chk_share(ptr noundef %6, i32 noundef 2)
  store i32 %43, ptr %4, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %42, %39
  %45 = load i32, ptr %4, align 4, !tbaa !9
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %130

47:                                               ; preds = %44
  %48 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 5
  %49 = getelementptr inbounds [12 x i8], ptr %48, i64 0, i64 11
  %50 = load i8, ptr %49, align 1, !tbaa !17
  %51 = zext i8 %50 to i32
  %52 = and i32 %51, 128
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %47
  store i32 6, ptr %4, align 4, !tbaa !9
  br label %64

55:                                               ; preds = %47
  %56 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %57 = getelementptr inbounds %struct.FFOBJID, ptr %56, i32 0, i32 2
  %58 = load i8, ptr %57, align 2, !tbaa !18
  %59 = zext i8 %58 to i32
  %60 = and i32 %59, 1
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %55
  store i32 7, ptr %4, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %62, %55
  br label %64

64:                                               ; preds = %63, %54
  %65 = load i32, ptr %4, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %108

67:                                               ; preds = %64
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !19
  %71 = call i32 @ld_clust(ptr noundef %68, ptr noundef %70)
  store i32 %71, ptr %8, align 4, !tbaa !9
  %72 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %73 = getelementptr inbounds %struct.FFOBJID, ptr %72, i32 0, i32 2
  %74 = load i8, ptr %73, align 2, !tbaa !18
  %75 = zext i8 %74 to i32
  %76 = and i32 %75, 16
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %107

78:                                               ; preds = %67
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.FATFS, ptr %80, i32 0, i32 12
  %82 = load i32, ptr %81, align 8, !tbaa !20
  %83 = icmp eq i32 %79, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %78
  store i32 7, ptr %4, align 4, !tbaa !9
  br label %106

85:                                               ; preds = %78
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 0
  %88 = getelementptr inbounds %struct.FFOBJID, ptr %87, i32 0, i32 0
  store ptr %86, ptr %88, align 8, !tbaa !11
  %89 = load i32, ptr %8, align 4, !tbaa !9
  %90 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 0
  %91 = getelementptr inbounds %struct.FFOBJID, ptr %90, i32 0, i32 4
  store i32 %89, ptr %91, align 4, !tbaa !21
  %92 = call i32 @dir_sdi(ptr noundef %7, i32 noundef 0)
  store i32 %92, ptr %4, align 4, !tbaa !9
  %93 = load i32, ptr %4, align 4, !tbaa !9
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %105

95:                                               ; preds = %85
  %96 = call i32 @dir_read(ptr noundef %7, i32 noundef 0)
  store i32 %96, ptr %4, align 4, !tbaa !9
  %97 = load i32, ptr %4, align 4, !tbaa !9
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  store i32 7, ptr %4, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %99, %95
  %101 = load i32, ptr %4, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 4
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %103, %100
  br label %105

105:                                              ; preds = %104, %85
  br label %106

106:                                              ; preds = %105, %84
  br label %107

107:                                              ; preds = %106, %67
  br label %108

108:                                              ; preds = %107, %64
  %109 = load i32, ptr %4, align 4, !tbaa !9
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %129

111:                                              ; preds = %108
  %112 = call i32 @dir_remove(ptr noundef %6)
  store i32 %112, ptr %4, align 4, !tbaa !9
  %113 = load i32, ptr %4, align 4, !tbaa !9
  %114 = icmp eq i32 %113, 0
  br i1 %114, label %115, label %122

115:                                              ; preds = %111
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %122

118:                                              ; preds = %115
  %119 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %120 = load i32, ptr %8, align 4, !tbaa !9
  %121 = call i32 @remove_chain(ptr noundef %119, i32 noundef %120, i32 noundef 0)
  store i32 %121, ptr %4, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %118, %115, %111
  %123 = load i32, ptr %4, align 4, !tbaa !9
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %128

125:                                              ; preds = %122
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = call i32 @sync_fs(ptr noundef %126)
  store i32 %127, ptr %4, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %125, %122
  br label %129

129:                                              ; preds = %128, %108
  br label %130

130:                                              ; preds = %129, %44
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  call void @ff_memfree(ptr noundef %131)
  br label %132

132:                                              ; preds = %130, %1
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = load i32, ptr %4, align 4, !tbaa !9
  call void @unlock_volume(ptr noundef %133, i32 noundef %134)
  %135 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %135, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %136

136:                                              ; preds = %132, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 72, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %137 = load i32, ptr %2, align 4
  ret i32 %137
}

; Function Attrs: nounwind uwtable
declare hidden i32 @dir_remove(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !13, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 40, !7, i64 48, !10, i64 60, !6, i64 64}
!13 = !{!"", !6, i64 0, !14, i64 8, !7, i64 10, !7, i64 11, !10, i64 12, !10, i64 16, !10, i64 20}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !6, i64 16}
!16 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !14, i64 6, !14, i64 8, !14, i64 10, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !7, i64 64}
!17 = !{!7, !7, i64 0}
!18 = !{!12, !7, i64 10}
!19 = !{!12, !6, i64 40}
!20 = !{!16, !10, i64 32}
!21 = !{!12, !10, i64 12}


; 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"

%struct.DIR = type { %struct.FFOBJID, i32, i32, i32, ptr, [12 x i8], i32, ptr }
%struct.FFOBJID = type { ptr, i16, i8, i8, i32, i32, i32 }

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

; Function Attrs: nounwind uwtable
declare hidden i32 @mount_volume(ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @unlock_volume(ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare ptr @ff_memalloc(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @follow_path(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @chk_share(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @ld_clust(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @remove_chain(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @ff_memfree(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @sync_fs(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @dir_sdi(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @dir_read(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @f_unlink(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %struct.DIR, align 8
  %5 = alloca %struct.DIR, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #3
  %6 = call i32 @mount_volume(ptr noundef nonnull %2, ptr noundef nonnull %3, i8 noundef zeroext 2)
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %8, label %61

8:                                                ; preds = %1
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %9, ptr %4, align 8, !tbaa !9
  %10 = call ptr @ff_memalloc(i32 noundef 512) #3
  %.not = icmp eq ptr %10, null
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  br i1 %.not, label %12, label %13

12:                                               ; preds = %8
  call void @unlock_volume(ptr noundef %11, i32 noundef 17)
  br label %63

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr %10, ptr %14, align 8, !tbaa !14
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = call i32 @follow_path(ptr noundef nonnull %4, ptr noundef %15)
  %17 = icmp eq i32 %16, 0
  %18 = getelementptr inbounds i8, ptr %4, i64 59
  %19 = load i8, ptr %18, align 1
  %20 = and i8 %19, 32
  %.not31 = icmp eq i8 %20, 0
  %spec.select = select i1 %.not31, i32 0, i32 6
  %.023 = select i1 %17, i32 %spec.select, i32 %16
  %21 = select i1 %17, i1 %.not31, i1 false
  br i1 %21, label %22, label %.thread

22:                                               ; preds = %13
  %23 = call i32 @chk_share(ptr noundef nonnull %4, i32 noundef 2)
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %.thread

25:                                               ; preds = %22
  %26 = load i8, ptr %18, align 1, !tbaa !16
  %.not32 = icmp sgt i8 %26, -1
  br i1 %.not32, label %27, label %.thread

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %4, i64 10
  %29 = load i8, ptr %28, align 2, !tbaa !17
  %30 = and i8 %29, 1
  %.not33 = icmp eq i8 %30, 0
  br i1 %.not33, label %31, label %.thread

31:                                               ; preds = %27
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %4, i64 40
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  %35 = call i32 @ld_clust(ptr noundef %32, ptr noundef %34)
  %36 = load i8, ptr %28, align 2, !tbaa !17
  %37 = and i8 %36, 16
  %.not34 = icmp eq i8 %37, 0
  br i1 %.not34, label %.thread44, label %38

38:                                               ; preds = %31
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 32
  %41 = load i32, ptr %40, align 8, !tbaa !19
  %42 = icmp eq i32 %35, %41
  br i1 %42, label %.thread, label %43

43:                                               ; preds = %38
  store ptr %39, ptr %5, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %5, i64 12
  store i32 %35, ptr %44, align 4, !tbaa !20
  %45 = call i32 @dir_sdi(ptr noundef nonnull %5, i32 noundef 0)
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %.thread

47:                                               ; preds = %43
  %48 = call i32 @dir_read(ptr noundef nonnull %5, i32 noundef 0)
  %49 = icmp eq i32 %48, 0
  %spec.store.select = select i1 %49, i32 7, i32 %48
  %50 = icmp eq i32 %spec.store.select, 4
  br i1 %50, label %.thread44, label %.thread

.thread44:                                        ; preds = %47, %31
  %51 = call i32 @dir_remove(ptr noundef nonnull %4)
  %52 = icmp eq i32 %51, 0
  %53 = icmp ne i32 %35, 0
  %or.cond = select i1 %52, i1 %53, i1 false
  br i1 %or.cond, label %54, label %56

54:                                               ; preds = %.thread44
  %55 = call i32 @remove_chain(ptr noundef nonnull %4, i32 noundef %35, i32 noundef 0)
  br label %56

56:                                               ; preds = %54, %.thread44
  %.4 = phi i32 [ %55, %54 ], [ %51, %.thread44 ]
  %57 = icmp eq i32 %.4, 0
  br i1 %57, label %58, label %.thread

58:                                               ; preds = %56
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = call i32 @sync_fs(ptr noundef %59)
  br label %.thread

.thread:                                          ; preds = %27, %25, %38, %43, %47, %13, %58, %56, %22
  %.5 = phi i32 [ %60, %58 ], [ %.4, %56 ], [ %23, %22 ], [ %.023, %13 ], [ 7, %38 ], [ %45, %43 ], [ %spec.store.select, %47 ], [ 6, %25 ], [ 7, %27 ]
  call void @ff_memfree(ptr noundef nonnull %10) #3
  br label %61

61:                                               ; preds = %.thread, %1
  %.6 = phi i32 [ %.5, %.thread ], [ %6, %1 ]
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  call void @unlock_volume(ptr noundef %62, i32 noundef %.6)
  br label %63

63:                                               ; preds = %61, %12
  %.0 = phi i32 [ %.6, %61 ], [ 17, %12 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @dir_remove(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 }

!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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"", !11, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !6, i64 40, !7, i64 48, !13, i64 60, !6, i64 64}
!11 = !{!"", !6, i64 0, !12, i64 8, !7, i64 10, !7, i64 11, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"short", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 16}
!15 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !12, i64 6, !12, i64 8, !12, i64 10, !6, i64 16, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !7, i64 64}
!16 = !{!7, !7, i64 0}
!17 = !{!10, !7, i64 10}
!18 = !{!10, !6, i64 40}
!19 = !{!15, !13, i64 32}
!20 = !{!10, !13, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass