; LLVM IR from ctlst-tech/catpilot :: bsp/mcu/core/stm32/h753/hal/src (stm32h7xx_hal_sd)

; 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.SD_HandleTypeDef = type { ptr, %struct.SDMMC_InitTypeDef, i32, ptr, i32, ptr, i32, i32, i32, i32, %struct.HAL_SD_CardInfoTypeDef, [4 x i32], [4 x i32] }
%struct.SDMMC_InitTypeDef = type { i32, i32, i32, i32, i32 }
%struct.HAL_SD_CardInfoTypeDef = type { i32, i32, 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 }
%struct.HAL_SD_CardStatusTypeDef = type { i8, i8, i16, i32, i8, i8, i8, i16, i8, i8, i8, i8, i8 }

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

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_SD_GetCardStatus(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [16 x i32], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = 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 64, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %10, i32 0, i32 8
  %12 = load volatile i32, ptr %11, align 8, !tbaa !11
  %13 = icmp eq i32 %12, 3
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  store i32 1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %165

15:                                               ; preds = %2
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 0
  %18 = call i32 @SD_SendSDStatus(ptr noundef %16, ptr noundef %17)
  store i32 %18, ptr %7, align 4, !tbaa !9
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %33

21:                                               ; preds = %15
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %24, i32 0, i32 14
  store volatile i32 534777855, ptr %25, align 4, !tbaa !16
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %27, i32 0, i32 9
  %29 = load volatile i32, ptr %28, align 4, !tbaa !18
  %30 = or i32 %29, %26
  store volatile i32 %30, ptr %28, align 4, !tbaa !18
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %31, i32 0, i32 8
  store volatile i32 1, ptr %32, align 8, !tbaa !11
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %146

33:                                               ; preds = %15
  %34 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 0
  %35 = load i32, ptr %34, align 16, !tbaa !9
  %36 = and i32 %35, 192
  %37 = lshr i32 %36, 6
  %38 = trunc i32 %37 to i8
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %39, i32 0, i32 0
  store volatile i8 %38, ptr %40, align 4, !tbaa !19
  %41 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 0
  %42 = load i32, ptr %41, align 16, !tbaa !9
  %43 = and i32 %42, 32
  %44 = lshr i32 %43, 5
  %45 = trunc i32 %44 to i8
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %46, i32 0, i32 1
  store volatile i8 %45, ptr %47, align 1, !tbaa !22
  %48 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 0
  %49 = load i32, ptr %48, align 16, !tbaa !9
  %50 = and i32 %49, 16711680
  %51 = lshr i32 %50, 8
  %52 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 0
  %53 = load i32, ptr %52, align 16, !tbaa !9
  %54 = and i32 %53, -16777216
  %55 = lshr i32 %54, 24
  %56 = or i32 %51, %55
  %57 = trunc i32 %56 to i16
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %58, i32 0, i32 2
  store volatile i16 %57, ptr %59, align 2, !tbaa !23
  %60 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 1
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = and i32 %61, 255
  %63 = shl i32 %62, 24
  %64 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 1
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = and i32 %65, 65280
  %67 = shl i32 %66, 8
  %68 = or i32 %63, %67
  %69 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 1
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = and i32 %70, 16711680
  %72 = lshr i32 %71, 8
  %73 = or i32 %68, %72
  %74 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 1
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = and i32 %75, -16777216
  %77 = lshr i32 %76, 24
  %78 = or i32 %73, %77
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %79, i32 0, i32 3
  store volatile i32 %78, ptr %80, align 4, !tbaa !24
  %81 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 2
  %82 = load i32, ptr %81, align 8, !tbaa !9
  %83 = and i32 %82, 255
  %84 = trunc i32 %83 to i8
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %85, i32 0, i32 4
  store volatile i8 %84, ptr %86, align 4, !tbaa !25
  %87 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 2
  %88 = load i32, ptr %87, align 8, !tbaa !9
  %89 = and i32 %88, 65280
  %90 = lshr i32 %89, 8
  %91 = trunc i32 %90 to i8
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %92, i32 0, i32 5
  store volatile i8 %91, ptr %93, align 1, !tbaa !26
  %94 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 2
  %95 = load i32, ptr %94, align 8, !tbaa !9
  %96 = and i32 %95, 15728640
  %97 = lshr i32 %96, 20
  %98 = trunc i32 %97 to i8
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %99, i32 0, i32 6
  store volatile i8 %98, ptr %100, align 2, !tbaa !27
  %101 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 2
  %102 = load i32, ptr %101, align 8, !tbaa !9
  %103 = and i32 %102, -16777216
  %104 = lshr i32 %103, 16
  %105 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 3
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = and i32 %106, 255
  %108 = or i32 %104, %107
  %109 = trunc i32 %108 to i16
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %110, i32 0, i32 7
  store volatile i16 %109, ptr %111, align 4, !tbaa !28
  %112 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 3
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = and i32 %113, 64512
  %115 = lshr i32 %114, 10
  %116 = trunc i32 %115 to i8
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %117, i32 0, i32 8
  store volatile i8 %116, ptr %118, align 2, !tbaa !29
  %119 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 3
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = and i32 %120, 768
  %122 = lshr i32 %121, 8
  %123 = trunc i32 %122 to i8
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %124, i32 0, i32 9
  store volatile i8 %123, ptr %125, align 1, !tbaa !30
  %126 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 3
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = and i32 %127, 240
  %129 = lshr i32 %128, 4
  %130 = trunc i32 %129 to i8
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %131, i32 0, i32 10
  store volatile i8 %130, ptr %132, align 4, !tbaa !31
  %133 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 3
  %134 = load i32, ptr %133, align 4, !tbaa !9
  %135 = and i32 %134, 15
  %136 = trunc i32 %135 to i8
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %137, i32 0, i32 11
  store volatile i8 %136, ptr %138, align 1, !tbaa !32
  %139 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 4
  %140 = load i32, ptr %139, align 16, !tbaa !9
  %141 = and i32 %140, -16777216
  %142 = lshr i32 %141, 24
  %143 = trunc i32 %142 to i8
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.HAL_SD_CardStatusTypeDef, ptr %144, i32 0, i32 12
  store volatile i8 %143, ptr %145, align 2, !tbaa !33
  br label %146

146:                                              ; preds = %33, %21
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8, !tbaa !15
  %150 = call i32 @SDMMC_CmdBlockLength(ptr noundef %149, i32 noundef 512)
  store i32 %150, ptr %7, align 4, !tbaa !9
  %151 = load i32, ptr %7, align 4, !tbaa !9
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %163

153:                                              ; preds = %146
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !15
  %157 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %156, i32 0, i32 14
  store volatile i32 534777855, ptr %157, align 4, !tbaa !16
  %158 = load i32, ptr %7, align 4, !tbaa !9
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %159, i32 0, i32 9
  store volatile i32 %158, ptr %160, align 4, !tbaa !18
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.SD_HandleTypeDef, ptr %161, i32 0, i32 8
  store volatile i32 1, ptr %162, align 8, !tbaa !11
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %153, %146
  %164 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %164, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %165

165:                                              ; preds = %163, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #3
  %166 = load i32, ptr %3, align 4
  ret i32 %166
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @SD_SendSDStatus(ptr noundef, ptr noundef) #1

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 64}
!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 108, !7, i64 124}
!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, !10, i64 28, !10, i64 32}
!15 = !{!12, !6, i64 0}
!16 = !{!17, !10, i64 56}
!17 = !{!"", !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}
!18 = !{!12, !10, i64 68}
!19 = !{!20, !7, i64 0}
!20 = !{!"", !7, i64 0, !7, i64 1, !21, i64 2, !10, i64 4, !7, i64 8, !7, i64 9, !7, i64 10, !21, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18}
!21 = !{!"short", !7, i64 0}
!22 = !{!20, !7, i64 1}
!23 = !{!20, !21, i64 2}
!24 = !{!20, !10, i64 4}
!25 = !{!20, !7, i64 8}
!26 = !{!20, !7, i64 9}
!27 = !{!20, !7, i64 10}
!28 = !{!20, !21, i64 12}
!29 = !{!20, !7, i64 14}
!30 = !{!20, !7, i64 15}
!31 = !{!20, !7, i64 16}
!32 = !{!20, !7, i64 17}
!33 = !{!20, !7, i64 18}


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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @HAL_SD_GetCardStatus(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca [16 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #4
  %4 = getelementptr inbounds i8, ptr %0, i64 64
  %5 = load volatile i32, ptr %4, align 8, !tbaa !5
  %6 = icmp eq i32 %5, 3
  br i1 %6, label %76, label %7

7:                                                ; preds = %2
  %8 = call i32 @SD_SendSDStatus(ptr noundef nonnull %0, ptr noundef nonnull %3)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %15, label %9

9:                                                ; preds = %7
  %10 = load ptr, ptr %0, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %10, i64 56
  store volatile i32 534777855, ptr %11, align 4, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %0, i64 68
  %13 = load volatile i32, ptr %12, align 4, !tbaa !16
  %14 = or i32 %13, %8
  store volatile i32 %14, ptr %12, align 4, !tbaa !16
  store volatile i32 1, ptr %4, align 8, !tbaa !5
  br label %69

15:                                               ; preds = %7
  %16 = load i32, ptr %3, align 16, !tbaa !17
  %17 = trunc i32 %16 to i8
  %18 = lshr i8 %17, 6
  store volatile i8 %18, ptr %1, align 4, !tbaa !18
  %19 = lshr i8 %17, 5
  %20 = and i8 %19, 1
  %21 = getelementptr inbounds i8, ptr %1, i64 1
  store volatile i8 %20, ptr %21, align 1, !tbaa !21
  %22 = lshr i32 %16, 8
  %23 = and i32 %22, 65280
  %24 = lshr i32 %16, 24
  %25 = or disjoint i32 %23, %24
  %26 = trunc nuw i32 %25 to i16
  %27 = getelementptr inbounds i8, ptr %1, i64 2
  store volatile i16 %26, ptr %27, align 2, !tbaa !22
  %28 = getelementptr inbounds i8, ptr %3, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !17
  %30 = call i32 @llvm.bswap.i32(i32 %29)
  %31 = getelementptr inbounds i8, ptr %1, i64 4
  store volatile i32 %30, ptr %31, align 4, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %3, i64 8
  %33 = load i32, ptr %32, align 8, !tbaa !17
  %34 = trunc i32 %33 to i8
  %35 = getelementptr inbounds i8, ptr %1, i64 8
  store volatile i8 %34, ptr %35, align 4, !tbaa !24
  %36 = lshr i32 %33, 8
  %37 = trunc i32 %36 to i8
  %38 = getelementptr inbounds i8, ptr %1, i64 9
  store volatile i8 %37, ptr %38, align 1, !tbaa !25
  %39 = lshr i32 %33, 20
  %40 = trunc i32 %39 to i8
  %41 = and i8 %40, 15
  %42 = getelementptr inbounds i8, ptr %1, i64 10
  store volatile i8 %41, ptr %42, align 2, !tbaa !26
  %43 = lshr i32 %33, 16
  %44 = and i32 %43, 65280
  %45 = getelementptr inbounds i8, ptr %3, i64 12
  %46 = load i32, ptr %45, align 4, !tbaa !17
  %47 = and i32 %46, 255
  %48 = or disjoint i32 %47, %44
  %49 = trunc nuw i32 %48 to i16
  %50 = getelementptr inbounds i8, ptr %1, i64 12
  store volatile i16 %49, ptr %50, align 4, !tbaa !27
  %51 = lshr i32 %46, 10
  %52 = trunc i32 %51 to i8
  %53 = and i8 %52, 63
  %54 = getelementptr inbounds i8, ptr %1, i64 14
  store volatile i8 %53, ptr %54, align 2, !tbaa !28
  %55 = lshr i32 %46, 8
  %56 = trunc i32 %55 to i8
  %57 = and i8 %56, 3
  %58 = getelementptr inbounds i8, ptr %1, i64 15
  store volatile i8 %57, ptr %58, align 1, !tbaa !29
  %59 = trunc i32 %46 to i8
  %60 = lshr i8 %59, 4
  %61 = getelementptr inbounds i8, ptr %1, i64 16
  store volatile i8 %60, ptr %61, align 4, !tbaa !30
  %62 = and i8 %59, 15
  %63 = getelementptr inbounds i8, ptr %1, i64 17
  store volatile i8 %62, ptr %63, align 1, !tbaa !31
  %64 = getelementptr inbounds i8, ptr %3, i64 16
  %65 = load i32, ptr %64, align 16, !tbaa !17
  %66 = lshr i32 %65, 24
  %67 = trunc nuw i32 %66 to i8
  %68 = getelementptr inbounds i8, ptr %1, i64 18
  store volatile i8 %67, ptr %68, align 2, !tbaa !32
  %.pre = load ptr, ptr %0, align 8, !tbaa !13
  br label %69

69:                                               ; preds = %15, %9
  %70 = phi ptr [ %10, %9 ], [ %.pre, %15 ]
  %.0 = phi i32 [ 1, %9 ], [ 0, %15 ]
  %71 = call i32 @SDMMC_CmdBlockLength(ptr noundef %70, i32 noundef 512) #4
  %.not30 = icmp eq i32 %71, 0
  br i1 %.not30, label %76, label %72

72:                                               ; preds = %69
  %73 = load ptr, ptr %0, align 8, !tbaa !13
  %74 = getelementptr inbounds i8, ptr %73, i64 56
  store volatile i32 534777855, ptr %74, align 4, !tbaa !14
  %75 = getelementptr inbounds i8, ptr %0, i64 68
  store volatile i32 %71, ptr %75, align 4, !tbaa !16
  store volatile i32 1, ptr %4, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %69, %72, %2
  %.027 = phi i32 [ 1, %2 ], [ 1, %72 ], [ %.0, %69 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #4
  ret i32 %.027
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @SD_SendSDStatus(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.bswap.i32(i32) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 64}
!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 108, !8, i64 124}
!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, !11, i64 28, !11, i64 32}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !11, i64 56}
!15 = !{!"", !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}
!16 = !{!6, !11, i64 68}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !8, i64 0}
!19 = !{!"", !8, i64 0, !8, i64 1, !20, i64 2, !11, i64 4, !8, i64 8, !8, i64 9, !8, i64 10, !20, i64 12, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !8, i64 18}
!20 = !{!"short", !8, i64 0}
!21 = !{!19, !8, i64 1}
!22 = !{!19, !20, i64 2}
!23 = !{!19, !11, i64 4}
!24 = !{!19, !8, i64 8}
!25 = !{!19, !8, i64 9}
!26 = !{!19, !8, i64 10}
!27 = !{!19, !20, i64 12}
!28 = !{!19, !8, i64 14}
!29 = !{!19, !8, i64 15}
!30 = !{!19, !8, i64 16}
!31 = !{!19, !8, i64 17}
!32 = !{!19, !8, i64 18}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass