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

; 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.PCD_HandleTypeDef = type { ptr, %struct.USB_OTG_CfgTypeDef, i8, [16 x %struct.USB_OTG_EPTypeDef], [16 x %struct.USB_OTG_EPTypeDef], i32, i32, i32, [12 x i32], i32, i32, i32, i32, ptr }
%struct.USB_OTG_CfgTypeDef = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.USB_OTG_EPTypeDef = type { i8, i8, i8, i8, i8, i8, i16, i32, ptr, 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] }

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_PCD_Init(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %1
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %190

10:                                               ; preds = %1
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %13, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %14, i32 0, i32 6
  %16 = load volatile i32, ptr %15, align 4, !tbaa !13
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %22

18:                                               ; preds = %10
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %19, i32 0, i32 5
  store i32 0, ptr %20, align 8, !tbaa !14
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  call void @HAL_PCD_MspInit(ptr noundef %21)
  br label %22

22:                                               ; preds = %18, %10
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %23, i32 0, i32 6
  store volatile i32 3, ptr %24, align 4, !tbaa !13
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.USB_OTG_GlobalTypeDef, ptr %25, i32 0, i32 14
  %27 = load volatile i32, ptr %26, align 4, !tbaa !15
  %28 = and i32 %27, 256
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %34

30:                                               ; preds = %22
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %32, i32 0, i32 3
  store i32 0, ptr %33, align 4, !tbaa !17
  br label %34

34:                                               ; preds = %30, %22
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = call i32 @USB_DisableGlobalInt(ptr noundef %37)
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %42, i32 0, i32 1
  %44 = call i32 @USB_CoreInit(ptr noundef %41, ptr noundef byval(%struct.USB_OTG_CfgTypeDef) align 8 %43)
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %49

46:                                               ; preds = %34
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %47, i32 0, i32 6
  store volatile i32 2, ptr %48, align 4, !tbaa !13
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %190

49:                                               ; preds = %34
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = call i32 @USB_SetCurrentMode(ptr noundef %52, i32 noundef 0)
  store i8 0, ptr %5, align 1, !tbaa !18
  br label %54

54:                                               ; preds = %108, %49
  %55 = load i8, ptr %5, align 1, !tbaa !18
  %56 = zext i8 %55 to i32
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %57, i32 0, i32 1
  %59 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !19
  %61 = icmp ult i32 %56, %60
  br i1 %61, label %62, label %111

62:                                               ; preds = %54
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %63, i32 0, i32 3
  %65 = load i8, ptr %5, align 1, !tbaa !18
  %66 = zext i8 %65 to i64
  %67 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %64, i64 0, i64 %66
  %68 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %67, i32 0, i32 1
  store i8 1, ptr %68, align 1, !tbaa !20
  %69 = load i8, ptr %5, align 1, !tbaa !18
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %70, i32 0, i32 3
  %72 = load i8, ptr %5, align 1, !tbaa !18
  %73 = zext i8 %72 to i64
  %74 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %71, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %74, i32 0, i32 0
  store i8 %69, ptr %75, align 8, !tbaa !23
  %76 = load i8, ptr %5, align 1, !tbaa !18
  %77 = zext i8 %76 to i16
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %78, i32 0, i32 3
  %80 = load i8, ptr %5, align 1, !tbaa !18
  %81 = zext i8 %80 to i64
  %82 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %79, i64 0, i64 %81
  %83 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %82, i32 0, i32 6
  store i16 %77, ptr %83, align 2, !tbaa !24
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %84, i32 0, i32 3
  %86 = load i8, ptr %5, align 1, !tbaa !18
  %87 = zext i8 %86 to i64
  %88 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %85, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %88, i32 0, i32 3
  store i8 0, ptr %89, align 1, !tbaa !25
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %90, i32 0, i32 3
  %92 = load i8, ptr %5, align 1, !tbaa !18
  %93 = zext i8 %92 to i64
  %94 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %91, i64 0, i64 %93
  %95 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %94, i32 0, i32 7
  store i32 0, ptr %95, align 8, !tbaa !26
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %96, i32 0, i32 3
  %98 = load i8, ptr %5, align 1, !tbaa !18
  %99 = zext i8 %98 to i64
  %100 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %97, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %100, i32 0, i32 8
  store ptr null, ptr %101, align 8, !tbaa !27
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %102, i32 0, i32 3
  %104 = load i8, ptr %5, align 1, !tbaa !18
  %105 = zext i8 %104 to i64
  %106 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %103, i64 0, i64 %105
  %107 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %106, i32 0, i32 10
  store i32 0, ptr %107, align 4, !tbaa !28
  br label %108

108:                                              ; preds = %62
  %109 = load i8, ptr %5, align 1, !tbaa !18
  %110 = add i8 %109, 1
  store i8 %110, ptr %5, align 1, !tbaa !18
  br label %54, !llvm.loop !29

111:                                              ; preds = %54
  store i8 0, ptr %5, align 1, !tbaa !18
  br label %112

112:                                              ; preds = %158, %111
  %113 = load i8, ptr %5, align 1, !tbaa !18
  %114 = zext i8 %113 to i32
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %115, i32 0, i32 1
  %117 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !19
  %119 = icmp ult i32 %114, %118
  br i1 %119, label %120, label %161

120:                                              ; preds = %112
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %121, i32 0, i32 4
  %123 = load i8, ptr %5, align 1, !tbaa !18
  %124 = zext i8 %123 to i64
  %125 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %122, i64 0, i64 %124
  %126 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %125, i32 0, i32 1
  store i8 0, ptr %126, align 1, !tbaa !20
  %127 = load i8, ptr %5, align 1, !tbaa !18
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %128, i32 0, i32 4
  %130 = load i8, ptr %5, align 1, !tbaa !18
  %131 = zext i8 %130 to i64
  %132 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %129, i64 0, i64 %131
  %133 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %132, i32 0, i32 0
  store i8 %127, ptr %133, align 8, !tbaa !23
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %134, i32 0, i32 4
  %136 = load i8, ptr %5, align 1, !tbaa !18
  %137 = zext i8 %136 to i64
  %138 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %135, i64 0, i64 %137
  %139 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %138, i32 0, i32 3
  store i8 0, ptr %139, align 1, !tbaa !25
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %140, i32 0, i32 4
  %142 = load i8, ptr %5, align 1, !tbaa !18
  %143 = zext i8 %142 to i64
  %144 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %141, i64 0, i64 %143
  %145 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %144, i32 0, i32 7
  store i32 0, ptr %145, align 8, !tbaa !26
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %146, i32 0, i32 4
  %148 = load i8, ptr %5, align 1, !tbaa !18
  %149 = zext i8 %148 to i64
  %150 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %147, i64 0, i64 %149
  %151 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %150, i32 0, i32 8
  store ptr null, ptr %151, align 8, !tbaa !27
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %152, i32 0, i32 4
  %154 = load i8, ptr %5, align 1, !tbaa !18
  %155 = zext i8 %154 to i64
  %156 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %153, i64 0, i64 %155
  %157 = getelementptr inbounds %struct.USB_OTG_EPTypeDef, ptr %156, i32 0, i32 10
  store i32 0, ptr %157, align 4, !tbaa !28
  br label %158

158:                                              ; preds = %120
  %159 = load i8, ptr %5, align 1, !tbaa !18
  %160 = add i8 %159, 1
  store i8 %160, ptr %5, align 1, !tbaa !18
  br label %112, !llvm.loop !31

161:                                              ; preds = %112
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !9
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %165, i32 0, i32 1
  %167 = call i32 @USB_DevInit(ptr noundef %164, ptr noundef byval(%struct.USB_OTG_CfgTypeDef) align 8 %166)
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %172

169:                                              ; preds = %161
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %170, i32 0, i32 6
  store volatile i32 2, ptr %171, align 4, !tbaa !13
  store i32 1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %190

172:                                              ; preds = %161
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %173, i32 0, i32 2
  store volatile i8 0, ptr %174, align 4, !tbaa !32
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %175, i32 0, i32 6
  store volatile i32 1, ptr %176, align 4, !tbaa !13
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %177, i32 0, i32 1
  %179 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %178, i32 0, i32 8
  %180 = load i32, ptr %179, align 8, !tbaa !33
  %181 = icmp eq i32 %180, 1
  br i1 %181, label %182, label %185

182:                                              ; preds = %172
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = call i32 @HAL_PCDEx_ActivateLPM(ptr noundef %183)
  br label %185

185:                                              ; preds = %182, %172
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.PCD_HandleTypeDef, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !9
  %189 = call i32 @USB_DevDisconnect(ptr noundef %188)
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %190

190:                                              ; preds = %185, %169, %46, %9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %191 = load i32, ptr %2, align 4
  ret i32 %191
}

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

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

declare i32 @USB_DisableGlobalInt(ptr noundef) #2

declare i32 @USB_CoreInit(ptr noundef, ptr noundef byval(%struct.USB_OTG_CfgTypeDef) align 8) #2

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

declare i32 @USB_DevInit(ptr noundef, ptr noundef byval(%struct.USB_OTG_CfgTypeDef) align 8) #2

declare i32 @HAL_PCDEx_ActivateLPM(ptr noundef) #2

declare i32 @USB_DevDisconnect(ptr noundef) #2

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!10 = !{!"", !6, i64 0, !11, i64 8, !7, i64 60, !7, i64 64, !7, i64 704, !12, i64 1344, !12, i64 1348, !12, i64 1352, !7, i64 1356, !12, i64 1404, !12, i64 1408, !12, i64 1412, !12, i64 1416, !6, i64 1424}
!11 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !12, i64 1348}
!14 = !{!10, !12, i64 1344}
!15 = !{!16, !12, i64 60}
!16 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !7, i64 48, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !7, i64 100, !12, i64 256, !7, i64 260}
!17 = !{!10, !12, i64 20}
!18 = !{!7, !7, i64 0}
!19 = !{!10, !12, i64 8}
!20 = !{!21, !7, i64 1}
!21 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !22, i64 6, !12, i64 8, !6, i64 16, !12, i64 24, !12, i64 28, !12, i64 32}
!22 = !{!"short", !7, i64 0}
!23 = !{!21, !7, i64 0}
!24 = !{!21, !22, i64 6}
!25 = !{!21, !7, i64 3}
!26 = !{!21, !12, i64 8}
!27 = !{!21, !6, i64 16}
!28 = !{!21, !12, i64 28}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!10, !7, i64 60}
!33 = !{!10, !12, i64 40}


; 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 }
%struct.USB_OTG_EPTypeDef = type { i8, i8, i8, i8, i8, i8, i16, i32, ptr, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @HAL_PCD_Init(ptr noundef %0) local_unnamed_addr #0 {
  %2 = icmp eq ptr %0, null
  br i1 %2, label %67, label %3

3:                                                ; preds = %1
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 1348
  %6 = load volatile i32, ptr %5, align 4, !tbaa !12
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %8, label %10

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %0, i64 1344
  store i32 0, ptr %9, align 8, !tbaa !13
  tail call void @HAL_PCD_MspInit(ptr noundef nonnull %0)
  br label %10

10:                                               ; preds = %8, %3
  store volatile i32 3, ptr %5, align 4, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %4, i64 60
  %12 = load volatile i32, ptr %11, align 4, !tbaa !14
  %13 = and i32 %12, 256
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 0, ptr %16, align 4, !tbaa !16
  br label %17

17:                                               ; preds = %15, %10
  %18 = load ptr, ptr %0, align 8, !tbaa !5
  %19 = tail call i32 @USB_DisableGlobalInt(ptr noundef %18) #2
  %20 = load ptr, ptr %0, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = tail call i32 @USB_CoreInit(ptr noundef %20, ptr noundef nonnull byval(%struct.USB_OTG_CfgTypeDef) align 8 %21) #2
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %24, label %23

23:                                               ; preds = %17
  store volatile i32 2, ptr %5, align 4, !tbaa !12
  br label %67

24:                                               ; preds = %17
  %25 = load ptr, ptr %0, align 8, !tbaa !5
  %26 = tail call i32 @USB_SetCurrentMode(ptr noundef %25, i32 noundef 0) #2
  %27 = load i32, ptr %21, align 8, !tbaa !17
  %.not62 = icmp eq i32 %27, 0
  br i1 %.not62, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %24
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  br label %30

.lr.ph61:                                         ; preds = %30
  %29 = getelementptr inbounds i8, ptr %0, i64 704
  br label %43

30:                                               ; preds = %.lr.ph, %30
  %.059 = phi i8 [ 0, %.lr.ph ], [ %40, %30 ]
  %31 = zext i8 %.059 to i64
  %32 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %28, i64 0, i64 %31
  %33 = getelementptr inbounds i8, ptr %32, i64 1
  store i8 1, ptr %33, align 1, !tbaa !18
  store i8 %.059, ptr %32, align 8, !tbaa !21
  %34 = zext i8 %.059 to i16
  %35 = getelementptr inbounds i8, ptr %32, i64 6
  store i16 %34, ptr %35, align 2, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %32, i64 3
  store i8 0, ptr %36, align 1, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %32, i64 8
  store i32 0, ptr %37, align 8, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %32, i64 16
  store ptr null, ptr %38, align 8, !tbaa !25
  %39 = getelementptr inbounds i8, ptr %32, i64 28
  store i32 0, ptr %39, align 4, !tbaa !26
  %40 = add i8 %.059, 1
  %41 = zext i8 %40 to i32
  %42 = icmp ugt i32 %27, %41
  br i1 %42, label %30, label %.lr.ph61, !llvm.loop !27

43:                                               ; preds = %.lr.ph61, %43
  %.160 = phi i8 [ 0, %.lr.ph61 ], [ %51, %43 ]
  %44 = zext i8 %.160 to i64
  %45 = getelementptr inbounds [16 x %struct.USB_OTG_EPTypeDef], ptr %29, i64 0, i64 %44
  %46 = getelementptr inbounds i8, ptr %45, i64 1
  store i8 0, ptr %46, align 1, !tbaa !18
  store i8 %.160, ptr %45, align 8, !tbaa !21
  %47 = getelementptr inbounds i8, ptr %45, i64 3
  store i8 0, ptr %47, align 1, !tbaa !23
  %48 = getelementptr inbounds i8, ptr %45, i64 8
  store i32 0, ptr %48, align 8, !tbaa !24
  %49 = getelementptr inbounds i8, ptr %45, i64 16
  store ptr null, ptr %49, align 8, !tbaa !25
  %50 = getelementptr inbounds i8, ptr %45, i64 28
  store i32 0, ptr %50, align 4, !tbaa !26
  %51 = add i8 %.160, 1
  %52 = zext i8 %51 to i32
  %53 = icmp ugt i32 %27, %52
  br i1 %53, label %43, label %._crit_edge, !llvm.loop !29

._crit_edge:                                      ; preds = %43, %24
  %54 = load ptr, ptr %0, align 8, !tbaa !5
  %55 = tail call i32 @USB_DevInit(ptr noundef %54, ptr noundef nonnull byval(%struct.USB_OTG_CfgTypeDef) align 8 %21) #2
  %.not58 = icmp eq i32 %55, 0
  br i1 %.not58, label %57, label %56

56:                                               ; preds = %._crit_edge
  store volatile i32 2, ptr %5, align 4, !tbaa !12
  br label %67

57:                                               ; preds = %._crit_edge
  %58 = getelementptr inbounds i8, ptr %0, i64 60
  store volatile i8 0, ptr %58, align 4, !tbaa !30
  store volatile i32 1, ptr %5, align 4, !tbaa !12
  %59 = getelementptr inbounds i8, ptr %0, i64 40
  %60 = load i32, ptr %59, align 8, !tbaa !31
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = tail call i32 @HAL_PCDEx_ActivateLPM(ptr noundef nonnull %0) #2
  br label %64

64:                                               ; preds = %62, %57
  %65 = load ptr, ptr %0, align 8, !tbaa !5
  %66 = tail call i32 @USB_DevDisconnect(ptr noundef %65) #2
  br label %67

67:                                               ; preds = %1, %64, %56, %23
  %.056 = phi i32 [ 1, %23 ], [ 1, %56 ], [ 0, %64 ], [ 1, %1 ]
  ret i32 %.056
}

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

declare i32 @USB_DisableGlobalInt(ptr noundef) local_unnamed_addr #1

declare i32 @USB_CoreInit(ptr noundef, ptr noundef byval(%struct.USB_OTG_CfgTypeDef) align 8) local_unnamed_addr #1

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

declare i32 @USB_DevInit(ptr noundef, ptr noundef byval(%struct.USB_OTG_CfgTypeDef) align 8) local_unnamed_addr #1

declare i32 @HAL_PCDEx_ActivateLPM(ptr noundef) local_unnamed_addr #1

declare i32 @USB_DevDisconnect(ptr noundef) local_unnamed_addr #1

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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !8, i64 60, !8, i64 64, !8, i64 704, !11, i64 1344, !11, i64 1348, !11, i64 1352, !8, i64 1356, !11, i64 1404, !11, i64 1408, !11, i64 1412, !11, i64 1416, !7, i64 1424}
!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, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !11, i64 1348}
!13 = !{!6, !11, i64 1344}
!14 = !{!15, !11, i64 60}
!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, !8, i64 48, !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, !8, i64 100, !11, i64 256, !8, i64 260}
!16 = !{!6, !11, i64 20}
!17 = !{!6, !11, i64 8}
!18 = !{!19, !8, i64 1}
!19 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !20, i64 6, !11, i64 8, !7, i64 16, !11, i64 24, !11, i64 28, !11, i64 32}
!20 = !{!"short", !8, i64 0}
!21 = !{!19, !8, i64 0}
!22 = !{!19, !20, i64 6}
!23 = !{!19, !8, i64 3}
!24 = !{!19, !11, i64 8}
!25 = !{!19, !7, i64 16}
!26 = !{!19, !11, i64 28}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = !{!6, !8, i64 60}
!31 = !{!6, !11, i64 40}


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