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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.FX_DIR_ENTRY_STRUCT = type { ptr, [13 x i8], i32, i32, i8, i8, i8, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.FX_MEDIA_STRUCT = type { i64, ptr, ptr, i64, i32, i64, ptr, ptr, i64, i64, i32, i32, i32, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i64, i64, i32, i64, i64, ptr, i32, i32, ptr, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.TX_MUTEX_STRUCT, i32, %struct.FX_DIR_ENTRY_STRUCT, %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], [256 x i8], %struct.FX_PATH_STRUCT, [16 x %struct.FX_FAT_CACHE_ENTRY_STRUCT], [128 x i8], i64, [1024 x i8], [256 x %struct.FX_CACHED_SECTOR_STRUCT], i64, i64, i64, i64, i8 }
%struct.TX_MUTEX_STRUCT = type { i64, ptr, i32, ptr, i32, i32, ptr, i32, ptr, ptr, i32, ptr, ptr }
%struct.FX_PATH_STRUCT = type { %struct.FX_DIR_ENTRY_STRUCT, [256 x i8], [256 x i8], i64 }
%struct.FX_FAT_CACHE_ENTRY_STRUCT = type { i64, i64, i64 }
%struct.FX_CACHED_SECTOR_STRUCT = type { ptr, i64, i8, i8, i8, i8, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @_fx_media_volume_set(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %9 = alloca %struct.FX_DIR_ENTRY_STRUCT, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, 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 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %15, i32 0, i32 0
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = icmp ne i64 %17, 1296385097
  br i1 %18, label %19, label %20

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

20:                                               ; preds = %2
  %21 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %8, i32 0, i32 14
  store i64 0, ptr %21, align 8, !tbaa !17
  %22 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %8, i32 0, i32 15
  store i64 0, ptr %22, align 8, !tbaa !18
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %23, i32 0, i32 0
  %25 = load i64, ptr %24, align 8, !tbaa !9
  %26 = icmp ne i64 %25, 1296385097
  br i1 %26, label %27, label %28

27:                                               ; preds = %20
  store i32 17, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

28:                                               ; preds = %20
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %29, i32 0, i32 112
  %31 = call i32 @_tx_mutex_get(ptr noundef %30, i64 noundef 4294967295)
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %28
  store i32 17, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

34:                                               ; preds = %28
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 0
  %38 = load i8, ptr %37, align 1, !tbaa !19
  %39 = sext i8 %38 to i32
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %35
  store i32 12, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

42:                                               ; preds = %35
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = call i32 @_fx_utility_logical_sector_read(ptr noundef %43, i64 noundef 0, ptr noundef %46, i64 noundef 1, i8 noundef zeroext 4)
  store i32 %47, ptr %10, align 4, !tbaa !21
  %48 = load i32, ptr %10, align 4, !tbaa !21
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %55

50:                                               ; preds = %42
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %51, i32 0, i32 112
  %53 = call i32 @_tx_mutex_put(ptr noundef %52)
  %54 = load i32, ptr %10, align 4, !tbaa !21
  store i32 %54, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

55:                                               ; preds = %42
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %56, i32 0, i32 107
  %58 = load i64, ptr %57, align 8, !tbaa !22
  %59 = add i64 %58, 1
  store i64 %59, ptr %57, align 8, !tbaa !22
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %60, i32 0, i32 32
  store i32 5, ptr %61, align 8, !tbaa !23
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %62, i32 0, i32 33
  store i32 144, ptr %63, align 4, !tbaa !24
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %67, i32 0, i32 34
  store ptr %66, ptr %68, align 8, !tbaa !25
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %69, i32 0, i32 36
  store i64 1, ptr %70, align 8, !tbaa !26
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %71, i32 0, i32 44
  store i32 1, ptr %72, align 8, !tbaa !27
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %73, i32 0, i32 45
  %75 = load ptr, ptr %74, align 8, !tbaa !28
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  call void %75(ptr noundef %76)
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %77, i32 0, i32 33
  %79 = load i32, ptr %78, align 4, !tbaa !24
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %88

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

88:                                               ; preds = %55
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %89, i32 0, i32 23
  %91 = load i32, ptr %90, align 8, !tbaa !29
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %88
  store i32 71, ptr %11, align 4, !tbaa !21
  br label %95

94:                                               ; preds = %88
  store i32 43, ptr %11, align 4, !tbaa !21
  br label %95

95:                                               ; preds = %94, %93
  store i64 0, ptr %6, align 8, !tbaa !30
  br label %96

96:                                               ; preds = %133, %95
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load i64, ptr %6, align 8, !tbaa !30
  %99 = getelementptr inbounds i8, ptr %97, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !19
  %101 = icmp ne i8 %100, 0
  br i1 %101, label %102, label %136

102:                                              ; preds = %96
  %103 = load i64, ptr %6, align 8, !tbaa !30
  %104 = icmp eq i64 %103, 11
  br i1 %104, label %105, label %106

105:                                              ; preds = %102
  br label %136

106:                                              ; preds = %102
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load i64, ptr %6, align 8, !tbaa !30
  %109 = getelementptr inbounds i8, ptr %107, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !19
  store i8 %110, ptr %13, align 1, !tbaa !19
  %111 = load i8, ptr %13, align 1, !tbaa !19
  %112 = sext i8 %111 to i32
  %113 = icmp sge i32 %112, 97
  br i1 %113, label %114, label %123

114:                                              ; preds = %106
  %115 = load i8, ptr %13, align 1, !tbaa !19
  %116 = sext i8 %115 to i32
  %117 = icmp sle i32 %116, 122
  br i1 %117, label %118, label %123

118:                                              ; preds = %114
  %119 = load i8, ptr %13, align 1, !tbaa !19
  %120 = sext i8 %119 to i32
  %121 = sub nsw i32 %120, 32
  %122 = trunc i32 %121 to i8
  store i8 %122, ptr %13, align 1, !tbaa !19
  br label %123

123:                                              ; preds = %118, %114, %106
  %124 = load i8, ptr %13, align 1, !tbaa !19
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %125, i32 0, i32 2
  %127 = load ptr, ptr %126, align 8, !tbaa !20
  %128 = load i32, ptr %11, align 4, !tbaa !21
  %129 = zext i32 %128 to i64
  %130 = load i64, ptr %6, align 8, !tbaa !30
  %131 = add i64 %129, %130
  %132 = getelementptr inbounds i8, ptr %127, i64 %131
  store i8 %124, ptr %132, align 1, !tbaa !19
  br label %133

133:                                              ; preds = %123
  %134 = load i64, ptr %6, align 8, !tbaa !30
  %135 = add i64 %134, 1
  store i64 %135, ptr %6, align 8, !tbaa !30
  br label %96, !llvm.loop !31

136:                                              ; preds = %105, %96
  br label %137

137:                                              ; preds = %149, %136
  %138 = load i64, ptr %6, align 8, !tbaa !30
  %139 = icmp ult i64 %138, 11
  br i1 %139, label %140, label %152

140:                                              ; preds = %137
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !20
  %144 = load i32, ptr %11, align 4, !tbaa !21
  %145 = zext i32 %144 to i64
  %146 = load i64, ptr %6, align 8, !tbaa !30
  %147 = add i64 %145, %146
  %148 = getelementptr inbounds i8, ptr %143, i64 %147
  store i8 32, ptr %148, align 1, !tbaa !19
  br label %149

149:                                              ; preds = %140
  %150 = load i64, ptr %6, align 8, !tbaa !30
  %151 = add i64 %150, 1
  store i64 %151, ptr %6, align 8, !tbaa !30
  br label %137, !llvm.loop !33

152:                                              ; preds = %137
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %153, i32 0, i32 108
  %155 = load i64, ptr %154, align 8, !tbaa !34
  %156 = add i64 %155, 1
  store i64 %156, ptr %154, align 8, !tbaa !34
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %157, i32 0, i32 32
  store i32 7, ptr %158, align 8, !tbaa !23
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %159, i32 0, i32 33
  store i32 144, ptr %160, align 4, !tbaa !24
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %161, i32 0, i32 2
  %163 = load ptr, ptr %162, align 8, !tbaa !20
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %164, i32 0, i32 34
  store ptr %163, ptr %165, align 8, !tbaa !25
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %166, i32 0, i32 36
  store i64 1, ptr %167, align 8, !tbaa !26
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %168, i32 0, i32 44
  store i32 1, ptr %169, align 8, !tbaa !27
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %170, i32 0, i32 42
  store i32 1, ptr %171, align 8, !tbaa !35
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %172, i32 0, i32 45
  %174 = load ptr, ptr %173, align 8, !tbaa !28
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  call void %174(ptr noundef %175)
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %176, i32 0, i32 42
  store i32 0, ptr %177, align 8, !tbaa !35
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %178, i32 0, i32 33
  %180 = load i32, ptr %179, align 4, !tbaa !24
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %189

182:                                              ; preds = %152
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %183, i32 0, i32 112
  %185 = call i32 @_tx_mutex_put(ptr noundef %184)
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %186, i32 0, i32 33
  %188 = load i32, ptr %187, align 4, !tbaa !24
  store i32 %188, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

189:                                              ; preds = %152
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %190, i32 0, i32 122
  %192 = getelementptr inbounds [1024 x i8], ptr %191, i64 0, i64 0
  %193 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %9, i32 0, i32 0
  store ptr %192, ptr %193, align 8, !tbaa !36
  %194 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %9, i32 0, i32 1
  %195 = getelementptr inbounds [13 x i8], ptr %194, i64 0, i64 0
  store i8 0, ptr %195, align 8, !tbaa !19
  store i64 0, ptr %6, align 8, !tbaa !30
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %196, i32 0, i32 28
  %198 = load i32, ptr %197, align 8, !tbaa !37
  %199 = add i32 %198, 1
  %200 = zext i32 %199 to i64
  store i64 %200, ptr %7, align 8, !tbaa !30
  br label %201

201:                                              ; preds = %258, %189
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = call i32 @_fx_directory_entry_read(ptr noundef %202, ptr noundef null, ptr noundef %6, ptr noundef %9)
  store i32 %203, ptr %10, align 4, !tbaa !21
  %204 = load i32, ptr %10, align 4, !tbaa !21
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %211

206:                                              ; preds = %201
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %207, i32 0, i32 112
  %209 = call i32 @_tx_mutex_put(ptr noundef %208)
  %210 = load i32, ptr %10, align 4, !tbaa !21
  store i32 %210, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

211:                                              ; preds = %201
  %212 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %9, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !36
  %214 = getelementptr inbounds i8, ptr %213, i64 0
  %215 = load i8, ptr %214, align 1, !tbaa !19
  %216 = sext i8 %215 to i32
  %217 = icmp eq i32 %216, -27
  br i1 %217, label %218, label %231

218:                                              ; preds = %211
  %219 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %9, i32 0, i32 1
  %220 = getelementptr inbounds [13 x i8], ptr %219, i64 0, i64 0
  %221 = load i8, ptr %220, align 8, !tbaa !19
  %222 = sext i8 %221 to i32
  %223 = icmp eq i32 %222, 0
  br i1 %223, label %224, label %231

224:                                              ; preds = %218
  %225 = load i64, ptr %6, align 8, !tbaa !30
  %226 = load i64, ptr %7, align 8, !tbaa !30
  %227 = icmp ult i64 %225, %226
  br i1 %227, label %228, label %230

228:                                              ; preds = %224
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 136, i1 false), !tbaa.struct !38
  %229 = load i64, ptr %6, align 8, !tbaa !30
  store i64 %229, ptr %7, align 8, !tbaa !30
  br label %230

230:                                              ; preds = %228, %224
  br label %255

231:                                              ; preds = %218, %211
  %232 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %9, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !36
  %234 = getelementptr inbounds i8, ptr %233, i64 0
  %235 = load i8, ptr %234, align 1, !tbaa !19
  %236 = sext i8 %235 to i32
  %237 = icmp eq i32 %236, 0
  br i1 %237, label %238, label %245

238:                                              ; preds = %231
  %239 = load i64, ptr %6, align 8, !tbaa !30
  %240 = load i64, ptr %7, align 8, !tbaa !30
  %241 = icmp ult i64 %239, %240
  br i1 %241, label %242, label %244

242:                                              ; preds = %238
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 136, i1 false), !tbaa.struct !38
  %243 = load i64, ptr %6, align 8, !tbaa !30
  store i64 %243, ptr %7, align 8, !tbaa !30
  br label %244

244:                                              ; preds = %242, %238
  br label %265

245:                                              ; preds = %231
  %246 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %9, i32 0, i32 4
  %247 = load i8, ptr %246, align 8, !tbaa !40
  %248 = zext i8 %247 to i32
  %249 = and i32 %248, 8
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %253

251:                                              ; preds = %245
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 136, i1 false), !tbaa.struct !38
  %252 = load i64, ptr %6, align 8, !tbaa !30
  store i64 %252, ptr %7, align 8, !tbaa !30
  br label %265

253:                                              ; preds = %245
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254, %230
  %256 = load i64, ptr %6, align 8, !tbaa !30
  %257 = add i64 %256, 1
  store i64 %257, ptr %6, align 8, !tbaa !30
  br label %258

258:                                              ; preds = %255
  %259 = load i64, ptr %6, align 8, !tbaa !30
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %260, i32 0, i32 28
  %262 = load i32, ptr %261, align 8, !tbaa !37
  %263 = zext i32 %262 to i64
  %264 = icmp ult i64 %259, %263
  br i1 %264, label %201, label %265, !llvm.loop !41

265:                                              ; preds = %258, %251, %244
  %266 = load i64, ptr %6, align 8, !tbaa !30
  %267 = load ptr, ptr %4, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %267, i32 0, i32 28
  %269 = load i32, ptr %268, align 8, !tbaa !37
  %270 = zext i32 %269 to i64
  %271 = icmp eq i64 %266, %270
  br i1 %271, label %272, label %285

272:                                              ; preds = %265
  %273 = load i64, ptr %7, align 8, !tbaa !30
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %274, i32 0, i32 28
  %276 = load i32, ptr %275, align 8, !tbaa !37
  %277 = add i32 %276, 1
  %278 = zext i32 %277 to i64
  %279 = icmp eq i64 %273, %278
  br i1 %279, label %280, label %284

280:                                              ; preds = %272
  %281 = load ptr, ptr %4, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %281, i32 0, i32 112
  %283 = call i32 @_tx_mutex_put(ptr noundef %282)
  store i32 2, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

284:                                              ; preds = %272
  br label %285

285:                                              ; preds = %284, %265
  %286 = load ptr, ptr %4, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %8, i32 0, i32 14
  %288 = load i64, ptr %287, align 8, !tbaa !17
  %289 = load ptr, ptr %4, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %289, i32 0, i32 2
  %291 = load ptr, ptr %290, align 8, !tbaa !20
  %292 = call i32 @_fx_utility_logical_sector_read(ptr noundef %286, i64 noundef %288, ptr noundef %291, i64 noundef 1, i8 noundef zeroext 1)
  store i32 %292, ptr %10, align 4, !tbaa !21
  %293 = load i32, ptr %10, align 4, !tbaa !21
  %294 = icmp ne i32 %293, 0
  br i1 %294, label %295, label %300

295:                                              ; preds = %285
  %296 = load ptr, ptr %4, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %296, i32 0, i32 112
  %298 = call i32 @_tx_mutex_put(ptr noundef %297)
  %299 = load i32, ptr %10, align 4, !tbaa !21
  store i32 %299, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

300:                                              ; preds = %285
  %301 = load ptr, ptr %4, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %301, i32 0, i32 2
  %303 = load ptr, ptr %302, align 8, !tbaa !20
  %304 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %8, i32 0, i32 15
  %305 = load i64, ptr %304, align 8, !tbaa !18
  %306 = trunc i64 %305 to i32
  %307 = zext i32 %306 to i64
  %308 = getelementptr inbounds i8, ptr %303, i64 %307
  store ptr %308, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %6, align 8, !tbaa !30
  br label %309

309:                                              ; preds = %341, %300
  %310 = load ptr, ptr %5, align 8, !tbaa !5
  %311 = load i64, ptr %6, align 8, !tbaa !30
  %312 = getelementptr inbounds i8, ptr %310, i64 %311
  %313 = load i8, ptr %312, align 1, !tbaa !19
  %314 = icmp ne i8 %313, 0
  br i1 %314, label %315, label %344

315:                                              ; preds = %309
  %316 = load i64, ptr %6, align 8, !tbaa !30
  %317 = icmp eq i64 %316, 11
  br i1 %317, label %318, label %319

318:                                              ; preds = %315
  br label %344

319:                                              ; preds = %315
  %320 = load ptr, ptr %5, align 8, !tbaa !5
  %321 = load i64, ptr %6, align 8, !tbaa !30
  %322 = getelementptr inbounds i8, ptr %320, i64 %321
  %323 = load i8, ptr %322, align 1, !tbaa !19
  store i8 %323, ptr %13, align 1, !tbaa !19
  %324 = load i8, ptr %13, align 1, !tbaa !19
  %325 = sext i8 %324 to i32
  %326 = icmp sge i32 %325, 97
  br i1 %326, label %327, label %336

327:                                              ; preds = %319
  %328 = load i8, ptr %13, align 1, !tbaa !19
  %329 = sext i8 %328 to i32
  %330 = icmp sle i32 %329, 122
  br i1 %330, label %331, label %336

331:                                              ; preds = %327
  %332 = load i8, ptr %13, align 1, !tbaa !19
  %333 = sext i8 %332 to i32
  %334 = sub nsw i32 %333, 32
  %335 = trunc i32 %334 to i8
  store i8 %335, ptr %13, align 1, !tbaa !19
  br label %336

336:                                              ; preds = %331, %327, %319
  %337 = load i8, ptr %13, align 1, !tbaa !19
  %338 = load ptr, ptr %12, align 8, !tbaa !5
  %339 = load i64, ptr %6, align 8, !tbaa !30
  %340 = getelementptr inbounds i8, ptr %338, i64 %339
  store i8 %337, ptr %340, align 1, !tbaa !19
  br label %341

341:                                              ; preds = %336
  %342 = load i64, ptr %6, align 8, !tbaa !30
  %343 = add i64 %342, 1
  store i64 %343, ptr %6, align 8, !tbaa !30
  br label %309, !llvm.loop !42

344:                                              ; preds = %318, %309
  br label %345

345:                                              ; preds = %352, %344
  %346 = load i64, ptr %6, align 8, !tbaa !30
  %347 = icmp ult i64 %346, 11
  br i1 %347, label %348, label %355

348:                                              ; preds = %345
  %349 = load ptr, ptr %12, align 8, !tbaa !5
  %350 = load i64, ptr %6, align 8, !tbaa !30
  %351 = getelementptr inbounds i8, ptr %349, i64 %350
  store i8 32, ptr %351, align 1, !tbaa !19
  br label %352

352:                                              ; preds = %348
  %353 = load i64, ptr %6, align 8, !tbaa !30
  %354 = add i64 %353, 1
  store i64 %354, ptr %6, align 8, !tbaa !30
  br label %345, !llvm.loop !43

355:                                              ; preds = %345
  %356 = load ptr, ptr %12, align 8, !tbaa !5
  %357 = getelementptr inbounds i8, ptr %356, i64 11
  store i8 40, ptr %357, align 1, !tbaa !19
  %358 = load ptr, ptr %12, align 8, !tbaa !5
  %359 = getelementptr inbounds i8, ptr %358, i64 20
  store i8 0, ptr %359, align 1, !tbaa !19
  %360 = load ptr, ptr %12, align 8, !tbaa !5
  %361 = getelementptr inbounds i8, ptr %360, i64 21
  store i8 0, ptr %361, align 1, !tbaa !19
  %362 = load ptr, ptr %12, align 8, !tbaa !5
  %363 = getelementptr inbounds i8, ptr %362, i64 26
  store i8 0, ptr %363, align 1, !tbaa !19
  %364 = load ptr, ptr %12, align 8, !tbaa !5
  %365 = getelementptr inbounds i8, ptr %364, i64 27
  store i8 0, ptr %365, align 1, !tbaa !19
  %366 = load ptr, ptr %12, align 8, !tbaa !5
  %367 = getelementptr inbounds i8, ptr %366, i64 28
  store i8 0, ptr %367, align 1, !tbaa !19
  %368 = load ptr, ptr %12, align 8, !tbaa !5
  %369 = getelementptr inbounds i8, ptr %368, i64 29
  store i8 0, ptr %369, align 1, !tbaa !19
  %370 = load ptr, ptr %12, align 8, !tbaa !5
  %371 = getelementptr inbounds i8, ptr %370, i64 30
  store i8 0, ptr %371, align 1, !tbaa !19
  %372 = load ptr, ptr %12, align 8, !tbaa !5
  %373 = getelementptr inbounds i8, ptr %372, i64 31
  store i8 0, ptr %373, align 1, !tbaa !19
  %374 = load ptr, ptr %4, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.FX_DIR_ENTRY_STRUCT, ptr %8, i32 0, i32 14
  %376 = load i64, ptr %375, align 8, !tbaa !17
  %377 = load ptr, ptr %4, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %377, i32 0, i32 2
  %379 = load ptr, ptr %378, align 8, !tbaa !20
  %380 = call i32 @_fx_utility_logical_sector_write(ptr noundef %374, i64 noundef %376, ptr noundef %379, i64 noundef 1, i8 noundef zeroext 3)
  store i32 %380, ptr %10, align 4, !tbaa !21
  %381 = load ptr, ptr %4, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.FX_MEDIA_STRUCT, ptr %381, i32 0, i32 112
  %383 = call i32 @_tx_mutex_put(ptr noundef %382)
  %384 = load i32, ptr %10, align 4, !tbaa !21
  store i32 %384, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %385

385:                                              ; preds = %355, %295, %280, %206, %182, %81, %50, %41, %33, %27, %19
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 136, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 136, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %386 = load i32, ptr %3, align 4
  ret i32 %386
}

; 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 @_fx_utility_logical_sector_read(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext) #2

declare i32 @_tx_mutex_put(ptr noundef) #2

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!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, !13, i64 72}
!18 = !{!15, !11, i64 80}
!19 = !{!7, !7, i64 0}
!20 = !{!10, !6, i64 16}
!21 = !{!12, !12, i64 0}
!22 = !{!10, !11, i64 784}
!23 = !{!10, !12, i64 216}
!24 = !{!10, !12, i64 220}
!25 = !{!10, !6, i64 224}
!26 = !{!10, !11, i64 240}
!27 = !{!10, !12, i64 280}
!28 = !{!10, !6, i64 288}
!29 = !{!10, !12, i64 144}
!30 = !{!11, !11, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!10, !11, i64 792}
!35 = !{!10, !12, i64 272}
!36 = !{!15, !6, i64 0}
!37 = !{!10, !12, i64 184}
!38 = !{i64 0, i64 8, !5, i64 8, i64 13, !19, i64 24, i64 4, !21, i64 28, i64 4, !21, i64 32, i64 1, !19, i64 33, i64 1, !19, i64 34, i64 1, !19, i64 36, i64 4, !21, i64 40, i64 4, !21, i64 44, i64 4, !21, i64 48, i64 4, !21, i64 52, i64 4, !21, i64 56, i64 8, !30, i64 64, i64 8, !39, i64 72, i64 8, !39, i64 80, i64 8, !30, i64 88, i64 8, !30, i64 96, i64 8, !30, i64 104, i64 8, !30, i64 112, i64 8, !39, i64 120, i64 8, !30, i64 128, i64 8, !39}
!39 = !{!13, !13, i64 0}
!40 = !{!15, !7, i64 32}
!41 = distinct !{!41, !32}
!42 = distinct !{!42, !32}
!43 = distinct !{!43, !32}


; 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_media_volume_set(ptr noundef %0, ptr nocapture noundef readonly %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) #4
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %4) #4
  %5 = load i64, ptr %0, align 8, !tbaa !5
  %.not = icmp eq i64 %5, 1296385097
  br i1 %.not, label %6, label %149

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 824
  %8 = tail call i32 @_tx_mutex_get(ptr noundef nonnull %7, i64 noundef 4294967295) #4
  %.not124 = icmp eq i32 %8, 0
  br i1 %.not124, label %9, label %149

9:                                                ; preds = %6
  %10 = load i8, ptr %1, align 1, !tbaa !16
  %11 = icmp eq i8 %10, 0
  br i1 %11, label %149, label %12

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %15 = tail call i32 @_fx_utility_logical_sector_read(ptr noundef nonnull %0, i64 noundef 0, ptr noundef %14, i64 noundef 1, i8 noundef zeroext 4) #4
  %.not125 = icmp eq i32 %15, 0
  br i1 %.not125, label %18, label %16

16:                                               ; preds = %12
  %17 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %7) #4
  br label %149

18:                                               ; preds = %12
  %19 = getelementptr inbounds i8, ptr %0, i64 784
  %20 = load i64, ptr %19, align 8, !tbaa !18
  %21 = add i64 %20, 1
  store i64 %21, ptr %19, align 8, !tbaa !18
  %22 = getelementptr inbounds i8, ptr %0, i64 216
  store i32 5, ptr %22, align 8, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %0, i64 220
  store i32 144, ptr %23, align 4, !tbaa !20
  %24 = load ptr, ptr %13, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %0, i64 224
  store ptr %24, ptr %25, align 8, !tbaa !21
  %26 = getelementptr inbounds i8, ptr %0, i64 240
  store i64 1, ptr %26, align 8, !tbaa !22
  %27 = getelementptr inbounds i8, ptr %0, i64 280
  store i32 1, ptr %27, align 8, !tbaa !23
  %28 = getelementptr inbounds i8, ptr %0, i64 288
  %29 = load ptr, ptr %28, align 8, !tbaa !24
  tail call void %29(ptr noundef nonnull %0) #4
  %30 = load i32, ptr %23, align 4, !tbaa !20
  %.not126 = icmp eq i32 %30, 0
  br i1 %.not126, label %34, label %31

31:                                               ; preds = %18
  %32 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %7) #4
  %33 = load i32, ptr %23, align 4, !tbaa !20
  br label %149

34:                                               ; preds = %18
  %35 = getelementptr inbounds i8, ptr %0, i64 144
  %36 = load i32, ptr %35, align 8, !tbaa !25
  %.not127 = icmp eq i32 %36, 0
  %. = select i1 %.not127, i64 43, i64 71
  %37 = load i8, ptr %1, align 1, !tbaa !16
  %38 = icmp eq i8 %37, 0
  br i1 %38, label %.lr.ph152.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %34, %.lr.ph
  %39 = phi i8 [ %48, %.lr.ph ], [ %37, %34 ]
  %40 = phi i64 [ %46, %.lr.ph ], [ 0, %34 ]
  %41 = add i8 %39, -97
  %or.cond = icmp ult i8 %41, 26
  %42 = add nsw i8 %39, -32
  %spec.select = select i1 %or.cond, i8 %42, i8 %39
  %43 = load ptr, ptr %13, align 8, !tbaa !17
  %44 = getelementptr i8, ptr %43, i64 %.
  %45 = getelementptr i8, ptr %44, i64 %40
  store i8 %spec.select, ptr %45, align 1, !tbaa !16
  %46 = add i64 %40, 1
  %47 = getelementptr inbounds i8, ptr %1, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !16
  %49 = icmp eq i8 %48, 0
  %50 = icmp eq i64 %46, 11
  %or.cond12 = or i1 %50, %49
  br i1 %or.cond12, label %thread-pre-split, label %.lr.ph, !llvm.loop !26

thread-pre-split:                                 ; preds = %.lr.ph
  %51 = icmp ult i64 %46, 11
  br i1 %51, label %.lr.ph152.preheader, label %._crit_edge

.lr.ph152.preheader:                              ; preds = %34, %thread-pre-split
  %.ph220 = phi i64 [ 0, %34 ], [ %46, %thread-pre-split ]
  br label %.lr.ph152

.lr.ph152:                                        ; preds = %.lr.ph152.preheader, %.lr.ph152
  %52 = phi i64 [ %56, %.lr.ph152 ], [ %.ph220, %.lr.ph152.preheader ]
  %53 = load ptr, ptr %13, align 8, !tbaa !17
  %54 = getelementptr inbounds i8, ptr %53, i64 %.
  %55 = getelementptr inbounds i8, ptr %54, i64 %52
  store i8 32, ptr %55, align 1, !tbaa !16
  %56 = add nuw nsw i64 %52, 1
  %57 = icmp ult i64 %52, 10
  br i1 %57, label %.lr.ph152, label %._crit_edge, !llvm.loop !28

._crit_edge:                                      ; preds = %.lr.ph152, %thread-pre-split
  %58 = getelementptr inbounds i8, ptr %0, i64 792
  %59 = load i64, ptr %58, align 8, !tbaa !29
  %60 = add i64 %59, 1
  store i64 %60, ptr %58, align 8, !tbaa !29
  store i32 7, ptr %22, align 8, !tbaa !19
  store i32 144, ptr %23, align 4, !tbaa !20
  %61 = load ptr, ptr %13, align 8, !tbaa !17
  store ptr %61, ptr %25, align 8, !tbaa !21
  store i64 1, ptr %26, align 8, !tbaa !22
  store i32 1, ptr %27, align 8, !tbaa !23
  %62 = getelementptr inbounds i8, ptr %0, i64 272
  store i32 1, ptr %62, align 8, !tbaa !30
  %63 = load ptr, ptr %28, align 8, !tbaa !24
  tail call void %63(ptr noundef nonnull %0) #4
  store i32 0, ptr %62, align 8, !tbaa !30
  %64 = load i32, ptr %23, align 4, !tbaa !20
  %.not128 = icmp eq i32 %64, 0
  br i1 %.not128, label %68, label %65

65:                                               ; preds = %._crit_edge
  %66 = tail call i32 @_tx_mutex_put(ptr noundef nonnull %7) #4
  %67 = load i32, ptr %23, align 4, !tbaa !20
  br label %149

68:                                               ; preds = %._crit_edge
  %69 = getelementptr inbounds i8, ptr %0, i64 2888
  store ptr %69, ptr %4, align 8, !tbaa !31
  %70 = getelementptr inbounds i8, ptr %4, i64 8
  store i8 0, ptr %70, align 8, !tbaa !16
  store i64 0, ptr %3, align 8, !tbaa !32
  %71 = getelementptr inbounds i8, ptr %0, i64 184
  %72 = load i32, ptr %71, align 8, !tbaa !33
  %73 = add i32 %72, 1
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %4, i64 32
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 72
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 80
  br label %76

76:                                               ; preds = %100, %68
  %.0113 = phi i64 [ %74, %68 ], [ %.1114, %100 ]
  %.sroa.8.0 = phi i64 [ 0, %68 ], [ %.sroa.8.1, %100 ]
  %.sroa.5.0 = phi i64 [ 0, %68 ], [ %.sroa.5.1, %100 ]
  %77 = call i32 @_fx_directory_entry_read(ptr noundef nonnull %0, ptr noundef null, ptr noundef nonnull %3, ptr noundef nonnull %4) #4
  %.not129 = icmp eq i32 %77, 0
  br i1 %.not129, label %80, label %78

78:                                               ; preds = %76
  %79 = call i32 @_tx_mutex_put(ptr noundef nonnull %7) #4
  br label %149

80:                                               ; preds = %76
  %81 = load ptr, ptr %4, align 8, !tbaa !31
  %82 = load i8, ptr %81, align 1, !tbaa !16
  %83 = icmp eq i8 %82, -27
  %84 = load i8, ptr %70, align 8
  %85 = icmp eq i8 %84, 0
  %or.cond7 = select i1 %83, i1 %85, i1 false
  br i1 %or.cond7, label %86, label %90

86:                                               ; preds = %80
  %87 = load i64, ptr %3, align 8, !tbaa !32
  %88 = icmp ult i64 %87, %.0113
  br i1 %88, label %89, label %100

89:                                               ; preds = %86
  %.sroa.5.0.copyload = load i64, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !34
  %.sroa.8.0.copyload = load i64, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !32
  br label %100

90:                                               ; preds = %80
  %91 = icmp eq i8 %82, 0
  br i1 %91, label %92, label %96

92:                                               ; preds = %90
  %93 = load i64, ptr %3, align 8, !tbaa !32
  %94 = icmp ult i64 %93, %.0113
  br i1 %94, label %95, label %.loopexit

95:                                               ; preds = %92
  %.sroa.5.0.copyload42 = load i64, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !34
  %.sroa.8.0.copyload47 = load i64, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !32
  br label %.loopexit

96:                                               ; preds = %90
  %97 = load i8, ptr %75, align 8, !tbaa !35
  %98 = and i8 %97, 8
  %.not130 = icmp eq i8 %98, 0
  %.pre = load i64, ptr %3, align 8, !tbaa !32
  br i1 %.not130, label %100, label %99

99:                                               ; preds = %96
  %.sroa.5.0.copyload44 = load i64, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !34
  %.sroa.8.0.copyload49 = load i64, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !32
  br label %.loopexit

100:                                              ; preds = %96, %86, %89
  %101 = phi i64 [ %87, %89 ], [ %87, %86 ], [ %.pre, %96 ]
  %.1114 = phi i64 [ %87, %89 ], [ %.0113, %86 ], [ %.0113, %96 ]
  %.sroa.8.1 = phi i64 [ %.sroa.8.0.copyload, %89 ], [ %.sroa.8.0, %86 ], [ %.sroa.8.0, %96 ]
  %.sroa.5.1 = phi i64 [ %.sroa.5.0.copyload, %89 ], [ %.sroa.5.0, %86 ], [ %.sroa.5.0, %96 ]
  %102 = add i64 %101, 1
  store i64 %102, ptr %3, align 8, !tbaa !32
  %103 = load i32, ptr %71, align 8, !tbaa !33
  %104 = zext i32 %103 to i64
  %105 = icmp ult i64 %102, %104
  br i1 %105, label %76, label %.loopexit, !llvm.loop !36

.loopexit:                                        ; preds = %100, %92, %95, %99
  %106 = phi i64 [ %93, %95 ], [ %93, %92 ], [ %.pre, %99 ], [ %102, %100 ]
  %.2 = phi i64 [ %93, %95 ], [ %.0113, %92 ], [ %.pre, %99 ], [ %.1114, %100 ]
  %.sroa.8.2 = phi i64 [ %.sroa.8.0.copyload47, %95 ], [ %.sroa.8.0, %92 ], [ %.sroa.8.0.copyload49, %99 ], [ %.sroa.8.1, %100 ]
  %.sroa.5.2 = phi i64 [ %.sroa.5.0.copyload42, %95 ], [ %.sroa.5.0, %92 ], [ %.sroa.5.0.copyload44, %99 ], [ %.sroa.5.1, %100 ]
  %107 = load i32, ptr %71, align 8, !tbaa !33
  %108 = zext i32 %107 to i64
  %109 = icmp eq i64 %106, %108
  %110 = add i32 %107, 1
  %111 = zext i32 %110 to i64
  %112 = icmp eq i64 %.2, %111
  %or.cond135 = select i1 %109, i1 %112, i1 false
  br i1 %or.cond135, label %113, label %115

113:                                              ; preds = %.loopexit
  %114 = call i32 @_tx_mutex_put(ptr noundef nonnull %7) #4
  br label %149

115:                                              ; preds = %.loopexit
  %116 = load ptr, ptr %13, align 8, !tbaa !17
  %117 = call i32 @_fx_utility_logical_sector_read(ptr noundef nonnull %0, i64 noundef %.sroa.5.2, ptr noundef %116, i64 noundef 1, i8 noundef zeroext 1) #4
  %.not131 = icmp eq i32 %117, 0
  br i1 %.not131, label %120, label %118

118:                                              ; preds = %115
  %119 = call i32 @_tx_mutex_put(ptr noundef nonnull %7) #4
  br label %149

120:                                              ; preds = %115
  %121 = load ptr, ptr %13, align 8, !tbaa !17
  %122 = and i64 %.sroa.8.2, 4294967295
  %123 = getelementptr inbounds i8, ptr %121, i64 %122
  store i64 0, ptr %3, align 8, !tbaa !32
  %124 = load i8, ptr %1, align 1, !tbaa !16
  %125 = icmp eq i8 %124, 0
  br i1 %125, label %.lr.ph156.preheader, label %.lr.ph155

.lr.ph155:                                        ; preds = %120, %.lr.ph155
  %126 = phi i8 [ %133, %.lr.ph155 ], [ %124, %120 ]
  %storemerge132153 = phi i64 [ %131, %.lr.ph155 ], [ 0, %120 ]
  %127 = add i8 %126, -97
  %or.cond10 = icmp ult i8 %127, 26
  %128 = add nsw i8 %126, -32
  %spec.select136 = select i1 %or.cond10, i8 %128, i8 %126
  %129 = getelementptr inbounds i8, ptr %123, i64 %storemerge132153
  store i8 %spec.select136, ptr %129, align 1, !tbaa !16
  %130 = load i64, ptr %3, align 8, !tbaa !32
  %131 = add i64 %130, 1
  store i64 %131, ptr %3, align 8, !tbaa !32
  %132 = getelementptr inbounds i8, ptr %1, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !16
  %134 = icmp eq i8 %133, 0
  %135 = icmp eq i64 %131, 11
  %or.cond14 = or i1 %135, %134
  br i1 %or.cond14, label %thread-pre-split137, label %.lr.ph155, !llvm.loop !37

thread-pre-split137:                              ; preds = %.lr.ph155
  %136 = icmp ult i64 %131, 11
  br i1 %136, label %.lr.ph156.preheader, label %._crit_edge157

.lr.ph156.preheader:                              ; preds = %120, %thread-pre-split137
  %.ph = phi i64 [ 0, %120 ], [ %131, %thread-pre-split137 ]
  br label %.lr.ph156

.lr.ph156:                                        ; preds = %.lr.ph156.preheader, %.lr.ph156
  %137 = phi i64 [ %140, %.lr.ph156 ], [ %.ph, %.lr.ph156.preheader ]
  %138 = getelementptr inbounds i8, ptr %123, i64 %137
  store i8 32, ptr %138, align 1, !tbaa !16
  %139 = load i64, ptr %3, align 8, !tbaa !32
  %140 = add i64 %139, 1
  store i64 %140, ptr %3, align 8, !tbaa !32
  %141 = icmp ult i64 %140, 11
  br i1 %141, label %.lr.ph156, label %._crit_edge157, !llvm.loop !38

._crit_edge157:                                   ; preds = %.lr.ph156, %thread-pre-split137
  %142 = getelementptr inbounds i8, ptr %123, i64 11
  store i8 40, ptr %142, align 1, !tbaa !16
  %143 = getelementptr inbounds i8, ptr %123, i64 20
  store i8 0, ptr %143, align 1, !tbaa !16
  %144 = getelementptr inbounds i8, ptr %123, i64 21
  store i8 0, ptr %144, align 1, !tbaa !16
  %145 = getelementptr inbounds i8, ptr %123, i64 26
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(6) %145, i8 0, i64 6, i1 false)
  %146 = load ptr, ptr %13, align 8, !tbaa !17
  %147 = call i32 @_fx_utility_logical_sector_write(ptr noundef nonnull %0, i64 noundef %.sroa.5.2, ptr noundef %146, i64 noundef 1, i8 noundef zeroext 3) #4
  %148 = call i32 @_tx_mutex_put(ptr noundef nonnull %7) #4
  br label %149

149:                                              ; preds = %9, %6, %2, %._crit_edge157, %118, %113, %78, %65, %31, %16
  %.0111 = phi i32 [ %15, %16 ], [ %33, %31 ], [ %67, %65 ], [ %77, %78 ], [ 2, %113 ], [ %117, %118 ], [ %147, %._crit_edge157 ], [ 17, %2 ], [ 17, %6 ], [ 12, %9 ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i32 %.0111
}

; 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 @_fx_utility_logical_sector_read(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #2

declare i32 @_tx_mutex_put(ptr noundef) local_unnamed_addr #2

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

declare i32 @_fx_utility_logical_sector_write(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i8 noundef zeroext) 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) #3

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!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 = !{!6, !10, i64 16}
!18 = !{!6, !7, i64 784}
!19 = !{!6, !11, i64 216}
!20 = !{!6, !11, i64 220}
!21 = !{!6, !10, i64 224}
!22 = !{!6, !7, i64 240}
!23 = !{!6, !11, i64 280}
!24 = !{!6, !10, i64 288}
!25 = !{!6, !11, i64 144}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!6, !7, i64 792}
!30 = !{!6, !11, i64 272}
!31 = !{!14, !10, i64 0}
!32 = !{!7, !7, i64 0}
!33 = !{!6, !11, i64 184}
!34 = !{!12, !12, i64 0}
!35 = !{!14, !8, i64 32}
!36 = distinct !{!36, !27}
!37 = distinct !{!37, !27}
!38 = distinct !{!38, !27}


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