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

; 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.RTC_HandleTypeDef = type { ptr, %struct.RTC_InitTypeDef, i32, i32 }
%struct.RTC_InitTypeDef = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.RTC_TypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, 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: nounwind uwtable
declare dso_local i32 @RTC_EnterInitMode(ptr noundef) #1

; 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_RTC_DeInit(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 1, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = icmp ne ptr %5, null
  br i1 %6, label %7, label %176

7:                                                ; preds = %1
  store i32 0, ptr %3, align 4, !tbaa !9
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %8, i32 0, i32 3
  store volatile i32 2, ptr %9, align 8, !tbaa !11
  br label %10

10:                                               ; preds = %7
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %14 = getelementptr inbounds %struct.RTC_TypeDef, ptr %13, i32 0, i32 9
  store volatile i32 202, ptr %14, align 4, !tbaa !15
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %15, i32 0, i32 0
  %17 = load ptr, ptr %16, align 8, !tbaa !14
  %18 = getelementptr inbounds %struct.RTC_TypeDef, ptr %17, i32 0, i32 9
  store volatile i32 83, ptr %18, align 4, !tbaa !15
  br label %19

19:                                               ; preds = %10
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = call i32 @RTC_EnterInitMode(ptr noundef %21)
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %34

24:                                               ; preds = %20
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !14
  %29 = getelementptr inbounds %struct.RTC_TypeDef, ptr %28, i32 0, i32 9
  store volatile i32 255, ptr %29, align 4, !tbaa !15
  br label %30

30:                                               ; preds = %25
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %32, i32 0, i32 3
  store volatile i32 4, ptr %33, align 8, !tbaa !11
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %78

34:                                               ; preds = %20
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds %struct.RTC_TypeDef, ptr %37, i32 0, i32 0
  store volatile i32 0, ptr %38, align 4, !tbaa !17
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  %42 = getelementptr inbounds %struct.RTC_TypeDef, ptr %41, i32 0, i32 1
  store volatile i32 8449, ptr %42, align 4, !tbaa !18
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = getelementptr inbounds %struct.RTC_TypeDef, ptr %45, i32 0, i32 2
  %47 = load volatile i32, ptr %46, align 4, !tbaa !19
  %48 = zext i32 %47 to i64
  %49 = and i64 %48, 7
  %50 = trunc i64 %49 to i32
  store volatile i32 %50, ptr %46, align 4, !tbaa !19
  %51 = call i32 @HAL_GetTick()
  store i32 %51, ptr %4, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %76, %34
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = getelementptr inbounds %struct.RTC_TypeDef, ptr %55, i32 0, i32 3
  %57 = load volatile i32, ptr %56, align 4, !tbaa !20
  %58 = zext i32 %57 to i64
  %59 = and i64 %58, 4
  %60 = icmp eq i64 %59, 0
  br i1 %60, label %61, label %77

61:                                               ; preds = %52
  %62 = call i32 @HAL_GetTick()
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = sub i32 %62, %63
  %65 = icmp ugt i32 %64, 1000
  br i1 %65, label %66, label %76

66:                                               ; preds = %61
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  %71 = getelementptr inbounds %struct.RTC_TypeDef, ptr %70, i32 0, i32 9
  store volatile i32 255, ptr %71, align 4, !tbaa !15
  br label %72

72:                                               ; preds = %67
  br label %73

73:                                               ; preds = %72
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %74, i32 0, i32 3
  store volatile i32 3, ptr %75, align 8, !tbaa !11
  store i32 3, ptr %3, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %73, %61
  br label %52, !llvm.loop !21

77:                                               ; preds = %52
  br label %78

78:                                               ; preds = %77, %31
  %79 = load i32, ptr %3, align 4, !tbaa !9
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %156

81:                                               ; preds = %78
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !14
  %85 = getelementptr inbounds %struct.RTC_TypeDef, ptr %84, i32 0, i32 2
  %86 = load volatile i32, ptr %85, align 4, !tbaa !19
  %87 = and i32 %86, 0
  store volatile i32 %87, ptr %85, align 4, !tbaa !19
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !14
  %91 = getelementptr inbounds %struct.RTC_TypeDef, ptr %90, i32 0, i32 5
  store volatile i32 65535, ptr %91, align 4, !tbaa !23
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !14
  %95 = getelementptr inbounds %struct.RTC_TypeDef, ptr %94, i32 0, i32 4
  store volatile i32 8323327, ptr %95, align 4, !tbaa !24
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !14
  %99 = getelementptr inbounds %struct.RTC_TypeDef, ptr %98, i32 0, i32 7
  store volatile i32 0, ptr %99, align 4, !tbaa !25
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !14
  %103 = getelementptr inbounds %struct.RTC_TypeDef, ptr %102, i32 0, i32 8
  store volatile i32 0, ptr %103, align 4, !tbaa !26
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !14
  %107 = getelementptr inbounds %struct.RTC_TypeDef, ptr %106, i32 0, i32 11
  store volatile i32 0, ptr %107, align 4, !tbaa !27
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !14
  %111 = getelementptr inbounds %struct.RTC_TypeDef, ptr %110, i32 0, i32 15
  store volatile i32 0, ptr %111, align 4, !tbaa !28
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !14
  %115 = getelementptr inbounds %struct.RTC_TypeDef, ptr %114, i32 0, i32 17
  store volatile i32 0, ptr %115, align 4, !tbaa !29
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !14
  %119 = getelementptr inbounds %struct.RTC_TypeDef, ptr %118, i32 0, i32 18
  store volatile i32 0, ptr %119, align 4, !tbaa !30
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !14
  %123 = getelementptr inbounds %struct.RTC_TypeDef, ptr %122, i32 0, i32 16
  store volatile i32 0, ptr %123, align 4, !tbaa !31
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !14
  %127 = getelementptr inbounds %struct.RTC_TypeDef, ptr %126, i32 0, i32 19
  store volatile i32 0, ptr %127, align 4, !tbaa !32
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !14
  %131 = getelementptr inbounds %struct.RTC_TypeDef, ptr %130, i32 0, i32 3
  store volatile i32 0, ptr %131, align 4, !tbaa !20
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !14
  %135 = getelementptr inbounds %struct.RTC_TypeDef, ptr %134, i32 0, i32 2
  %136 = load volatile i32, ptr %135, align 4, !tbaa !19
  %137 = zext i32 %136 to i64
  %138 = and i64 %137, 32
  %139 = icmp eq i64 %138, 0
  br i1 %139, label %140, label %155

140:                                              ; preds = %81
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = call i32 @HAL_RTC_WaitForSynchro(ptr noundef %141)
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %154

144:                                              ; preds = %140
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !14
  %149 = getelementptr inbounds %struct.RTC_TypeDef, ptr %148, i32 0, i32 9
  store volatile i32 255, ptr %149, align 4, !tbaa !15
  br label %150

150:                                              ; preds = %145
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %2, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %152, i32 0, i32 3
  store volatile i32 4, ptr %153, align 8, !tbaa !11
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %151, %140
  br label %155

155:                                              ; preds = %154, %81
  br label %156

156:                                              ; preds = %155, %78
  %157 = load i32, ptr %3, align 4, !tbaa !9
  %158 = icmp eq i32 %157, 0
  br i1 %158, label %159, label %175

159:                                              ; preds = %156
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !14
  %164 = getelementptr inbounds %struct.RTC_TypeDef, ptr %163, i32 0, i32 9
  store volatile i32 255, ptr %164, align 4, !tbaa !15
  br label %165

165:                                              ; preds = %160
  br label %166

166:                                              ; preds = %165
  %167 = load ptr, ptr %2, align 8, !tbaa !5
  call void @HAL_RTC_MspDeInit(ptr noundef %167)
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %168, i32 0, i32 3
  store volatile i32 0, ptr %169, align 8, !tbaa !11
  br label %170

170:                                              ; preds = %166
  %171 = load ptr, ptr %2, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.RTC_HandleTypeDef, ptr %171, i32 0, i32 2
  store i32 0, ptr %172, align 4, !tbaa !33
  br label %173

173:                                              ; preds = %170
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174, %156
  br label %176

176:                                              ; preds = %175, %1
  %177 = load i32, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret i32 %177
}

declare i32 @HAL_GetTick() #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @HAL_RTC_WaitForSynchro(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @HAL_RTC_MspDeInit(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 40}
!12 = !{!"", !6, i64 0, !13, i64 8, !10, i64 36, !10, i64 40}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!14 = !{!12, !6, i64 0}
!15 = !{!16, !10, i64 36}
!16 = !{!"", !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, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204}
!17 = !{!16, !10, i64 0}
!18 = !{!16, !10, i64 4}
!19 = !{!16, !10, i64 8}
!20 = !{!16, !10, i64 12}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!16, !10, i64 20}
!24 = !{!16, !10, i64 16}
!25 = !{!16, !10, i64 28}
!26 = !{!16, !10, i64 32}
!27 = !{!16, !10, i64 44}
!28 = !{!16, !10, i64 60}
!29 = !{!16, !10, i64 68}
!30 = !{!16, !10, i64 72}
!31 = !{!16, !10, i64 64}
!32 = !{!16, !10, i64 76}
!33 = !{!12, !10, i64 36}


; 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: nounwind uwtable
declare dso_local i32 @RTC_EnterInitMode(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 4) i32 @HAL_RTC_DeInit(ptr noundef %0) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %.thread40, label %2

2:                                                ; preds = %1
  %3 = getelementptr inbounds i8, ptr %0, i64 40
  store volatile i32 2, ptr %3, align 8, !tbaa !5
  %4 = load ptr, ptr %0, align 8, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %4, i64 36
  store volatile i32 202, ptr %5, align 4, !tbaa !13
  store volatile i32 83, ptr %5, align 4, !tbaa !13
  %6 = tail call i32 @RTC_EnterInitMode(ptr noundef nonnull %0)
  %.not37 = icmp eq i32 %6, 0
  %7 = load ptr, ptr %0, align 8, !tbaa !12
  br i1 %.not37, label %9, label %.thread

.thread:                                          ; preds = %2
  %8 = getelementptr inbounds i8, ptr %7, i64 36
  store volatile i32 255, ptr %8, align 4, !tbaa !13
  store volatile i32 4, ptr %3, align 8, !tbaa !5
  br label %.thread40

9:                                                ; preds = %2
  store volatile i32 0, ptr %7, align 4, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %7, i64 4
  store volatile i32 8449, ptr %10, align 4, !tbaa !16
  %11 = getelementptr inbounds i8, ptr %7, i64 8
  %12 = load volatile i32, ptr %11, align 4, !tbaa !17
  %13 = and i32 %12, 7
  store volatile i32 %13, ptr %11, align 4, !tbaa !17
  %14 = tail call i32 @HAL_GetTick() #2
  %15 = load ptr, ptr %0, align 8, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %15, i64 12
  %17 = load volatile i32, ptr %16, align 4, !tbaa !18
  %18 = and i32 %17, 4
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %9, %25
  %.042 = phi i32 [ %.1, %25 ], [ 0, %9 ]
  %20 = tail call i32 @HAL_GetTick() #2
  %21 = sub i32 %20, %14
  %22 = icmp ugt i32 %21, 1000
  %.pre = load ptr, ptr %0, align 8, !tbaa !12
  br i1 %22, label %23, label %25

23:                                               ; preds = %.lr.ph
  %24 = getelementptr inbounds i8, ptr %.pre, i64 36
  store volatile i32 255, ptr %24, align 4, !tbaa !13
  store volatile i32 3, ptr %3, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %23, %.lr.ph
  %.1 = phi i32 [ 3, %23 ], [ %.042, %.lr.ph ]
  %26 = getelementptr inbounds i8, ptr %.pre, i64 12
  %27 = load volatile i32, ptr %26, align 4, !tbaa !18
  %28 = and i32 %27, 4
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %25
  %30 = icmp eq i32 %.1, 0
  br i1 %30, label %._crit_edge.thread, label %.thread40

._crit_edge.thread:                               ; preds = %9, %._crit_edge
  %31 = phi ptr [ %.pre, %._crit_edge ], [ %15, %9 ]
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load volatile i32, ptr %32, align 4, !tbaa !17
  store volatile i32 0, ptr %32, align 4, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %31, i64 20
  store volatile i32 65535, ptr %34, align 4, !tbaa !21
  %35 = getelementptr inbounds i8, ptr %31, i64 16
  store volatile i32 8323327, ptr %35, align 4, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %31, i64 28
  store volatile i32 0, ptr %36, align 4, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %31, i64 32
  store volatile i32 0, ptr %37, align 4, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %31, i64 44
  store volatile i32 0, ptr %38, align 4, !tbaa !25
  %39 = getelementptr inbounds i8, ptr %31, i64 60
  store volatile i32 0, ptr %39, align 4, !tbaa !26
  %40 = getelementptr inbounds i8, ptr %31, i64 68
  store volatile i32 0, ptr %40, align 4, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %31, i64 72
  store volatile i32 0, ptr %41, align 4, !tbaa !28
  %42 = getelementptr inbounds i8, ptr %31, i64 64
  store volatile i32 0, ptr %42, align 4, !tbaa !29
  %43 = getelementptr inbounds i8, ptr %31, i64 76
  store volatile i32 0, ptr %43, align 4, !tbaa !30
  %44 = getelementptr inbounds i8, ptr %31, i64 12
  store volatile i32 0, ptr %44, align 4, !tbaa !18
  %45 = load volatile i32, ptr %32, align 4, !tbaa !17
  %46 = and i32 %45, 32
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %52

48:                                               ; preds = %._crit_edge.thread
  %49 = tail call i32 @HAL_RTC_WaitForSynchro(ptr noundef nonnull %0)
  %.not38 = icmp eq i32 %49, 0
  %.pre43 = load ptr, ptr %0, align 8, !tbaa !12
  br i1 %.not38, label %52, label %50

50:                                               ; preds = %48
  %51 = getelementptr inbounds i8, ptr %.pre43, i64 36
  store volatile i32 255, ptr %51, align 4, !tbaa !13
  store volatile i32 4, ptr %3, align 8, !tbaa !5
  br label %.thread40

52:                                               ; preds = %48, %._crit_edge.thread
  %53 = phi ptr [ %.pre43, %48 ], [ %31, %._crit_edge.thread ]
  %54 = getelementptr inbounds i8, ptr %53, i64 36
  store volatile i32 255, ptr %54, align 4, !tbaa !13
  tail call void @HAL_RTC_MspDeInit(ptr noundef nonnull %0)
  store volatile i32 0, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 0, ptr %55, align 4, !tbaa !31
  br label %.thread40

.thread40:                                        ; preds = %.thread, %._crit_edge, %50, %52, %1
  %.4 = phi i32 [ 0, %52 ], [ 1, %1 ], [ 1, %.thread ], [ %.1, %._crit_edge ], [ 1, %50 ]
  ret i32 %.4
}

declare i32 @HAL_GetTick() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @HAL_RTC_WaitForSynchro(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @HAL_RTC_MspDeInit(ptr noundef) local_unnamed_addr #0

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 = { "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 }

!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 40}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 36, !11, i64 40}
!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, i64 20, !11, i64 24}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!14, !11, i64 36}
!14 = !{!"", !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, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !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, !11, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204}
!15 = !{!14, !11, i64 0}
!16 = !{!14, !11, i64 4}
!17 = !{!14, !11, i64 8}
!18 = !{!14, !11, i64 12}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !11, i64 20}
!22 = !{!14, !11, i64 16}
!23 = !{!14, !11, i64 28}
!24 = !{!14, !11, i64 32}
!25 = !{!14, !11, i64 44}
!26 = !{!14, !11, i64 60}
!27 = !{!14, !11, i64 68}
!28 = !{!14, !11, i64 72}
!29 = !{!14, !11, i64 64}
!30 = !{!14, !11, i64 76}
!31 = !{!6, !11, i64 36}


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