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

; 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

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

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

declare i32 @SDMMC_CmdWriteMultiBlock(ptr noundef, i32 noundef) #1

declare i32 @SDMMC_CmdWriteSingleBlock(ptr noundef, i32 noundef) #1

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

17:                                               ; preds = %4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %18, i32 0, i32 9
  %20 = load volatile i32, ptr %19, align 4, !tbaa !11
  %21 = or i32 %20, 134217728
  store volatile i32 %21, ptr %19, align 4, !tbaa !11
  store i32 1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %148

22:                                               ; preds = %4
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %23, i32 0, i32 8
  %25 = load volatile i32, ptr %24, align 8, !tbaa !15
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %27, label %147

27:                                               ; preds = %22
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %28, i32 0, i32 9
  store volatile i32 0, ptr %29, align 4, !tbaa !11
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = add i32 %30, %31
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %33, i32 0, i32 10
  %35 = getelementptr inbounds %struct.HAL_MMC_CardInfoTypeDef, ptr %34, i32 0, i32 5
  %36 = load i32, ptr %35, align 4, !tbaa !16
  %37 = icmp ugt i32 %32, %36
  br i1 %37, label %38, label %43

38:                                               ; preds = %27
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %39, i32 0, i32 9
  %41 = load volatile i32, ptr %40, align 4, !tbaa !11
  %42 = or i32 %41, 33554432
  store volatile i32 %42, ptr %40, align 4, !tbaa !11
  store i32 1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %148

43:                                               ; preds = %27
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %44, i32 0, i32 8
  store volatile i32 3, ptr %45, align 8, !tbaa !15
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %48, i32 0, i32 11
  store volatile i32 0, ptr %49, align 4, !tbaa !18
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %51, i32 0, i32 3
  store ptr %50, ptr %52, align 8, !tbaa !20
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = mul i32 512, %53
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %55, i32 0, i32 4
  store i32 %54, ptr %56, align 8, !tbaa !21
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %60 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %59, i32 0, i32 15
  %61 = load volatile i32, ptr %60, align 4, !tbaa !22
  %62 = zext i32 %61 to i64
  %63 = or i64 %62, 16666
  %64 = trunc i64 %63 to i32
  store volatile i32 %64, ptr %60, align 4, !tbaa !22
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %65, i32 0, i32 10
  %67 = getelementptr inbounds %struct.HAL_MMC_CardInfoTypeDef, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !23
  %69 = icmp ne i32 %68, 1
  br i1 %69, label %70, label %73

70:                                               ; preds = %43
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = mul i32 %71, 512
  store i32 %72, ptr %12, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %70, %43
  %74 = load ptr, ptr %6, 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 = call i32 @SDMMC_CmdBlockLength(ptr noundef %76, i32 noundef 512)
  store i32 %77, ptr %11, align 4, !tbaa !9
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %92

80:                                               ; preds = %73
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !17
  %84 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %83, i32 0, i32 14
  store volatile i32 534777855, ptr %84, align 4, !tbaa !24
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %86, i32 0, i32 9
  %88 = load volatile i32, ptr %87, align 4, !tbaa !11
  %89 = or i32 %88, %85
  store volatile i32 %89, ptr %87, align 4, !tbaa !11
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %90, i32 0, i32 8
  store volatile i32 1, ptr %91, align 8, !tbaa !15
  store i32 1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %148

92:                                               ; preds = %73
  %93 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %10, i32 0, i32 0
  store i32 -1, ptr %93, align 4, !tbaa !25
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = mul i32 512, %94
  %96 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %10, i32 0, i32 1
  store i32 %95, ptr %96, align 4, !tbaa !27
  %97 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %10, i32 0, i32 2
  store i32 144, ptr %97, align 4, !tbaa !28
  %98 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %10, i32 0, i32 3
  store i32 0, ptr %98, align 4, !tbaa !29
  %99 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %10, i32 0, i32 4
  store i32 0, ptr %99, align 4, !tbaa !30
  %100 = getelementptr inbounds %struct.SDMMC_DataInitTypeDef, ptr %10, i32 0, i32 5
  store i32 0, ptr %100, align 4, !tbaa !31
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = call i32 @SDMMC_ConfigData(ptr noundef %103, ptr noundef %10)
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  %108 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %107, i32 0, i32 3
  %109 = load volatile i32, ptr %108, align 4, !tbaa !32
  %110 = zext i32 %109 to i64
  %111 = or i64 %110, 64
  %112 = trunc i64 %111 to i32
  store volatile i32 %112, ptr %108, align 4, !tbaa !32
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = icmp ugt i32 %113, 1
  br i1 %114, label %115, label %123

115:                                              ; preds = %92
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %116, i32 0, i32 7
  store volatile i32 40, ptr %117, align 4, !tbaa !33
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !17
  %121 = load i32, ptr %12, align 4, !tbaa !9
  %122 = call i32 @SDMMC_CmdWriteMultiBlock(ptr noundef %120, i32 noundef %121)
  store i32 %122, ptr %11, align 4, !tbaa !9
  br label %131

123:                                              ; preds = %92
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %124, i32 0, i32 7
  store volatile i32 24, ptr %125, align 4, !tbaa !33
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !17
  %129 = load i32, ptr %12, align 4, !tbaa !9
  %130 = call i32 @SDMMC_CmdWriteSingleBlock(ptr noundef %128, i32 noundef %129)
  store i32 %130, ptr %11, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %123, %115
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %146

134:                                              ; preds = %131
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !17
  %138 = getelementptr inbounds %struct.SDMMC_TypeDef, ptr %137, i32 0, i32 14
  store volatile i32 534777855, ptr %138, align 4, !tbaa !24
  %139 = load i32, ptr %11, align 4, !tbaa !9
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %140, i32 0, i32 9
  %142 = load volatile i32, ptr %141, align 4, !tbaa !11
  %143 = or i32 %142, %139
  store volatile i32 %143, ptr %141, align 4, !tbaa !11
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.MMC_HandleTypeDef, ptr %144, i32 0, i32 8
  store volatile i32 1, ptr %145, align 8, !tbaa !15
  store i32 1, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %148

146:                                              ; preds = %131
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %148

147:                                              ; preds = %22
  store i32 2, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %148

148:                                              ; preds = %147, %146, %134, %80, %38, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #3
  %149 = load i32, ptr %5, align 4
  ret i32 %149
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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, !6, i64 32}
!21 = !{!12, !10, i64 40}
!22 = !{!19, !10, i64 60}
!23 = !{!12, !10, i64 72}
!24 = !{!19, !10, i64 56}
!25 = !{!26, !10, i64 0}
!26 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!27 = !{!26, !10, i64 4}
!28 = !{!26, !10, i64 8}
!29 = !{!26, !10, i64 12}
!30 = !{!26, !10, i64 16}
!31 = !{!26, !10, i64 20}
!32 = !{!19, !10, i64 12}
!33 = !{!12, !10, i64 60}


; 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

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

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

declare i32 @SDMMC_CmdWriteMultiBlock(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @SDMMC_CmdWriteSingleBlock(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 64
  %13 = load volatile i32, ptr %12, align 8, !tbaa !13
  %14 = icmp eq i32 %13, 1
  br i1 %14, label %15, label %63

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

21:                                               ; preds = %15
  %22 = load volatile i32, ptr %16, align 4, !tbaa !5
  %23 = or i32 %22, 33554432
  store volatile i32 %23, ptr %16, align 4, !tbaa !5
  br label %63

24:                                               ; preds = %15
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  store volatile i32 3, ptr %12, align 8, !tbaa !13
  %26 = load ptr, ptr %0, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %26, i64 44
  store volatile i32 0, ptr %27, align 4, !tbaa !16
  %28 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %1, ptr %28, align 8, !tbaa !18
  %29 = shl i32 %3, 9
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 %29, ptr %30, align 8, !tbaa !19
  %31 = getelementptr inbounds i8, ptr %26, i64 60
  %32 = load volatile i32, ptr %31, align 4, !tbaa !20
  %33 = or i32 %32, 16666
  store volatile i32 %33, ptr %31, align 4, !tbaa !20
  %34 = load i32, ptr %25, align 8, !tbaa !21
  %.not = icmp eq i32 %34, 1
  %35 = shl i32 %2, 9
  %spec.select = select i1 %.not, i32 %2, i32 %35
  %36 = tail call i32 @SDMMC_CmdBlockLength(ptr noundef %26, i32 noundef 512) #3
  %.not43 = icmp eq i32 %36, 0
  br i1 %.not43, label %42, label %37

37:                                               ; preds = %24
  %38 = load ptr, ptr %0, align 8, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %38, i64 56
  store volatile i32 534777855, ptr %39, align 4, !tbaa !22
  %40 = load volatile i32, ptr %16, align 4, !tbaa !5
  %41 = or i32 %40, %36
  store volatile i32 %41, ptr %16, align 4, !tbaa !5
  store volatile i32 1, ptr %12, align 8, !tbaa !13
  br label %63

42:                                               ; preds = %24
  store i32 -1, ptr %5, align 4, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %29, ptr %43, align 4, !tbaa !25
  %44 = getelementptr inbounds i8, ptr %5, i64 8
  store <4 x i32> <i32 144, i32 0, i32 0, i32 0>, ptr %44, align 4, !tbaa !26
  %45 = load ptr, ptr %0, align 8, !tbaa !15
  %46 = call i32 @SDMMC_ConfigData(ptr noundef %45, ptr noundef nonnull %5) #3
  %47 = load ptr, ptr %0, align 8, !tbaa !15
  %48 = getelementptr inbounds i8, ptr %47, i64 12
  %49 = load volatile i32, ptr %48, align 4, !tbaa !27
  %50 = or i32 %49, 64
  store volatile i32 %50, ptr %48, align 4, !tbaa !27
  %51 = icmp ugt i32 %3, 1
  %52 = getelementptr inbounds i8, ptr %0, i64 60
  br i1 %51, label %53, label %55

53:                                               ; preds = %42
  store volatile i32 40, ptr %52, align 4, !tbaa !28
  %54 = call i32 @SDMMC_CmdWriteMultiBlock(ptr noundef nonnull %47, i32 noundef %spec.select) #3
  br label %57

55:                                               ; preds = %42
  store volatile i32 24, ptr %52, align 4, !tbaa !28
  %56 = call i32 @SDMMC_CmdWriteSingleBlock(ptr noundef nonnull %47, i32 noundef %spec.select) #3
  br label %57

57:                                               ; preds = %55, %53
  %.039 = phi i32 [ %54, %53 ], [ %56, %55 ]
  %.not44 = icmp eq i32 %.039, 0
  br i1 %.not44, label %63, label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %0, align 8, !tbaa !15
  %60 = getelementptr inbounds i8, ptr %59, i64 56
  store volatile i32 534777855, ptr %60, align 4, !tbaa !22
  %61 = load volatile i32, ptr %16, align 4, !tbaa !5
  %62 = or i32 %61, %.039
  store volatile i32 %62, ptr %16, align 4, !tbaa !5
  store volatile i32 1, ptr %12, align 8, !tbaa !13
  br label %63

63:                                               ; preds = %11, %57, %58, %37, %21, %7
  %.040 = phi i32 [ 1, %7 ], [ 1, %21 ], [ 1, %37 ], [ 1, %58 ], [ 0, %57 ], [ 2, %11 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  ret i32 %.040
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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, !7, i64 32}
!19 = !{!6, !11, i64 40}
!20 = !{!17, !11, i64 60}
!21 = !{!6, !11, i64 72}
!22 = !{!17, !11, i64 56}
!23 = !{!24, !11, i64 0}
!24 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!25 = !{!24, !11, i64 4}
!26 = !{!11, !11, i64 0}
!27 = !{!17, !11, i64 12}
!28 = !{!6, !11, i64 60}


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