; LLVM IR from mlcommons/tiny :: benchmark/interface/Middlewares/ST/filex/common/src (fx_directory_delete)

; 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.FX_DIR_ENTRY_STRUCT = type { ptr, [13 x i8], i32, i32, i8, i8, i8, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.FX_MEDIA_STRUCT = type { i64, ptr, ptr, i64, i32, i64, ptr, ptr, i64, i64, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i64, i64, i32, i64, i64, ptr, i32, i32, ptr, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.TX_MUTEX_STRUCT, i32, %struct.FX_DIR_ENTRY_STRUCT, %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], [256 x i8], %struct.FX_PATH_STRUCT, [16 x %struct.FX_FAT_CACHE_ENTRY_STRUCT], [128 x i8], i64, [1024 x i8], [256 x %struct.FX_CACHED_SECTOR_STRUCT], i64, i64, i64, i64, i8 }
%struct.TX_MUTEX_STRUCT = type { i64, ptr, i32, ptr, i32, i32, ptr, i32, ptr, ptr, i32, ptr, ptr }
%struct.FX_PATH_STRUCT = type { %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], [256 x i8], i64 }
%struct.FX_FAT_CACHE_ENTRY_STRUCT = type { i64, i64, i64 }
%struct.FX_CACHED_SECTOR_STRUCT = type { ptr, i64, i8, i8, i8, i8, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_directory_delete(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %12 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %13 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr %13) #4
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %15, i32 0, i32 57
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = add i64 %17, 1
  store i64 %18, ptr %16, align 8, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %19, i32 0, i32 122
  %21 = getelementptr inbounds [1024 x i8], ptr %20, i64 0, i64 0
  %22 = getelementptr inbounds i8, ptr %21, i64 256
  %23 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %11, i32 0, i32 0
  store ptr %22, ptr %23, align 8, !tbaa !17
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %24, i32 0, i32 122
  %26 = getelementptr inbounds [1024 x i8], ptr %25, i64 0, i64 0
  %27 = getelementptr inbounds i8, ptr %26, i64 512
  %28 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 0
  store ptr %27, ptr %28, align 8, !tbaa !17
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %29, i32 0, i32 122
  %31 = getelementptr inbounds [1024 x i8], ptr %30, i64 0, i64 0
  %32 = getelementptr inbounds i8, ptr %31, i64 768
  %33 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %13, i32 0, i32 0
  store ptr %32, ptr %33, align 8, !tbaa !17
  %34 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %11, i32 0, i32 1
  %35 = getelementptr inbounds [13 x i8], ptr %34, i64 0, i64 0
  store i8 0, ptr %35, align 8, !tbaa !18
  %36 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %37 = getelementptr inbounds [13 x i8], ptr %36, i64 0, i64 0
  store i8 0, ptr %37, align 8, !tbaa !18
  %38 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %13, i32 0, i32 1
  %39 = getelementptr inbounds [13 x i8], ptr %38, i64 0, i64 0
  store i8 0, ptr %39, align 8, !tbaa !18
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !19
  %43 = icmp ne i64 %42, 1296385097
  br i1 %43, label %44, label %45

44:                                               ; preds = %2
  store i32 17, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

45:                                               ; preds = %2
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %46, i32 0, i32 0
  %48 = load i64, ptr %47, align 8, !tbaa !19
  %49 = icmp ne i64 %48, 1296385097
  br i1 %49, label %50, label %51

50:                                               ; preds = %45
  store i32 17, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

51:                                               ; preds = %45
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %52, i32 0, i32 112
  %54 = call i32 @_tx_mutex_get(ptr noundef %53, i64 noundef 4294967295)
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  store i32 17, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

57:                                               ; preds = %51
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %59, i32 0, i32 40
  %61 = load i32, ptr %60, align 8, !tbaa !20
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %67

63:                                               ; preds = %58
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %64, i32 0, i32 112
  %66 = call i32 @_tx_mutex_put(ptr noundef %65)
  store i32 35, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

67:                                               ; preds = %58
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = call i32 @_fx_directory_search(ptr noundef %68, ptr noundef %69, ptr noundef %11, ptr noundef null, ptr noundef null)
  store i32 %70, ptr %6, align 4, !tbaa !21
  %71 = load i32, ptr %6, align 4, !tbaa !21
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %78

73:                                               ; preds = %67
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %74, i32 0, i32 112
  %76 = call i32 @_tx_mutex_put(ptr noundef %75)
  %77 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %77, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

78:                                               ; preds = %67
  %79 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %11, i32 0, i32 4
  %80 = load i8, ptr %79, align 8, !tbaa !22
  %81 = zext i8 %80 to i32
  %82 = and i32 %81, 16
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %88, label %84

84:                                               ; preds = %78
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %85, i32 0, i32 112
  %87 = call i32 @_tx_mutex_put(ptr noundef %86)
  store i32 14, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

88:                                               ; preds = %78
  %89 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %11, i32 0, i32 4
  %90 = load i8, ptr %89, align 8, !tbaa !22
  %91 = zext i8 %90 to i32
  %92 = and i32 %91, 1
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %98

94:                                               ; preds = %88
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %95, i32 0, i32 112
  %97 = call i32 @_tx_mutex_put(ptr noundef %96)
  store i32 35, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

98:                                               ; preds = %88
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %11, i64 136, i1 false), !tbaa.struct !23
  %99 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 17
  store i64 0, ptr %99, align 8, !tbaa !26
  store i64 0, ptr %9, align 8, !tbaa !24
  %100 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 12
  %101 = load i64, ptr %100, align 8, !tbaa !27
  store i64 %101, ptr %7, align 8, !tbaa !24
  br label %102

102:                                              ; preds = %138, %98
  %103 = load i64, ptr %7, align 8, !tbaa !24
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %104, i32 0, i32 126
  %106 = load i64, ptr %105, align 8, !tbaa !28
  %107 = icmp ult i64 %103, %106
  br i1 %107, label %108, label %140

108:                                              ; preds = %102
  %109 = load i64, ptr %9, align 8, !tbaa !24
  %110 = add i64 %109, 1
  store i64 %110, ptr %9, align 8, !tbaa !24
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load i64, ptr %7, align 8, !tbaa !24
  %113 = call i32 @_fx_utility_FAT_entry_read(ptr noundef %111, i64 noundef %112, ptr noundef %8)
  store i32 %113, ptr %6, align 4, !tbaa !21
  %114 = load i32, ptr %6, align 4, !tbaa !21
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %121

116:                                              ; preds = %108
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %117, i32 0, i32 112
  %119 = call i32 @_tx_mutex_put(ptr noundef %118)
  %120 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %120, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

121:                                              ; preds = %108
  %122 = load i64, ptr %7, align 8, !tbaa !24
  %123 = icmp ult i64 %122, 2
  br i1 %123, label %134, label %124

124:                                              ; preds = %121
  %125 = load i64, ptr %7, align 8, !tbaa !24
  %126 = load i64, ptr %8, align 8, !tbaa !24
  %127 = icmp eq i64 %125, %126
  br i1 %127, label %134, label %128

128:                                              ; preds = %124
  %129 = load i64, ptr %9, align 8, !tbaa !24
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %130, i32 0, i32 14
  %132 = load i64, ptr %131, align 8, !tbaa !29
  %133 = icmp ugt i64 %129, %132
  br i1 %133, label %134, label %138

134:                                              ; preds = %128, %124, %121
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %135, i32 0, i32 112
  %137 = call i32 @_tx_mutex_put(ptr noundef %136)
  store i32 3, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

138:                                              ; preds = %128
  %139 = load i64, ptr %8, align 8, !tbaa !24
  store i64 %139, ptr %7, align 8, !tbaa !24
  br label %102, !llvm.loop !30

140:                                              ; preds = %102
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %141, i32 0, i32 10
  %143 = load i32, ptr %142, align 8, !tbaa !32
  %144 = zext i32 %143 to i64
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %145, i32 0, i32 19
  %147 = load i32, ptr %146, align 8, !tbaa !33
  %148 = zext i32 %147 to i64
  %149 = mul i64 %144, %148
  %150 = load i64, ptr %9, align 8, !tbaa !24
  %151 = mul i64 %149, %150
  %152 = udiv i64 %151, 32
  store i64 %152, ptr %10, align 8, !tbaa !24
  %153 = load i64, ptr %10, align 8, !tbaa !24
  %154 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 13
  store i64 %153, ptr %154, align 8, !tbaa !34
  store i64 2, ptr %9, align 8, !tbaa !24
  br label %155

155:                                              ; preds = %187, %140
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = call i32 @_fx_directory_entry_read(ptr noundef %156, ptr noundef %12, ptr noundef %9, ptr noundef %13)
  store i32 %157, ptr %6, align 4, !tbaa !21
  %158 = load i32, ptr %6, align 4, !tbaa !21
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %165

160:                                              ; preds = %155
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %161, i32 0, i32 112
  %163 = call i32 @_tx_mutex_put(ptr noundef %162)
  %164 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %164, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

165:                                              ; preds = %155
  %166 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %13, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !17
  %168 = getelementptr inbounds i8, ptr %167, i64 0
  %169 = load i8, ptr %168, align 1, !tbaa !18
  %170 = sext i8 %169 to i32
  %171 = icmp eq i32 %170, 0
  br i1 %171, label %172, label %173

172:                                              ; preds = %165
  br label %191

173:                                              ; preds = %165
  %174 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %13, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !17
  %176 = getelementptr inbounds i8, ptr %175, i64 0
  %177 = load i8, ptr %176, align 1, !tbaa !18
  %178 = zext i8 %177 to i32
  %179 = icmp ne i32 %178, 229
  br i1 %179, label %180, label %184

180:                                              ; preds = %173
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %181, i32 0, i32 112
  %183 = call i32 @_tx_mutex_put(ptr noundef %182)
  store i32 16, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

184:                                              ; preds = %173
  %185 = load i64, ptr %9, align 8, !tbaa !24
  %186 = add i64 %185, 1
  store i64 %186, ptr %9, align 8, !tbaa !24
  br label %187

187:                                              ; preds = %184
  %188 = load i64, ptr %9, align 8, !tbaa !24
  %189 = load i64, ptr %10, align 8, !tbaa !24
  %190 = icmp ult i64 %188, %189
  br i1 %190, label %155, label %191, !llvm.loop !35

191:                                              ; preds = %187, %172
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %192, i32 0, i32 117
  %194 = getelementptr inbounds [256 x i8], ptr %193, i64 0, i64 0
  store i8 0, ptr %194, align 8, !tbaa !18
  %195 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %11, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8, !tbaa !17
  %197 = getelementptr inbounds i8, ptr %196, i64 0
  store i8 -27, ptr %197, align 1, !tbaa !18
  %198 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %11, i32 0, i32 1
  %199 = getelementptr inbounds [13 x i8], ptr %198, i64 0, i64 0
  store i8 -27, ptr %199, align 8, !tbaa !18
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = call i32 @_fx_directory_entry_write(ptr noundef %200, ptr noundef %11)
  store i32 %201, ptr %6, align 4, !tbaa !21
  %202 = load i32, ptr %6, align 4, !tbaa !21
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %209

204:                                              ; preds = %191
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %205, i32 0, i32 112
  %207 = call i32 @_tx_mutex_put(ptr noundef %206)
  %208 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %208, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

209:                                              ; preds = %191
  %210 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 12
  %211 = load i64, ptr %210, align 8, !tbaa !27
  store i64 %211, ptr %7, align 8, !tbaa !24
  br label %212

212:                                              ; preds = %259, %209
  %213 = load i64, ptr %7, align 8, !tbaa !24
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %214, i32 0, i32 126
  %216 = load i64, ptr %215, align 8, !tbaa !28
  %217 = icmp ult i64 %213, %216
  br i1 %217, label %218, label %265

218:                                              ; preds = %212
  %219 = load i64, ptr %9, align 8, !tbaa !24
  %220 = add i64 %219, 1
  store i64 %220, ptr %9, align 8, !tbaa !24
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = load i64, ptr %7, align 8, !tbaa !24
  %223 = call i32 @_fx_utility_FAT_entry_read(ptr noundef %221, i64 noundef %222, ptr noundef %8)
  store i32 %223, ptr %6, align 4, !tbaa !21
  %224 = load i32, ptr %6, align 4, !tbaa !21
  %225 = icmp ne i32 %224, 0
  br i1 %225, label %226, label %231

226:                                              ; preds = %218
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %227, i32 0, i32 112
  %229 = call i32 @_tx_mutex_put(ptr noundef %228)
  %230 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %230, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

231:                                              ; preds = %218
  %232 = load i64, ptr %7, align 8, !tbaa !24
  %233 = icmp ult i64 %232, 2
  br i1 %233, label %244, label %234

234:                                              ; preds = %231
  %235 = load i64, ptr %7, align 8, !tbaa !24
  %236 = load i64, ptr %8, align 8, !tbaa !24
  %237 = icmp eq i64 %235, %236
  br i1 %237, label %244, label %238

238:                                              ; preds = %234
  %239 = load i64, ptr %9, align 8, !tbaa !24
  %240 = load ptr, ptr %4, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %240, i32 0, i32 14
  %242 = load i64, ptr %241, align 8, !tbaa !29
  %243 = icmp ugt i64 %239, %242
  br i1 %243, label %244, label %248

244:                                              ; preds = %238, %234, %231
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %245, i32 0, i32 112
  %247 = call i32 @_tx_mutex_put(ptr noundef %246)
  store i32 3, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

248:                                              ; preds = %238
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = load i64, ptr %7, align 8, !tbaa !24
  %251 = call i32 @_fx_utility_FAT_entry_write(ptr noundef %249, i64 noundef %250, i64 noundef 0)
  store i32 %251, ptr %6, align 4, !tbaa !21
  %252 = load i32, ptr %6, align 4, !tbaa !21
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %259

254:                                              ; preds = %248
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %255, i32 0, i32 112
  %257 = call i32 @_tx_mutex_put(ptr noundef %256)
  %258 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %258, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

259:                                              ; preds = %248
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %260, i32 0, i32 29
  %262 = load i64, ptr %261, align 8, !tbaa !36
  %263 = add i64 %262, 1
  store i64 %263, ptr %261, align 8, !tbaa !36
  %264 = load i64, ptr %8, align 8, !tbaa !24
  store i64 %264, ptr %7, align 8, !tbaa !24
  br label %212, !llvm.loop !37

265:                                              ; preds = %212
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  %267 = load ptr, ptr %4, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %267, i32 0, i32 20
  %269 = load i32, ptr %268, align 4, !tbaa !38
  %270 = zext i32 %269 to i64
  %271 = call i32 @_fx_utility_logical_sector_flush(ptr noundef %266, i64 noundef 1, i64 noundef %270, i32 noundef 0)
  store i32 %271, ptr %6, align 4, !tbaa !21
  %272 = load ptr, ptr %4, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %272, i32 0, i32 112
  %274 = call i32 @_tx_mutex_put(ptr noundef %273)
  %275 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %275, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %276

276:                                              ; preds = %265, %254, %244, %226, %204, %180, %160, %134, %116, %94, %84, %73, %63, %56, %50, %44
  call void @llvm.lifetime.end.p0(i64 136, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 136, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 136, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %277 = load i32, ptr %3, align 4
  ret i32 %277
}

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

declare i32 @_tx_mutex_get(ptr noundef, i64 noundef) #2

declare i32 @_tx_mutex_put(ptr noundef) #2

declare i32 @_fx_directory_search(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare i32 @_fx_utility_FAT_entry_read(ptr noundef, i64 noundef, ptr noundef) #2

declare i32 @_fx_directory_entry_read(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @_fx_directory_entry_write(ptr noundef, ptr noundef) #2

declare i32 @_fx_utility_FAT_entry_write(ptr noundef, i64 noundef, i64 noundef) #2

declare i32 @_fx_utility_logical_sector_flush(ptr noundef, i64 noundef, i64 noundef, i32 noundef) #2

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

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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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, !11, i64 384}
!10 = !{!"FX_MEDIA_STRUCT", !11, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !12, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !13, i64 96, !11, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !11, i64 152, !12, i64 160, !11, i64 168, !11, i64 176, !12, i64 184, !11, i64 192, !11, i64 200, !6, i64 208, !12, i64 216, !12, i64 220, !6, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !12, i64 256, !12, i64 260, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !11, i64 320, !6, i64 328, !6, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !11, i64 392, !11, i64 400, !11, i64 408, !11, i64 416, !11, i64 424, !11, i64 432, !11, i64 440, !11, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !11, i64 520, !11, i64 528, !11, i64 536, !11, i64 544, !11, i64 552, !11, i64 560, !11, i64 568, !11, i64 576, !11, i64 584, !11, i64 592, !11, i64 600, !11, i64 608, !11, i64 616, !11, i64 624, !11, i64 632, !11, i64 640, !11, i64 648, !11, i64 656, !11, i64 664, !11, i64 672, !11, i64 680, !11, i64 688, !11, i64 696, !11, i64 704, !11, i64 712, !11, i64 720, !11, i64 728, !11, i64 736, !11, i64 744, !11, i64 752, !11, i64 760, !11, i64 768, !11, i64 776, !11, i64 784, !11, i64 792, !11, i64 800, !11, i64 808, !11, i64 816, !14, i64 824, !12, i64 920, !15, i64 928, !15, i64 1064, !7, i64 1200, !7, i64 1456, !16, i64 1712, !7, i64 2368, !7, i64 2752, !11, i64 2880, !7, i64 2888, !7, i64 3912, !11, i64 12104, !11, i64 12112, !11, i64 12120, !11, i64 12128, !7, i64 12136}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"TX_MUTEX_STRUCT", !11, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !6, i64 40, !12, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !6, i64 80, !6, i64 88}
!15 = !{!"FX_DIR_ENTRY_STRUCT", !6, i64 0, !7, i64 8, !12, i64 24, !12, i64 28, !7, i64 32, !7, i64 33, !7, i64 34, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !11, i64 56, !13, i64 64, !13, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !13, i64 112, !11, i64 120, !13, i64 128}
!16 = !{!"FX_PATH_STRUCT", !15, i64 0, !7, i64 136, !7, i64 392, !11, i64 648}
!17 = !{!15, !6, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!10, !11, i64 0}
!20 = !{!10, !12, i64 264}
!21 = !{!12, !12, i64 0}
!22 = !{!15, !7, i64 32}
!23 = !{i64 0, i64 8, !5, i64 8, i64 13, !18, i64 24, i64 4, !21, i64 28, i64 4, !21, i64 32, i64 1, !18, i64 33, i64 1, !18, i64 34, i64 1, !18, i64 36, i64 4, !21, i64 40, i64 4, !21, i64 44, i64 4, !21, i64 48, i64 4, !21, i64 52, i64 4, !21, i64 56, i64 8, !24, i64 64, i64 8, !25, i64 72, i64 8, !25, i64 80, i64 8, !24, i64 88, i64 8, !24, i64 96, i64 8, !24, i64 104, i64 8, !24, i64 112, i64 8, !25, i64 120, i64 8, !24, i64 128, i64 8, !25}
!24 = !{!11, !11, i64 0}
!25 = !{!13, !13, i64 0}
!26 = !{!15, !11, i64 96}
!27 = !{!15, !11, i64 56}
!28 = !{!10, !11, i64 12120}
!29 = !{!10, !11, i64 104}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!10, !12, i64 80}
!33 = !{!10, !12, i64 128}
!34 = !{!15, !13, i64 64}
!35 = distinct !{!35, !31}
!36 = !{!10, !11, i64 192}
!37 = distinct !{!37, !31}
!38 = !{!10, !12, i64 132}


; 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.FX_DIR_ENTRY_STRUCT = type { ptr, [13 x i8], i32, i32, i8, i8, i8, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_directory_delete(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %6 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %7 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %7) #4
  %8 = getelementptr inbounds i8, ptr %0, i64 384
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = add i64 %9, 1
  store i64 %10, ptr %8, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 3144
  store ptr %11, ptr %5, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %0, i64 3656
  store ptr %12, ptr %7, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  store i8 0, ptr %13, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %7, i64 8
  store i8 0, ptr %14, align 8, !tbaa !17
  %15 = load i64, ptr %0, align 8, !tbaa !18
  %.not = icmp eq i64 %15, 1296385097
  br i1 %.not, label %16, label %130

16:                                               ; preds = %2
  %17 = getelementptr inbounds i8, ptr %0, i64 824
  %18 = tail call i32 @_tx_mutex_get(ptr noundef nonnull %17, i64 noundef 4294967295) #4
  %.not70 = icmp eq i32 %18, 0
  br i1 %.not70, label %19, label %130

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %0, i64 264
  %21 = load i32, ptr %20, align 8, !tbaa !19
  %.not71 = icmp eq i32 %21, 0
  br i1 %.not71, label %24, label %22

22:                                               ; preds = %19
  %23 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

24:                                               ; preds = %19
  %25 = call i32 @_fx_directory_search(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %5, ptr noundef null, ptr noundef null) #4
  %.not72 = icmp eq i32 %25, 0
  br i1 %.not72, label %28, label %26

26:                                               ; preds = %24
  %27 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %5, i64 32
  %30 = load i8, ptr %29, align 8, !tbaa !20
  %31 = zext i8 %30 to i32
  %32 = and i32 %31, 16
  %.not73 = icmp eq i32 %32, 0
  br i1 %.not73, label %33, label %35

33:                                               ; preds = %28
  %34 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

35:                                               ; preds = %28
  %36 = and i32 %31, 1
  %.not74 = icmp eq i32 %36, 0
  br i1 %.not74, label %39, label %37

37:                                               ; preds = %35
  %38 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

39:                                               ; preds = %35
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(136) %6, ptr noundef nonnull align 8 dereferenceable(136) %5, i64 136, i1 false), !tbaa.struct !21
  %40 = getelementptr inbounds i8, ptr %6, i64 96
  store i64 0, ptr %40, align 8, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %6, i64 56
  %42 = load i64, ptr %41, align 8, !tbaa !27
  %43 = getelementptr inbounds i8, ptr %0, i64 12120
  %44 = getelementptr inbounds i8, ptr %0, i64 104
  br label %45

45:                                               ; preds = %59, %39
  %46 = phi i64 [ 0, %39 ], [ %50, %59 ]
  %.062 = phi i64 [ %42, %39 ], [ %57, %59 ]
  %47 = load i64, ptr %43, align 8, !tbaa !28
  %48 = icmp ult i64 %.062, %47
  br i1 %48, label %49, label %64

49:                                               ; preds = %45
  %50 = add i64 %46, 1
  store i64 %50, ptr %4, align 8, !tbaa !24
  %51 = call i32 @_fx_utility_FAT_entry_read(ptr noundef nonnull %0, i64 noundef %.062, ptr noundef nonnull %3) #4
  %.not80 = icmp eq i32 %51, 0
  br i1 %.not80, label %54, label %52

52:                                               ; preds = %49
  %53 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

54:                                               ; preds = %49
  %55 = icmp ult i64 %.062, 2
  br i1 %55, label %62, label %56

56:                                               ; preds = %54
  %57 = load i64, ptr %3, align 8, !tbaa !24
  %58 = icmp eq i64 %.062, %57
  br i1 %58, label %62, label %59

59:                                               ; preds = %56
  %60 = load i64, ptr %44, align 8, !tbaa !29
  %61 = icmp ugt i64 %50, %60
  br i1 %61, label %62, label %45, !llvm.loop !30

62:                                               ; preds = %59, %56, %54
  %63 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

64:                                               ; preds = %45
  %65 = getelementptr inbounds i8, ptr %0, i64 80
  %66 = load i32, ptr %65, align 8, !tbaa !32
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %0, i64 128
  %69 = load i32, ptr %68, align 8, !tbaa !33
  %70 = zext i32 %69 to i64
  %71 = mul nuw i64 %70, %67
  %72 = mul i64 %71, %46
  %73 = lshr i64 %72, 5
  %74 = getelementptr inbounds i8, ptr %6, i64 64
  store i64 %73, ptr %74, align 8, !tbaa !34
  store i64 2, ptr %4, align 8, !tbaa !24
  br label %75

75:                                               ; preds = %84, %64
  %76 = call i32 @_fx_directory_entry_read(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %7) #4
  %.not75 = icmp eq i32 %76, 0
  br i1 %.not75, label %79, label %77

77:                                               ; preds = %75
  %78 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

79:                                               ; preds = %75
  %80 = load ptr, ptr %7, align 8, !tbaa !16
  %81 = load i8, ptr %80, align 1, !tbaa !17
  switch i8 %81, label %82 [
    i8 0, label %88
    i8 -27, label %84
  ]

82:                                               ; preds = %79
  %83 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

84:                                               ; preds = %79
  %85 = load i64, ptr %4, align 8, !tbaa !24
  %86 = add i64 %85, 1
  store i64 %86, ptr %4, align 8, !tbaa !24
  %87 = icmp ult i64 %86, %73
  br i1 %87, label %75, label %88, !llvm.loop !35

88:                                               ; preds = %79, %84
  %89 = getelementptr inbounds i8, ptr %0, i64 1456
  store i8 0, ptr %89, align 8, !tbaa !17
  %90 = load ptr, ptr %5, align 8, !tbaa !16
  store i8 -27, ptr %90, align 1, !tbaa !17
  store i8 -27, ptr %13, align 8, !tbaa !17
  %91 = call i32 @_fx_directory_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %5) #4
  %.not77 = icmp eq i32 %91, 0
  br i1 %.not77, label %94, label %92

92:                                               ; preds = %88
  %93 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

94:                                               ; preds = %88
  %95 = load i64, ptr %41, align 8, !tbaa !27
  %96 = load i64, ptr %43, align 8, !tbaa !28
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %94
  %98 = getelementptr inbounds i8, ptr %0, i64 192
  br label %99

99:                                               ; preds = %.lr.ph, %119
  %.193 = phi i64 [ %95, %.lr.ph ], [ %122, %119 ]
  %100 = load i64, ptr %4, align 8, !tbaa !24
  %101 = add i64 %100, 1
  store i64 %101, ptr %4, align 8, !tbaa !24
  %102 = call i32 @_fx_utility_FAT_entry_read(ptr noundef nonnull %0, i64 noundef %.193, ptr noundef nonnull %3) #4
  %.not78 = icmp eq i32 %102, 0
  br i1 %.not78, label %105, label %103

103:                                              ; preds = %99
  %104 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

105:                                              ; preds = %99
  %106 = icmp ult i64 %.193, 2
  %107 = load i64, ptr %3, align 8
  %108 = icmp eq i64 %.193, %107
  %or.cond = select i1 %106, i1 true, i1 %108
  br i1 %or.cond, label %113, label %109

109:                                              ; preds = %105
  %110 = load i64, ptr %4, align 8, !tbaa !24
  %111 = load i64, ptr %44, align 8, !tbaa !29
  %112 = icmp ugt i64 %110, %111
  br i1 %112, label %113, label %115

113:                                              ; preds = %109, %105
  %114 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

115:                                              ; preds = %109
  %116 = call i32 @_fx_utility_FAT_entry_write(ptr noundef nonnull %0, i64 noundef %.193, i64 noundef 0) #4
  %.not79 = icmp eq i32 %116, 0
  br i1 %.not79, label %119, label %117

117:                                              ; preds = %115
  %118 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

119:                                              ; preds = %115
  %120 = load i64, ptr %98, align 8, !tbaa !36
  %121 = add i64 %120, 1
  store i64 %121, ptr %98, align 8, !tbaa !36
  %122 = load i64, ptr %3, align 8, !tbaa !24
  %123 = load i64, ptr %43, align 8, !tbaa !28
  %124 = icmp ult i64 %122, %123
  br i1 %124, label %99, label %._crit_edge, !llvm.loop !37

._crit_edge:                                      ; preds = %119, %94
  %125 = getelementptr inbounds i8, ptr %0, i64 132
  %126 = load i32, ptr %125, align 4, !tbaa !38
  %127 = zext i32 %126 to i64
  %128 = call i32 @_fx_utility_logical_sector_flush(ptr noundef nonnull %0, i64 noundef 1, i64 noundef %127, i32 noundef 0) #4
  %129 = call i32 @_tx_mutex_put(ptr noundef nonnull %17) #4
  br label %130

130:                                              ; preds = %16, %2, %._crit_edge, %117, %113, %103, %92, %82, %77, %62, %52, %37, %33, %26, %22
  %.0 = phi i32 [ 35, %22 ], [ %25, %26 ], [ 35, %37 ], [ %51, %52 ], [ 3, %62 ], [ %76, %77 ], [ %91, %92 ], [ %102, %103 ], [ 3, %113 ], [ %116, %117 ], [ %128, %._crit_edge ], [ 16, %82 ], [ 14, %33 ], [ 17, %2 ], [ 17, %16 ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i32 %.0
}

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

declare i32 @_tx_mutex_get(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @_tx_mutex_put(ptr noundef) local_unnamed_addr #2

declare i32 @_fx_directory_search(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare i32 @_fx_utility_FAT_entry_read(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @_fx_directory_entry_read(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @_fx_directory_entry_write(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @_fx_utility_FAT_entry_write(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare i32 @_fx_utility_logical_sector_flush(ptr noundef, i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

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 = { "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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, !7, i64 384}
!6 = !{!"FX_MEDIA_STRUCT", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !11, i64 32, !7, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !12, i64 96, !7, i64 104, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !7, i64 152, !11, i64 160, !7, i64 168, !7, i64 176, !11, i64 184, !7, i64 192, !7, i64 200, !10, i64 208, !11, i64 216, !11, i64 220, !10, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !7, i64 320, !10, i64 328, !10, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !7, i64 672, !7, i64 680, !7, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !7, i64 760, !7, i64 768, !7, i64 776, !7, i64 784, !7, i64 792, !7, i64 800, !7, i64 808, !7, i64 816, !13, i64 824, !11, i64 920, !14, i64 928, !14, i64 1064, !8, i64 1200, !8, i64 1456, !15, i64 1712, !8, i64 2368, !8, i64 2752, !7, i64 2880, !8, i64 2888, !8, i64 3912, !7, i64 12104, !7, i64 12112, !7, i64 12120, !7, i64 12128, !8, i64 12136}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"TX_MUTEX_STRUCT", !7, i64 0, !10, i64 8, !11, i64 16, !10, i64 24, !11, i64 32, !11, i64 36, !10, i64 40, !11, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !10, i64 80, !10, i64 88}
!14 = !{!"FX_DIR_ENTRY_STRUCT", !10, i64 0, !8, i64 8, !11, i64 24, !11, i64 28, !8, i64 32, !8, i64 33, !8, i64 34, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !7, i64 56, !12, i64 64, !12, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !12, i64 112, !7, i64 120, !12, i64 128}
!15 = !{!"FX_PATH_STRUCT", !14, i64 0, !8, i64 136, !8, i64 392, !7, i64 648}
!16 = !{!14, !10, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!6, !7, i64 0}
!19 = !{!6, !11, i64 264}
!20 = !{!14, !8, i64 32}
!21 = !{i64 0, i64 8, !22, i64 8, i64 13, !17, i64 24, i64 4, !23, i64 28, i64 4, !23, i64 32, i64 1, !17, i64 33, i64 1, !17, i64 34, i64 1, !17, i64 36, i64 4, !23, i64 40, i64 4, !23, i64 44, i64 4, !23, i64 48, i64 4, !23, i64 52, i64 4, !23, i64 56, i64 8, !24, i64 64, i64 8, !25, i64 72, i64 8, !25, i64 80, i64 8, !24, i64 88, i64 8, !24, i64 96, i64 8, !24, i64 104, i64 8, !24, i64 112, i64 8, !25, i64 120, i64 8, !24, i64 128, i64 8, !25}
!22 = !{!10, !10, i64 0}
!23 = !{!11, !11, i64 0}
!24 = !{!7, !7, i64 0}
!25 = !{!12, !12, i64 0}
!26 = !{!14, !7, i64 96}
!27 = !{!14, !7, i64 56}
!28 = !{!6, !7, i64 12120}
!29 = !{!6, !7, i64 104}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!6, !11, i64 80}
!33 = !{!6, !11, i64 128}
!34 = !{!14, !12, i64 64}
!35 = distinct !{!35, !31}
!36 = !{!6, !7, i64 192}
!37 = distinct !{!37, !31}
!38 = !{!6, !11, i64 132}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass