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

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

@_fx_system_time = external global i32, align 4
@_fx_system_date = external global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_directory_create(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 i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %15 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %16 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %17 = alloca i32, align 4
  %18 = 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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 136, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 136, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 136, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %19, i32 0, i32 54
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = add i64 %21, 1
  store i64 %22, ptr %20, align 8, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !17
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %23, ptr %11, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %57, %2
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = load i8, ptr %25, align 1, !tbaa !18
  %27 = sext i8 %26 to i32
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %32

29:                                               ; preds = %24
  %30 = load i64, ptr %13, align 8, !tbaa !17
  %31 = icmp ult i64 %30, 256
  br label %32

32:                                               ; preds = %29, %24
  %33 = phi i1 [ false, %24 ], [ %31, %29 ]
  br i1 %33, label %34, label %60

34:                                               ; preds = %32
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = load i8, ptr %35, align 1, !tbaa !18
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 %37, 92
  br i1 %38, label %44, label %39

39:                                               ; preds = %34
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = load i8, ptr %40, align 1, !tbaa !18
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 47
  br i1 %43, label %44, label %45

44:                                               ; preds = %39, %34
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %57

45:                                               ; preds = %39
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = load i8, ptr %46, align 1, !tbaa !18
  %48 = sext i8 %47 to i32
  %49 = icmp ne i32 %48, 32
  br i1 %49, label %53, label %50

50:                                               ; preds = %45
  %51 = load i64, ptr %13, align 8, !tbaa !17
  %52 = icmp ne i64 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %50, %45
  %54 = load i64, ptr %13, align 8, !tbaa !17
  %55 = add i64 %54, 1
  store i64 %55, ptr %13, align 8, !tbaa !17
  br label %56

56:                                               ; preds = %53, %50
  br label %57

57:                                               ; preds = %56, %44
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i32 1
  store ptr %59, ptr %11, align 8, !tbaa !5
  br label %24, !llvm.loop !19

60:                                               ; preds = %32
  %61 = load i64, ptr %13, align 8, !tbaa !17
  %62 = icmp eq i64 %61, 0
  br i1 %62, label %66, label %63

63:                                               ; preds = %60
  %64 = load i64, ptr %13, align 8, !tbaa !17
  %65 = icmp uge i64 %64, 256
  br i1 %65, label %66, label %67

66:                                               ; preds = %63, %60
  store i32 12, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

67:                                               ; preds = %63
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %68, i32 0, i32 122
  %70 = getelementptr inbounds [1024 x i8], ptr %69, i64 0, i64 0
  %71 = getelementptr inbounds i8, ptr %70, i64 256
  %72 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 0
  store ptr %71, ptr %72, align 8, !tbaa !21
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %73, i32 0, i32 122
  %75 = getelementptr inbounds [1024 x i8], ptr %74, i64 0, i64 0
  %76 = getelementptr inbounds i8, ptr %75, i64 512
  %77 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 0
  store ptr %76, ptr %77, align 8, !tbaa !21
  %78 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 1
  %79 = getelementptr inbounds [13 x i8], ptr %78, i64 0, i64 0
  store i8 0, ptr %79, align 8, !tbaa !18
  %80 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 1
  %81 = getelementptr inbounds [13 x i8], ptr %80, i64 0, i64 0
  store i8 0, ptr %81, align 8, !tbaa !18
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %82, i32 0, i32 0
  %84 = load i64, ptr %83, align 8, !tbaa !22
  %85 = icmp ne i64 %84, 1296385097
  br i1 %85, label %86, label %87

86:                                               ; preds = %67
  store i32 17, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

87:                                               ; preds = %67
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %88, i32 0, i32 0
  %90 = load i64, ptr %89, align 8, !tbaa !22
  %91 = icmp ne i64 %90, 1296385097
  br i1 %91, label %92, label %93

92:                                               ; preds = %87
  store i32 17, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

93:                                               ; preds = %87
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %94, i32 0, i32 112
  %96 = call i32 @_tx_mutex_get(ptr noundef %95, i64 noundef 4294967295)
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %93
  store i32 17, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

99:                                               ; preds = %93
  br label %100

100:                                              ; preds = %99
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %101, i32 0, i32 40
  %103 = load i32, ptr %102, align 8, !tbaa !23
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %109

105:                                              ; preds = %100
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %106, i32 0, i32 112
  %108 = call i32 @_tx_mutex_put(ptr noundef %107)
  store i32 35, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

109:                                              ; preds = %100
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %110, i32 0, i32 29
  %112 = load i64, ptr %111, align 8, !tbaa !24
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %118, label %114

114:                                              ; preds = %109
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %115, i32 0, i32 112
  %117 = call i32 @_tx_mutex_put(ptr noundef %116)
  store i32 10, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

118:                                              ; preds = %109
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = call i32 @_fx_directory_search(ptr noundef %119, ptr noundef %120, ptr noundef %14, ptr noundef %16, ptr noundef %11)
  store i32 %121, ptr %6, align 4, !tbaa !25
  %122 = load i32, ptr %6, align 4, !tbaa !25
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %124, label %128

124:                                              ; preds = %118
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %125, i32 0, i32 112
  %127 = call i32 @_tx_mutex_put(ptr noundef %126)
  store i32 11, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

128:                                              ; preds = %118
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !21
  %132 = getelementptr inbounds i8, ptr %131, i64 0
  %133 = call ptr @_fx_directory_name_extract(ptr noundef %129, ptr noundef %132)
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %139

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

139:                                              ; preds = %128
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = call i32 @_fx_directory_free_search(ptr noundef %140, ptr noundef %16, ptr noundef %14)
  store i32 %141, ptr %6, align 4, !tbaa !25
  %142 = load i32, ptr %6, align 4, !tbaa !25
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %149

144:                                              ; preds = %139
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %145, i32 0, i32 112
  %147 = call i32 @_tx_mutex_put(ptr noundef %146)
  %148 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %148, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

149:                                              ; preds = %139
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %150, i32 0, i32 30
  %152 = load i64, ptr %151, align 8, !tbaa !26
  store i64 %152, ptr %7, align 8, !tbaa !17
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %153, i32 0, i32 14
  %155 = load i64, ptr %154, align 8, !tbaa !27
  store i64 %155, ptr %10, align 8, !tbaa !17
  br label %156

156:                                              ; preds = %208, %149
  %157 = load i64, ptr %10, align 8, !tbaa !17
  %158 = icmp ne i64 %157, 0
  br i1 %158, label %163, label %159

159:                                              ; preds = %156
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %160, i32 0, i32 112
  %162 = call i32 @_tx_mutex_put(ptr noundef %161)
  store i32 10, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

163:                                              ; preds = %156
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = load i64, ptr %7, align 8, !tbaa !17
  %166 = call i32 @_fx_utility_FAT_entry_read(ptr noundef %164, i64 noundef %165, ptr noundef %8)
  store i32 %166, ptr %6, align 4, !tbaa !25
  %167 = load i32, ptr %6, align 4, !tbaa !25
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %174

169:                                              ; preds = %163
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %170, i32 0, i32 112
  %172 = call i32 @_tx_mutex_put(ptr noundef %171)
  %173 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %173, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

174:                                              ; preds = %163
  %175 = load i64, ptr %10, align 8, !tbaa !17
  %176 = add i64 %175, -1
  store i64 %176, ptr %10, align 8, !tbaa !17
  %177 = load i64, ptr %8, align 8, !tbaa !17
  %178 = icmp eq i64 %177, 0
  br i1 %178, label %179, label %196

179:                                              ; preds = %174
  %180 = load i64, ptr %7, align 8, !tbaa !17
  %181 = add i64 %180, 1
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %182, i32 0, i32 30
  store i64 %181, ptr %183, align 8, !tbaa !26
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %184, i32 0, i32 30
  %186 = load i64, ptr %185, align 8, !tbaa !26
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %187, i32 0, i32 14
  %189 = load i64, ptr %188, align 8, !tbaa !27
  %190 = add i64 %189, 2
  %191 = icmp uge i64 %186, %190
  br i1 %191, label %192, label %195

192:                                              ; preds = %179
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %193, i32 0, i32 30
  store i64 2, ptr %194, align 8, !tbaa !26
  br label %195

195:                                              ; preds = %192, %179
  br label %209

196:                                              ; preds = %174
  %197 = load i64, ptr %7, align 8, !tbaa !17
  %198 = add i64 %197, 1
  store i64 %198, ptr %7, align 8, !tbaa !17
  %199 = load i64, ptr %7, align 8, !tbaa !17
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %200, i32 0, i32 14
  %202 = load i64, ptr %201, align 8, !tbaa !27
  %203 = add i64 %202, 2
  %204 = icmp uge i64 %199, %203
  br i1 %204, label %205, label %206

205:                                              ; preds = %196
  store i64 2, ptr %7, align 8, !tbaa !17
  br label %206

206:                                              ; preds = %205, %196
  br label %207

207:                                              ; preds = %206
  br label %208

208:                                              ; preds = %207
  br i1 true, label %156, label %209

209:                                              ; preds = %208, %195
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %210, i32 0, i32 29
  %212 = load i64, ptr %211, align 8, !tbaa !24
  %213 = add i64 %212, -1
  store i64 %213, ptr %211, align 8, !tbaa !24
  %214 = load ptr, ptr %11, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !21
  %217 = getelementptr inbounds i8, ptr %216, i64 0
  %218 = call ptr @_fx_directory_name_extract(ptr noundef %214, ptr noundef %217)
  %219 = call i32 @__disable_interrupts()
  store i32 %219, ptr %17, align 4, !tbaa !25
  %220 = load i32, ptr @_fx_system_time, align 4, !tbaa !25
  %221 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 10
  store i32 %220, ptr %221, align 8, !tbaa !28
  %222 = load i32, ptr @_fx_system_date, align 4, !tbaa !25
  %223 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 11
  store i32 %222, ptr %223, align 4, !tbaa !29
  %224 = load i32, ptr %17, align 4, !tbaa !25
  call void @__restore_interrupt(i32 noundef %224)
  %225 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 4
  store i8 16, ptr %225, align 8, !tbaa !30
  %226 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 13
  store i64 0, ptr %226, align 8, !tbaa !31
  %227 = load i64, ptr %7, align 8, !tbaa !17
  %228 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 12
  store i64 %227, ptr %228, align 8, !tbaa !32
  %229 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 0
  %230 = load ptr, ptr %229, align 8, !tbaa !21
  %231 = getelementptr inbounds i8, ptr %230, i64 0
  %232 = load i8, ptr %231, align 1, !tbaa !18
  %233 = sext i8 %232 to i32
  %234 = icmp eq i32 %233, 46
  br i1 %234, label %235, label %241

235:                                              ; preds = %209
  %236 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 4
  %237 = load i8, ptr %236, align 8, !tbaa !30
  %238 = zext i8 %237 to i32
  %239 = or i32 %238, 2
  %240 = trunc i32 %239 to i8
  store i8 %240, ptr %236, align 8, !tbaa !30
  br label %241

241:                                              ; preds = %235, %209
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %242, i32 0, i32 18
  %244 = load i32, ptr %243, align 4, !tbaa !33
  %245 = zext i32 %244 to i64
  %246 = load i64, ptr %7, align 8, !tbaa !17
  %247 = sub i64 %246, 2
  %248 = load ptr, ptr %4, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %248, i32 0, i32 19
  %250 = load i32, ptr %249, align 8, !tbaa !34
  %251 = zext i32 %250 to i64
  %252 = mul i64 %247, %251
  %253 = add i64 %245, %252
  store i64 %253, ptr %12, align 8, !tbaa !35
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %254, i32 0, i32 19
  %256 = load i32, ptr %255, align 8, !tbaa !34
  store i32 %256, ptr %9, align 4, !tbaa !25
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = load i64, ptr %12, align 8, !tbaa !35
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %259, i32 0, i32 2
  %261 = load ptr, ptr %260, align 8, !tbaa !36
  %262 = call i32 @_fx_utility_logical_sector_read(ptr noundef %257, i64 noundef %258, ptr noundef %261, i64 noundef 1, i8 noundef zeroext 3)
  store i32 %262, ptr %6, align 4, !tbaa !25
  %263 = load i32, ptr %6, align 4, !tbaa !25
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %265, label %270

265:                                              ; preds = %241
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %266, i32 0, i32 112
  %268 = call i32 @_tx_mutex_put(ptr noundef %267)
  %269 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %269, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

270:                                              ; preds = %241
  %271 = load ptr, ptr %4, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %271, i32 0, i32 2
  %273 = load ptr, ptr %272, align 8, !tbaa !36
  store ptr %273, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %274

274:                                              ; preds = %281, %270
  %275 = load i64, ptr %13, align 8, !tbaa !17
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %276, i32 0, i32 10
  %278 = load i32, ptr %277, align 8, !tbaa !37
  %279 = zext i32 %278 to i64
  %280 = icmp ult i64 %275, %279
  br i1 %280, label %281, label %287

281:                                              ; preds = %274
  %282 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %282, align 8, !tbaa !17
  %283 = load ptr, ptr %11, align 8, !tbaa !5
  %284 = getelementptr inbounds i8, ptr %283, i64 8
  store ptr %284, ptr %11, align 8, !tbaa !5
  %285 = load i64, ptr %13, align 8, !tbaa !17
  %286 = add i64 %285, 8
  store i64 %286, ptr %13, align 8, !tbaa !17
  br label %274, !llvm.loop !38

287:                                              ; preds = %274
  %288 = load i32, ptr %9, align 4, !tbaa !25
  %289 = icmp ugt i32 %288, 1
  br i1 %289, label %290, label %358

290:                                              ; preds = %287
  %291 = load ptr, ptr %4, align 8, !tbaa !5
  %292 = load i64, ptr %12, align 8, !tbaa !35
  %293 = add i64 %292, 1
  %294 = load i32, ptr %9, align 4, !tbaa !25
  %295 = sub i32 %294, 1
  %296 = zext i32 %295 to i64
  %297 = call i32 @_fx_utility_logical_sector_flush(ptr noundef %291, i64 noundef %293, i64 noundef %296, i32 noundef 1)
  store i32 %297, ptr %6, align 4, !tbaa !25
  %298 = load i32, ptr %6, align 4, !tbaa !25
  %299 = icmp ne i32 %298, 0
  br i1 %299, label %300, label %305

300:                                              ; preds = %290
  %301 = load ptr, ptr %4, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %301, i32 0, i32 112
  %303 = call i32 @_tx_mutex_put(ptr noundef %302)
  %304 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %304, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

305:                                              ; preds = %290
  %306 = load i32, ptr %9, align 4, !tbaa !25
  %307 = add i32 %306, -1
  store i32 %307, ptr %9, align 4, !tbaa !25
  br label %308

308:                                              ; preds = %354, %305
  %309 = load i32, ptr %9, align 4, !tbaa !25
  %310 = icmp ne i32 %309, 0
  br i1 %310, label %311, label %357

311:                                              ; preds = %308
  %312 = load ptr, ptr %4, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %312, i32 0, i32 106
  %314 = load i64, ptr %313, align 8, !tbaa !39
  %315 = add i64 %314, 1
  store i64 %315, ptr %313, align 8, !tbaa !39
  %316 = load ptr, ptr %4, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %316, i32 0, i32 32
  store i32 1, ptr %317, align 8, !tbaa !40
  %318 = load ptr, ptr %4, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %318, i32 0, i32 33
  store i32 144, ptr %319, align 4, !tbaa !41
  %320 = load ptr, ptr %4, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %320, i32 0, i32 2
  %322 = load ptr, ptr %321, align 8, !tbaa !36
  %323 = load ptr, ptr %4, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %323, i32 0, i32 34
  store ptr %322, ptr %324, align 8, !tbaa !42
  %325 = load i64, ptr %12, align 8, !tbaa !35
  %326 = load i32, ptr %9, align 4, !tbaa !25
  %327 = zext i32 %326 to i64
  %328 = add i64 %325, %327
  %329 = load ptr, ptr %4, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %329, i32 0, i32 35
  store i64 %328, ptr %330, align 8, !tbaa !43
  %331 = load ptr, ptr %4, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %331, i32 0, i32 36
  store i64 1, ptr %332, align 8, !tbaa !44
  %333 = load ptr, ptr %4, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %333, i32 0, i32 44
  store i32 3, ptr %334, align 8, !tbaa !45
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %335, i32 0, i32 42
  store i32 1, ptr %336, align 8, !tbaa !46
  %337 = load ptr, ptr %4, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %337, i32 0, i32 45
  %339 = load ptr, ptr %338, align 8, !tbaa !47
  %340 = load ptr, ptr %4, align 8, !tbaa !5
  call void %339(ptr noundef %340)
  %341 = load ptr, ptr %4, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %341, i32 0, i32 42
  store i32 0, ptr %342, align 8, !tbaa !46
  %343 = load ptr, ptr %4, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %343, i32 0, i32 33
  %345 = load i32, ptr %344, align 4, !tbaa !41
  %346 = icmp ne i32 %345, 0
  br i1 %346, label %347, label %354

347:                                              ; preds = %311
  %348 = load ptr, ptr %4, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %348, i32 0, i32 112
  %350 = call i32 @_tx_mutex_put(ptr noundef %349)
  %351 = load ptr, ptr %4, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %351, i32 0, i32 33
  %353 = load i32, ptr %352, align 4, !tbaa !41
  store i32 %353, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

354:                                              ; preds = %311
  %355 = load i32, ptr %9, align 4, !tbaa !25
  %356 = add i32 %355, -1
  store i32 %356, ptr %9, align 4, !tbaa !25
  br label %308, !llvm.loop !48

357:                                              ; preds = %308
  br label %358

358:                                              ; preds = %357, %287
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %14, i64 136, i1 false), !tbaa.struct !49
  %359 = load ptr, ptr %4, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %359, i32 0, i32 122
  %361 = getelementptr inbounds [1024 x i8], ptr %360, i64 0, i64 0
  %362 = getelementptr inbounds i8, ptr %361, i64 768
  %363 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  store ptr %362, ptr %363, align 8, !tbaa !21
  %364 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %365 = load ptr, ptr %364, align 8, !tbaa !21
  %366 = getelementptr inbounds i8, ptr %365, i64 0
  store ptr %366, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %367

367:                                              ; preds = %373, %358
  %368 = load i64, ptr %13, align 8, !tbaa !17
  %369 = icmp ult i64 %368, 11
  br i1 %369, label %370, label %376

370:                                              ; preds = %367
  %371 = load ptr, ptr %11, align 8, !tbaa !5
  %372 = getelementptr inbounds i8, ptr %371, i32 1
  store ptr %372, ptr %11, align 8, !tbaa !5
  store i8 32, ptr %371, align 1, !tbaa !18
  br label %373

373:                                              ; preds = %370
  %374 = load i64, ptr %13, align 8, !tbaa !17
  %375 = add i64 %374, 1
  store i64 %375, ptr %13, align 8, !tbaa !17
  br label %367, !llvm.loop !50

376:                                              ; preds = %367
  %377 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 2
  store i32 0, ptr %377, align 8, !tbaa !51
  %378 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %379 = load ptr, ptr %378, align 8, !tbaa !21
  %380 = getelementptr inbounds i8, ptr %379, i64 0
  store i8 46, ptr %380, align 1, !tbaa !18
  %381 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %382 = load ptr, ptr %381, align 8, !tbaa !21
  %383 = getelementptr inbounds i8, ptr %382, i64 1
  store i8 0, ptr %383, align 1, !tbaa !18
  %384 = load i64, ptr %12, align 8, !tbaa !35
  %385 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 14
  store i64 %384, ptr %385, align 8, !tbaa !52
  %386 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 15
  store i64 0, ptr %386, align 8, !tbaa !53
  %387 = load ptr, ptr %4, align 8, !tbaa !5
  %388 = call i32 @_fx_directory_entry_write(ptr noundef %387, ptr noundef %15)
  store i32 %388, ptr %6, align 4, !tbaa !25
  %389 = load i32, ptr %6, align 4, !tbaa !25
  %390 = icmp ne i32 %389, 0
  br i1 %390, label %391, label %396

391:                                              ; preds = %376
  %392 = load ptr, ptr %4, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %392, i32 0, i32 112
  %394 = call i32 @_tx_mutex_put(ptr noundef %393)
  %395 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %395, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

396:                                              ; preds = %376
  %397 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 0
  %398 = load ptr, ptr %397, align 8, !tbaa !21
  %399 = getelementptr inbounds i8, ptr %398, i64 0
  %400 = load i8, ptr %399, align 1, !tbaa !18
  %401 = icmp ne i8 %400, 0
  br i1 %401, label %402, label %440

402:                                              ; preds = %396
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %16, i64 136, i1 false), !tbaa.struct !49
  %403 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 10
  %404 = load i32, ptr %403, align 8, !tbaa !28
  %405 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 10
  store i32 %404, ptr %405, align 8, !tbaa !28
  %406 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %14, i32 0, i32 11
  %407 = load i32, ptr %406, align 4, !tbaa !29
  %408 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 11
  store i32 %407, ptr %408, align 4, !tbaa !29
  %409 = load ptr, ptr %4, align 8, !tbaa !5
  %410 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %409, i32 0, i32 122
  %411 = getelementptr inbounds [1024 x i8], ptr %410, i64 0, i64 0
  %412 = getelementptr inbounds i8, ptr %411, i64 768
  %413 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  store ptr %412, ptr %413, align 8, !tbaa !21
  %414 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %415 = load ptr, ptr %414, align 8, !tbaa !21
  %416 = getelementptr inbounds i8, ptr %415, i64 0
  store ptr %416, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %417

417:                                              ; preds = %423, %402
  %418 = load i64, ptr %13, align 8, !tbaa !17
  %419 = icmp ult i64 %418, 11
  br i1 %419, label %420, label %426

420:                                              ; preds = %417
  %421 = load ptr, ptr %11, align 8, !tbaa !5
  %422 = getelementptr inbounds i8, ptr %421, i32 1
  store ptr %422, ptr %11, align 8, !tbaa !5
  store i8 32, ptr %421, align 1, !tbaa !18
  br label %423

423:                                              ; preds = %420
  %424 = load i64, ptr %13, align 8, !tbaa !17
  %425 = add i64 %424, 1
  store i64 %425, ptr %13, align 8, !tbaa !17
  br label %417, !llvm.loop !54

426:                                              ; preds = %417
  %427 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %428 = load ptr, ptr %427, align 8, !tbaa !21
  %429 = getelementptr inbounds i8, ptr %428, i64 0
  store i8 46, ptr %429, align 1, !tbaa !18
  %430 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %431 = load ptr, ptr %430, align 8, !tbaa !21
  %432 = getelementptr inbounds i8, ptr %431, i64 1
  store i8 46, ptr %432, align 1, !tbaa !18
  %433 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %434 = load ptr, ptr %433, align 8, !tbaa !21
  %435 = getelementptr inbounds i8, ptr %434, i64 2
  store i8 0, ptr %435, align 1, !tbaa !18
  %436 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 2
  store i32 0, ptr %436, align 8, !tbaa !51
  %437 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 13
  store i64 0, ptr %437, align 8, !tbaa !31
  %438 = load i64, ptr %12, align 8, !tbaa !35
  %439 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 14
  store i64 %438, ptr %439, align 8, !tbaa !52
  br label %448

440:                                              ; preds = %396
  %441 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %442 = load ptr, ptr %441, align 8, !tbaa !21
  %443 = getelementptr inbounds i8, ptr %442, i64 1
  store i8 46, ptr %443, align 1, !tbaa !18
  %444 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 0
  %445 = load ptr, ptr %444, align 8, !tbaa !21
  %446 = getelementptr inbounds i8, ptr %445, i64 2
  store i8 0, ptr %446, align 1, !tbaa !18
  %447 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 12
  store i64 0, ptr %447, align 8, !tbaa !32
  br label %448

448:                                              ; preds = %440, %426
  %449 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %15, i32 0, i32 15
  store i64 32, ptr %449, align 8, !tbaa !53
  %450 = load ptr, ptr %4, align 8, !tbaa !5
  %451 = call i32 @_fx_directory_entry_write(ptr noundef %450, ptr noundef %15)
  store i32 %451, ptr %6, align 4, !tbaa !25
  %452 = load i32, ptr %6, align 4, !tbaa !25
  %453 = icmp ne i32 %452, 0
  br i1 %453, label %454, label %459

454:                                              ; preds = %448
  %455 = load ptr, ptr %4, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %455, i32 0, i32 112
  %457 = call i32 @_tx_mutex_put(ptr noundef %456)
  %458 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %458, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

459:                                              ; preds = %448
  %460 = load ptr, ptr %4, align 8, !tbaa !5
  %461 = load i64, ptr %7, align 8, !tbaa !17
  %462 = load ptr, ptr %4, align 8, !tbaa !5
  %463 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %462, i32 0, i32 127
  %464 = load i64, ptr %463, align 8, !tbaa !55
  %465 = call i32 @_fx_utility_FAT_entry_write(ptr noundef %460, i64 noundef %461, i64 noundef %464)
  store i32 %465, ptr %6, align 4, !tbaa !25
  %466 = load i32, ptr %6, align 4, !tbaa !25
  %467 = icmp ne i32 %466, 0
  br i1 %467, label %468, label %473

468:                                              ; preds = %459
  %469 = load ptr, ptr %4, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %469, i32 0, i32 112
  %471 = call i32 @_tx_mutex_put(ptr noundef %470)
  %472 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %472, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

473:                                              ; preds = %459
  %474 = load ptr, ptr %4, align 8, !tbaa !5
  %475 = call i32 @_fx_directory_entry_write(ptr noundef %474, ptr noundef %14)
  store i32 %475, ptr %6, align 4, !tbaa !25
  %476 = load ptr, ptr %4, align 8, !tbaa !5
  %477 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %476, i32 0, i32 112
  %478 = call i32 @_tx_mutex_put(ptr noundef %477)
  %479 = load i32, ptr %6, align 4, !tbaa !25
  store i32 %479, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %480

480:                                              ; preds = %473, %468, %454, %391, %347, %300, %265, %169, %159, %144, %135, %124, %114, %105, %98, %92, %86, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 136, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 136, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 136, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %481 = load i32, ptr %3, align 4
  ret i32 %481
}

; 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

declare ptr @_fx_directory_name_extract(ptr noundef, ptr noundef) #2

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @__disable_interrupts() #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @__restore_interrupt(i32 noundef) #3

declare i32 @_fx_utility_logical_sector_read(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext) #2

declare i32 @_fx_utility_logical_sector_flush(ptr noundef, i64 noundef, i64 noundef, i32 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) #4

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

; 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 = { alwaysinline 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 360}
!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 = !{!11, !11, i64 0}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!15, !6, i64 0}
!22 = !{!10, !11, i64 0}
!23 = !{!10, !12, i64 264}
!24 = !{!10, !11, i64 192}
!25 = !{!12, !12, i64 0}
!26 = !{!10, !11, i64 200}
!27 = !{!10, !11, i64 104}
!28 = !{!15, !12, i64 48}
!29 = !{!15, !12, i64 52}
!30 = !{!15, !7, i64 32}
!31 = !{!15, !13, i64 64}
!32 = !{!15, !11, i64 56}
!33 = !{!10, !12, i64 124}
!34 = !{!10, !12, i64 128}
!35 = !{!13, !13, i64 0}
!36 = !{!10, !6, i64 16}
!37 = !{!10, !12, i64 80}
!38 = distinct !{!38, !20}
!39 = !{!10, !11, i64 776}
!40 = !{!10, !12, i64 216}
!41 = !{!10, !12, i64 220}
!42 = !{!10, !6, i64 224}
!43 = !{!10, !11, i64 232}
!44 = !{!10, !11, i64 240}
!45 = !{!10, !12, i64 280}
!46 = !{!10, !12, i64 272}
!47 = !{!10, !6, i64 288}
!48 = distinct !{!48, !20}
!49 = !{i64 0, i64 8, !5, i64 8, i64 13, !18, i64 24, i64 4, !25, i64 28, i64 4, !25, i64 32, i64 1, !18, i64 33, i64 1, !18, i64 34, i64 1, !18, i64 36, i64 4, !25, i64 40, i64 4, !25, i64 44, i64 4, !25, i64 48, i64 4, !25, i64 52, i64 4, !25, i64 56, i64 8, !17, i64 64, i64 8, !35, i64 72, i64 8, !35, i64 80, i64 8, !17, i64 88, i64 8, !17, i64 96, i64 8, !17, i64 104, i64 8, !17, i64 112, i64 8, !35, i64 120, i64 8, !17, i64 128, i64 8, !35}
!50 = distinct !{!50, !20}
!51 = !{!15, !12, i64 24}
!52 = !{!15, !13, i64 72}
!53 = !{!15, !11, i64 80}
!54 = distinct !{!54, !20}
!55 = !{!10, !11, i64 12128}


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

@_fx_system_time = external local_unnamed_addr global i32, align 4
@_fx_system_date = external local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_directory_create(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, 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) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %7) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 360
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = add i64 %9, 1
  store i64 %10, ptr %8, align 8, !tbaa !5
  %11 = load i8, ptr %1, align 1, !tbaa !16
  %.not166 = icmp eq i8 %11, 0
  br i1 %.not166, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %2, %17
  %12 = phi i8 [ %19, %17 ], [ %11, %2 ]
  %.0115151 = phi i64 [ %.1, %17 ], [ 0, %2 ]
  %storemerge150 = phi ptr [ %18, %17 ], [ %1, %2 ]
  switch i8 %12, label %13 [
    i8 92, label %17
    i8 47, label %17
  ]

13:                                               ; preds = %.lr.ph
  %14 = icmp ne i8 %12, 32
  %15 = icmp ne i64 %.0115151, 0
  %or.cond = select i1 %14, i1 true, i1 %15
  %16 = add nuw nsw i64 %.0115151, 1
  %spec.select = select i1 %or.cond, i64 %16, i64 0
  br label %17

17:                                               ; preds = %13, %.lr.ph, %.lr.ph
  %.1 = phi i64 [ 0, %.lr.ph ], [ 0, %.lr.ph ], [ %spec.select, %13 ]
  %18 = getelementptr inbounds i8, ptr %storemerge150, i64 1
  %19 = load i8, ptr %18, align 1, !tbaa !16
  %20 = icmp ne i8 %19, 0
  %21 = icmp ult i64 %.1, 256
  %22 = select i1 %20, i1 %21, i1 false
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %17
  store ptr %18, ptr %4, align 8, !tbaa !19
  %23 = add nsw i64 %.1, -256
  %or.cond3 = icmp ult i64 %23, -255
  br i1 %or.cond3, label %._crit_edge.thread, label %24

24:                                               ; preds = %._crit_edge
  %25 = getelementptr inbounds i8, ptr %0, i64 3144
  store ptr %25, ptr %5, align 8, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %0, i64 3400
  store ptr %26, ptr %7, align 8, !tbaa !20
  %27 = getelementptr inbounds i8, ptr %5, i64 8
  store i8 0, ptr %27, align 8, !tbaa !16
  %28 = getelementptr inbounds i8, ptr %7, i64 8
  store i8 0, ptr %28, align 8, !tbaa !16
  %29 = load i64, ptr %0, align 8, !tbaa !21
  %.not = icmp eq i64 %29, 1296385097
  br i1 %.not, label %30, label %._crit_edge.thread

30:                                               ; preds = %24
  %31 = getelementptr inbounds i8, ptr %0, i64 824
  %32 = tail call i32 @_tx_mutex_get(ptr noundef nonnull %31, i64 noundef 4294967295) #6
  %.not128 = icmp eq i32 %32, 0
  br i1 %.not128, label %33, label %._crit_edge.thread

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %0, i64 264
  %35 = load i32, ptr %34, align 8, !tbaa !22
  %.not129 = icmp eq i32 %35, 0
  br i1 %.not129, label %38, label %36

36:                                               ; preds = %33
  %37 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

38:                                               ; preds = %33
  %39 = getelementptr inbounds i8, ptr %0, i64 192
  %40 = load i64, ptr %39, align 8, !tbaa !23
  %.not130 = icmp eq i64 %40, 0
  br i1 %.not130, label %41, label %43

41:                                               ; preds = %38
  %42 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

43:                                               ; preds = %38
  %44 = call i32 @_fx_directory_search(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %5, ptr noundef nonnull %7, ptr noundef nonnull %4) #6
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %43
  %47 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

48:                                               ; preds = %43
  %49 = load ptr, ptr %4, align 8, !tbaa !19
  %50 = load ptr, ptr %5, align 8, !tbaa !20
  %51 = call ptr @_fx_directory_name_extract(ptr noundef %49, ptr noundef %50) #6
  %.not131 = icmp eq ptr %51, null
  br i1 %.not131, label %54, label %52

52:                                               ; preds = %48
  %53 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

54:                                               ; preds = %48
  %55 = call i32 @_fx_directory_free_search(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull %5) #6
  %.not132 = icmp eq i32 %55, 0
  br i1 %.not132, label %58, label %56

56:                                               ; preds = %54
  %57 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

58:                                               ; preds = %54
  %59 = getelementptr inbounds i8, ptr %0, i64 200
  %60 = getelementptr inbounds i8, ptr %0, i64 104
  %61 = load i64, ptr %60, align 8, !tbaa !24
  %.not133153 = icmp eq i64 %61, 0
  br i1 %.not133153, label %._crit_edge158, label %.lr.ph157.preheader

.lr.ph157.preheader:                              ; preds = %58
  %62 = load i64, ptr %59, align 8, !tbaa !25
  br label %.lr.ph157

._crit_edge158:                                   ; preds = %90, %58
  %63 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

.lr.ph157:                                        ; preds = %.lr.ph157.preheader, %90
  %.0116155 = phi i64 [ %91, %90 ], [ %61, %.lr.ph157.preheader ]
  %.0118154 = phi i64 [ %spec.store.select, %90 ], [ %62, %.lr.ph157.preheader ]
  %64 = call i32 @_fx_utility_FAT_entry_read(ptr noundef nonnull %0, i64 noundef %.0118154, ptr noundef nonnull %3) #6
  %.not134 = icmp eq i32 %64, 0
  br i1 %.not134, label %67, label %65

65:                                               ; preds = %.lr.ph157
  %66 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

67:                                               ; preds = %.lr.ph157
  %68 = load i64, ptr %3, align 8, !tbaa !26
  %69 = icmp eq i64 %68, 0
  br i1 %69, label %70, label %90

70:                                               ; preds = %67
  %71 = add i64 %.0118154, 1
  %72 = load i64, ptr %60, align 8, !tbaa !24
  %73 = add i64 %72, 2
  %.not136 = icmp ult i64 %71, %73
  %spec.store.select145 = select i1 %.not136, i64 %71, i64 2
  store i64 %spec.store.select145, ptr %59, align 8
  %74 = load i64, ptr %39, align 8, !tbaa !23
  %75 = add i64 %74, -1
  store i64 %75, ptr %39, align 8, !tbaa !23
  %76 = load ptr, ptr %4, align 8, !tbaa !19
  %77 = load ptr, ptr %5, align 8, !tbaa !20
  %78 = call ptr @_fx_directory_name_extract(ptr noundef %76, ptr noundef %77) #6
  %79 = call i32 @__disable_interrupts()
  %80 = load i32, ptr @_fx_system_time, align 4, !tbaa !27
  %81 = getelementptr inbounds i8, ptr %5, i64 48
  store i32 %80, ptr %81, align 8, !tbaa !28
  %82 = load i32, ptr @_fx_system_date, align 4, !tbaa !27
  %83 = getelementptr inbounds i8, ptr %5, i64 52
  store i32 %82, ptr %83, align 4, !tbaa !29
  call void @__restore_interrupt(i32 noundef %79)
  %84 = getelementptr inbounds i8, ptr %5, i64 32
  store i8 16, ptr %84, align 8, !tbaa !30
  %85 = getelementptr inbounds i8, ptr %5, i64 64
  store i64 0, ptr %85, align 8, !tbaa !31
  %86 = getelementptr inbounds i8, ptr %5, i64 56
  store i64 %.0118154, ptr %86, align 8, !tbaa !32
  %87 = load ptr, ptr %5, align 8, !tbaa !20
  %88 = load i8, ptr %87, align 1, !tbaa !16
  %89 = icmp eq i8 %88, 46
  br i1 %89, label %95, label %96

90:                                               ; preds = %67
  %91 = add i64 %.0116155, -1
  %92 = add i64 %.0118154, 1
  %93 = load i64, ptr %60, align 8, !tbaa !24
  %94 = add i64 %93, 2
  %.not135 = icmp ult i64 %92, %94
  %spec.store.select = select i1 %.not135, i64 %92, i64 2
  %.not133 = icmp eq i64 %91, 0
  br i1 %.not133, label %._crit_edge158, label %.lr.ph157

95:                                               ; preds = %70
  store i8 18, ptr %84, align 8, !tbaa !30
  br label %96

96:                                               ; preds = %95, %70
  %97 = getelementptr inbounds i8, ptr %0, i64 124
  %98 = load i32, ptr %97, align 4, !tbaa !33
  %99 = zext i32 %98 to i64
  %100 = add i64 %.0118154, -2
  %101 = getelementptr inbounds i8, ptr %0, i64 128
  %102 = load i32, ptr %101, align 8, !tbaa !34
  %103 = zext i32 %102 to i64
  %104 = mul i64 %100, %103
  %105 = add i64 %104, %99
  %106 = getelementptr inbounds i8, ptr %0, i64 16
  %107 = load ptr, ptr %106, align 8, !tbaa !35
  %108 = call i32 @_fx_utility_logical_sector_read(ptr noundef nonnull %0, i64 noundef %105, ptr noundef %107, i64 noundef 1, i8 noundef zeroext 3) #6
  %.not137 = icmp eq i32 %108, 0
  br i1 %.not137, label %111, label %109

109:                                              ; preds = %96
  %110 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

111:                                              ; preds = %96
  %112 = load ptr, ptr %106, align 8, !tbaa !35
  store ptr %112, ptr %4, align 8, !tbaa !19
  %113 = getelementptr inbounds i8, ptr %0, i64 80
  %114 = load i32, ptr %113, align 8, !tbaa !36
  %.not167 = icmp eq i32 %114, 0
  br i1 %.not167, label %119, label %.lr.ph161.preheader

.lr.ph161.preheader:                              ; preds = %111
  %115 = zext i32 %114 to i64
  %116 = add nsw i64 %115, -1
  %117 = and i64 %116, -8
  %118 = add nuw nsw i64 %117, 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %112, i8 0, i64 %118, i1 false), !tbaa !26
  %scevgep = getelementptr i8, ptr %112, i64 %118
  store ptr %scevgep, ptr %4, align 8, !tbaa !19
  br label %119

119:                                              ; preds = %.lr.ph161.preheader, %111
  %120 = icmp ugt i32 %102, 1
  br i1 %120, label %121, label %.loopexit

121:                                              ; preds = %119
  %122 = add i64 %105, 1
  %123 = add i32 %102, -1
  %124 = zext i32 %123 to i64
  %125 = call i32 @_fx_utility_logical_sector_flush(ptr noundef nonnull %0, i64 noundef %122, i64 noundef %124, i32 noundef 1) #6
  %.not138 = icmp eq i32 %125, 0
  br i1 %.not138, label %.preheader, label %135

.preheader:                                       ; preds = %121
  %126 = getelementptr inbounds i8, ptr %0, i64 776
  %127 = getelementptr inbounds i8, ptr %0, i64 216
  %128 = getelementptr inbounds i8, ptr %0, i64 220
  %129 = getelementptr inbounds i8, ptr %0, i64 224
  %130 = getelementptr inbounds i8, ptr %0, i64 232
  %131 = getelementptr inbounds i8, ptr %0, i64 240
  %132 = getelementptr inbounds i8, ptr %0, i64 280
  %133 = getelementptr inbounds i8, ptr %0, i64 272
  %134 = getelementptr inbounds i8, ptr %0, i64 288
  br label %137

135:                                              ; preds = %121
  %136 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

137:                                              ; preds = %.preheader, %139
  %indvars.iv = phi i64 [ %103, %.preheader ], [ %138, %139 ]
  %138 = add nsw i64 %indvars.iv, -1
  %.not139.wide = icmp eq i64 %138, 0
  br i1 %.not139.wide, label %.loopexit, label %139

139:                                              ; preds = %137
  %140 = load i64, ptr %126, align 8, !tbaa !37
  %141 = add i64 %140, 1
  store i64 %141, ptr %126, align 8, !tbaa !37
  store i32 1, ptr %127, align 8, !tbaa !38
  store i32 144, ptr %128, align 4, !tbaa !39
  %142 = load ptr, ptr %106, align 8, !tbaa !35
  store ptr %142, ptr %129, align 8, !tbaa !40
  %143 = add i64 %105, %138
  store i64 %143, ptr %130, align 8, !tbaa !41
  store i64 1, ptr %131, align 8, !tbaa !42
  store i32 3, ptr %132, align 8, !tbaa !43
  store i32 1, ptr %133, align 8, !tbaa !44
  %144 = load ptr, ptr %134, align 8, !tbaa !45
  call void %144(ptr noundef nonnull %0) #6
  store i32 0, ptr %133, align 8, !tbaa !44
  %145 = load i32, ptr %128, align 4, !tbaa !39
  %.not144 = icmp eq i32 %145, 0
  br i1 %.not144, label %137, label %146, !llvm.loop !46

146:                                              ; preds = %139
  %147 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  %148 = load i32, ptr %128, align 4, !tbaa !39
  br label %._crit_edge.thread

.loopexit:                                        ; preds = %137, %119
  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 !47
  %149 = getelementptr inbounds i8, ptr %0, i64 3656
  store ptr %149, ptr %6, align 8, !tbaa !20
  %150 = getelementptr inbounds i8, ptr %0, i64 3664
  %151 = getelementptr inbounds i8, ptr %0, i64 3665
  store i8 32, ptr %150, align 1, !tbaa !16
  %152 = getelementptr inbounds i8, ptr %0, i64 3666
  store i8 32, ptr %151, align 1, !tbaa !16
  %153 = getelementptr inbounds i8, ptr %0, i64 3667
  store ptr %153, ptr %4, align 8, !tbaa !19
  store i8 32, ptr %152, align 1, !tbaa !16
  %154 = getelementptr inbounds i8, ptr %6, i64 24
  store i32 0, ptr %154, align 8, !tbaa !49
  store <8 x i8> <i8 46, i8 0, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>, ptr %149, align 1, !tbaa !16
  %155 = getelementptr inbounds i8, ptr %6, i64 72
  store i64 %105, ptr %155, align 8, !tbaa !50
  %156 = getelementptr inbounds i8, ptr %6, i64 80
  store i64 0, ptr %156, align 8, !tbaa !51
  %157 = call i32 @_fx_directory_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %6) #6
  %.not140 = icmp eq i32 %157, 0
  br i1 %.not140, label %160, label %158

158:                                              ; preds = %.loopexit
  %159 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

160:                                              ; preds = %.loopexit
  %161 = load ptr, ptr %7, align 8, !tbaa !20
  %162 = load i8, ptr %161, align 1, !tbaa !16
  %.not141 = icmp eq i8 %162, 0
  br i1 %.not141, label %167, label %163

163:                                              ; preds = %160
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(136) %6, ptr noundef nonnull align 8 dereferenceable(136) %7, i64 136, i1 false), !tbaa.struct !47
  %164 = getelementptr inbounds i8, ptr %6, i64 48
  %165 = load <2 x i32>, ptr %81, align 8, !tbaa !27
  store <2 x i32> %165, ptr %164, align 8, !tbaa !27
  store ptr %149, ptr %6, align 8, !tbaa !20
  store i8 32, ptr %150, align 1, !tbaa !16
  store i8 32, ptr %151, align 1, !tbaa !16
  store ptr %153, ptr %4, align 8, !tbaa !19
  store i8 32, ptr %152, align 1, !tbaa !16
  store <8 x i8> <i8 46, i8 46, i8 0, i8 32, i8 32, i8 32, i8 32, i8 32>, ptr %149, align 1, !tbaa !16
  store i32 0, ptr %154, align 8, !tbaa !49
  %166 = getelementptr inbounds i8, ptr %6, i64 64
  store i64 0, ptr %166, align 8, !tbaa !31
  store i64 %105, ptr %155, align 8, !tbaa !50
  br label %173

167:                                              ; preds = %160
  %168 = load ptr, ptr %6, align 8, !tbaa !20
  %169 = getelementptr inbounds i8, ptr %168, i64 1
  store i8 46, ptr %169, align 1, !tbaa !16
  %170 = load ptr, ptr %6, align 8, !tbaa !20
  %171 = getelementptr inbounds i8, ptr %170, i64 2
  store i8 0, ptr %171, align 1, !tbaa !16
  %172 = getelementptr inbounds i8, ptr %6, i64 56
  store i64 0, ptr %172, align 8, !tbaa !32
  br label %173

173:                                              ; preds = %167, %163
  store i64 32, ptr %156, align 8, !tbaa !51
  %174 = call i32 @_fx_directory_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %6) #6
  %.not142 = icmp eq i32 %174, 0
  br i1 %.not142, label %177, label %175

175:                                              ; preds = %173
  %176 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

177:                                              ; preds = %173
  %178 = getelementptr inbounds i8, ptr %0, i64 12128
  %179 = load i64, ptr %178, align 8, !tbaa !52
  %180 = call i32 @_fx_utility_FAT_entry_write(ptr noundef nonnull %0, i64 noundef %.0118154, i64 noundef %179) #6
  %.not143 = icmp eq i32 %180, 0
  br i1 %.not143, label %183, label %181

181:                                              ; preds = %177
  %182 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

183:                                              ; preds = %177
  %184 = call i32 @_fx_directory_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %5) #6
  %185 = call i32 @_tx_mutex_put(ptr noundef nonnull %31) #6
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %2, %30, %24, %._crit_edge, %183, %181, %175, %158, %146, %135, %109, %65, %._crit_edge158, %56, %52, %46, %41, %36
  %.0 = phi i32 [ 35, %36 ], [ 11, %46 ], [ 13, %52 ], [ %55, %56 ], [ %64, %65 ], [ %108, %109 ], [ %125, %135 ], [ %148, %146 ], [ %157, %158 ], [ %174, %175 ], [ %180, %181 ], [ %184, %183 ], [ 10, %._crit_edge158 ], [ 10, %41 ], [ 12, %._crit_edge ], [ 17, %24 ], [ 17, %30 ], [ 12, %2 ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  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

declare ptr @_fx_directory_name_extract(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @__disable_interrupts() local_unnamed_addr #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @__restore_interrupt(i32 noundef) local_unnamed_addr #3

declare i32 @_fx_utility_logical_sector_read(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext) 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 = { alwaysinline 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 360}
!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 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!10, !10, i64 0}
!20 = !{!14, !10, i64 0}
!21 = !{!6, !7, i64 0}
!22 = !{!6, !11, i64 264}
!23 = !{!6, !7, i64 192}
!24 = !{!6, !7, i64 104}
!25 = !{!6, !7, i64 200}
!26 = !{!7, !7, i64 0}
!27 = !{!11, !11, i64 0}
!28 = !{!14, !11, i64 48}
!29 = !{!14, !11, i64 52}
!30 = !{!14, !8, i64 32}
!31 = !{!14, !12, i64 64}
!32 = !{!14, !7, i64 56}
!33 = !{!6, !11, i64 124}
!34 = !{!6, !11, i64 128}
!35 = !{!6, !10, i64 16}
!36 = !{!6, !11, i64 80}
!37 = !{!6, !7, i64 776}
!38 = !{!6, !11, i64 216}
!39 = !{!6, !11, i64 220}
!40 = !{!6, !10, i64 224}
!41 = !{!6, !7, i64 232}
!42 = !{!6, !7, i64 240}
!43 = !{!6, !11, i64 280}
!44 = !{!6, !11, i64 272}
!45 = !{!6, !10, i64 288}
!46 = distinct !{!46, !18}
!47 = !{i64 0, i64 8, !19, i64 8, i64 13, !16, i64 24, i64 4, !27, i64 28, i64 4, !27, i64 32, i64 1, !16, i64 33, i64 1, !16, i64 34, i64 1, !16, i64 36, i64 4, !27, i64 40, i64 4, !27, i64 44, i64 4, !27, i64 48, i64 4, !27, i64 52, i64 4, !27, i64 56, i64 8, !26, i64 64, i64 8, !48, i64 72, i64 8, !48, i64 80, i64 8, !26, i64 88, i64 8, !26, i64 96, i64 8, !26, i64 104, i64 8, !26, i64 112, i64 8, !48, i64 120, i64 8, !26, i64 128, i64 8, !48}
!48 = !{!12, !12, i64 0}
!49 = !{!14, !11, i64 24}
!50 = !{!14, !12, i64 72}
!51 = !{!14, !7, i64 80}
!52 = !{!6, !7, i64 12128}


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