; LLVM IR from lichen-community-systems/signaletic :: hosts/daisy/vendor/libDaisy/Middlewares/ST/STM32_USB_Host_Library/Class/MSC_ (Inquiry)

; 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._USBH_HandleTypeDef = type { i32, i32, i32, %struct.USBH_CtrlTypeDef, %struct.USBH_DeviceTypeDef, [1 x ptr], ptr, i32, [16 x i32], i32, i32, i8, ptr, ptr }
%struct.USBH_CtrlTypeDef = type { i8, i8, i8, ptr, i16, i16, %union._USB_Setup, i32, i8 }
%union._USB_Setup = type { [2 x i32] }
%struct.USBH_DeviceTypeDef = type { [256 x i8], [512 x i8], i8, i8, i8, i8, i8, i8, i8, i8, i8, %struct._DeviceDescriptor, %struct._ConfigurationDescriptor }
%struct._DeviceDescriptor = type { i8, i8, i16, i8, i8, i8, i8, i16, i16, i16, i8, i8, i8, i8 }
%struct._ConfigurationDescriptor = type { i8, i8, i16, i8, i8, i8, i8, i8, [2 x %struct._InterfaceDescriptor] }
%struct._InterfaceDescriptor = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, [2 x %struct._EndpointDescriptor] }
%struct._EndpointDescriptor = type { i8, i8, i8, i8, i16, i8 }
%struct.USBH_ClassTypeDef = type { ptr, i8, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._MSC_Process = type { i8, [3 x i8], i8, i8, i8, i8, i16, i16, i32, i32, i32, i32, %struct.BOT_HandleTypeDef, [2 x %struct.MSC_LUNTypeDef], i16, i16, i32 }
%struct.BOT_HandleTypeDef = type { [16 x i32], i32, i32, i32, %union.BOT_CBWTypeDef, i8, %union.BOT_CSWTypeDef, [3 x i8], ptr }
%union.BOT_CBWTypeDef = type { %struct.__CBW }
%struct.__CBW = type { i32, i32, i32, i8, i8, i8, [16 x i8] }
%union.BOT_CSWTypeDef = type { %struct.__CSW }
%struct.__CSW = type { i32, i32, i32, i8 }
%struct.MSC_LUNTypeDef = type { i32, i32, i32, %struct.SCSI_CapacityTypeDef, %struct.SCSI_SenseTypeDef, %struct.SCSI_StdInquiryDataTypeDef, i8 }
%struct.SCSI_CapacityTypeDef = type { i32, i16 }
%struct.SCSI_SenseTypeDef = type { i8, i8, i8 }
%struct.SCSI_StdInquiryDataTypeDef = type { i8, i8, i8, [9 x i8], [17 x i8], [5 x i8] }

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare i32 @USBH_MSC_BOT_Process(ptr noundef, i8 noundef zeroext) #2

; 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 @USBH_MSC_SCSI_Inquiry(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i8 %1, ptr %5, align 1, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 2, ptr %7, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %9, i32 0, i32 6
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %12 = getelementptr inbounds %struct.USBH_ClassTypeDef, ptr %11, i32 0, i32 7
  %13 = load ptr, ptr %12, align 8, !tbaa !19
  store ptr %13, ptr %8, align 8, !tbaa !5
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._MSC_Process, ptr %14, i32 0, i32 12
  %16 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %15, i32 0, i32 3
  %17 = load i32, ptr %16, align 8, !tbaa !21
  switch i32 %17, label %154 [
    i32 1, label %18
    i32 2, label %83
  ]

18:                                               ; preds = %3
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._MSC_Process, ptr %19, i32 0, i32 12
  %21 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %20, i32 0, i32 4
  %22 = getelementptr inbounds %struct.__CBW, ptr %21, i32 0, i32 2
  store i32 36, ptr %22, align 4, !tbaa !9
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._MSC_Process, ptr %23, i32 0, i32 12
  %25 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %24, i32 0, i32 4
  %26 = getelementptr inbounds %struct.__CBW, ptr %25, i32 0, i32 3
  store i8 -128, ptr %26, align 4, !tbaa !9
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._MSC_Process, ptr %27, i32 0, i32 12
  %29 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %28, i32 0, i32 4
  %30 = getelementptr inbounds %struct.__CBW, ptr %29, i32 0, i32 5
  store i8 10, ptr %30, align 2, !tbaa !9
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._MSC_Process, ptr %31, i32 0, i32 12
  %33 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %32, i32 0, i32 4
  %34 = getelementptr inbounds %struct.__CBW, ptr %33, i32 0, i32 6
  %35 = getelementptr inbounds [16 x i8], ptr %34, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %35, i8 0, i64 10, i1 false)
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._MSC_Process, ptr %36, i32 0, i32 12
  %38 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %37, i32 0, i32 4
  %39 = getelementptr inbounds %struct.__CBW, ptr %38, i32 0, i32 6
  %40 = getelementptr inbounds [16 x i8], ptr %39, i64 0, i64 0
  store i8 18, ptr %40, align 1, !tbaa !9
  %41 = load i8, ptr %5, align 1, !tbaa !9
  %42 = zext i8 %41 to i32
  %43 = shl i32 %42, 5
  %44 = trunc i32 %43 to i8
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._MSC_Process, ptr %45, i32 0, i32 12
  %47 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %46, i32 0, i32 4
  %48 = getelementptr inbounds %struct.__CBW, ptr %47, i32 0, i32 6
  %49 = getelementptr inbounds [16 x i8], ptr %48, i64 0, i64 1
  store i8 %44, ptr %49, align 1, !tbaa !9
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._MSC_Process, ptr %50, i32 0, i32 12
  %52 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %51, i32 0, i32 4
  %53 = getelementptr inbounds %struct.__CBW, ptr %52, i32 0, i32 6
  %54 = getelementptr inbounds [16 x i8], ptr %53, i64 0, i64 2
  store i8 0, ptr %54, align 1, !tbaa !9
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._MSC_Process, ptr %55, i32 0, i32 12
  %57 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %56, i32 0, i32 4
  %58 = getelementptr inbounds %struct.__CBW, ptr %57, i32 0, i32 6
  %59 = getelementptr inbounds [16 x i8], ptr %58, i64 0, i64 3
  store i8 0, ptr %59, align 1, !tbaa !9
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._MSC_Process, ptr %60, i32 0, i32 12
  %62 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %61, i32 0, i32 4
  %63 = getelementptr inbounds %struct.__CBW, ptr %62, i32 0, i32 6
  %64 = getelementptr inbounds [16 x i8], ptr %63, i64 0, i64 4
  store i8 36, ptr %64, align 1, !tbaa !9
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._MSC_Process, ptr %65, i32 0, i32 12
  %67 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %66, i32 0, i32 4
  %68 = getelementptr inbounds %struct.__CBW, ptr %67, i32 0, i32 6
  %69 = getelementptr inbounds [16 x i8], ptr %68, i64 0, i64 5
  store i8 0, ptr %69, align 1, !tbaa !9
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._MSC_Process, ptr %70, i32 0, i32 12
  %72 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %71, i32 0, i32 1
  store i32 1, ptr %72, align 8, !tbaa !24
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._MSC_Process, ptr %73, i32 0, i32 12
  %75 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %74, i32 0, i32 3
  store i32 2, ptr %75, align 8, !tbaa !21
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._MSC_Process, ptr %76, i32 0, i32 12
  %78 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds [16 x i32], ptr %78, i64 0, i64 0
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._MSC_Process, ptr %80, i32 0, i32 12
  %82 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %81, i32 0, i32 8
  store ptr %79, ptr %82, align 8, !tbaa !25
  store i32 1, ptr %7, align 4, !tbaa !10
  br label %155

83:                                               ; preds = %3
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load i8, ptr %5, align 1, !tbaa !9
  %86 = call i32 @USBH_MSC_BOT_Process(ptr noundef %84, i8 noundef zeroext %85)
  store i32 %86, ptr %7, align 4, !tbaa !10
  %87 = load i32, ptr %7, align 4, !tbaa !10
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %153

89:                                               ; preds = %83
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 1 %90, i8 0, i64 34, i1 false)
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._MSC_Process, ptr %91, i32 0, i32 12
  %93 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %92, i32 0, i32 8
  %94 = load ptr, ptr %93, align 8, !tbaa !25
  %95 = getelementptr inbounds i8, ptr %94, i64 0
  %96 = load i8, ptr %95, align 1, !tbaa !9
  %97 = zext i8 %96 to i32
  %98 = and i32 %97, 31
  %99 = trunc i32 %98 to i8
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.SCSI_StdInquiryDataTypeDef, ptr %100, i32 0, i32 1
  store i8 %99, ptr %101, align 1, !tbaa !26
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._MSC_Process, ptr %102, i32 0, i32 12
  %104 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %103, i32 0, i32 8
  %105 = load ptr, ptr %104, align 8, !tbaa !25
  %106 = getelementptr inbounds i8, ptr %105, i64 0
  %107 = load i8, ptr %106, align 1, !tbaa !9
  %108 = zext i8 %107 to i32
  %109 = ashr i32 %108, 5
  %110 = trunc i32 %109 to i8
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.SCSI_StdInquiryDataTypeDef, ptr %111, i32 0, i32 0
  store i8 %110, ptr %112, align 1, !tbaa !28
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._MSC_Process, ptr %113, i32 0, i32 12
  %115 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %114, i32 0, i32 8
  %116 = load ptr, ptr %115, align 8, !tbaa !25
  %117 = getelementptr inbounds i8, ptr %116, i64 1
  %118 = load i8, ptr %117, align 1, !tbaa !9
  %119 = zext i8 %118 to i32
  %120 = and i32 %119, 128
  %121 = icmp eq i32 %120, 128
  br i1 %121, label %122, label %125

122:                                              ; preds = %89
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.SCSI_StdInquiryDataTypeDef, ptr %123, i32 0, i32 2
  store i8 1, ptr %124, align 1, !tbaa !29
  br label %128

125:                                              ; preds = %89
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.SCSI_StdInquiryDataTypeDef, ptr %126, i32 0, i32 2
  store i8 0, ptr %127, align 1, !tbaa !29
  br label %128

128:                                              ; preds = %125, %122
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.SCSI_StdInquiryDataTypeDef, ptr %129, i32 0, i32 3
  %131 = getelementptr inbounds [9 x i8], ptr %130, i64 0, i64 0
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._MSC_Process, ptr %132, i32 0, i32 12
  %134 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %133, i32 0, i32 8
  %135 = load ptr, ptr %134, align 8, !tbaa !25
  %136 = getelementptr inbounds i8, ptr %135, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %131, ptr align 1 %136, i64 8, i1 false)
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.SCSI_StdInquiryDataTypeDef, ptr %137, i32 0, i32 4
  %139 = getelementptr inbounds [17 x i8], ptr %138, i64 0, i64 0
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._MSC_Process, ptr %140, i32 0, i32 12
  %142 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %141, i32 0, i32 8
  %143 = load ptr, ptr %142, align 8, !tbaa !25
  %144 = getelementptr inbounds i8, ptr %143, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %139, ptr align 1 %144, i64 16, i1 false)
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.SCSI_StdInquiryDataTypeDef, ptr %145, i32 0, i32 5
  %147 = getelementptr inbounds [5 x i8], ptr %146, i64 0, i64 0
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._MSC_Process, ptr %148, i32 0, i32 12
  %150 = getelementptr inbounds %struct.BOT_HandleTypeDef, ptr %149, i32 0, i32 8
  %151 = load ptr, ptr %150, align 8, !tbaa !25
  %152 = getelementptr inbounds i8, ptr %151, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %147, ptr align 1 %152, i64 4, i1 false)
  br label %153

153:                                              ; preds = %128, %83
  br label %155

154:                                              ; preds = %3
  br label %155

155:                                              ; preds = %154, %153, %18
  %156 = load i32, ptr %7, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret i32 %156
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 928}
!13 = !{!"_USBH_HandleTypeDef", !11, i64 0, !11, i64 4, !11, i64 8, !14, i64 16, !16, i64 56, !7, i64 920, !6, i64 928, !11, i64 936, !7, i64 940, !11, i64 1004, !11, i64 1008, !7, i64 1012, !6, i64 1016, !6, i64 1024}
!14 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !6, i64 8, !15, i64 16, !15, i64 18, !7, i64 20, !11, i64 28, !7, i64 32}
!15 = !{!"short", !7, i64 0}
!16 = !{!"", !7, i64 0, !7, i64 256, !7, i64 768, !7, i64 769, !7, i64 770, !7, i64 771, !7, i64 772, !7, i64 773, !7, i64 774, !7, i64 775, !7, i64 776, !17, i64 778, !18, i64 796}
!17 = !{!"_DeviceDescriptor", !7, i64 0, !7, i64 1, !15, i64 2, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !15, i64 8, !15, i64 10, !15, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17}
!18 = !{!"_ConfigurationDescriptor", !7, i64 0, !7, i64 1, !15, i64 2, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 10}
!19 = !{!20, !6, i64 56}
!20 = !{!"", !6, i64 0, !7, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!21 = !{!22, !11, i64 104}
!22 = !{!"_MSC_Process", !7, i64 0, !7, i64 1, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !15, i64 8, !15, i64 10, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !23, i64 32, !7, i64 176, !15, i64 296, !15, i64 298, !11, i64 300}
!23 = !{!"", !7, i64 0, !11, i64 64, !11, i64 68, !11, i64 72, !7, i64 76, !7, i64 108, !7, i64 112, !7, i64 128, !6, i64 136}
!24 = !{!22, !11, i64 96}
!25 = !{!22, !6, i64 168}
!26 = !{!27, !7, i64 1}
!27 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 12, !7, i64 29}
!28 = !{!27, !7, i64 0}
!29 = !{!27, !7, i64 2}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

declare i32 @USBH_MSC_BOT_Process(ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @USBH_MSC_SCSI_Inquiry(ptr noundef %0, i8 noundef zeroext %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 928
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 56
  %7 = load ptr, ptr %6, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %7, i64 104
  %9 = load i32, ptr %8, align 8, !tbaa !18
  switch i32 %9, label %46 [
    i32 1, label %10
    i32 2, label %22
  ]

10:                                               ; preds = %3
  %11 = getelementptr inbounds i8, ptr %7, i64 32
  %12 = getelementptr inbounds i8, ptr %7, i64 116
  store i32 36, ptr %12, align 4, !tbaa !21
  %13 = getelementptr inbounds i8, ptr %7, i64 120
  store i8 -128, ptr %13, align 4, !tbaa !21
  %14 = getelementptr inbounds i8, ptr %7, i64 122
  store i8 10, ptr %14, align 2, !tbaa !21
  %15 = getelementptr inbounds i8, ptr %7, i64 123
  %16 = getelementptr inbounds i8, ptr %7, i64 129
  store i32 0, ptr %16, align 1
  store i8 18, ptr %15, align 1, !tbaa !21
  %17 = shl i8 %1, 5
  %18 = getelementptr inbounds i8, ptr %7, i64 124
  store i8 %17, ptr %18, align 1, !tbaa !21
  %19 = getelementptr inbounds i8, ptr %7, i64 125
  store <4 x i8> <i8 0, i8 0, i8 36, i8 0>, ptr %19, align 1, !tbaa !21
  %20 = getelementptr inbounds i8, ptr %7, i64 96
  store i32 1, ptr %20, align 8, !tbaa !22
  store i32 2, ptr %8, align 8, !tbaa !18
  %21 = getelementptr inbounds i8, ptr %7, i64 168
  store ptr %11, ptr %21, align 8, !tbaa !23
  br label %46

22:                                               ; preds = %3
  %23 = tail call i32 @USBH_MSC_BOT_Process(ptr noundef nonnull %0, i8 noundef zeroext %1) #4
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %46

25:                                               ; preds = %22
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(34) %2, i8 0, i64 34, i1 false)
  %26 = getelementptr inbounds i8, ptr %7, i64 168
  %27 = load ptr, ptr %26, align 8, !tbaa !23
  %28 = load i8, ptr %27, align 1, !tbaa !21
  %29 = and i8 %28, 31
  %30 = getelementptr inbounds i8, ptr %2, i64 1
  store i8 %29, ptr %30, align 1, !tbaa !24
  %31 = load i8, ptr %27, align 1, !tbaa !21
  %32 = lshr i8 %31, 5
  store i8 %32, ptr %2, align 1, !tbaa !26
  %33 = getelementptr inbounds i8, ptr %27, i64 1
  %34 = load i8, ptr %33, align 1, !tbaa !21
  %.lobit = lshr i8 %34, 7
  %35 = getelementptr inbounds i8, ptr %2, i64 2
  store i8 %.lobit, ptr %35, align 1
  %36 = getelementptr inbounds i8, ptr %2, i64 3
  %37 = getelementptr inbounds i8, ptr %27, i64 8
  %38 = load i64, ptr %37, align 1
  store i64 %38, ptr %36, align 1
  %39 = getelementptr inbounds i8, ptr %2, i64 12
  %40 = load ptr, ptr %26, align 8, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %39, ptr noundef nonnull align 1 dereferenceable(16) %41, i64 16, i1 false)
  %42 = getelementptr inbounds i8, ptr %2, i64 29
  %43 = load ptr, ptr %26, align 8, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %43, i64 32
  %45 = load i32, ptr %44, align 1
  store i32 %45, ptr %42, align 1
  br label %46

46:                                               ; preds = %3, %22, %25, %10
  %.0 = phi i32 [ 2, %3 ], [ 0, %25 ], [ %23, %22 ], [ 1, %10 ]
  ret i32 %.0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 928}
!6 = !{!"_USBH_HandleTypeDef", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !13, i64 56, !8, i64 920, !11, i64 928, !7, i64 936, !8, i64 940, !7, i64 1004, !7, i64 1008, !8, i64 1012, !11, i64 1016, !11, i64 1024}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !11, i64 8, !12, i64 16, !12, i64 18, !8, i64 20, !7, i64 28, !8, i64 32}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"", !8, i64 0, !8, i64 256, !8, i64 768, !8, i64 769, !8, i64 770, !8, i64 771, !8, i64 772, !8, i64 773, !8, i64 774, !8, i64 775, !8, i64 776, !14, i64 778, !15, i64 796}
!14 = !{!"_DeviceDescriptor", !8, i64 0, !8, i64 1, !12, i64 2, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !12, i64 8, !12, i64 10, !12, i64 12, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17}
!15 = !{!"_ConfigurationDescriptor", !8, i64 0, !8, i64 1, !12, i64 2, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !8, i64 10}
!16 = !{!17, !11, i64 56}
!17 = !{!"", !11, i64 0, !8, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!18 = !{!19, !7, i64 104}
!19 = !{!"_MSC_Process", !8, i64 0, !8, i64 1, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !12, i64 8, !12, i64 10, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !20, i64 32, !8, i64 176, !12, i64 296, !12, i64 298, !7, i64 300}
!20 = !{!"", !8, i64 0, !7, i64 64, !7, i64 68, !7, i64 72, !8, i64 76, !8, i64 108, !8, i64 112, !8, i64 128, !11, i64 136}
!21 = !{!8, !8, i64 0}
!22 = !{!19, !7, i64 96}
!23 = !{!19, !11, i64 168}
!24 = !{!25, !8, i64 1}
!25 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 12, !8, i64 29}
!26 = !{!25, !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass