; LLVM IR from lichen-community-systems/signaletic :: hosts/daisy/vendor/libDaisy/Drivers/STM32H7xx_HAL_Driver/Src (ReadBlocks)

; 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.SDMMC_DataInitTypeDef = type { i32, i32, i32, i32, i32, i32 }
%struct.MMC_HandleTypeDef = type { ptr, %struct.SDMMC_InitTypeDef, i32, ptr, i32, ptr, i32, i32, i32, i32, %struct.HAL_MMC_CardInfoTypeDef, [4 x i32], [4 x i32], [128 x i32] }
%struct.SDMMC_InitTypeDef = type { i32, i32, i32, i32, i32 }
%struct.HAL_MMC_CardInfoTypeDef = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.SDMMC_TypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i32, i32, i32, i32, [8 x i32], i32, [222 x i32], i32 }

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_MMC_ReadBlocks(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.SDMMC_DataInitTypeDef, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %20 = call i32 @HAL_GetTick()
  store i32 %20, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %21 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %21, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %22, ptr %18, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = icmp eq ptr null, %23
  br i1 %24, label %25, label %30

25:                                               ; preds = %5
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %26, i32 0, i32 9
  %28 = load volatile i32, ptr %27, align 4, !tbaa !11
  %29 = or i32 %28, 134217728
  store volatile i32 %29, ptr %27, align 4, !tbaa !11
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

30:                                               ; preds = %5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %31, i32 0, i32 8
  %33 = load volatile i32, ptr %32, align 8, !tbaa !15
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %330

35:                                               ; preds = %30
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %36, i32 0, i32 9
  store volatile i32 0, ptr %37, align 4, !tbaa !11
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = add i32 %38, %39
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %41, i32 0, i32 10
  %43 = getelementptr inbounds %struct.HAL_MMC_CardInfoTypeDef, ptr %42, i32 0, i32 5
  %44 = load i32, ptr %43, align 4, !tbaa !16
  %45 = icmp ugt i32 %40, %44
  br i1 %45, label %46, label %51

46:                                               ; preds = %35
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %47, i32 0, i32 9
  %49 = load volatile i32, ptr %48, align 4, !tbaa !11
  %50 = or i32 %49, 33554432
  store volatile i32 %50, ptr %48, align 4, !tbaa !11
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

51:                                               ; preds = %35
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %52, i32 0, i32 8
  store volatile i32 3, ptr %53, align 8, !tbaa !15
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %56, i32 0, i32 11
  store volatile i32 0, ptr %57, align 4, !tbaa !18
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %58, i32 0, i32 10
  %60 = getelementptr inbounds %struct.HAL_MMC_CardInfoTypeDef, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !20
  %62 = icmp ne i32 %61, 1
  br i1 %62, label %63, label %66

63:                                               ; preds = %51
  %64 = load i32, ptr %17, align 4, !tbaa !9
  %65 = mul i32 %64, 512
  store i32 %65, ptr %17, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %63, %51
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %70 = call i32 @SDMMC_CmdBlockLength(ptr noundef %69, i32 noundef 512)
  store i32 %70, ptr %13, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %85

73:                                               ; preds = %66
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %76, i32 0, i32 14
  store volatile i32 534777855, ptr %77, align 4, !tbaa !21
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %79, i32 0, i32 9
  %81 = load volatile i32, ptr %80, align 4, !tbaa !11
  %82 = or i32 %81, %78
  store volatile i32 %82, ptr %80, align 4, !tbaa !11
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %83, i32 0, i32 8
  store volatile i32 1, ptr %84, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

85:                                               ; preds = %66
  %86 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %12, i32 0, i32 0
  store i32 -1, ptr %86, align 4, !tbaa !22
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = mul i32 %87, 512
  %89 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %12, i32 0, i32 1
  store i32 %88, ptr %89, align 4, !tbaa !24
  %90 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %12, i32 0, i32 2
  store i32 144, ptr %90, align 4, !tbaa !25
  %91 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %12, i32 0, i32 3
  store i32 2, ptr %91, align 4, !tbaa !26
  %92 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %12, i32 0, i32 4
  store i32 0, ptr %92, align 4, !tbaa !27
  %93 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %12, i32 0, i32 5
  store i32 0, ptr %93, align 4, !tbaa !28
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !17
  %97 = call i32 @SDMMC_ConfigData(ptr noundef %96, ptr noundef %12)
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !17
  %101 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %100, i32 0, i32 3
  %102 = load volatile i32, ptr %101, align 4, !tbaa !29
  %103 = zext i32 %102 to i64
  %104 = or i64 %103, 64
  %105 = trunc i64 %104 to i32
  store volatile i32 %105, ptr %101, align 4, !tbaa !29
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = icmp ugt i32 %106, 1
  br i1 %107, label %108, label %116

108:                                              ; preds = %85
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %109, i32 0, i32 7
  store volatile i32 2, ptr %110, align 4, !tbaa !30
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !17
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = call i32 @SDMMC_CmdReadMultiBlock(ptr noundef %113, i32 noundef %114)
  store i32 %115, ptr %13, align 4, !tbaa !9
  br label %124

116:                                              ; preds = %85
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %117, i32 0, i32 7
  store volatile i32 1, ptr %118, align 4, !tbaa !30
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !17
  %122 = load i32, ptr %17, align 4, !tbaa !9
  %123 = call i32 @SDMMC_CmdReadSingleBlock(ptr noundef %121, i32 noundef %122)
  store i32 %123, ptr %13, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %116, %108
  %125 = load i32, ptr %13, align 4, !tbaa !9
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %139

127:                                              ; preds = %124
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !17
  %131 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %130, i32 0, i32 14
  store volatile i32 534777855, ptr %131, align 4, !tbaa !21
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %133, i32 0, i32 9
  %135 = load volatile i32, ptr %134, align 4, !tbaa !11
  %136 = or i32 %135, %132
  store volatile i32 %136, ptr %134, align 4, !tbaa !11
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %137, i32 0, i32 8
  store volatile i32 1, ptr %138, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

139:                                              ; preds = %124
  br label %140

140:                                              ; preds = %219, %139
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !17
  %144 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %143, i32 0, i32 13
  %145 = load volatile i32, ptr %144, align 4, !tbaa !31
  %146 = zext i32 %145 to i64
  %147 = and i64 %146, 298
  %148 = icmp ne i64 %147, 0
  %149 = xor i1 %148, true
  br i1 %149, label %150, label %220

150:                                              ; preds = %140
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !17
  %154 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %153, i32 0, i32 13
  %155 = load volatile i32, ptr %154, align 4, !tbaa !31
  %156 = zext i32 %155 to i64
  %157 = and i64 %156, 32768
  %158 = icmp ne i64 %157, 0
  br i1 %158, label %159, label %199

159:                                              ; preds = %150
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %195, %159
  %161 = load i32, ptr %15, align 4, !tbaa !9
  %162 = icmp ult i32 %161, 8
  br i1 %162, label %163, label %198

163:                                              ; preds = %160
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8, !tbaa !17
  %167 = call i32 @SDMMC_ReadFIFO(ptr noundef %166)
  store i32 %167, ptr %16, align 4, !tbaa !9
  %168 = load i32, ptr %16, align 4, !tbaa !9
  %169 = and i32 %168, 255
  %170 = trunc i32 %169 to i8
  %171 = load ptr, ptr %18, align 8, !tbaa !5
  store i8 %170, ptr %171, align 1, !tbaa !32
  %172 = load ptr, ptr %18, align 8, !tbaa !5
  %173 = getelementptr inbounds i8, ptr %172, i32 1
  store ptr %173, ptr %18, align 8, !tbaa !5
  %174 = load i32, ptr %16, align 4, !tbaa !9
  %175 = lshr i32 %174, 8
  %176 = and i32 %175, 255
  %177 = trunc i32 %176 to i8
  %178 = load ptr, ptr %18, align 8, !tbaa !5
  store i8 %177, ptr %178, align 1, !tbaa !32
  %179 = load ptr, ptr %18, align 8, !tbaa !5
  %180 = getelementptr inbounds i8, ptr %179, i32 1
  store ptr %180, ptr %18, align 8, !tbaa !5
  %181 = load i32, ptr %16, align 4, !tbaa !9
  %182 = lshr i32 %181, 16
  %183 = and i32 %182, 255
  %184 = trunc i32 %183 to i8
  %185 = load ptr, ptr %18, align 8, !tbaa !5
  store i8 %184, ptr %185, align 1, !tbaa !32
  %186 = load ptr, ptr %18, align 8, !tbaa !5
  %187 = getelementptr inbounds i8, ptr %186, i32 1
  store ptr %187, ptr %18, align 8, !tbaa !5
  %188 = load i32, ptr %16, align 4, !tbaa !9
  %189 = lshr i32 %188, 24
  %190 = and i32 %189, 255
  %191 = trunc i32 %190 to i8
  %192 = load ptr, ptr %18, align 8, !tbaa !5
  store i8 %191, ptr %192, align 1, !tbaa !32
  %193 = load ptr, ptr %18, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i32 1
  store ptr %194, ptr %18, align 8, !tbaa !5
  br label %195

195:                                              ; preds = %163
  %196 = load i32, ptr %15, align 4, !tbaa !9
  %197 = add i32 %196, 1
  store i32 %197, ptr %15, align 4, !tbaa !9
  br label %160, !llvm.loop !33

198:                                              ; preds = %160
  br label %199

199:                                              ; preds = %198, %150
  %200 = call i32 @HAL_GetTick()
  %201 = load i32, ptr %14, align 4, !tbaa !9
  %202 = sub i32 %200, %201
  %203 = load i32, ptr %11, align 4, !tbaa !9
  %204 = icmp uge i32 %202, %203
  br i1 %204, label %208, label %205

205:                                              ; preds = %199
  %206 = load i32, ptr %11, align 4, !tbaa !9
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %208, label %219

208:                                              ; preds = %205, %199
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %209, i32 0, i32 0
  %211 = load ptr, ptr %210, align 8, !tbaa !17
  %212 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %211, i32 0, i32 14
  store volatile i32 534777855, ptr %212, align 4, !tbaa !21
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %213, i32 0, i32 9
  %215 = load volatile i32, ptr %214, align 4, !tbaa !11
  %216 = or i32 %215, -2147483648
  store volatile i32 %216, ptr %214, align 4, !tbaa !11
  %217 = load ptr, ptr %7, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %217, i32 0, i32 8
  store volatile i32 1, ptr %218, align 8, !tbaa !15
  store i32 3, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

219:                                              ; preds = %205
  br label %140, !llvm.loop !35

220:                                              ; preds = %140
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !17
  %224 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %223, i32 0, i32 3
  %225 = load volatile i32, ptr %224, align 4, !tbaa !29
  %226 = zext i32 %225 to i64
  %227 = and i64 %226, -65
  %228 = trunc i64 %227 to i32
  store volatile i32 %228, ptr %224, align 4, !tbaa !29
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %229, i32 0, i32 0
  %231 = load ptr, ptr %230, align 8, !tbaa !17
  %232 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %231, i32 0, i32 13
  %233 = load volatile i32, ptr %232, align 4, !tbaa !31
  %234 = zext i32 %233 to i64
  %235 = and i64 %234, 256
  %236 = icmp ne i64 %235, 0
  br i1 %236, label %237, label %260

237:                                              ; preds = %220
  %238 = load i32, ptr %10, align 4, !tbaa !9
  %239 = icmp ugt i32 %238, 1
  br i1 %239, label %240, label %260

240:                                              ; preds = %237
  %241 = load ptr, ptr %7, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %241, i32 0, i32 0
  %243 = load ptr, ptr %242, align 8, !tbaa !17
  %244 = call i32 @SDMMC_CmdStopTransfer(ptr noundef %243)
  store i32 %244, ptr %13, align 4, !tbaa !9
  %245 = load i32, ptr %13, align 4, !tbaa !9
  %246 = icmp ne i32 %245, 0
  br i1 %246, label %247, label %259

247:                                              ; preds = %240
  %248 = load ptr, ptr %7, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %248, i32 0, i32 0
  %250 = load ptr, ptr %249, align 8, !tbaa !17
  %251 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %250, i32 0, i32 14
  store volatile i32 534777855, ptr %251, align 4, !tbaa !21
  %252 = load i32, ptr %13, align 4, !tbaa !9
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %253, i32 0, i32 9
  %255 = load volatile i32, ptr %254, align 4, !tbaa !11
  %256 = or i32 %255, %252
  store volatile i32 %256, ptr %254, align 4, !tbaa !11
  %257 = load ptr, ptr %7, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %257, i32 0, i32 8
  store volatile i32 1, ptr %258, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

259:                                              ; preds = %240
  br label %260

260:                                              ; preds = %259, %237, %220
  %261 = load ptr, ptr %7, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %261, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8, !tbaa !17
  %264 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %263, i32 0, i32 13
  %265 = load volatile i32, ptr %264, align 4, !tbaa !31
  %266 = zext i32 %265 to i64
  %267 = and i64 %266, 8
  %268 = icmp ne i64 %267, 0
  br i1 %268, label %269, label %280

269:                                              ; preds = %260
  %270 = load ptr, ptr %7, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !17
  %273 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %272, i32 0, i32 14
  store volatile i32 534777855, ptr %273, align 4, !tbaa !21
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %274, i32 0, i32 9
  %276 = load volatile i32, ptr %275, align 4, !tbaa !11
  %277 = or i32 %276, 8
  store volatile i32 %277, ptr %275, align 4, !tbaa !11
  %278 = load ptr, ptr %7, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %278, i32 0, i32 8
  store volatile i32 1, ptr %279, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

280:                                              ; preds = %260
  %281 = load ptr, ptr %7, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %281, i32 0, i32 0
  %283 = load ptr, ptr %282, align 8, !tbaa !17
  %284 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %283, i32 0, i32 13
  %285 = load volatile i32, ptr %284, align 4, !tbaa !31
  %286 = zext i32 %285 to i64
  %287 = and i64 %286, 2
  %288 = icmp ne i64 %287, 0
  br i1 %288, label %289, label %300

289:                                              ; preds = %280
  %290 = load ptr, ptr %7, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %290, i32 0, i32 0
  %292 = load ptr, ptr %291, align 8, !tbaa !17
  %293 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %292, i32 0, i32 14
  store volatile i32 534777855, ptr %293, align 4, !tbaa !21
  %294 = load ptr, ptr %7, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %294, i32 0, i32 9
  %296 = load volatile i32, ptr %295, align 4, !tbaa !11
  %297 = or i32 %296, 2
  store volatile i32 %297, ptr %295, align 4, !tbaa !11
  %298 = load ptr, ptr %7, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %298, i32 0, i32 8
  store volatile i32 1, ptr %299, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

300:                                              ; preds = %280
  %301 = load ptr, ptr %7, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %301, i32 0, i32 0
  %303 = load ptr, ptr %302, align 8, !tbaa !17
  %304 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %303, i32 0, i32 13
  %305 = load volatile i32, ptr %304, align 4, !tbaa !31
  %306 = zext i32 %305 to i64
  %307 = and i64 %306, 32
  %308 = icmp ne i64 %307, 0
  br i1 %308, label %309, label %320

309:                                              ; preds = %300
  %310 = load ptr, ptr %7, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %310, i32 0, i32 0
  %312 = load ptr, ptr %311, align 8, !tbaa !17
  %313 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %312, i32 0, i32 14
  store volatile i32 534777855, ptr %313, align 4, !tbaa !21
  %314 = load ptr, ptr %7, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %314, i32 0, i32 9
  %316 = load volatile i32, ptr %315, align 4, !tbaa !11
  %317 = or i32 %316, 32
  store volatile i32 %317, ptr %315, align 4, !tbaa !11
  %318 = load ptr, ptr %7, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %318, i32 0, i32 8
  store volatile i32 1, ptr %319, align 8, !tbaa !15
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

320:                                              ; preds = %300
  br label %321

321:                                              ; preds = %320
  br label %322

322:                                              ; preds = %321
  br label %323

323:                                              ; preds = %322
  %324 = load ptr, ptr %7, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %324, i32 0, i32 0
  %326 = load ptr, ptr %325, align 8, !tbaa !17
  %327 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %326, i32 0, i32 14
  store volatile i32 402657082, ptr %327, align 4, !tbaa !21
  %328 = load ptr, ptr %7, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %328, i32 0, i32 8
  store volatile i32 1, ptr %329, align 8, !tbaa !15
  store i32 0, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

330:                                              ; preds = %30
  %331 = load ptr, ptr %7, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %331, i32 0, i32 9
  %333 = load volatile i32, ptr %332, align 4, !tbaa !11
  %334 = or i32 %333, 536870912
  store volatile i32 %334, ptr %332, align 4, !tbaa !11
  store i32 1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %335

335:                                              ; preds = %330, %323, %309, %289, %269, %247, %208, %127, %73, %46, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  %336 = load i32, ptr %6, align 4
  ret i32 %336
}

declare i32 @HAL_GetTick() #2

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

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

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

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

declare i32 @SDMMC_ReadFIFO(ptr noundef) #2

declare i32 @SDMMC_CmdStopTransfer(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 68}
!12 = !{!"", !6, i64 0, !13, i64 8, !10, i64 28, !6, i64 32, !10, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !14, i64 72, !7, i64 100, !7, i64 116, !7, i64 132}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!14 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!15 = !{!12, !10, i64 64}
!16 = !{!12, !10, i64 92}
!17 = !{!12, !6, i64 0}
!18 = !{!19, !10, i64 44}
!19 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !7, i64 68, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !7, i64 96, !10, i64 128, !7, i64 132, !10, i64 1020}
!20 = !{!12, !10, i64 72}
!21 = !{!19, !10, i64 56}
!22 = !{!23, !10, i64 0}
!23 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!24 = !{!23, !10, i64 4}
!25 = !{!23, !10, i64 8}
!26 = !{!23, !10, i64 12}
!27 = !{!23, !10, i64 16}
!28 = !{!23, !10, i64 20}
!29 = !{!19, !10, i64 12}
!30 = !{!12, !10, i64 60}
!31 = !{!19, !10, i64 52}
!32 = !{!7, !7, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}


; 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.SDMMC_DataInitTypeDef = type { i32, i32, i32, i32, i32, i32 }

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 4) i32 @HAL_MMC_ReadBlocks(ptr noundef %0, ptr noundef writeonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #1 {
  %6 = alloca %struct.SDMMC_DataInitTypeDef, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  %7 = tail call i32 @HAL_GetTick() #3
  %8 = icmp eq ptr %1, null
  br i1 %8, label %9, label %13

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 68
  %11 = load volatile i32, ptr %10, align 4, !tbaa !5
  %12 = or i32 %11, 134217728
  store volatile i32 %12, ptr %10, align 4, !tbaa !5
  br label %217

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  %15 = load volatile i32, ptr %14, align 8, !tbaa !13
  %16 = icmp eq i32 %15, 1
  %17 = getelementptr inbounds i8, ptr %0, i64 68
  br i1 %16, label %18, label %214

18:                                               ; preds = %13
  store volatile i32 0, ptr %17, align 4, !tbaa !5
  %19 = add i32 %3, %2
  %20 = getelementptr inbounds i8, ptr %0, i64 92
  %21 = load i32, ptr %20, align 4, !tbaa !14
  %22 = icmp ugt i32 %19, %21
  br i1 %22, label %23, label %26

23:                                               ; preds = %18
  %24 = load volatile i32, ptr %17, align 4, !tbaa !5
  %25 = or i32 %24, 33554432
  store volatile i32 %25, ptr %17, align 4, !tbaa !5
  br label %217

26:                                               ; preds = %18
  %27 = getelementptr inbounds i8, ptr %0, i64 72
  store volatile i32 3, ptr %14, align 8, !tbaa !13
  %28 = load ptr, ptr %0, align 8, !tbaa !15
  %29 = getelementptr inbounds i8, ptr %28, i64 44
  store volatile i32 0, ptr %29, align 4, !tbaa !16
  %30 = load i32, ptr %27, align 8, !tbaa !18
  %.not = icmp eq i32 %30, 1
  %31 = shl i32 %2, 9
  %spec.select = select i1 %.not, i32 %2, i32 %31
  %32 = tail call i32 @SDMMC_CmdBlockLength(ptr noundef %28, i32 noundef 512) #3
  %.not92 = icmp eq i32 %32, 0
  br i1 %.not92, label %38, label %33

33:                                               ; preds = %26
  %34 = load ptr, ptr %0, align 8, !tbaa !15
  %35 = getelementptr inbounds i8, ptr %34, i64 56
  store volatile i32 534777855, ptr %35, align 4, !tbaa !19
  %36 = load volatile i32, ptr %17, align 4, !tbaa !5
  %37 = or i32 %36, %32
  store volatile i32 %37, ptr %17, align 4, !tbaa !5
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

38:                                               ; preds = %26
  store i32 -1, ptr %6, align 4, !tbaa !20
  %39 = shl i32 %3, 9
  %40 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 %39, ptr %40, align 4, !tbaa !22
  %41 = getelementptr inbounds i8, ptr %6, i64 8
  store <4 x i32> <i32 144, i32 2, i32 0, i32 0>, ptr %41, align 4, !tbaa !23
  %42 = load ptr, ptr %0, align 8, !tbaa !15
  %43 = call i32 @SDMMC_ConfigData(ptr noundef %42, ptr noundef nonnull %6) #3
  %44 = load ptr, ptr %0, align 8, !tbaa !15
  %45 = getelementptr inbounds i8, ptr %44, i64 12
  %46 = load volatile i32, ptr %45, align 4, !tbaa !24
  %47 = or i32 %46, 64
  store volatile i32 %47, ptr %45, align 4, !tbaa !24
  %48 = icmp ugt i32 %3, 1
  %49 = getelementptr inbounds i8, ptr %0, i64 60
  br i1 %48, label %50, label %52

50:                                               ; preds = %38
  store volatile i32 2, ptr %49, align 4, !tbaa !25
  %51 = call i32 @SDMMC_CmdReadMultiBlock(ptr noundef nonnull %44, i32 noundef %spec.select) #3
  br label %54

52:                                               ; preds = %38
  store volatile i32 1, ptr %49, align 4, !tbaa !25
  %53 = call i32 @SDMMC_CmdReadSingleBlock(ptr noundef nonnull %44, i32 noundef %spec.select) #3
  br label %54

54:                                               ; preds = %52, %50
  %.088 = phi i32 [ %51, %50 ], [ %53, %52 ]
  %.not93 = icmp eq i32 %.088, 0
  br i1 %.not93, label %.preheader101, label %55

55:                                               ; preds = %54
  %56 = load ptr, ptr %0, align 8, !tbaa !15
  %57 = getelementptr inbounds i8, ptr %56, i64 56
  store volatile i32 534777855, ptr %57, align 4, !tbaa !19
  %58 = load volatile i32, ptr %17, align 4, !tbaa !5
  %59 = or i32 %58, %.088
  store volatile i32 %59, ptr %17, align 4, !tbaa !5
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

.preheader101:                                    ; preds = %54, %.loopexit
  %.0 = phi ptr [ %.2, %.loopexit ], [ %1, %54 ]
  %60 = load ptr, ptr %0, align 8, !tbaa !15
  %61 = getelementptr inbounds i8, ptr %60, i64 52
  %62 = load volatile i32, ptr %61, align 4, !tbaa !26
  %63 = and i32 %62, 298
  %.not94 = icmp eq i32 %63, 0
  br i1 %.not94, label %64, label %177

64:                                               ; preds = %.preheader101
  %65 = load volatile i32, ptr %61, align 4, !tbaa !26
  %66 = and i32 %65, 32768
  %.not99 = icmp eq i32 %66, 0
  br i1 %.not99, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %64
  %67 = call i32 @SDMMC_ReadFIFO(ptr noundef nonnull %60) #3
  %68 = trunc i32 %67 to i8
  store i8 %68, ptr %.0, align 1, !tbaa !27
  %69 = getelementptr inbounds i8, ptr %.0, i64 1
  %70 = lshr i32 %67, 8
  %71 = trunc i32 %70 to i8
  store i8 %71, ptr %69, align 1, !tbaa !27
  %72 = getelementptr inbounds i8, ptr %.0, i64 2
  %73 = lshr i32 %67, 16
  %74 = trunc i32 %73 to i8
  store i8 %74, ptr %72, align 1, !tbaa !27
  %75 = getelementptr inbounds i8, ptr %.0, i64 3
  %76 = lshr i32 %67, 24
  %77 = trunc nuw i32 %76 to i8
  store i8 %77, ptr %75, align 1, !tbaa !27
  %78 = getelementptr inbounds i8, ptr %.0, i64 4
  %79 = load ptr, ptr %0, align 8, !tbaa !15
  %80 = call i32 @SDMMC_ReadFIFO(ptr noundef %79) #3
  %81 = trunc i32 %80 to i8
  store i8 %81, ptr %78, align 1, !tbaa !27
  %82 = getelementptr inbounds i8, ptr %.0, i64 5
  %83 = lshr i32 %80, 8
  %84 = trunc i32 %83 to i8
  store i8 %84, ptr %82, align 1, !tbaa !27
  %85 = getelementptr inbounds i8, ptr %.0, i64 6
  %86 = lshr i32 %80, 16
  %87 = trunc i32 %86 to i8
  store i8 %87, ptr %85, align 1, !tbaa !27
  %88 = getelementptr inbounds i8, ptr %.0, i64 7
  %89 = lshr i32 %80, 24
  %90 = trunc nuw i32 %89 to i8
  store i8 %90, ptr %88, align 1, !tbaa !27
  %91 = getelementptr inbounds i8, ptr %.0, i64 8
  %92 = load ptr, ptr %0, align 8, !tbaa !15
  %93 = call i32 @SDMMC_ReadFIFO(ptr noundef %92) #3
  %94 = trunc i32 %93 to i8
  store i8 %94, ptr %91, align 1, !tbaa !27
  %95 = getelementptr inbounds i8, ptr %.0, i64 9
  %96 = lshr i32 %93, 8
  %97 = trunc i32 %96 to i8
  store i8 %97, ptr %95, align 1, !tbaa !27
  %98 = getelementptr inbounds i8, ptr %.0, i64 10
  %99 = lshr i32 %93, 16
  %100 = trunc i32 %99 to i8
  store i8 %100, ptr %98, align 1, !tbaa !27
  %101 = getelementptr inbounds i8, ptr %.0, i64 11
  %102 = lshr i32 %93, 24
  %103 = trunc nuw i32 %102 to i8
  store i8 %103, ptr %101, align 1, !tbaa !27
  %104 = getelementptr inbounds i8, ptr %.0, i64 12
  %105 = load ptr, ptr %0, align 8, !tbaa !15
  %106 = call i32 @SDMMC_ReadFIFO(ptr noundef %105) #3
  %107 = trunc i32 %106 to i8
  store i8 %107, ptr %104, align 1, !tbaa !27
  %108 = getelementptr inbounds i8, ptr %.0, i64 13
  %109 = lshr i32 %106, 8
  %110 = trunc i32 %109 to i8
  store i8 %110, ptr %108, align 1, !tbaa !27
  %111 = getelementptr inbounds i8, ptr %.0, i64 14
  %112 = lshr i32 %106, 16
  %113 = trunc i32 %112 to i8
  store i8 %113, ptr %111, align 1, !tbaa !27
  %114 = getelementptr inbounds i8, ptr %.0, i64 15
  %115 = lshr i32 %106, 24
  %116 = trunc nuw i32 %115 to i8
  store i8 %116, ptr %114, align 1, !tbaa !27
  %117 = getelementptr inbounds i8, ptr %.0, i64 16
  %118 = load ptr, ptr %0, align 8, !tbaa !15
  %119 = call i32 @SDMMC_ReadFIFO(ptr noundef %118) #3
  %120 = trunc i32 %119 to i8
  store i8 %120, ptr %117, align 1, !tbaa !27
  %121 = getelementptr inbounds i8, ptr %.0, i64 17
  %122 = lshr i32 %119, 8
  %123 = trunc i32 %122 to i8
  store i8 %123, ptr %121, align 1, !tbaa !27
  %124 = getelementptr inbounds i8, ptr %.0, i64 18
  %125 = lshr i32 %119, 16
  %126 = trunc i32 %125 to i8
  store i8 %126, ptr %124, align 1, !tbaa !27
  %127 = getelementptr inbounds i8, ptr %.0, i64 19
  %128 = lshr i32 %119, 24
  %129 = trunc nuw i32 %128 to i8
  store i8 %129, ptr %127, align 1, !tbaa !27
  %130 = getelementptr inbounds i8, ptr %.0, i64 20
  %131 = load ptr, ptr %0, align 8, !tbaa !15
  %132 = call i32 @SDMMC_ReadFIFO(ptr noundef %131) #3
  %133 = trunc i32 %132 to i8
  store i8 %133, ptr %130, align 1, !tbaa !27
  %134 = getelementptr inbounds i8, ptr %.0, i64 21
  %135 = lshr i32 %132, 8
  %136 = trunc i32 %135 to i8
  store i8 %136, ptr %134, align 1, !tbaa !27
  %137 = getelementptr inbounds i8, ptr %.0, i64 22
  %138 = lshr i32 %132, 16
  %139 = trunc i32 %138 to i8
  store i8 %139, ptr %137, align 1, !tbaa !27
  %140 = getelementptr inbounds i8, ptr %.0, i64 23
  %141 = lshr i32 %132, 24
  %142 = trunc nuw i32 %141 to i8
  store i8 %142, ptr %140, align 1, !tbaa !27
  %143 = getelementptr inbounds i8, ptr %.0, i64 24
  %144 = load ptr, ptr %0, align 8, !tbaa !15
  %145 = call i32 @SDMMC_ReadFIFO(ptr noundef %144) #3
  %146 = trunc i32 %145 to i8
  store i8 %146, ptr %143, align 1, !tbaa !27
  %147 = getelementptr inbounds i8, ptr %.0, i64 25
  %148 = lshr i32 %145, 8
  %149 = trunc i32 %148 to i8
  store i8 %149, ptr %147, align 1, !tbaa !27
  %150 = getelementptr inbounds i8, ptr %.0, i64 26
  %151 = lshr i32 %145, 16
  %152 = trunc i32 %151 to i8
  store i8 %152, ptr %150, align 1, !tbaa !27
  %153 = getelementptr inbounds i8, ptr %.0, i64 27
  %154 = lshr i32 %145, 24
  %155 = trunc nuw i32 %154 to i8
  store i8 %155, ptr %153, align 1, !tbaa !27
  %156 = getelementptr inbounds i8, ptr %.0, i64 28
  %157 = load ptr, ptr %0, align 8, !tbaa !15
  %158 = call i32 @SDMMC_ReadFIFO(ptr noundef %157) #3
  %159 = trunc i32 %158 to i8
  store i8 %159, ptr %156, align 1, !tbaa !27
  %160 = getelementptr inbounds i8, ptr %.0, i64 29
  %161 = lshr i32 %158, 8
  %162 = trunc i32 %161 to i8
  store i8 %162, ptr %160, align 1, !tbaa !27
  %163 = getelementptr inbounds i8, ptr %.0, i64 30
  %164 = lshr i32 %158, 16
  %165 = trunc i32 %164 to i8
  store i8 %165, ptr %163, align 1, !tbaa !27
  %166 = getelementptr inbounds i8, ptr %.0, i64 31
  %167 = lshr i32 %158, 24
  %168 = trunc nuw i32 %167 to i8
  store i8 %168, ptr %166, align 1, !tbaa !27
  %169 = getelementptr inbounds i8, ptr %.0, i64 32
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %64
  %.2 = phi ptr [ %.0, %64 ], [ %169, %.preheader.preheader ]
  %170 = call i32 @HAL_GetTick() #3
  %171 = sub i32 %170, %7
  %.not100 = icmp ult i32 %171, %4
  br i1 %.not100, label %.preheader101, label %172, !llvm.loop !28

172:                                              ; preds = %.loopexit
  %173 = load ptr, ptr %0, align 8, !tbaa !15
  %174 = getelementptr inbounds i8, ptr %173, i64 56
  store volatile i32 534777855, ptr %174, align 4, !tbaa !19
  %175 = load volatile i32, ptr %17, align 4, !tbaa !5
  %176 = or i32 %175, -2147483648
  store volatile i32 %176, ptr %17, align 4, !tbaa !5
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

177:                                              ; preds = %.preheader101
  %178 = getelementptr inbounds i8, ptr %60, i64 12
  %179 = load volatile i32, ptr %178, align 4, !tbaa !24
  %180 = and i32 %179, -65
  store volatile i32 %180, ptr %178, align 4, !tbaa !24
  %181 = load volatile i32, ptr %61, align 4, !tbaa !26
  %182 = and i32 %181, 256
  %183 = icmp ne i32 %182, 0
  %or.cond3 = and i1 %48, %183
  br i1 %or.cond3, label %184, label %190

184:                                              ; preds = %177
  %185 = call i32 @SDMMC_CmdStopTransfer(ptr noundef nonnull %60) #3
  %.not95 = icmp eq i32 %185, 0
  %.pre = load ptr, ptr %0, align 8, !tbaa !15
  br i1 %.not95, label %190, label %186

186:                                              ; preds = %184
  %187 = getelementptr inbounds i8, ptr %.pre, i64 56
  store volatile i32 534777855, ptr %187, align 4, !tbaa !19
  %188 = load volatile i32, ptr %17, align 4, !tbaa !5
  %189 = or i32 %188, %185
  store volatile i32 %189, ptr %17, align 4, !tbaa !5
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

190:                                              ; preds = %184, %177
  %191 = phi ptr [ %.pre, %184 ], [ %60, %177 ]
  %192 = getelementptr inbounds i8, ptr %191, i64 52
  %193 = load volatile i32, ptr %192, align 4, !tbaa !26
  %194 = and i32 %193, 8
  %.not96 = icmp eq i32 %194, 0
  br i1 %.not96, label %199, label %195

195:                                              ; preds = %190
  %196 = getelementptr inbounds i8, ptr %191, i64 56
  store volatile i32 534777855, ptr %196, align 4, !tbaa !19
  %197 = load volatile i32, ptr %17, align 4, !tbaa !5
  %198 = or i32 %197, 8
  store volatile i32 %198, ptr %17, align 4, !tbaa !5
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

199:                                              ; preds = %190
  %200 = load volatile i32, ptr %192, align 4, !tbaa !26
  %201 = and i32 %200, 2
  %.not97 = icmp eq i32 %201, 0
  br i1 %.not97, label %206, label %202

202:                                              ; preds = %199
  %203 = getelementptr inbounds i8, ptr %191, i64 56
  store volatile i32 534777855, ptr %203, align 4, !tbaa !19
  %204 = load volatile i32, ptr %17, align 4, !tbaa !5
  %205 = or i32 %204, 2
  store volatile i32 %205, ptr %17, align 4, !tbaa !5
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

206:                                              ; preds = %199
  %207 = load volatile i32, ptr %192, align 4, !tbaa !26
  %208 = and i32 %207, 32
  %.not98 = icmp eq i32 %208, 0
  %209 = getelementptr inbounds i8, ptr %191, i64 56
  br i1 %.not98, label %213, label %210

210:                                              ; preds = %206
  store volatile i32 534777855, ptr %209, align 4, !tbaa !19
  %211 = load volatile i32, ptr %17, align 4, !tbaa !5
  %212 = or i32 %211, 32
  store volatile i32 %212, ptr %17, align 4, !tbaa !5
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

213:                                              ; preds = %206
  store volatile i32 402657082, ptr %209, align 4, !tbaa !19
  store volatile i32 1, ptr %14, align 8, !tbaa !13
  br label %217

214:                                              ; preds = %13
  %215 = load volatile i32, ptr %17, align 4, !tbaa !5
  %216 = or i32 %215, 536870912
  store volatile i32 %216, ptr %17, align 4, !tbaa !5
  br label %217

217:                                              ; preds = %214, %213, %210, %202, %195, %186, %172, %55, %33, %23, %9
  %.086 = phi i32 [ 1, %9 ], [ 1, %23 ], [ 1, %33 ], [ 1, %55 ], [ 3, %172 ], [ 1, %186 ], [ 1, %195 ], [ 1, %202 ], [ 1, %210 ], [ 0, %213 ], [ 1, %214 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  ret i32 %.086
}

declare i32 @HAL_GetTick() local_unnamed_addr #2

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

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

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

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

declare i32 @SDMMC_ReadFIFO(ptr noundef) local_unnamed_addr #2

declare i32 @SDMMC_CmdStopTransfer(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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, !11, i64 68}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 28, !7, i64 32, !11, i64 40, !7, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !12, i64 72, !8, i64 100, !8, i64 116, !8, i64 132}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!11 = !{!"int", !8, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!13 = !{!6, !11, i64 64}
!14 = !{!6, !11, i64 92}
!15 = !{!6, !7, i64 0}
!16 = !{!17, !11, i64 44}
!17 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !8, i64 68, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !8, i64 96, !11, i64 128, !8, i64 132, !11, i64 1020}
!18 = !{!6, !11, i64 72}
!19 = !{!17, !11, i64 56}
!20 = !{!21, !11, i64 0}
!21 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!22 = !{!21, !11, i64 4}
!23 = !{!11, !11, i64 0}
!24 = !{!17, !11, i64 12}
!25 = !{!6, !11, i64 60}
!26 = !{!17, !11, i64 52}
!27 = !{!8, !8, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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