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

; 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.USB_OTG_CfgTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.USB_OTG_GlobalTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [39 x i32], i32, [15 x i32] }
%struct.USB_OTG_HostTypeDef = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.USB_OTG_HostChannelTypeDef = type { i32, i32, i32, i32, i32, i32, [2 x 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 void @HAL_Delay(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @USB_FlushTxFifo(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @USB_FlushRxFifo(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @USB_HostInit(ptr noundef %0, ptr noundef byval(%struct.USB_OTG_CfgTypeDef) align 8 %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = ptrtoint ptr %6 to i32
  store i32 %7, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %8 = load i32, ptr %4, align 4, !tbaa !9
  %9 = zext i32 %8 to i64
  %10 = add i64 %9, 3584
  %11 = inttoptr i64 %10 to ptr
  store volatile i32 0, ptr %11, align 4, !tbaa !9
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %12, i32 0, i32 13
  %14 = load volatile i32, ptr %13, align 4, !tbaa !11
  %15 = zext i32 %14 to i64
  %16 = and i64 %15, -2097153
  %17 = trunc i64 %16 to i32
  store volatile i32 %17, ptr %13, align 4, !tbaa !11
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %18, i32 0, i32 13
  %20 = load volatile i32, ptr %19, align 4, !tbaa !11
  %21 = zext i32 %20 to i64
  %22 = and i64 %21, -131073
  %23 = trunc i64 %22 to i32
  store volatile i32 %23, ptr %19, align 4, !tbaa !11
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %24, i32 0, i32 14
  %26 = load volatile i32, ptr %25, align 4, !tbaa !13
  %27 = and i32 %26, 256
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %54

29:                                               ; preds = %2
  %30 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %1, i32 0, i32 2
  %31 = load i32, ptr %30, align 8, !tbaa !14
  %32 = icmp eq i32 %31, 3
  br i1 %32, label %33, label %43

33:                                               ; preds = %29
  %34 = load i32, ptr %4, align 4, !tbaa !9
  %35 = zext i32 %34 to i64
  %36 = add i64 %35, 1024
  %37 = inttoptr i64 %36 to ptr
  %38 = getelementptr inbounds %struct.USB_OTG_HostTypeDef, ptr %37, i32 0, i32 0
  %39 = load volatile i32, ptr %38, align 4, !tbaa !16
  %40 = zext i32 %39 to i64
  %41 = or i64 %40, 4
  %42 = trunc i64 %41 to i32
  store volatile i32 %42, ptr %38, align 4, !tbaa !16
  br label %53

43:                                               ; preds = %29
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = add i64 %45, 1024
  %47 = inttoptr i64 %46 to ptr
  %48 = getelementptr inbounds %struct.USB_OTG_HostTypeDef, ptr %47, i32 0, i32 0
  %49 = load volatile i32, ptr %48, align 4, !tbaa !16
  %50 = zext i32 %49 to i64
  %51 = and i64 %50, -5
  %52 = trunc i64 %51 to i32
  store volatile i32 %52, ptr %48, align 4, !tbaa !16
  br label %53

53:                                               ; preds = %43, %33
  br label %64

54:                                               ; preds = %2
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = add i64 %56, 1024
  %58 = inttoptr i64 %57 to ptr
  %59 = getelementptr inbounds %struct.USB_OTG_HostTypeDef, ptr %58, i32 0, i32 0
  %60 = load volatile i32, ptr %59, align 4, !tbaa !16
  %61 = zext i32 %60 to i64
  %62 = and i64 %61, -5
  %63 = trunc i64 %62 to i32
  store volatile i32 %63, ptr %59, align 4, !tbaa !16
  br label %64

64:                                               ; preds = %54, %53
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = call i32 @USB_FlushTxFifo(ptr noundef %65, i32 noundef 16)
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = call i32 @USB_FlushRxFifo(ptr noundef %67)
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %93, %64
  %70 = load i32, ptr %5, align 4, !tbaa !9
  %71 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %1, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !18
  %73 = icmp ult i32 %70, %72
  br i1 %73, label %74, label %96

74:                                               ; preds = %69
  %75 = load i32, ptr %4, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = add i64 %76, 1280
  %78 = load i32, ptr %5, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = mul i64 %79, 32
  %81 = add i64 %77, %80
  %82 = inttoptr i64 %81 to ptr
  %83 = getelementptr inbounds %struct.USB_OTG_HostChannelTypeDef, ptr %82, i32 0, i32 2
  store volatile i32 -1, ptr %83, align 4, !tbaa !19
  %84 = load i32, ptr %4, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = add i64 %85, 1280
  %87 = load i32, ptr %5, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = mul i64 %88, 32
  %90 = add i64 %86, %89
  %91 = inttoptr i64 %90 to ptr
  %92 = getelementptr inbounds %struct.USB_OTG_HostChannelTypeDef, ptr %91, i32 0, i32 3
  store volatile i32 0, ptr %92, align 4, !tbaa !21
  br label %93

93:                                               ; preds = %74
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = add i32 %94, 1
  store i32 %95, ptr %5, align 4, !tbaa !9
  br label %69, !llvm.loop !22

96:                                               ; preds = %69
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = call i32 @USB_DriveVbus(ptr noundef %97, i8 noundef zeroext 1)
  call void @HAL_Delay(i32 noundef 200)
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %99, i32 0, i32 6
  store volatile i32 0, ptr %100, align 4, !tbaa !24
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %101, i32 0, i32 5
  store volatile i32 -1, ptr %102, align 4, !tbaa !25
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %103, i32 0, i32 14
  %105 = load volatile i32, ptr %104, align 4, !tbaa !13
  %106 = and i32 %105, 256
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %115

108:                                              ; preds = %96
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %109, i32 0, i32 9
  store volatile i32 512, ptr %110, align 4, !tbaa !26
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %111, i32 0, i32 10
  store volatile i32 16777728, ptr %112, align 4, !tbaa !27
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %113, i32 0, i32 25
  store volatile i32 14680832, ptr %114, align 4, !tbaa !28
  br label %122

115:                                              ; preds = %96
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %116, i32 0, i32 9
  store volatile i32 128, ptr %117, align 4, !tbaa !26
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %118, i32 0, i32 10
  store volatile i32 6291584, ptr %119, align 4, !tbaa !27
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %120, i32 0, i32 25
  store volatile i32 4194528, ptr %121, align 4, !tbaa !28
  br label %122

122:                                              ; preds = %115, %108
  %123 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %1, i32 0, i32 3
  %124 = load i32, ptr %123, align 4, !tbaa !29
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %133

126:                                              ; preds = %122
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %127, i32 0, i32 6
  %129 = load volatile i32, ptr %128, align 4, !tbaa !24
  %130 = zext i32 %129 to i64
  %131 = or i64 %130, 16
  %132 = trunc i64 %131 to i32
  store volatile i32 %132, ptr %128, align 4, !tbaa !24
  br label %133

133:                                              ; preds = %126, %122
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %134, i32 0, i32 6
  %136 = load volatile i32, ptr %135, align 4, !tbaa !24
  %137 = zext i32 %136 to i64
  %138 = or i64 %137, 2736783368
  %139 = trunc i64 %138 to i32
  store volatile i32 %139, ptr %135, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  ret i32 0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @USB_DriveVbus(ptr noundef, i8 noundef zeroext) #2

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 56}
!12 = !{!"", !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, !7, i64 48, !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, !7, i64 100, !10, i64 256, !7, i64 260}
!13 = !{!12, !10, i64 60}
!14 = !{!15, !10, i64 8}
!15 = !{!"", !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}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!18 = !{!15, !10, i64 4}
!19 = !{!20, !10, i64 8}
!20 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24}
!21 = !{!20, !10, i64 12}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!12, !10, i64 24}
!25 = !{!12, !10, i64 20}
!26 = !{!12, !10, i64 36}
!27 = !{!12, !10, i64 40}
!28 = !{!12, !10, i64 256}
!29 = !{!15, !10, i64 12}


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

declare void @HAL_Delay(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @USB_HostInit(ptr noundef %0, ptr nocapture noundef readonly byval(%struct.USB_OTG_CfgTypeDef) align 8 %1) local_unnamed_addr #1 {
  %3 = ptrtoint ptr %0 to i64
  %4 = and i64 %3, 4294967295
  %5 = add nuw nsw i64 %4, 3584
  %6 = inttoptr i64 %5 to ptr
  store volatile i32 0, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = load volatile i32, ptr %7, align 4, !tbaa !9
  %9 = and i32 %8, -2097153
  store volatile i32 %9, ptr %7, align 4, !tbaa !9
  %10 = load volatile i32, ptr %7, align 4, !tbaa !9
  %11 = and i32 %10, -131073
  store volatile i32 %11, ptr %7, align 4, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %0, i64 60
  %13 = load volatile i32, ptr %12, align 4, !tbaa !11
  %14 = and i32 %13, 256
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %26, label %15

15:                                               ; preds = %2
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !12
  %18 = icmp eq i32 %17, 3
  %19 = add nuw nsw i64 %4, 1024
  %20 = inttoptr i64 %19 to ptr
  %21 = load volatile i32, ptr %20, align 4, !tbaa !14
  br i1 %18, label %22, label %24

22:                                               ; preds = %15
  %23 = or i32 %21, 4
  store volatile i32 %23, ptr %20, align 4, !tbaa !14
  br label %31

24:                                               ; preds = %15
  %25 = and i32 %21, -5
  store volatile i32 %25, ptr %20, align 4, !tbaa !14
  br label %31

26:                                               ; preds = %2
  %27 = add nuw nsw i64 %4, 1024
  %28 = inttoptr i64 %27 to ptr
  %29 = load volatile i32, ptr %28, align 4, !tbaa !14
  %30 = and i32 %29, -5
  store volatile i32 %30, ptr %28, align 4, !tbaa !14
  br label %31

31:                                               ; preds = %22, %24, %26
  %32 = tail call i32 @USB_FlushTxFifo(ptr noundef nonnull %0, i32 noundef 16)
  %33 = tail call i32 @USB_FlushRxFifo(ptr noundef nonnull %0)
  %34 = getelementptr inbounds i8, ptr %1, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !16
  %.fr = freeze i32 %35
  %.not29 = icmp eq i32 %.fr, 0
  br i1 %.not29, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %31
  %36 = add nuw nsw i64 %4, 1280
  %wide.trip.count = zext i32 %.fr to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %37 = icmp ult i32 %.fr, 4
  br i1 %37, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %38

38:                                               ; preds = %38, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %38 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %38 ]
  %39 = shl nuw nsw i64 %indvars.iv, 5
  %40 = add nuw nsw i64 %36, %39
  %41 = inttoptr i64 %40 to ptr
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  store volatile i32 -1, ptr %42, align 4, !tbaa !17
  %43 = getelementptr inbounds i8, ptr %41, i64 12
  store volatile i32 0, ptr %43, align 4, !tbaa !19
  %indvars.iv.next = shl i64 %indvars.iv, 5
  %44 = or disjoint i64 %indvars.iv.next, 32
  %45 = add nuw nsw i64 %36, %44
  %46 = inttoptr i64 %45 to ptr
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  store volatile i32 -1, ptr %47, align 4, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %46, i64 12
  store volatile i32 0, ptr %48, align 4, !tbaa !19
  %indvars.iv.next.1 = shl i64 %indvars.iv, 5
  %49 = or disjoint i64 %indvars.iv.next.1, 64
  %50 = add nuw nsw i64 %36, %49
  %51 = inttoptr i64 %50 to ptr
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  store volatile i32 -1, ptr %52, align 4, !tbaa !17
  %53 = getelementptr inbounds i8, ptr %51, i64 12
  store volatile i32 0, ptr %53, align 4, !tbaa !19
  %indvars.iv.next.2 = shl i64 %indvars.iv, 5
  %54 = or disjoint i64 %indvars.iv.next.2, 96
  %55 = add nuw nsw i64 %36, %54
  %56 = inttoptr i64 %55 to ptr
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  store volatile i32 -1, ptr %57, align 4, !tbaa !17
  %58 = getelementptr inbounds i8, ptr %56, i64 12
  store volatile i32 0, ptr %58, align 4, !tbaa !19
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %38, !llvm.loop !20

._crit_edge.loopexit.unr-lcssa:                   ; preds = %38, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %38 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %59 = shl nuw nsw i64 %indvars.iv.epil, 5
  %60 = add nuw nsw i64 %36, %59
  %61 = inttoptr i64 %60 to ptr
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  store volatile i32 -1, ptr %62, align 4, !tbaa !17
  %63 = getelementptr inbounds i8, ptr %61, i64 12
  store volatile i32 0, ptr %63, align 4, !tbaa !19
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !22

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %31
  %64 = tail call i32 @USB_DriveVbus(ptr noundef %0, i8 noundef zeroext 1)
  tail call void @HAL_Delay(i32 noundef 200) #2
  %65 = getelementptr inbounds i8, ptr %0, i64 24
  store volatile i32 0, ptr %65, align 4, !tbaa !24
  %66 = getelementptr inbounds i8, ptr %0, i64 20
  store volatile i32 -1, ptr %66, align 4, !tbaa !25
  %67 = load volatile i32, ptr %12, align 4, !tbaa !11
  %68 = and i32 %67, 256
  %.not27 = icmp eq i32 %68, 0
  %69 = getelementptr inbounds i8, ptr %0, i64 36
  %70 = getelementptr inbounds i8, ptr %0, i64 40
  %71 = getelementptr inbounds i8, ptr %0, i64 256
  %. = select i1 %.not27, i32 128, i32 512
  %.33 = select i1 %.not27, i32 6291584, i32 16777728
  %.34 = select i1 %.not27, i32 4194528, i32 14680832
  store volatile i32 %., ptr %69, align 4, !tbaa !26
  store volatile i32 %.33, ptr %70, align 4, !tbaa !27
  store volatile i32 %.34, ptr %71, align 4, !tbaa !28
  %72 = getelementptr inbounds i8, ptr %1, i64 12
  %73 = load i32, ptr %72, align 4, !tbaa !29
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %78

75:                                               ; preds = %._crit_edge
  %76 = load volatile i32, ptr %65, align 4, !tbaa !24
  %77 = or i32 %76, 16
  store volatile i32 %77, ptr %65, align 4, !tbaa !24
  br label %78

78:                                               ; preds = %75, %._crit_edge
  %79 = load volatile i32, ptr %65, align 4, !tbaa !24
  %80 = or i32 %79, -1558183928
  store volatile i32 %80, ptr %65, align 4, !tbaa !24
  ret i32 0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @USB_DriveVbus(ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

attributes #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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 56}
!10 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !7, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !7, i64 100, !6, i64 256, !7, i64 260}
!11 = !{!10, !6, i64 60}
!12 = !{!13, !6, i64 8}
!13 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48}
!14 = !{!15, !6, i64 0}
!15 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24}
!16 = !{!13, !6, i64 4}
!17 = !{!18, !6, i64 8}
!18 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !7, i64 24}
!19 = !{!18, !6, i64 12}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = !{!10, !6, i64 24}
!25 = !{!10, !6, i64 20}
!26 = !{!10, !6, i64 36}
!27 = !{!10, !6, i64 40}
!28 = !{!10, !6, i64 256}
!29 = !{!13, !6, i64 12}


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