; LLVM IR from mlcommons/tiny :: benchmark/interface/Middlewares/ST/filex/common/src/fx_file_delete.ll (fx_file_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 }
%struct.FX_FILE_STRUCT = type { i64, ptr, i64, i8, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], i64, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_file_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 ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %13 = alloca i8, align 1
  %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) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #3
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %15, i32 0, i32 75
  %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 %12, i32 0, i32 0
  store ptr %22, ptr %23, align 8, !tbaa !17
  %24 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %25 = getelementptr inbounds [13 x i8], ptr %24, i64 0, i64 0
  store i8 0, ptr %25, align 8, !tbaa !18
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !19
  %29 = icmp ne i64 %28, 1296385097
  br i1 %29, label %30, label %31

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

31:                                               ; preds = %2
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !19
  %35 = icmp ne i64 %34, 1296385097
  br i1 %35, label %36, label %37

36:                                               ; preds = %31
  store i32 17, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

37:                                               ; preds = %31
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %38, i32 0, i32 112
  %40 = call i32 @_tx_mutex_get(ptr noundef %39, i64 noundef 4294967295)
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %37
  store i32 17, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

43:                                               ; preds = %37
  br label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %45, i32 0, i32 40
  %47 = load i32, ptr %46, align 8, !tbaa !20
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %53

49:                                               ; preds = %44
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %50, i32 0, i32 112
  %52 = call i32 @_tx_mutex_put(ptr noundef %51)
  store i32 35, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

53:                                               ; preds = %44
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = call i32 @_fx_directory_search(ptr noundef %54, ptr noundef %55, ptr noundef %12, ptr noundef null, ptr noundef null)
  store i32 %56, ptr %6, align 4, !tbaa !21
  %57 = load i32, ptr %6, align 4, !tbaa !21
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %64

59:                                               ; preds = %53
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %60, i32 0, i32 112
  %62 = call i32 @_tx_mutex_put(ptr noundef %61)
  %63 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %63, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

64:                                               ; preds = %53
  store i8 24, ptr %13, align 1, !tbaa !18
  %65 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 4
  %66 = load i8, ptr %65, align 8, !tbaa !22
  %67 = zext i8 %66 to i32
  %68 = load i8, ptr %13, align 1, !tbaa !18
  %69 = zext i8 %68 to i32
  %70 = and i32 %67, %69
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %76

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

76:                                               ; preds = %64
  %77 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 4
  %78 = load i8, ptr %77, align 8, !tbaa !22
  %79 = zext i8 %78 to i32
  %80 = and i32 %79, 1
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %86

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

86:                                               ; preds = %76
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %87, i32 0, i32 49
  %89 = load i64, ptr %88, align 8, !tbaa !23
  store i64 %89, ptr %9, align 8, !tbaa !24
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %90, i32 0, i32 48
  %92 = load ptr, ptr %91, align 8, !tbaa !25
  store ptr %92, ptr %10, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %116, %86
  %94 = load i64, ptr %9, align 8, !tbaa !24
  %95 = icmp ne i64 %94, 0
  br i1 %95, label %96, label %122

96:                                               ; preds = %93
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %97, i32 0, i32 19
  %99 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %98, i32 0, i32 14
  %100 = load i64, ptr %99, align 8, !tbaa !26
  %101 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 14
  %102 = load i64, ptr %101, align 8, !tbaa !28
  %103 = icmp eq i64 %100, %102
  br i1 %103, label %104, label %116

104:                                              ; preds = %96
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %105, i32 0, i32 19
  %107 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %106, i32 0, i32 15
  %108 = load i64, ptr %107, align 8, !tbaa !29
  %109 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 15
  %110 = load i64, ptr %109, align 8, !tbaa !30
  %111 = icmp eq i64 %108, %110
  br i1 %111, label %112, label %116

112:                                              ; preds = %104
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %113, i32 0, i32 112
  %115 = call i32 @_tx_mutex_put(ptr noundef %114)
  store i32 6, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

116:                                              ; preds = %104, %96
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %117, i32 0, i32 17
  %119 = load ptr, ptr %118, align 8, !tbaa !31
  store ptr %119, ptr %10, align 8, !tbaa !5
  %120 = load i64, ptr %9, align 8, !tbaa !24
  %121 = add i64 %120, -1
  store i64 %121, ptr %9, align 8, !tbaa !24
  br label %93, !llvm.loop !32

122:                                              ; preds = %93
  %123 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 12
  %124 = load i64, ptr %123, align 8, !tbaa !34
  store i64 %124, ptr %7, align 8, !tbaa !24
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %125, i32 0, i32 117
  %127 = getelementptr inbounds [256 x i8], ptr %126, i64 0, i64 0
  store i8 0, ptr %127, align 8, !tbaa !18
  %128 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !17
  %130 = getelementptr inbounds i8, ptr %129, i64 0
  store i8 -27, ptr %130, align 1, !tbaa !18
  %131 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %12, i32 0, i32 1
  %132 = getelementptr inbounds [13 x i8], ptr %131, i64 0, i64 0
  store i8 -27, ptr %132, align 8, !tbaa !18
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = call i32 @_fx_directory_entry_write(ptr noundef %133, ptr noundef %12)
  store i32 %134, ptr %6, align 4, !tbaa !21
  %135 = load i32, ptr %6, align 4, !tbaa !21
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %142

137:                                              ; preds = %122
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %138, i32 0, i32 112
  %140 = call i32 @_tx_mutex_put(ptr noundef %139)
  %141 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %141, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

142:                                              ; preds = %122
  store i64 0, ptr %11, align 8, !tbaa !24
  br label %143

143:                                              ; preds = %192, %142
  %144 = load i64, ptr %7, align 8, !tbaa !24
  %145 = icmp uge i64 %144, 2
  br i1 %145, label %146, label %152

146:                                              ; preds = %143
  %147 = load i64, ptr %7, align 8, !tbaa !24
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %148, i32 0, i32 126
  %150 = load i64, ptr %149, align 8, !tbaa !35
  %151 = icmp ult i64 %147, %150
  br label %152

152:                                              ; preds = %146, %143
  %153 = phi i1 [ false, %143 ], [ %151, %146 ]
  br i1 %153, label %154, label %194

154:                                              ; preds = %152
  %155 = load i64, ptr %11, align 8, !tbaa !24
  %156 = add i64 %155, 1
  store i64 %156, ptr %11, align 8, !tbaa !24
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = load i64, ptr %7, align 8, !tbaa !24
  %159 = call i32 @_fx_utility_FAT_entry_read(ptr noundef %157, i64 noundef %158, ptr noundef %8)
  store i32 %159, ptr %6, align 4, !tbaa !21
  %160 = load i32, ptr %6, align 4, !tbaa !21
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %167

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

167:                                              ; preds = %154
  %168 = load i64, ptr %7, align 8, !tbaa !24
  %169 = load i64, ptr %8, align 8, !tbaa !24
  %170 = icmp eq i64 %168, %169
  br i1 %170, label %177, label %171

171:                                              ; preds = %167
  %172 = load i64, ptr %11, align 8, !tbaa !24
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %173, i32 0, i32 14
  %175 = load i64, ptr %174, align 8, !tbaa !36
  %176 = icmp ugt i64 %172, %175
  br i1 %176, label %177, label %181

177:                                              ; preds = %171, %167
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %178, i32 0, i32 112
  %180 = call i32 @_tx_mutex_put(ptr noundef %179)
  store i32 3, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

181:                                              ; preds = %171
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load i64, ptr %7, align 8, !tbaa !24
  %184 = call i32 @_fx_utility_FAT_entry_write(ptr noundef %182, i64 noundef %183, i64 noundef 0)
  store i32 %184, ptr %6, align 4, !tbaa !21
  %185 = load i32, ptr %6, align 4, !tbaa !21
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %192

187:                                              ; preds = %181
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %188, i32 0, i32 112
  %190 = call i32 @_tx_mutex_put(ptr noundef %189)
  %191 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %191, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

192:                                              ; preds = %181
  %193 = load i64, ptr %8, align 8, !tbaa !24
  store i64 %193, ptr %7, align 8, !tbaa !24
  br label %143, !llvm.loop !37

194:                                              ; preds = %152
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %195, i32 0, i32 29
  %197 = load i64, ptr %196, align 8, !tbaa !38
  %198 = load i64, ptr %11, align 8, !tbaa !24
  %199 = add i64 %197, %198
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %200, i32 0, i32 29
  store i64 %199, ptr %201, align 8, !tbaa !38
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %202, i32 0, i32 112
  %204 = call i32 @_tx_mutex_put(ptr noundef %203)
  %205 = load i32, ptr %6, align 4, !tbaa !21
  store i32 %205, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %206

206:                                              ; preds = %194, %187, %177, %162, %137, %112, %82, %72, %59, %49, %42, %36, %30
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  %207 = load i32, ptr %3, align 4
  ret i32 %207
}

; 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 i32 @_fx_directory_entry_write(ptr noundef, ptr noundef) #2

declare i32 @_fx_utility_FAT_entry_read(ptr noundef, i64 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 = { 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 528}
!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 = !{!10, !11, i64 320}
!24 = !{!11, !11, i64 0}
!25 = !{!10, !6, i64 312}
!26 = !{!27, !13, i64 224}
!27 = !{!"FX_FILE_STRUCT", !11, i64 0, !6, i64 8, !11, i64 16, !7, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !13, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !15, i64 152, !7, i64 288, !11, i64 544, !6, i64 552}
!28 = !{!15, !13, i64 72}
!29 = !{!27, !11, i64 232}
!30 = !{!15, !11, i64 80}
!31 = !{!27, !6, i64 136}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!15, !11, i64 56}
!35 = !{!10, !11, i64 12120}
!36 = !{!10, !11, i64 104}
!37 = distinct !{!37, !33}
!38 = !{!10, !11, i64 192}


; 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_file_delete(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %4) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 528
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = add i64 %6, 1
  store i64 %7, ptr %5, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 3144
  store ptr %8, ptr %4, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %4, i64 8
  store i8 0, ptr %9, align 8, !tbaa !17
  %10 = load i64, ptr %0, align 8, !tbaa !18
  %.not = icmp eq i64 %10, 1296385097
  br i1 %.not, label %11, label %92

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 824
  %13 = tail call i32 @_tx_mutex_get(ptr noundef nonnull %12, i64 noundef 4294967295) #3
  %.not62 = icmp eq i32 %13, 0
  br i1 %.not62, label %14, label %92

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 264
  %16 = load i32, ptr %15, align 8, !tbaa !19
  %.not63 = icmp eq i32 %16, 0
  br i1 %.not63, label %19, label %17

17:                                               ; preds = %14
  %18 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

19:                                               ; preds = %14
  %20 = call i32 @_fx_directory_search(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %4, ptr noundef null, ptr noundef null) #3
  %.not64 = icmp eq i32 %20, 0
  br i1 %.not64, label %23, label %21

21:                                               ; preds = %19
  %22 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %4, i64 32
  %25 = load i8, ptr %24, align 8, !tbaa !20
  %26 = zext i8 %25 to i32
  %27 = and i32 %26, 24
  %.not65 = icmp eq i32 %27, 0
  br i1 %.not65, label %30, label %28

28:                                               ; preds = %23
  %29 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

30:                                               ; preds = %23
  %31 = and i32 %26, 1
  %.not66 = icmp eq i32 %31, 0
  br i1 %.not66, label %34, label %32

32:                                               ; preds = %30
  %33 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %0, i64 320
  %36 = load i64, ptr %35, align 8, !tbaa !21
  %.not6778 = icmp eq i64 %36, 0
  br i1 %.not6778, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %34
  %37 = getelementptr inbounds i8, ptr %0, i64 312
  %38 = getelementptr inbounds i8, ptr %4, i64 72
  %39 = load i64, ptr %38, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %4, i64 80
  %41 = load i64, ptr %40, align 8
  br label %42

42:                                               ; preds = %.lr.ph, %52
  %.05280.in = phi ptr [ %37, %.lr.ph ], [ %53, %52 ]
  %.05379 = phi i64 [ %36, %.lr.ph ], [ %54, %52 ]
  %.05280 = load ptr, ptr %.05280.in, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %.05280, i64 224
  %44 = load i64, ptr %43, align 8, !tbaa !24
  %45 = icmp eq i64 %44, %39
  br i1 %45, label %46, label %52

46:                                               ; preds = %42
  %47 = getelementptr inbounds i8, ptr %.05280, i64 232
  %48 = load i64, ptr %47, align 8, !tbaa !26
  %49 = icmp eq i64 %48, %41
  br i1 %49, label %50, label %52

50:                                               ; preds = %46
  %51 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

52:                                               ; preds = %46, %42
  %53 = getelementptr inbounds i8, ptr %.05280, i64 136
  %54 = add i64 %.05379, -1
  %.not67 = icmp eq i64 %54, 0
  br i1 %.not67, label %._crit_edge, label %42, !llvm.loop !27

._crit_edge:                                      ; preds = %52, %34
  %55 = getelementptr inbounds i8, ptr %4, i64 56
  %56 = load i64, ptr %55, align 8, !tbaa !29
  %57 = getelementptr inbounds i8, ptr %0, i64 1456
  store i8 0, ptr %57, align 8, !tbaa !17
  %58 = load ptr, ptr %4, align 8, !tbaa !16
  store i8 -27, ptr %58, align 1, !tbaa !17
  store i8 -27, ptr %9, align 8, !tbaa !17
  %59 = call i32 @_fx_directory_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %4) #3
  %.not68 = icmp eq i32 %59, 0
  br i1 %.not68, label %.preheader, label %63

.preheader:                                       ; preds = %._crit_edge
  %60 = icmp ugt i64 %56, 1
  br i1 %60, label %.lr.ph83, label %.critedge

.lr.ph83:                                         ; preds = %.preheader
  %61 = getelementptr inbounds i8, ptr %0, i64 12120
  %62 = getelementptr inbounds i8, ptr %0, i64 104
  br label %65

63:                                               ; preds = %._crit_edge
  %64 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

65:                                               ; preds = %.lr.ph83, %85
  %.05182 = phi i64 [ 0, %.lr.ph83 ], [ %69, %85 ]
  %.05481 = phi i64 [ %56, %.lr.ph83 ], [ %86, %85 ]
  %66 = load i64, ptr %61, align 8, !tbaa !30
  %67 = icmp ult i64 %.05481, %66
  br i1 %67, label %68, label %.critedge

68:                                               ; preds = %65
  %69 = add i64 %.05182, 1
  %70 = call i32 @_fx_utility_FAT_entry_read(ptr noundef nonnull %0, i64 noundef %.05481, ptr noundef nonnull %3) #3
  %.not69 = icmp eq i32 %70, 0
  br i1 %.not69, label %73, label %71

71:                                               ; preds = %68
  %72 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

73:                                               ; preds = %68
  %74 = load i64, ptr %3, align 8, !tbaa !31
  %75 = icmp eq i64 %.05481, %74
  br i1 %75, label %79, label %76

76:                                               ; preds = %73
  %77 = load i64, ptr %62, align 8, !tbaa !32
  %78 = icmp ugt i64 %69, %77
  br i1 %78, label %79, label %81

79:                                               ; preds = %76, %73
  %80 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

81:                                               ; preds = %76
  %82 = call i32 @_fx_utility_FAT_entry_write(ptr noundef nonnull %0, i64 noundef %.05481, i64 noundef 0) #3
  %.not70 = icmp eq i32 %82, 0
  br i1 %.not70, label %85, label %83

83:                                               ; preds = %81
  %84 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

85:                                               ; preds = %81
  %86 = load i64, ptr %3, align 8, !tbaa !31
  %87 = icmp ugt i64 %86, 1
  br i1 %87, label %65, label %.critedge, !llvm.loop !33

.critedge:                                        ; preds = %65, %85, %.preheader
  %.051.lcssa = phi i64 [ 0, %.preheader ], [ %69, %85 ], [ %.05182, %65 ]
  %88 = getelementptr inbounds i8, ptr %0, i64 192
  %89 = load i64, ptr %88, align 8, !tbaa !34
  %90 = add i64 %89, %.051.lcssa
  store i64 %90, ptr %88, align 8, !tbaa !34
  %91 = call i32 @_tx_mutex_put(ptr noundef nonnull %12) #3
  br label %92

92:                                               ; preds = %11, %2, %.critedge, %83, %79, %71, %63, %50, %32, %28, %21, %17
  %.0 = phi i32 [ 35, %17 ], [ %20, %21 ], [ 5, %28 ], [ 35, %32 ], [ 6, %50 ], [ %59, %63 ], [ %70, %71 ], [ 3, %79 ], [ %82, %83 ], [ 0, %.critedge ], [ 17, %2 ], [ 17, %11 ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  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 i32 @_fx_directory_entry_write(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

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

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 = { 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 528}
!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 = !{!6, !7, i64 320}
!22 = !{!14, !12, i64 72}
!23 = !{!10, !10, i64 0}
!24 = !{!25, !12, i64 224}
!25 = !{!"FX_FILE_STRUCT", !7, i64 0, !10, i64 8, !7, i64 16, !8, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !12, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !14, i64 152, !8, i64 288, !7, i64 544, !10, i64 552}
!26 = !{!25, !7, i64 232}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!14, !7, i64 56}
!30 = !{!6, !7, i64 12120}
!31 = !{!7, !7, i64 0}
!32 = !{!6, !7, i64 104}
!33 = distinct !{!33, !28}
!34 = !{!6, !7, i64 192}


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