; LLVM IR from lichen-community-systems/signaletic :: hosts/daisy/vendor/libDaisy/Middlewares/Third_Party/FatFs/src (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._FDID, i64, i64, i64, ptr, [12 x i8], i64 }
%struct._FDID = type { ptr, i16, i8, i8, i64, i64 }
%struct.FATFS = type { i8, i8, i8, i8, i8, i16, i16, i16, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, [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 @get_ldnumber(ptr noundef) #1

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @f_rename(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.DIR, align 8
  %7 = alloca %struct.DIR, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [24 x i8], align 16
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 88, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 88, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  %12 = call i32 @get_ldnumber(ptr noundef %4)
  %13 = call i32 @find_volume(ptr noundef %3, ptr noundef %8, i8 noundef zeroext 2)
  store i32 %13, ptr %5, align 4, !tbaa !9
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %149

16:                                               ; preds = %2
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %19 = getelementptr inbounds %struct._FDID, ptr %18, i32 0, i32 0
  store ptr %17, ptr %19, align 8, !tbaa !11
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call i32 @follow_path(ptr noundef %6, ptr noundef %20)
  store i32 %21, ptr %5, align 4, !tbaa !9
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %32

24:                                               ; preds = %16
  %25 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 5
  %26 = getelementptr inbounds [12 x i8], ptr %25, i64 0, i64 11
  %27 = load i8, ptr %26, align 1, !tbaa !16
  %28 = zext i8 %27 to i32
  %29 = and i32 %28, 160
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %24
  store i32 6, ptr %5, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %31, %24, %16
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %148

35:                                               ; preds = %32
  %36 = getelementptr inbounds [24 x i8], ptr %9, i64 0, i64 0
  %37 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %38, i64 11
  call void @mem_cpy(ptr noundef %36, ptr noundef %39, i32 noundef 21)
  call void @mem_cpy(ptr noundef %7, ptr noundef %6, i32 noundef 88)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call i32 @follow_path(ptr noundef %7, ptr noundef %40)
  store i32 %41, ptr %5, align 4, !tbaa !9
  %42 = load i32, ptr %5, align 4, !tbaa !9
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %62

44:                                               ; preds = %35
  %45 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 0
  %46 = getelementptr inbounds %struct._FDID, ptr %45, i32 0, i32 4
  %47 = load i64, ptr %46, align 8, !tbaa !18
  %48 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %49 = getelementptr inbounds %struct._FDID, ptr %48, i32 0, i32 4
  %50 = load i64, ptr %49, align 8, !tbaa !18
  %51 = icmp eq i64 %47, %50
  br i1 %51, label %52, label %58

52:                                               ; preds = %44
  %53 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 1
  %54 = load i64, ptr %53, align 8, !tbaa !19
  %55 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 1
  %56 = load i64, ptr %55, align 8, !tbaa !19
  %57 = icmp eq i64 %54, %56
  br label %58

58:                                               ; preds = %52, %44
  %59 = phi i1 [ false, %44 ], [ %57, %52 ]
  %60 = zext i1 %59 to i64
  %61 = select i1 %59, i32 4, i32 8
  store i32 %61, ptr %5, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %58, %35
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 4
  br i1 %64, label %65, label %136

65:                                               ; preds = %62
  %66 = call i32 @dir_register(ptr noundef %7)
  store i32 %66, ptr %5, align 4, !tbaa !9
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %135

69:                                               ; preds = %65
  %70 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !17
  store ptr %71, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 13
  %74 = getelementptr inbounds [24 x i8], ptr %9, i64 0, i64 0
  %75 = getelementptr inbounds i8, ptr %74, i64 2
  call void @mem_cpy(ptr noundef %73, ptr noundef %75, i32 noundef 19)
  %76 = getelementptr inbounds [24 x i8], ptr %9, i64 0, i64 0
  %77 = load i8, ptr %76, align 16, !tbaa !16
  %78 = zext i8 %77 to i32
  %79 = or i32 %78, 32
  %80 = trunc i32 %79 to i8
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 11
  store i8 %80, ptr %82, align 1, !tbaa !16
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.FATFS, ptr %83, i32 0, i32 3
  store i8 1, ptr %84, align 1, !tbaa !20
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 11
  %87 = load i8, ptr %86, align 1, !tbaa !16
  %88 = zext i8 %87 to i32
  %89 = and i32 %88, 16
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %134

91:                                               ; preds = %69
  %92 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %93 = getelementptr inbounds %struct._FDID, ptr %92, i32 0, i32 4
  %94 = load i64, ptr %93, align 8, !tbaa !18
  %95 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 0
  %96 = getelementptr inbounds %struct._FDID, ptr %95, i32 0, i32 4
  %97 = load i64, ptr %96, align 8, !tbaa !18
  %98 = icmp ne i64 %94, %97
  br i1 %98, label %99, label %134

99:                                               ; preds = %91
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = call i64 @ld_clust(ptr noundef %101, ptr noundef %102)
  %104 = call i64 @clust2sect(ptr noundef %100, i64 noundef %103)
  store i64 %104, ptr %11, align 8, !tbaa !22
  %105 = load i64, ptr %11, align 8, !tbaa !22
  %106 = icmp ne i64 %105, 0
  br i1 %106, label %108, label %107

107:                                              ; preds = %99
  store i32 2, ptr %5, align 4, !tbaa !9
  br label %133

108:                                              ; preds = %99
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = load i64, ptr %11, align 8, !tbaa !22
  %111 = call i32 @move_window(ptr noundef %109, i64 noundef %110)
  store i32 %111, ptr %5, align 4, !tbaa !9
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.FATFS, ptr %112, i32 0, i32 18
  %114 = getelementptr inbounds [512 x i8], ptr %113, i64 0, i64 0
  %115 = getelementptr inbounds i8, ptr %114, i64 32
  store ptr %115, ptr %10, align 8, !tbaa !5
  %116 = load i32, ptr %5, align 4, !tbaa !9
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %132

118:                                              ; preds = %108
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds i8, ptr %119, i64 1
  %121 = load i8, ptr %120, align 1, !tbaa !16
  %122 = zext i8 %121 to i32
  %123 = icmp eq i32 %122, 46
  br i1 %123, label %124, label %132

124:                                              ; preds = %118
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 0
  %128 = getelementptr inbounds %struct._FDID, ptr %127, i32 0, i32 4
  %129 = load i64, ptr %128, align 8, !tbaa !18
  call void @st_clust(ptr noundef %125, ptr noundef %126, i64 noundef %129)
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.FATFS, ptr %130, i32 0, i32 3
  store i8 1, ptr %131, align 1, !tbaa !20
  br label %132

132:                                              ; preds = %124, %118, %108
  br label %133

133:                                              ; preds = %132, %107
  br label %134

134:                                              ; preds = %133, %91, %69
  br label %135

135:                                              ; preds = %134, %65
  br label %136

136:                                              ; preds = %135, %62
  %137 = load i32, ptr %5, align 4, !tbaa !9
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %147

139:                                              ; preds = %136
  %140 = call i32 @dir_remove(ptr noundef %6)
  store i32 %140, ptr %5, align 4, !tbaa !9
  %141 = load i32, ptr %5, align 4, !tbaa !9
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %146

143:                                              ; preds = %139
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = call i32 @sync_fs(ptr noundef %144)
  store i32 %145, ptr %5, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %143, %139
  br label %147

147:                                              ; preds = %146, %136
  br label %148

148:                                              ; preds = %147, %32
  br label %149

149:                                              ; preds = %148, %2
  %150 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 88, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 88, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #2
  ret i32 %150
}

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 = { 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, !15, i64 32, !15, i64 40, !15, i64 48, !6, i64 56, !7, i64 64, !15, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !7, i64 10, !7, i64 11, !15, i64 16, !15, i64 24}
!14 = !{!"short", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!12, !6, i64 56}
!18 = !{!12, !15, i64 16}
!19 = !{!12, !15, i64 32}
!20 = !{!21, !7, i64 3}
!21 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !14, i64 6, !14, i64 8, !14, i64 10, !6, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !7, i64 96}
!22 = !{!15, !15, 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"

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

; 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 @get_ldnumber(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @find_volume(ptr noundef, ptr noundef, i8 noundef zeroext) 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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @f_rename(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.DIR, align 8
  %6 = alloca %struct.DIR, align 8
  %7 = alloca ptr, align 8
  %8 = alloca [24 x i8], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %5) #2
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %6) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #2
  %9 = call i32 @get_ldnumber(ptr noundef nonnull %4)
  %10 = call i32 @find_volume(ptr noundef nonnull %3, ptr noundef nonnull %7, i8 noundef zeroext 2)
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %.thread33

12:                                               ; preds = %2
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %13, ptr %5, align 8, !tbaa !9
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call i32 @follow_path(ptr noundef nonnull %5, ptr noundef %14)
  %16 = icmp eq i32 %15, 0
  %17 = getelementptr inbounds i8, ptr %5, i64 75
  %18 = load i8, ptr %17, align 1
  %19 = and i8 %18, -96
  %.not = icmp eq i8 %19, 0
  %spec.select = select i1 %.not, i32 0, i32 6
  %.0 = select i1 %16, i32 %spec.select, i32 %15
  %20 = select i1 %16, i1 %.not, i1 false
  br i1 %20, label %21, label %.thread33

21:                                               ; preds = %12
  %22 = getelementptr inbounds i8, ptr %5, i64 56
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %23, i64 11
  call void @mem_cpy(ptr noundef nonnull %8, ptr noundef nonnull %24, i32 noundef 21)
  call void @mem_cpy(ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef 88)
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call i32 @follow_path(ptr noundef nonnull %6, ptr noundef %25)
  switch i32 %26, label %.thread33 [
    i32 0, label %27
    i32 4, label %.thread
  ]

27:                                               ; preds = %21
  %28 = getelementptr inbounds i8, ptr %6, i64 16
  %29 = load i64, ptr %28, align 8, !tbaa !15
  %30 = getelementptr inbounds i8, ptr %5, i64 16
  %31 = load i64, ptr %30, align 8, !tbaa !15
  %32 = icmp eq i64 %29, %31
  %33 = getelementptr inbounds i8, ptr %6, i64 32
  %34 = load i64, ptr %33, align 8
  %35 = getelementptr inbounds i8, ptr %5, i64 32
  %36 = load i64, ptr %35, align 8
  %37 = icmp eq i64 %34, %36
  %38 = select i1 %32, i1 %37, i1 false
  br i1 %38, label %.thread, label %.thread33

.thread:                                          ; preds = %21, %27
  %39 = call i32 @dir_register(ptr noundef nonnull %6)
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %.thread33

41:                                               ; preds = %.thread
  %42 = getelementptr inbounds i8, ptr %6, i64 56
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %43, i64 13
  %45 = getelementptr inbounds i8, ptr %8, i64 2
  call void @mem_cpy(ptr noundef nonnull %44, ptr noundef nonnull %45, i32 noundef 19)
  %46 = load i8, ptr %8, align 16, !tbaa !16
  %47 = or i8 %46, 32
  %48 = getelementptr inbounds i8, ptr %43, i64 11
  store i8 %47, ptr %48, align 1, !tbaa !16
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 3
  store i8 1, ptr %50, align 1, !tbaa !17
  %51 = load i8, ptr %48, align 1, !tbaa !16
  %52 = and i8 %51, 16
  %.not27 = icmp eq i8 %52, 0
  br i1 %.not27, label %75, label %53

53:                                               ; preds = %41
  %54 = getelementptr inbounds i8, ptr %5, i64 16
  %55 = load i64, ptr %54, align 8, !tbaa !15
  %56 = getelementptr inbounds i8, ptr %6, i64 16
  %57 = load i64, ptr %56, align 8, !tbaa !15
  %.not28 = icmp eq i64 %55, %57
  br i1 %.not28, label %75, label %58

58:                                               ; preds = %53
  %59 = call i64 @ld_clust(ptr noundef nonnull %49, ptr noundef nonnull %43)
  %60 = call i64 @clust2sect(ptr noundef nonnull %49, i64 noundef %59)
  %.not29 = icmp eq i64 %60, 0
  br i1 %.not29, label %.thread33, label %61

61:                                               ; preds = %58
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = call i32 @move_window(ptr noundef %62, i64 noundef %60)
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i64 128
  %66 = icmp eq i32 %63, 0
  br i1 %66, label %67, label %.thread33

67:                                               ; preds = %61
  %68 = getelementptr inbounds i8, ptr %64, i64 129
  %69 = load i8, ptr %68, align 1, !tbaa !16
  %70 = icmp eq i8 %69, 46
  br i1 %70, label %71, label %75

71:                                               ; preds = %67
  %72 = load i64, ptr %56, align 8, !tbaa !15
  call void @st_clust(ptr noundef nonnull %64, ptr noundef nonnull %65, i64 noundef %72)
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 3
  store i8 1, ptr %74, align 1, !tbaa !17
  br label %75

75:                                               ; preds = %41, %53, %67, %71
  %76 = call i32 @dir_remove(ptr noundef nonnull %5)
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %.thread33

78:                                               ; preds = %75
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = call i32 @sync_fs(ptr noundef %79)
  br label %.thread33

.thread33:                                        ; preds = %21, %27, %58, %.thread, %61, %12, %75, %78, %2
  %.3 = phi i32 [ %80, %78 ], [ %76, %75 ], [ %.0, %12 ], [ %10, %2 ], [ 2, %58 ], [ %39, %.thread ], [ %63, %61 ], [ 8, %27 ], [ %26, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #2
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %6) #2
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #2
  ret i32 %.3
}

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 = { 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 32, !13, i64 40, !13, i64 48, !6, i64 56, !7, i64 64, !13, i64 80}
!11 = !{!"", !6, i64 0, !12, i64 8, !7, i64 10, !7, i64 11, !13, i64 16, !13, i64 24}
!12 = !{!"short", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !6, i64 56}
!15 = !{!10, !13, i64 16}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !7, i64 3}
!18 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !12, i64 6, !12, i64 8, !12, i64 10, !6, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !7, i64 96}


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