; LLVM IR from cvra/robot-software :: lib/fatfs (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 { ptr, i16, i16, i64, i64, i64, ptr, ptr }
%struct.FATFS = type { i8, i8, i8, i8, i8, i8, i16, i16, i64, i64, i64, i64, i64, i64, i64, i64, i64, [512 x i8] }

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @get_ldnumber(ptr noundef) #0

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @f_rename(ptr noundef %0, ptr noundef %1) #0 {
  %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 [21 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca [12 x i8], align 1
  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 56, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 21, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #2
  %12 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %13 = call i32 @find_volume(ptr noundef %12, ptr noundef %3, i8 noundef zeroext 1)
  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 %156

16:                                               ; preds = %2
  %17 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 0
  store ptr %18, ptr %19, align 8, !tbaa !11
  %20 = getelementptr inbounds [12 x i8], ptr %11, i64 0, i64 0
  %21 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 7
  store ptr %20, ptr %21, align 8, !tbaa !15
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call i32 @follow_path(ptr noundef %6, ptr noundef %22)
  store i32 %23, ptr %5, align 4, !tbaa !9
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %155

26:                                               ; preds = %16
  %27 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 6
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = icmp ne ptr %28, null
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 4, ptr %5, align 4, !tbaa !9
  br label %154

31:                                               ; preds = %26
  %32 = getelementptr inbounds [21 x i8], ptr %8, i64 0, i64 0
  %33 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 6
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %34, i64 11
  call void @mem_cpy(ptr noundef %32, ptr noundef %35, i32 noundef 21)
  call void @mem_cpy(ptr noundef %7, ptr noundef %6, i32 noundef 56)
  %36 = call i32 @get_ldnumber(ptr noundef %4)
  %37 = icmp sge i32 %36, 0
  br i1 %37, label %38, label %41

38:                                               ; preds = %31
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call i32 @follow_path(ptr noundef %7, ptr noundef %39)
  store i32 %40, ptr %5, align 4, !tbaa !9
  br label %42

41:                                               ; preds = %31
  store i32 11, ptr %5, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %41, %38
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  store i32 8, ptr %5, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %45, %42
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = icmp eq i32 %47, 4
  br i1 %48, label %49, label %153

49:                                               ; preds = %46
  %50 = call i32 @dir_register(ptr noundef %7)
  store i32 %50, ptr %5, align 4, !tbaa !9
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %152

53:                                               ; preds = %49
  %54 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 6
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  store ptr %55, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 13
  %58 = getelementptr inbounds [21 x i8], ptr %8, i64 0, i64 0
  %59 = getelementptr inbounds i8, ptr %58, i64 2
  call void @mem_cpy(ptr noundef %57, ptr noundef %59, i32 noundef 19)
  %60 = getelementptr inbounds [21 x i8], ptr %8, i64 0, i64 0
  %61 = load i8, ptr %60, align 16, !tbaa !17
  %62 = zext i8 %61 to i32
  %63 = or i32 %62, 32
  %64 = trunc i32 %63 to i8
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 11
  store i8 %64, ptr %66, align 1, !tbaa !17
  %67 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !11
  %69 = getelementptr inbounds %struct.FATFS, ptr %68, i32 0, i32 4
  store i8 1, ptr %69, align 4, !tbaa !18
  %70 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 3
  %71 = load i64, ptr %70, align 8, !tbaa !20
  %72 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 3
  %73 = load i64, ptr %72, align 8, !tbaa !20
  %74 = icmp ne i64 %71, %73
  br i1 %74, label %75, label %139

75:                                               ; preds = %53
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 11
  %78 = load i8, ptr %77, align 1, !tbaa !17
  %79 = zext i8 %78 to i32
  %80 = and i32 %79, 16
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %139

82:                                               ; preds = %75
  %83 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !11
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = call i64 @ld_clust(ptr noundef %86, ptr noundef %87)
  %89 = call i64 @clust2sect(ptr noundef %84, i64 noundef %88)
  store i64 %89, ptr %10, align 8, !tbaa !21
  %90 = load i64, ptr %10, align 8, !tbaa !21
  %91 = icmp ne i64 %90, 0
  br i1 %91, label %93, label %92

92:                                               ; preds = %82
  store i32 2, ptr %5, align 4, !tbaa !9
  br label %138

93:                                               ; preds = %82
  %94 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !11
  %96 = load i64, ptr %10, align 8, !tbaa !21
  %97 = call i32 @move_window(ptr noundef %95, i64 noundef %96)
  store i32 %97, ptr %5, align 4, !tbaa !9
  %98 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds %struct.FATFS, ptr %99, i32 0, i32 17
  %101 = getelementptr inbounds [512 x i8], ptr %100, i64 0, i64 0
  %102 = getelementptr inbounds i8, ptr %101, i64 32
  store ptr %102, ptr %9, align 8, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !9
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %137

105:                                              ; preds = %93
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 1
  %108 = load i8, ptr %107, align 1, !tbaa !17
  %109 = zext i8 %108 to i32
  %110 = icmp eq i32 %109, 46
  br i1 %110, label %111, label %137

111:                                              ; preds = %105
  %112 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = getelementptr inbounds %struct.FATFS, ptr %113, i32 0, i32 0
  %115 = load i8, ptr %114, align 8, !tbaa !22
  %116 = zext i8 %115 to i32
  %117 = icmp eq i32 %116, 3
  br i1 %117, label %118, label %127

118:                                              ; preds = %111
  %119 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 3
  %120 = load i64, ptr %119, align 8, !tbaa !20
  %121 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !11
  %123 = getelementptr inbounds %struct.FATFS, ptr %122, i32 0, i32 14
  %124 = load i64, ptr %123, align 8, !tbaa !23
  %125 = icmp eq i64 %120, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %118
  br label %130

127:                                              ; preds = %118, %111
  %128 = getelementptr inbounds %struct.DIR, ptr %7, i32 0, i32 3
  %129 = load i64, ptr %128, align 8, !tbaa !20
  br label %130

130:                                              ; preds = %127, %126
  %131 = phi i64 [ 0, %126 ], [ %129, %127 ]
  store i64 %131, ptr %10, align 8, !tbaa !21
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = load i64, ptr %10, align 8, !tbaa !21
  call void @st_clust(ptr noundef %132, i64 noundef %133)
  %134 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.FATFS, ptr %135, i32 0, i32 4
  store i8 1, ptr %136, align 4, !tbaa !18
  br label %137

137:                                              ; preds = %130, %105, %93
  br label %138

138:                                              ; preds = %137, %92
  br label %139

139:                                              ; preds = %138, %75, %53
  %140 = load i32, ptr %5, align 4, !tbaa !9
  %141 = icmp eq i32 %140, 0
  br i1 %141, label %142, label %151

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

146:                                              ; preds = %142
  %147 = getelementptr inbounds %struct.DIR, ptr %6, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !11
  %149 = call i32 @sync_fs(ptr noundef %148)
  store i32 %149, ptr %5, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %146, %142
  br label %151

151:                                              ; preds = %150, %139
  br label %152

152:                                              ; preds = %151, %49
  br label %153

153:                                              ; preds = %152, %46
  br label %154

154:                                              ; preds = %153, %30
  br label %155

155:                                              ; preds = %154, %16
  br label %156

156:                                              ; preds = %155, %2
  %157 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 21, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #2
  ret i32 %157
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!"", !6, i64 0, !13, i64 8, !13, i64 10, !14, i64 16, !14, i64 24, !14, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!"short", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !6, i64 48}
!16 = !{!12, !6, i64 40}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !7, i64 4}
!19 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !13, i64 6, !13, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !7, i64 88}
!20 = !{!12, !14, i64 16}
!21 = !{!14, !14, i64 0}
!22 = !{!19, !7, i64 0}
!23 = !{!19, !14, i64 64}


; 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 { ptr, i16, i16, i64, i64, i64, ptr, ptr }

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @f_rename(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.DIR, align 8
  %6 = alloca %struct.DIR, align 8
  %7 = alloca [21 x i8], align 16
  %8 = alloca [12 x i8], align 1
  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 56, ptr nonnull %5) #2
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #2
  call void @llvm.lifetime.start.p0(i64 21, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #2
  %9 = call i32 @find_volume(ptr noundef nonnull %5, ptr noundef nonnull %3, i8 noundef zeroext 1)
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %.thread31

11:                                               ; preds = %2
  %12 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %12, ptr %6, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %5, i64 48
  store ptr %8, ptr %13, align 8, !tbaa !13
  %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
  br i1 %16, label %17, label %.thread31

17:                                               ; preds = %11
  %18 = getelementptr inbounds i8, ptr %5, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  %.not = icmp eq ptr %19, null
  br i1 %.not, label %.thread31, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %19, i64 11
  call void @mem_cpy(ptr noundef nonnull %7, ptr noundef nonnull %21, i32 noundef 21)
  call void @mem_cpy(ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef 56)
  %22 = call i32 @get_ldnumber(ptr noundef nonnull %4)
  %23 = icmp sgt i32 %22, -1
  br i1 %23, label %24, label %.thread31

24:                                               ; preds = %20
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call i32 @follow_path(ptr noundef nonnull %6, ptr noundef %25)
  %.fr = freeze i32 %26
  switch i32 %.fr, label %.thread31.fold.split [
    i32 0, label %.thread31
    i32 4, label %27
  ]

27:                                               ; preds = %24
  %28 = call i32 @dir_register(ptr noundef nonnull %6)
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %.thread31

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %6, i64 40
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = getelementptr inbounds i8, ptr %32, i64 13
  %34 = getelementptr inbounds i8, ptr %7, i64 2
  call void @mem_cpy(ptr noundef nonnull %33, ptr noundef nonnull %34, i32 noundef 19)
  %35 = load i8, ptr %7, align 16, !tbaa !15
  %36 = or i8 %35, 32
  %37 = getelementptr inbounds i8, ptr %32, i64 11
  store i8 %36, ptr %37, align 1, !tbaa !15
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %38, i64 4
  store i8 1, ptr %39, align 4, !tbaa !16
  %40 = getelementptr inbounds i8, ptr %5, i64 16
  %41 = load i64, ptr %40, align 8, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %6, i64 16
  %43 = load i64, ptr %42, align 8, !tbaa !18
  %.not26 = icmp eq i64 %41, %43
  br i1 %.not26, label %72, label %44

44:                                               ; preds = %30
  %45 = load i8, ptr %37, align 1, !tbaa !15
  %46 = and i8 %45, 16
  %.not27 = icmp eq i8 %46, 0
  br i1 %.not27, label %72, label %47

47:                                               ; preds = %44
  %48 = call i64 @ld_clust(ptr noundef nonnull %38, ptr noundef nonnull %32)
  %49 = call i64 @clust2sect(ptr noundef nonnull %38, i64 noundef %48)
  %.not28 = icmp eq i64 %49, 0
  br i1 %.not28, label %.thread31, label %50

50:                                               ; preds = %47
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  %52 = call i32 @move_window(ptr noundef %51, i64 noundef %49)
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = getelementptr inbounds i8, ptr %53, i64 120
  %55 = icmp eq i32 %52, 0
  br i1 %55, label %56, label %.thread31

56:                                               ; preds = %50
  %57 = getelementptr inbounds i8, ptr %53, i64 121
  %58 = load i8, ptr %57, align 1, !tbaa !15
  %59 = icmp eq i8 %58, 46
  br i1 %59, label %60, label %72

60:                                               ; preds = %56
  %61 = load i8, ptr %53, align 8, !tbaa !19
  %62 = icmp eq i8 %61, 3
  %.pre = load i64, ptr %42, align 8, !tbaa !18
  br i1 %62, label %63, label %67

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %53, i64 64
  %65 = load i64, ptr %64, align 8, !tbaa !20
  %66 = icmp eq i64 %.pre, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63, %60
  br label %68

68:                                               ; preds = %63, %67
  %69 = phi i64 [ %.pre, %67 ], [ 0, %63 ]
  call void @st_clust(ptr noundef nonnull %54, i64 noundef %69)
  %70 = load ptr, ptr %5, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %70, i64 4
  store i8 1, ptr %71, align 4, !tbaa !16
  br label %72

72:                                               ; preds = %68, %56, %44, %30
  %73 = call i32 @dir_remove(ptr noundef nonnull %5)
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %.thread31

75:                                               ; preds = %72
  %76 = load ptr, ptr %5, align 8, !tbaa !9
  %77 = call i32 @sync_fs(ptr noundef %76)
  br label %.thread31

.thread31.fold.split:                             ; preds = %24
  br label %.thread31

.thread31:                                        ; preds = %24, %.thread31.fold.split, %20, %50, %47, %17, %11, %75, %72, %27, %2
  %.2 = phi i32 [ %77, %75 ], [ %73, %72 ], [ %28, %27 ], [ %15, %11 ], [ %9, %2 ], [ 4, %17 ], [ %52, %50 ], [ 2, %47 ], [ 11, %20 ], [ 8, %24 ], [ %.fr, %.thread31.fold.split ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 21, ptr nonnull %7) #2
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #2
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #2
  ret i32 %.2
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!"", !6, i64 0, !11, i64 8, !11, i64 10, !12, i64 16, !12, i64 24, !12, i64 32, !6, i64 40, !6, i64 48}
!11 = !{!"short", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !6, i64 48}
!14 = !{!10, !6, i64 40}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !7, i64 4}
!17 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !11, i64 6, !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !7, i64 88}
!18 = !{!10, !12, i64 16}
!19 = !{!17, !7, i64 0}
!20 = !{!17, !12, i64 64}


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