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

; 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_rename(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %17 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %18 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  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 1, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #3
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %21, i32 0, i32 79
  %23 = load i64, ptr %22, align 8, !tbaa !9
  %24 = add i64 %23, 1
  store i64 %24, ptr %22, align 8, !tbaa !9
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %25, i32 0, i32 122
  %27 = getelementptr inbounds [1024 x i8], ptr %26, i64 0, i64 0
  %28 = getelementptr inbounds i8, ptr %27, i64 256
  %29 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 0
  store ptr %28, ptr %29, align 8, !tbaa !17
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %30, i32 0, i32 122
  %32 = getelementptr inbounds [1024 x i8], ptr %31, i64 0, i64 0
  %33 = getelementptr inbounds i8, ptr %32, i64 512
  %34 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 0
  store ptr %33, ptr %34, align 8, !tbaa !17
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %35, i32 0, i32 122
  %37 = getelementptr inbounds [1024 x i8], ptr %36, i64 0, i64 0
  %38 = getelementptr inbounds i8, ptr %37, i64 768
  %39 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %18, i32 0, i32 0
  store ptr %38, ptr %39, align 8, !tbaa !17
  %40 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 1
  %41 = getelementptr inbounds [13 x i8], ptr %40, i64 0, i64 0
  store i8 0, ptr %41, align 8, !tbaa !18
  %42 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 1
  %43 = getelementptr inbounds [13 x i8], ptr %42, i64 0, i64 0
  store i8 0, ptr %43, align 8, !tbaa !18
  %44 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %18, i32 0, i32 1
  %45 = getelementptr inbounds [13 x i8], ptr %44, i64 0, i64 0
  store i8 0, ptr %45, align 8, !tbaa !18
  store i64 0, ptr %8, align 8, !tbaa !19
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %46, ptr %9, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %74, %3
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = load i8, ptr %48, align 1, !tbaa !18
  %50 = icmp ne i8 %49, 0
  br i1 %50, label %51, label %77

51:                                               ; preds = %47
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load i8, ptr %52, align 1, !tbaa !18
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 92
  br i1 %55, label %61, label %56

56:                                               ; preds = %51
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load i8, ptr %57, align 1, !tbaa !18
  %59 = sext i8 %58 to i32
  %60 = icmp eq i32 %59, 47
  br i1 %60, label %61, label %62

61:                                               ; preds = %56, %51
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %74

62:                                               ; preds = %56
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = load i8, ptr %63, align 1, !tbaa !18
  %65 = sext i8 %64 to i32
  %66 = icmp ne i32 %65, 32
  br i1 %66, label %70, label %67

67:                                               ; preds = %62
  %68 = load i64, ptr %8, align 8, !tbaa !19
  %69 = icmp ne i64 %68, 0
  br i1 %69, label %70, label %73

70:                                               ; preds = %67, %62
  %71 = load i64, ptr %8, align 8, !tbaa !19
  %72 = add i64 %71, 1
  store i64 %72, ptr %8, align 8, !tbaa !19
  br label %73

73:                                               ; preds = %70, %67
  br label %74

74:                                               ; preds = %73, %61
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %75, i32 1
  store ptr %76, ptr %9, align 8, !tbaa !5
  br label %47, !llvm.loop !20

77:                                               ; preds = %47
  %78 = load i64, ptr %8, align 8, !tbaa !19
  %79 = icmp eq i64 %78, 0
  br i1 %79, label %83, label %80

80:                                               ; preds = %77
  %81 = load i64, ptr %8, align 8, !tbaa !19
  %82 = icmp uge i64 %81, 256
  br i1 %82, label %83, label %84

83:                                               ; preds = %80, %77
  store i32 12, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

84:                                               ; preds = %80
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %85, i32 0, i32 0
  %87 = load i64, ptr %86, align 8, !tbaa !22
  %88 = icmp ne i64 %87, 1296385097
  br i1 %88, label %89, label %90

89:                                               ; preds = %84
  store i32 17, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

90:                                               ; preds = %84
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %91, i32 0, i32 0
  %93 = load i64, ptr %92, align 8, !tbaa !22
  %94 = icmp ne i64 %93, 1296385097
  br i1 %94, label %95, label %96

95:                                               ; preds = %90
  store i32 17, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

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

101:                                              ; preds = %96
  store i32 17, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

102:                                              ; preds = %96
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %104, i32 0, i32 40
  %106 = load i32, ptr %105, align 8, !tbaa !23
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %112

108:                                              ; preds = %103
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %109, i32 0, i32 112
  %111 = call i32 @_tx_mutex_put(ptr noundef %110)
  store i32 35, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

112:                                              ; preds = %103
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = call i32 @_fx_directory_search(ptr noundef %113, ptr noundef %114, ptr noundef %16, ptr noundef %18, ptr noundef null)
  store i32 %115, ptr %12, align 4, !tbaa !24
  %116 = load i32, ptr %12, align 4, !tbaa !24
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %123

118:                                              ; preds = %112
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %119, i32 0, i32 112
  %121 = call i32 @_tx_mutex_put(ptr noundef %120)
  %122 = load i32, ptr %12, align 4, !tbaa !24
  store i32 %122, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

123:                                              ; preds = %112
  store i8 24, ptr %19, align 1, !tbaa !18
  %124 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 4
  %125 = load i8, ptr %124, align 8, !tbaa !25
  %126 = zext i8 %125 to i32
  %127 = load i8, ptr %19, align 1, !tbaa !18
  %128 = zext i8 %127 to i32
  %129 = and i32 %126, %128
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %135

131:                                              ; preds = %123
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %132, i32 0, i32 112
  %134 = call i32 @_tx_mutex_put(ptr noundef %133)
  store i32 5, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

135:                                              ; preds = %123
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = call i32 @_fx_directory_search(ptr noundef %136, ptr noundef %137, ptr noundef %17, ptr noundef %18, ptr noundef %15)
  store i32 %138, ptr %12, align 4, !tbaa !24
  %139 = load i32, ptr %12, align 4, !tbaa !24
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %141, label %204

141:                                              ; preds = %135
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %142

142:                                              ; preds = %190, %141
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = load i64, ptr %8, align 8, !tbaa !19
  %145 = getelementptr inbounds i8, ptr %143, i64 %144
  %146 = load i8, ptr %145, align 1, !tbaa !18
  store i8 %146, ptr %10, align 1, !tbaa !18
  %147 = load i8, ptr %10, align 1, !tbaa !18
  %148 = sext i8 %147 to i32
  %149 = icmp sge i32 %148, 97
  br i1 %149, label %150, label %159

150:                                              ; preds = %142
  %151 = load i8, ptr %10, align 1, !tbaa !18
  %152 = sext i8 %151 to i32
  %153 = icmp sle i32 %152, 122
  br i1 %153, label %154, label %159

154:                                              ; preds = %150
  %155 = load i8, ptr %10, align 1, !tbaa !18
  %156 = sext i8 %155 to i32
  %157 = sub nsw i32 %156, 32
  %158 = trunc i32 %157 to i8
  store i8 %158, ptr %10, align 1, !tbaa !18
  br label %159

159:                                              ; preds = %154, %150, %142
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = load i64, ptr %8, align 8, !tbaa !19
  %162 = getelementptr inbounds i8, ptr %160, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !18
  store i8 %163, ptr %11, align 1, !tbaa !18
  %164 = load i8, ptr %11, align 1, !tbaa !18
  %165 = sext i8 %164 to i32
  %166 = icmp sge i32 %165, 97
  br i1 %166, label %167, label %176

167:                                              ; preds = %159
  %168 = load i8, ptr %11, align 1, !tbaa !18
  %169 = sext i8 %168 to i32
  %170 = icmp sle i32 %169, 122
  br i1 %170, label %171, label %176

171:                                              ; preds = %167
  %172 = load i8, ptr %11, align 1, !tbaa !18
  %173 = sext i8 %172 to i32
  %174 = sub nsw i32 %173, 32
  %175 = trunc i32 %174 to i8
  store i8 %175, ptr %11, align 1, !tbaa !18
  br label %176

176:                                              ; preds = %171, %167, %159
  %177 = load i8, ptr %10, align 1, !tbaa !18
  %178 = sext i8 %177 to i32
  %179 = load i8, ptr %11, align 1, !tbaa !18
  %180 = sext i8 %179 to i32
  %181 = icmp ne i32 %178, %180
  br i1 %181, label %186, label %182

182:                                              ; preds = %176
  %183 = load i8, ptr %10, align 1, !tbaa !18
  %184 = sext i8 %183 to i32
  %185 = icmp eq i32 %184, 0
  br i1 %185, label %186, label %187

186:                                              ; preds = %182, %176
  br label %193

187:                                              ; preds = %182
  %188 = load i64, ptr %8, align 8, !tbaa !19
  %189 = add i64 %188, 1
  store i64 %189, ptr %8, align 8, !tbaa !19
  br label %190

190:                                              ; preds = %187
  %191 = load i64, ptr %8, align 8, !tbaa !19
  %192 = icmp ult i64 %191, 255
  br i1 %192, label %142, label %193, !llvm.loop !26

193:                                              ; preds = %190, %186
  %194 = load i8, ptr %10, align 1, !tbaa !18
  %195 = sext i8 %194 to i32
  %196 = load i8, ptr %11, align 1, !tbaa !18
  %197 = sext i8 %196 to i32
  %198 = icmp ne i32 %195, %197
  br i1 %198, label %199, label %203

199:                                              ; preds = %193
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %200, i32 0, i32 112
  %202 = call i32 @_tx_mutex_put(ptr noundef %201)
  store i32 11, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

203:                                              ; preds = %193
  br label %204

204:                                              ; preds = %203, %135
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 0
  %207 = load ptr, ptr %206, align 8, !tbaa !17
  %208 = getelementptr inbounds i8, ptr %207, i64 0
  %209 = call ptr @_fx_directory_name_extract(ptr noundef %205, ptr noundef %208)
  %210 = icmp ne ptr %209, null
  br i1 %210, label %211, label %215

211:                                              ; preds = %204
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %212, i32 0, i32 112
  %214 = call i32 @_tx_mutex_put(ptr noundef %213)
  store i32 12, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

215:                                              ; preds = %204
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = call i32 @_fx_directory_free_search(ptr noundef %216, ptr noundef %18, ptr noundef %17)
  store i32 %217, ptr %12, align 4, !tbaa !24
  %218 = load i32, ptr %12, align 4, !tbaa !24
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %220, label %225

220:                                              ; preds = %215
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %221, i32 0, i32 112
  %223 = call i32 @_tx_mutex_put(ptr noundef %222)
  %224 = load i32, ptr %12, align 4, !tbaa !24
  store i32 %224, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

225:                                              ; preds = %215
  %226 = load ptr, ptr %15, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !17
  %229 = getelementptr inbounds i8, ptr %228, i64 0
  %230 = call ptr @_fx_directory_name_extract(ptr noundef %226, ptr noundef %229)
  %231 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 2
  %232 = load i32, ptr %231, align 8, !tbaa !27
  %233 = icmp ne i32 %232, 0
  br i1 %233, label %234, label %237

234:                                              ; preds = %225
  %235 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 1
  %236 = getelementptr inbounds [13 x i8], ptr %235, i64 0, i64 0
  store i8 0, ptr %236, align 8, !tbaa !18
  br label %237

237:                                              ; preds = %234, %225
  %238 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 4
  %239 = load i8, ptr %238, align 8, !tbaa !25
  %240 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 4
  store i8 %239, ptr %240, align 8, !tbaa !25
  %241 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 12
  %242 = load i64, ptr %241, align 8, !tbaa !28
  %243 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 12
  store i64 %242, ptr %243, align 8, !tbaa !28
  %244 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 13
  %245 = load i64, ptr %244, align 8, !tbaa !29
  %246 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 13
  store i64 %245, ptr %246, align 8, !tbaa !29
  %247 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 5
  %248 = load i8, ptr %247, align 1, !tbaa !30
  %249 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 5
  store i8 %248, ptr %249, align 1, !tbaa !30
  %250 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 6
  %251 = load i8, ptr %250, align 2, !tbaa !31
  %252 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 6
  store i8 %251, ptr %252, align 2, !tbaa !31
  %253 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 7
  %254 = load i32, ptr %253, align 4, !tbaa !32
  %255 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 7
  store i32 %254, ptr %255, align 4, !tbaa !32
  %256 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 8
  %257 = load i32, ptr %256, align 8, !tbaa !33
  %258 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 8
  store i32 %257, ptr %258, align 8, !tbaa !33
  %259 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 9
  %260 = load i32, ptr %259, align 4, !tbaa !34
  %261 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 9
  store i32 %260, ptr %261, align 4, !tbaa !34
  %262 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 10
  %263 = load i32, ptr %262, align 8, !tbaa !35
  %264 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 10
  store i32 %263, ptr %264, align 8, !tbaa !35
  %265 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 11
  %266 = load i32, ptr %265, align 4, !tbaa !36
  %267 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 11
  store i32 %266, ptr %267, align 4, !tbaa !36
  %268 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8, !tbaa !17
  %270 = getelementptr inbounds i8, ptr %269, i64 0
  %271 = load i8, ptr %270, align 1, !tbaa !18
  %272 = sext i8 %271 to i32
  %273 = icmp eq i32 %272, 46
  br i1 %273, label %274, label %280

274:                                              ; preds = %237
  %275 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 4
  %276 = load i8, ptr %275, align 8, !tbaa !25
  %277 = zext i8 %276 to i32
  %278 = or i32 %277, 2
  %279 = trunc i32 %278 to i8
  store i8 %279, ptr %275, align 8, !tbaa !25
  br label %280

280:                                              ; preds = %274, %237
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %281, i32 0, i32 117
  %283 = getelementptr inbounds [256 x i8], ptr %282, i64 0, i64 0
  store i8 0, ptr %283, align 8, !tbaa !18
  %284 = load ptr, ptr %5, align 8, !tbaa !5
  %285 = call i32 @_fx_directory_entry_write(ptr noundef %284, ptr noundef %17)
  store i32 %285, ptr %12, align 4, !tbaa !24
  %286 = load i32, ptr %12, align 4, !tbaa !24
  %287 = icmp ne i32 %286, 0
  br i1 %287, label %288, label %293

288:                                              ; preds = %280
  %289 = load ptr, ptr %5, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %289, i32 0, i32 112
  %291 = call i32 @_tx_mutex_put(ptr noundef %290)
  %292 = load i32, ptr %12, align 4, !tbaa !24
  store i32 %292, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

293:                                              ; preds = %280
  %294 = load ptr, ptr %5, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %294, i32 0, i32 49
  %296 = load i64, ptr %295, align 8, !tbaa !37
  store i64 %296, ptr %13, align 8, !tbaa !19
  %297 = load ptr, ptr %5, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %297, i32 0, i32 48
  %299 = load ptr, ptr %298, align 8, !tbaa !38
  store ptr %299, ptr %14, align 8, !tbaa !5
  br label %300

300:                                              ; preds = %377, %293
  %301 = load i64, ptr %13, align 8, !tbaa !19
  %302 = icmp ne i64 %301, 0
  br i1 %302, label %303, label %383

303:                                              ; preds = %300
  %304 = load ptr, ptr %14, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %304, i32 0, i32 19
  %306 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %305, i32 0, i32 14
  %307 = load i64, ptr %306, align 8, !tbaa !39
  %308 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 14
  %309 = load i64, ptr %308, align 8, !tbaa !41
  %310 = icmp eq i64 %307, %309
  br i1 %310, label %311, label %377

311:                                              ; preds = %303
  %312 = load ptr, ptr %14, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %312, i32 0, i32 19
  %314 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %313, i32 0, i32 15
  %315 = load i64, ptr %314, align 8, !tbaa !42
  %316 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 15
  %317 = load i64, ptr %316, align 8, !tbaa !43
  %318 = icmp eq i64 %315, %317
  br i1 %318, label %319, label %377

319:                                              ; preds = %311
  %320 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 12
  %321 = load i64, ptr %320, align 8, !tbaa !28
  %322 = load ptr, ptr %14, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %322, i32 0, i32 19
  %324 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %323, i32 0, i32 12
  store i64 %321, ptr %324, align 8, !tbaa !44
  %325 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 13
  %326 = load i64, ptr %325, align 8, !tbaa !29
  %327 = load ptr, ptr %14, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %327, i32 0, i32 19
  %329 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %328, i32 0, i32 13
  store i64 %326, ptr %329, align 8, !tbaa !45
  %330 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 14
  %331 = load i64, ptr %330, align 8, !tbaa !41
  %332 = load ptr, ptr %14, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %332, i32 0, i32 19
  %334 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %333, i32 0, i32 14
  store i64 %331, ptr %334, align 8, !tbaa !39
  %335 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 15
  %336 = load i64, ptr %335, align 8, !tbaa !43
  %337 = load ptr, ptr %14, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %337, i32 0, i32 19
  %339 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %338, i32 0, i32 15
  store i64 %336, ptr %339, align 8, !tbaa !42
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %340

340:                                              ; preds = %369, %319
  %341 = load i64, ptr %8, align 8, !tbaa !19
  %342 = icmp ult i64 %341, 255
  br i1 %342, label %343, label %370

343:                                              ; preds = %340
  %344 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 0
  %345 = load ptr, ptr %344, align 8, !tbaa !17
  %346 = load i64, ptr %8, align 8, !tbaa !19
  %347 = getelementptr inbounds i8, ptr %345, i64 %346
  %348 = load i8, ptr %347, align 1, !tbaa !18
  %349 = load ptr, ptr %14, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %349, i32 0, i32 19
  %351 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %350, i32 0, i32 0
  %352 = load ptr, ptr %351, align 8, !tbaa !46
  %353 = load i64, ptr %8, align 8, !tbaa !19
  %354 = getelementptr inbounds i8, ptr %352, i64 %353
  store i8 %348, ptr %354, align 1, !tbaa !18
  %355 = load i64, ptr %8, align 8, !tbaa !19
  %356 = add i64 %355, 1
  store i64 %356, ptr %8, align 8, !tbaa !19
  %357 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %17, i32 0, i32 0
  %358 = load ptr, ptr %357, align 8, !tbaa !17
  %359 = load i64, ptr %8, align 8, !tbaa !19
  %360 = getelementptr inbounds i8, ptr %358, i64 %359
  %361 = load i8, ptr %360, align 1, !tbaa !18
  %362 = sext i8 %361 to i32
  %363 = icmp eq i32 %362, 0
  br i1 %363, label %364, label %369

364:                                              ; preds = %343
  %365 = load i64, ptr %8, align 8, !tbaa !19
  %366 = icmp ult i64 %365, 255
  br i1 %366, label %367, label %368

367:                                              ; preds = %364
  br label %370

368:                                              ; preds = %364
  br label %369

369:                                              ; preds = %368, %343
  br label %340, !llvm.loop !47

370:                                              ; preds = %367, %340
  %371 = load ptr, ptr %14, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %371, i32 0, i32 19
  %373 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %372, i32 0, i32 0
  %374 = load ptr, ptr %373, align 8, !tbaa !46
  %375 = load i64, ptr %8, align 8, !tbaa !19
  %376 = getelementptr inbounds i8, ptr %374, i64 %375
  store i8 0, ptr %376, align 1, !tbaa !18
  br label %377

377:                                              ; preds = %370, %311, %303
  %378 = load ptr, ptr %14, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.FX_FILE_STRUCT, ptr %378, i32 0, i32 17
  %380 = load ptr, ptr %379, align 8, !tbaa !48
  store ptr %380, ptr %14, align 8, !tbaa !5
  %381 = load i64, ptr %13, align 8, !tbaa !19
  %382 = add i64 %381, -1
  store i64 %382, ptr %13, align 8, !tbaa !19
  br label %300, !llvm.loop !49

383:                                              ; preds = %300
  %384 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 0
  %385 = load ptr, ptr %384, align 8, !tbaa !17
  %386 = getelementptr inbounds i8, ptr %385, i64 0
  store i8 -27, ptr %386, align 1, !tbaa !18
  %387 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %16, i32 0, i32 1
  %388 = getelementptr inbounds [13 x i8], ptr %387, i64 0, i64 0
  store i8 -27, ptr %388, align 8, !tbaa !18
  %389 = load ptr, ptr %5, align 8, !tbaa !5
  %390 = call i32 @_fx_directory_entry_write(ptr noundef %389, ptr noundef %16)
  store i32 %390, ptr %12, align 4, !tbaa !24
  %391 = load ptr, ptr %5, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %391, i32 0, i32 112
  %393 = call i32 @_tx_mutex_put(ptr noundef %392)
  %394 = load i32, ptr %12, align 4, !tbaa !24
  store i32 %394, ptr %4, align 4
  store i32 1, ptr %20, align 4
  br label %395

395:                                              ; preds = %383, %288, %220, %211, %199, %131, %118, %108, %101, %95, %89, %83
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, 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
  %396 = load i32, ptr %4, align 4
  ret i32 %396
}

; 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_directory_entry_write(ptr noundef, ptr 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 560}
!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 = !{!11, !11, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !11, i64 0}
!23 = !{!10, !12, i64 264}
!24 = !{!12, !12, i64 0}
!25 = !{!15, !7, i64 32}
!26 = distinct !{!26, !21}
!27 = !{!15, !12, i64 24}
!28 = !{!15, !11, i64 56}
!29 = !{!15, !13, i64 64}
!30 = !{!15, !7, i64 33}
!31 = !{!15, !7, i64 34}
!32 = !{!15, !12, i64 36}
!33 = !{!15, !12, i64 40}
!34 = !{!15, !12, i64 44}
!35 = !{!15, !12, i64 48}
!36 = !{!15, !12, i64 52}
!37 = !{!10, !11, i64 320}
!38 = !{!10, !6, i64 312}
!39 = !{!40, !13, i64 224}
!40 = !{!"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}
!41 = !{!15, !13, i64 72}
!42 = !{!40, !11, i64 232}
!43 = !{!15, !11, i64 80}
!44 = !{!40, !11, i64 208}
!45 = !{!40, !13, i64 216}
!46 = !{!40, !6, i64 152}
!47 = distinct !{!47, !21}
!48 = !{!40, !6, i64 136}
!49 = distinct !{!49, !21}


; 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_rename(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %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 %4) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %7) #3
  %8 = getelementptr inbounds i8, ptr %0, i64 560
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = add i64 %9, 1
  store i64 %10, ptr %8, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 3144
  store ptr %11, ptr %5, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %0, i64 3400
  store ptr %12, ptr %6, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %0, i64 3656
  store ptr %13, ptr %7, align 8, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %5, i64 8
  store i8 0, ptr %14, align 8, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %6, i64 8
  store i8 0, ptr %15, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %7, i64 8
  store i8 0, ptr %16, align 8, !tbaa !17
  br label %17

17:                                               ; preds = %23, %3
  %.0102 = phi i64 [ 0, %3 ], [ %.1, %23 ]
  %.0101 = phi ptr [ %2, %3 ], [ %24, %23 ]
  %18 = load i8, ptr %.0101, align 1, !tbaa !17
  switch i8 %18, label %19 [
    i8 0, label %25
    i8 92, label %23
    i8 47, label %23
  ]

19:                                               ; preds = %17
  %20 = icmp ne i8 %18, 32
  %21 = icmp ne i64 %.0102, 0
  %or.cond = select i1 %20, i1 true, i1 %21
  %22 = add i64 %.0102, 1
  %spec.select = select i1 %or.cond, i64 %22, i64 0
  br label %23

23:                                               ; preds = %19, %17, %17
  %.1 = phi i64 [ 0, %17 ], [ 0, %17 ], [ %spec.select, %19 ]
  %24 = getelementptr inbounds i8, ptr %.0101, i64 1
  br label %17, !llvm.loop !18

25:                                               ; preds = %17
  %26 = add i64 %.0102, -256
  %or.cond3 = icmp ult i64 %26, -255
  br i1 %or.cond3, label %152, label %27

27:                                               ; preds = %25
  %28 = load i64, ptr %0, align 8, !tbaa !20
  %.not111 = icmp eq i64 %28, 1296385097
  br i1 %.not111, label %29, label %152

29:                                               ; preds = %27
  %30 = getelementptr inbounds i8, ptr %0, i64 824
  %31 = tail call i32 @_tx_mutex_get(ptr noundef nonnull %30, i64 noundef 4294967295) #3
  %.not112 = icmp eq i32 %31, 0
  br i1 %.not112, label %32, label %152

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %0, i64 264
  %34 = load i32, ptr %33, align 8, !tbaa !21
  %.not113 = icmp eq i32 %34, 0
  br i1 %.not113, label %37, label %35

35:                                               ; preds = %32
  %36 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

37:                                               ; preds = %32
  %38 = call i32 @_fx_directory_search(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %5, ptr noundef nonnull %7, ptr noundef null) #3
  %.not114 = icmp eq i32 %38, 0
  br i1 %.not114, label %41, label %39

39:                                               ; preds = %37
  %40 = call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

41:                                               ; preds = %37
  %42 = getelementptr inbounds i8, ptr %5, i64 32
  %43 = load i8, ptr %42, align 8, !tbaa !22
  %44 = and i8 %43, 24
  %.not115 = icmp eq i8 %44, 0
  br i1 %.not115, label %47, label %45

45:                                               ; preds = %41
  %46 = call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

47:                                               ; preds = %41
  %48 = call i32 @_fx_directory_search(ptr noundef nonnull %0, ptr noundef %2, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4) #3
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %.preheader, label %66

.preheader:                                       ; preds = %47, %.preheader
  %.2 = phi i64 [ %60, %.preheader ], [ 0, %47 ]
  %50 = getelementptr inbounds i8, ptr %1, i64 %.2
  %51 = load i8, ptr %50, align 1, !tbaa !17
  %52 = add i8 %51, -97
  %or.cond6 = icmp ult i8 %52, 26
  %53 = add nsw i8 %51, -32
  %spec.select122 = select i1 %or.cond6, i8 %53, i8 %51
  %54 = getelementptr inbounds i8, ptr %2, i64 %.2
  %55 = load i8, ptr %54, align 1, !tbaa !17
  %56 = add i8 %55, -97
  %or.cond9 = icmp ult i8 %56, 26
  %57 = add nsw i8 %55, -32
  %.099 = select i1 %or.cond9, i8 %57, i8 %55
  %58 = icmp eq i8 %spec.select122, %.099
  %59 = icmp ne i8 %spec.select122, 0
  %60 = add nuw nsw i64 %.2, 1
  %61 = icmp ult i64 %.2, 254
  %62 = and i1 %61, %59
  %or.cond124 = and i1 %62, %58
  br i1 %or.cond124, label %.preheader, label %63, !llvm.loop !23

63:                                               ; preds = %.preheader
  br i1 %58, label %66, label %64

64:                                               ; preds = %63
  %65 = call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

66:                                               ; preds = %63, %47
  %67 = load ptr, ptr %4, align 8, !tbaa !24
  %68 = load ptr, ptr %6, align 8, !tbaa !16
  %69 = call ptr @_fx_directory_name_extract(ptr noundef %67, ptr noundef %68) #3
  %.not116 = icmp eq ptr %69, null
  br i1 %.not116, label %72, label %70

70:                                               ; preds = %66
  %71 = call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

72:                                               ; preds = %66
  %73 = call i32 @_fx_directory_free_search(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull %6) #3
  %.not117 = icmp eq i32 %73, 0
  br i1 %.not117, label %76, label %74

74:                                               ; preds = %72
  %75 = call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

76:                                               ; preds = %72
  %77 = load ptr, ptr %4, align 8, !tbaa !24
  %78 = load ptr, ptr %6, align 8, !tbaa !16
  %79 = call ptr @_fx_directory_name_extract(ptr noundef %77, ptr noundef %78) #3
  %80 = getelementptr inbounds i8, ptr %6, i64 24
  %81 = load i32, ptr %80, align 8, !tbaa !25
  %.not118 = icmp eq i32 %81, 0
  br i1 %.not118, label %83, label %82

82:                                               ; preds = %76
  store i8 0, ptr %15, align 8, !tbaa !17
  br label %83

83:                                               ; preds = %82, %76
  %84 = load i8, ptr %42, align 8, !tbaa !22
  %85 = getelementptr inbounds i8, ptr %6, i64 32
  store i8 %84, ptr %85, align 8, !tbaa !22
  %86 = getelementptr inbounds i8, ptr %5, i64 56
  %87 = getelementptr inbounds i8, ptr %6, i64 56
  %88 = load <2 x i64>, ptr %86, align 8, !tbaa !17
  store <2 x i64> %88, ptr %87, align 8, !tbaa !17
  %89 = getelementptr inbounds i8, ptr %5, i64 33
  %90 = load i8, ptr %89, align 1, !tbaa !26
  %91 = getelementptr inbounds i8, ptr %6, i64 33
  store i8 %90, ptr %91, align 1, !tbaa !26
  %92 = getelementptr inbounds i8, ptr %5, i64 34
  %93 = load i8, ptr %92, align 2, !tbaa !27
  %94 = getelementptr inbounds i8, ptr %6, i64 34
  store i8 %93, ptr %94, align 2, !tbaa !27
  %95 = getelementptr inbounds i8, ptr %5, i64 36
  %96 = getelementptr inbounds i8, ptr %6, i64 36
  %97 = load <4 x i32>, ptr %95, align 4, !tbaa !28
  store <4 x i32> %97, ptr %96, align 4, !tbaa !28
  %98 = getelementptr inbounds i8, ptr %5, i64 52
  %99 = load i32, ptr %98, align 4, !tbaa !29
  %100 = getelementptr inbounds i8, ptr %6, i64 52
  store i32 %99, ptr %100, align 4, !tbaa !29
  %101 = load ptr, ptr %6, align 8, !tbaa !16
  %102 = load i8, ptr %101, align 1, !tbaa !17
  %103 = icmp eq i8 %102, 46
  br i1 %103, label %104, label %106

104:                                              ; preds = %83
  %105 = or i8 %84, 2
  store i8 %105, ptr %85, align 8, !tbaa !22
  br label %106

106:                                              ; preds = %104, %83
  %107 = getelementptr inbounds i8, ptr %0, i64 1456
  store i8 0, ptr %107, align 8, !tbaa !17
  %108 = call i32 @_fx_directory_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %6) #3
  %.not119 = icmp eq i32 %108, 0
  br i1 %.not119, label %111, label %109

109:                                              ; preds = %106
  %110 = call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

111:                                              ; preds = %106
  %112 = getelementptr inbounds i8, ptr %0, i64 320
  %113 = load i64, ptr %112, align 8, !tbaa !30
  %.not120129 = icmp eq i64 %113, 0
  br i1 %.not120129, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %111
  %114 = getelementptr inbounds i8, ptr %0, i64 312
  %115 = getelementptr inbounds i8, ptr %5, i64 72
  %116 = getelementptr inbounds i8, ptr %5, i64 80
  %117 = getelementptr inbounds i8, ptr %6, i64 72
  br label %118

118:                                              ; preds = %.lr.ph, %146
  %.097131.in = phi ptr [ %114, %.lr.ph ], [ %147, %146 ]
  %.098130 = phi i64 [ %113, %.lr.ph ], [ %148, %146 ]
  %.097131 = load ptr, ptr %.097131.in, align 8, !tbaa !24
  %119 = getelementptr inbounds i8, ptr %.097131, i64 152
  %120 = getelementptr inbounds i8, ptr %.097131, i64 224
  %121 = load i64, ptr %120, align 8, !tbaa !31
  %122 = load i64, ptr %115, align 8, !tbaa !33
  %123 = icmp eq i64 %121, %122
  br i1 %123, label %124, label %146

124:                                              ; preds = %118
  %125 = getelementptr inbounds i8, ptr %.097131, i64 232
  %126 = load i64, ptr %125, align 8, !tbaa !34
  %127 = load i64, ptr %116, align 8, !tbaa !35
  %128 = icmp eq i64 %126, %127
  br i1 %128, label %129, label %146

129:                                              ; preds = %124
  %130 = getelementptr inbounds i8, ptr %.097131, i64 208
  %131 = load <2 x i64>, ptr %87, align 8, !tbaa !17
  store <2 x i64> %131, ptr %130, align 8, !tbaa !17
  %132 = load <2 x i64>, ptr %117, align 8, !tbaa !17
  store <2 x i64> %132, ptr %120, align 8, !tbaa !17
  %.pre = load ptr, ptr %6, align 8, !tbaa !16
  %.pre133 = load i8, ptr %.pre, align 1, !tbaa !17
  br label %133

133:                                              ; preds = %129, %133
  %134 = phi i8 [ %.pre133, %129 ], [ %140, %133 ]
  %.3 = phi i64 [ 0, %129 ], [ %137, %133 ]
  %135 = load ptr, ptr %119, align 8, !tbaa !36
  %136 = getelementptr inbounds i8, ptr %135, i64 %.3
  store i8 %134, ptr %136, align 1, !tbaa !17
  %137 = add nuw nsw i64 %.3, 1
  %138 = load ptr, ptr %6, align 8, !tbaa !16
  %139 = getelementptr inbounds i8, ptr %138, i64 %137
  %140 = load i8, ptr %139, align 1, !tbaa !17
  %141 = icmp ne i8 %140, 0
  %142 = icmp ult i64 %.3, 254
  %or.cond16 = and i1 %142, %141
  br i1 %or.cond16, label %133, label %143, !llvm.loop !37

143:                                              ; preds = %133
  %144 = load ptr, ptr %119, align 8, !tbaa !36
  %145 = getelementptr inbounds i8, ptr %144, i64 %137
  store i8 0, ptr %145, align 1, !tbaa !17
  br label %146

146:                                              ; preds = %143, %124, %118
  %147 = getelementptr inbounds i8, ptr %.097131, i64 136
  %148 = add i64 %.098130, -1
  %.not120 = icmp eq i64 %148, 0
  br i1 %.not120, label %._crit_edge, label %118, !llvm.loop !38

._crit_edge:                                      ; preds = %146, %111
  %149 = load ptr, ptr %5, align 8, !tbaa !16
  store i8 -27, ptr %149, align 1, !tbaa !17
  store i8 -27, ptr %14, align 8, !tbaa !17
  %150 = call i32 @_fx_directory_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %5) #3
  %151 = call i32 @_tx_mutex_put(ptr noundef nonnull %30) #3
  br label %152

152:                                              ; preds = %29, %27, %25, %._crit_edge, %109, %74, %70, %64, %45, %39, %35
  %.0 = phi i32 [ 35, %35 ], [ %38, %39 ], [ 5, %45 ], [ 11, %64 ], [ 12, %70 ], [ %73, %74 ], [ %108, %109 ], [ %150, %._crit_edge ], [ 12, %25 ], [ 17, %27 ], [ 17, %29 ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #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 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_directory_entry_write(ptr noundef, ptr 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 560}
!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 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !7, i64 0}
!21 = !{!6, !11, i64 264}
!22 = !{!14, !8, i64 32}
!23 = distinct !{!23, !19}
!24 = !{!10, !10, i64 0}
!25 = !{!14, !11, i64 24}
!26 = !{!14, !8, i64 33}
!27 = !{!14, !8, i64 34}
!28 = !{!11, !11, i64 0}
!29 = !{!14, !11, i64 52}
!30 = !{!6, !7, i64 320}
!31 = !{!32, !12, i64 224}
!32 = !{!"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}
!33 = !{!14, !12, i64 72}
!34 = !{!32, !7, i64 232}
!35 = !{!14, !7, i64 80}
!36 = !{!32, !10, i64 152}
!37 = distinct !{!37, !19}
!38 = distinct !{!38, !19}


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