; LLVM IR from lichen-community-systems/signaletic :: hosts/daisy/vendor/libDaisy/Middlewares/ST/STM32_USB_Host_Library/Core/Src (Process)

; 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 }

; Function Attrs: nounwind uwtable
declare hidden i32 @DeInitStateMachine(ptr noundef) #0

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

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

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

declare i32 @USBH_LL_Start(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @USBH_Process(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store volatile i32 2, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #3
  store i8 0, ptr %4, align 1, !tbaa !11
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %5, i32 0, i32 4
  %7 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %6, i32 0, i32 7
  %8 = load volatile i8, ptr %7, align 1, !tbaa !12
  %9 = zext i8 %8 to i32
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %14

11:                                               ; preds = %1
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %12, i32 0, i32 0
  store volatile i32 3, ptr %13, align 8, !tbaa !19
  br label %14

14:                                               ; preds = %11, %1
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %15, i32 0, i32 0
  %17 = load volatile i32, ptr %16, align 8, !tbaa !19
  switch i32 %17, label %428 [
    i32 0, label %18
    i32 1, label %38
    i32 2, label %88
    i32 5, label %155
    i32 7, label %185
    i32 8, label %198
    i32 9, label %215
    i32 10, label %239
    i32 6, label %326
    i32 11, label %363
    i32 3, label %377
    i32 13, label %427
  ]

18:                                               ; preds = %14
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %19, i32 0, i32 4
  %21 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %20, i32 0, i32 6
  %22 = load volatile i8, ptr %21, align 4, !tbaa !20
  %23 = icmp ne i8 %22, 0
  br i1 %23, label %24, label %37

24:                                               ; preds = %18
  br label %25

25:                                               ; preds = %24
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %28, i32 0, i32 0
  store volatile i32 1, ptr %29, align 8, !tbaa !19
  call void @USBH_Delay(i32 noundef 200)
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = call i32 @USBH_LL_ResetPort(ptr noundef %30)
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %32, i32 0, i32 4
  %34 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %33, i32 0, i32 2
  store i8 0, ptr %34, align 8, !tbaa !21
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %35, i32 0, i32 10
  store i32 0, ptr %36, align 8, !tbaa !22
  br label %37

37:                                               ; preds = %27, %18
  br label %429

38:                                               ; preds = %14
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %39, i32 0, i32 4
  %41 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %40, i32 0, i32 9
  %42 = load i8, ptr %41, align 1, !tbaa !23
  %43 = zext i8 %42 to i32
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %54

45:                                               ; preds = %38
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %49, i32 0, i32 4
  %51 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %50, i32 0, i32 5
  store i8 0, ptr %51, align 1, !tbaa !24
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %52, i32 0, i32 0
  store volatile i32 2, ptr %53, align 8, !tbaa !19
  br label %87

54:                                               ; preds = %38
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %55, i32 0, i32 10
  %57 = load i32, ptr %56, align 8, !tbaa !22
  %58 = icmp ugt i32 %57, 1000
  br i1 %58, label %59, label %81

59:                                               ; preds = %54
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %60, i32 0, i32 4
  %62 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %61, i32 0, i32 5
  %63 = load i8, ptr %62, align 1, !tbaa !24
  %64 = add i8 %63, 1
  store i8 %64, ptr %62, align 1, !tbaa !24
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %65, i32 0, i32 4
  %67 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %66, i32 0, i32 5
  %68 = load i8, ptr %67, align 1, !tbaa !24
  %69 = zext i8 %68 to i32
  %70 = icmp ugt i32 %69, 3
  br i1 %70, label %71, label %77

71:                                               ; preds = %59
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %75, i32 0, i32 0
  store volatile i32 13, ptr %76, align 8, !tbaa !19
  br label %80

77:                                               ; preds = %59
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %78, i32 0, i32 0
  store volatile i32 0, ptr %79, align 8, !tbaa !19
  br label %80

80:                                               ; preds = %77, %74
  br label %86

81:                                               ; preds = %54
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %82, i32 0, i32 10
  %84 = load i32, ptr %83, align 8, !tbaa !22
  %85 = add i32 %84, 10
  store i32 %85, ptr %83, align 8, !tbaa !22
  call void @USBH_Delay(i32 noundef 10)
  br label %86

86:                                               ; preds = %81, %80
  br label %87

87:                                               ; preds = %86, %48
  br label %429

88:                                               ; preds = %14
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %89, i32 0, i32 13
  %91 = load ptr, ptr %90, align 8, !tbaa !25
  %92 = icmp ne ptr %91, null
  br i1 %92, label %93, label %98

93:                                               ; preds = %88
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %94, i32 0, i32 13
  %96 = load ptr, ptr %95, align 8, !tbaa !25
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  call void %96(ptr noundef %97, i8 noundef zeroext 4)
  br label %98

98:                                               ; preds = %93, %88
  call void @USBH_Delay(i32 noundef 100)
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = call i32 @USBH_LL_GetSpeed(ptr noundef %99)
  %101 = trunc i32 %100 to i8
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %102, i32 0, i32 4
  %104 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %103, i32 0, i32 3
  store i8 %101, ptr %104, align 1, !tbaa !26
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %105, i32 0, i32 0
  store volatile i32 5, ptr %106, align 8, !tbaa !19
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = call zeroext i8 @USBH_AllocPipe(ptr noundef %107, i8 noundef zeroext 0)
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %109, i32 0, i32 3
  %111 = getelementptr inbounds %struct.USBH_CtrlTypeDef, ptr %110, i32 0, i32 1
  store i8 %108, ptr %111, align 1, !tbaa !27
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = call zeroext i8 @USBH_AllocPipe(ptr noundef %112, i8 noundef zeroext -128)
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %114, i32 0, i32 3
  %116 = getelementptr inbounds %struct.USBH_CtrlTypeDef, ptr %115, i32 0, i32 0
  store i8 %113, ptr %116, align 8, !tbaa !28
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %118, i32 0, i32 3
  %120 = getelementptr inbounds %struct.USBH_CtrlTypeDef, ptr %119, i32 0, i32 0
  %121 = load i8, ptr %120, align 8, !tbaa !28
  %122 = load ptr, ptr %2, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %122, i32 0, i32 4
  %124 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %123, i32 0, i32 2
  %125 = load i8, ptr %124, align 8, !tbaa !21
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %126, i32 0, i32 4
  %128 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %127, i32 0, i32 3
  %129 = load i8, ptr %128, align 1, !tbaa !26
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %130, i32 0, i32 3
  %132 = getelementptr inbounds %struct.USBH_CtrlTypeDef, ptr %131, i32 0, i32 2
  %133 = load i8, ptr %132, align 2, !tbaa !29
  %134 = zext i8 %133 to i16
  %135 = call i32 @USBH_OpenPipe(ptr noundef %117, i8 noundef zeroext %121, i8 noundef zeroext -128, i8 noundef zeroext %125, i8 noundef zeroext %129, i8 noundef zeroext 0, i16 noundef zeroext %134)
  %136 = load ptr, ptr %2, align 8, !tbaa !5
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %137, i32 0, i32 3
  %139 = getelementptr inbounds %struct.USBH_CtrlTypeDef, ptr %138, i32 0, i32 1
  %140 = load i8, ptr %139, align 1, !tbaa !27
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %141, i32 0, i32 4
  %143 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %142, i32 0, i32 2
  %144 = load i8, ptr %143, align 8, !tbaa !21
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %145, i32 0, i32 4
  %147 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %146, i32 0, i32 3
  %148 = load i8, ptr %147, align 1, !tbaa !26
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %149, i32 0, i32 3
  %151 = getelementptr inbounds %struct.USBH_CtrlTypeDef, ptr %150, i32 0, i32 2
  %152 = load i8, ptr %151, align 2, !tbaa !29
  %153 = zext i8 %152 to i16
  %154 = call i32 @USBH_OpenPipe(ptr noundef %136, i8 noundef zeroext %140, i8 noundef zeroext 0, i8 noundef zeroext %144, i8 noundef zeroext %148, i8 noundef zeroext 0, i16 noundef zeroext %153)
  br label %429

155:                                              ; preds = %14
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = call i32 @USBH_HandleEnum(ptr noundef %156)
  store volatile i32 %157, ptr %3, align 4, !tbaa !9
  %158 = load volatile i32, ptr %3, align 4, !tbaa !9
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %160, label %184

160:                                              ; preds = %155
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %164, i32 0, i32 4
  %166 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %165, i32 0, i32 10
  store i8 0, ptr %166, align 8, !tbaa !30
  %167 = load ptr, ptr %2, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %167, i32 0, i32 4
  %169 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %168, i32 0, i32 11
  %170 = getelementptr inbounds %struct._DeviceDescriptor, ptr %169, i32 0, i32 13
  %171 = load i8, ptr %170, align 1, !tbaa !31
  %172 = zext i8 %171 to i32
  %173 = icmp eq i32 %172, 1
  br i1 %173, label %174, label %180

174:                                              ; preds = %163
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  %178 = load ptr, ptr %2, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %178, i32 0, i32 0
  store volatile i32 8, ptr %179, align 8, !tbaa !19
  br label %183

180:                                              ; preds = %163
  %181 = load ptr, ptr %2, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %181, i32 0, i32 0
  store volatile i32 7, ptr %182, align 8, !tbaa !19
  br label %183

183:                                              ; preds = %180, %177
  br label %184

184:                                              ; preds = %183, %155
  br label %429

185:                                              ; preds = %14
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %186, i32 0, i32 13
  %188 = load ptr, ptr %187, align 8, !tbaa !25
  %189 = icmp ne ptr %188, null
  br i1 %189, label %190, label %197

190:                                              ; preds = %185
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %191, i32 0, i32 13
  %193 = load ptr, ptr %192, align 8, !tbaa !25
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  call void %193(ptr noundef %194, i8 noundef zeroext 1)
  %195 = load ptr, ptr %2, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %195, i32 0, i32 0
  store volatile i32 8, ptr %196, align 8, !tbaa !19
  br label %197

197:                                              ; preds = %190, %185
  br label %429

198:                                              ; preds = %14
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %200, i32 0, i32 4
  %202 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %201, i32 0, i32 12
  %203 = getelementptr inbounds %struct._ConfigurationDescriptor, ptr %202, i32 0, i32 4
  %204 = load i8, ptr %203, align 1, !tbaa !32
  %205 = zext i8 %204 to i16
  %206 = call i32 @USBH_SetCfg(ptr noundef %199, i16 noundef zeroext %205)
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %208, label %214

208:                                              ; preds = %198
  %209 = load ptr, ptr %2, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %209, i32 0, i32 0
  store volatile i32 9, ptr %210, align 8, !tbaa !19
  br label %211

211:                                              ; preds = %208
  br label %212

212:                                              ; preds = %211
  br label %213

213:                                              ; preds = %212
  br label %214

214:                                              ; preds = %213, %198
  br label %429

215:                                              ; preds = %14
  %216 = load ptr, ptr %2, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %216, i32 0, i32 4
  %218 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %217, i32 0, i32 12
  %219 = getelementptr inbounds %struct._ConfigurationDescriptor, ptr %218, i32 0, i32 6
  %220 = load i8, ptr %219, align 1, !tbaa !33
  %221 = zext i8 %220 to i32
  %222 = and i32 %221, 32
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %224, label %235

224:                                              ; preds = %215
  %225 = load ptr, ptr %2, align 8, !tbaa !5
  %226 = call i32 @USBH_SetFeature(ptr noundef %225, i8 noundef zeroext 1)
  %227 = icmp eq i32 %226, 0
  br i1 %227, label %228, label %234

228:                                              ; preds = %224
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229
  br label %231

231:                                              ; preds = %230
  %232 = load ptr, ptr %2, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %232, i32 0, i32 0
  store volatile i32 10, ptr %233, align 8, !tbaa !19
  br label %234

234:                                              ; preds = %231, %224
  br label %238

235:                                              ; preds = %215
  %236 = load ptr, ptr %2, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %236, i32 0, i32 0
  store volatile i32 10, ptr %237, align 8, !tbaa !19
  br label %238

238:                                              ; preds = %235, %234
  br label %429

239:                                              ; preds = %14
  %240 = load ptr, ptr %2, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %240, i32 0, i32 7
  %242 = load i32, ptr %241, align 8, !tbaa !34
  %243 = icmp eq i32 %242, 0
  br i1 %243, label %244, label %248

244:                                              ; preds = %239
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245
  br label %247

247:                                              ; preds = %246
  br label %325

248:                                              ; preds = %239
  %249 = load ptr, ptr %2, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %249, i32 0, i32 6
  store ptr null, ptr %250, align 8, !tbaa !35
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %251

251:                                              ; preds = %284, %248
  %252 = load i8, ptr %4, align 1, !tbaa !11
  %253 = zext i8 %252 to i32
  %254 = icmp ult i32 %253, 1
  br i1 %254, label %255, label %287

255:                                              ; preds = %251
  %256 = load ptr, ptr %2, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %256, i32 0, i32 5
  %258 = load i8, ptr %4, align 1, !tbaa !11
  %259 = zext i8 %258 to i64
  %260 = getelementptr inbounds [1 x ptr], ptr %257, i64 0, i64 %259
  %261 = load ptr, ptr %260, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.USBH_ClassTypeDef, ptr %261, i32 0, i32 1
  %263 = load i8, ptr %262, align 8, !tbaa !36
  %264 = zext i8 %263 to i32
  %265 = load ptr, ptr %2, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %265, i32 0, i32 4
  %267 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %266, i32 0, i32 12
  %268 = getelementptr inbounds %struct._ConfigurationDescriptor, ptr %267, i32 0, i32 8
  %269 = getelementptr inbounds [2 x %struct._InterfaceDescriptor], ptr %268, i64 0, i64 0
  %270 = getelementptr inbounds %struct._InterfaceDescriptor, ptr %269, i32 0, i32 5
  %271 = load i8, ptr %270, align 1, !tbaa !38
  %272 = zext i8 %271 to i32
  %273 = icmp eq i32 %264, %272
  br i1 %273, label %274, label %283

274:                                              ; preds = %255
  %275 = load ptr, ptr %2, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %275, i32 0, i32 5
  %277 = load i8, ptr %4, align 1, !tbaa !11
  %278 = zext i8 %277 to i64
  %279 = getelementptr inbounds [1 x ptr], ptr %276, i64 0, i64 %278
  %280 = load ptr, ptr %279, align 8, !tbaa !5
  %281 = load ptr, ptr %2, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %281, i32 0, i32 6
  store ptr %280, ptr %282, align 8, !tbaa !35
  br label %287

283:                                              ; preds = %255
  br label %284

284:                                              ; preds = %283
  %285 = load i8, ptr %4, align 1, !tbaa !11
  %286 = add i8 %285, 1
  store i8 %286, ptr %4, align 1, !tbaa !11
  br label %251, !llvm.loop !40

287:                                              ; preds = %274, %251
  %288 = load ptr, ptr %2, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %288, i32 0, i32 6
  %290 = load ptr, ptr %289, align 8, !tbaa !35
  %291 = icmp ne ptr %290, null
  br i1 %291, label %292, label %318

292:                                              ; preds = %287
  %293 = load ptr, ptr %2, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %293, i32 0, i32 6
  %295 = load ptr, ptr %294, align 8, !tbaa !35
  %296 = getelementptr inbounds %struct.USBH_ClassTypeDef, ptr %295, i32 0, i32 2
  %297 = load ptr, ptr %296, align 8, !tbaa !42
  %298 = load ptr, ptr %2, align 8, !tbaa !5
  %299 = call i32 %297(ptr noundef %298)
  %300 = icmp eq i32 %299, 0
  br i1 %300, label %301, label %311

301:                                              ; preds = %292
  %302 = load ptr, ptr %2, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %302, i32 0, i32 0
  store volatile i32 6, ptr %303, align 8, !tbaa !19
  br label %304

304:                                              ; preds = %301
  br label %305

305:                                              ; preds = %304
  br label %306

306:                                              ; preds = %305
  %307 = load ptr, ptr %2, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %307, i32 0, i32 13
  %309 = load ptr, ptr %308, align 8, !tbaa !25
  %310 = load ptr, ptr %2, align 8, !tbaa !5
  call void %309(ptr noundef %310, i8 noundef zeroext 3)
  br label %317

311:                                              ; preds = %292
  %312 = load ptr, ptr %2, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %312, i32 0, i32 0
  store volatile i32 13, ptr %313, align 8, !tbaa !19
  br label %314

314:                                              ; preds = %311
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315
  br label %317

317:                                              ; preds = %316, %306
  br label %324

318:                                              ; preds = %287
  %319 = load ptr, ptr %2, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %319, i32 0, i32 0
  store volatile i32 13, ptr %320, align 8, !tbaa !19
  br label %321

321:                                              ; preds = %318
  br label %322

322:                                              ; preds = %321
  br label %323

323:                                              ; preds = %322
  br label %324

324:                                              ; preds = %323, %317
  br label %325

325:                                              ; preds = %324, %247
  br label %429

326:                                              ; preds = %14
  %327 = load ptr, ptr %2, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %327, i32 0, i32 6
  %329 = load ptr, ptr %328, align 8, !tbaa !35
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %356

331:                                              ; preds = %326
  %332 = load ptr, ptr %2, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %332, i32 0, i32 6
  %334 = load ptr, ptr %333, align 8, !tbaa !35
  %335 = getelementptr inbounds %struct.USBH_ClassTypeDef, ptr %334, i32 0, i32 4
  %336 = load ptr, ptr %335, align 8, !tbaa !43
  %337 = load ptr, ptr %2, align 8, !tbaa !5
  %338 = call i32 %336(ptr noundef %337)
  store volatile i32 %338, ptr %3, align 4, !tbaa !9
  %339 = load volatile i32, ptr %3, align 4, !tbaa !9
  %340 = icmp eq i32 %339, 0
  br i1 %340, label %341, label %344

341:                                              ; preds = %331
  %342 = load ptr, ptr %2, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %342, i32 0, i32 0
  store volatile i32 11, ptr %343, align 8, !tbaa !19
  br label %355

344:                                              ; preds = %331
  %345 = load volatile i32, ptr %3, align 4, !tbaa !9
  %346 = icmp eq i32 %345, 2
  br i1 %346, label %347, label %353

347:                                              ; preds = %344
  %348 = load ptr, ptr %2, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %348, i32 0, i32 0
  store volatile i32 13, ptr %349, align 8, !tbaa !19
  br label %350

350:                                              ; preds = %347
  br label %351

351:                                              ; preds = %350
  br label %352

352:                                              ; preds = %351
  br label %354

353:                                              ; preds = %344
  br label %354

354:                                              ; preds = %353, %352
  br label %355

355:                                              ; preds = %354, %341
  br label %362

356:                                              ; preds = %326
  %357 = load ptr, ptr %2, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %357, i32 0, i32 0
  store volatile i32 13, ptr %358, align 8, !tbaa !19
  br label %359

359:                                              ; preds = %356
  br label %360

360:                                              ; preds = %359
  br label %361

361:                                              ; preds = %360
  br label %362

362:                                              ; preds = %361, %355
  br label %429

363:                                              ; preds = %14
  %364 = load ptr, ptr %2, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %364, i32 0, i32 6
  %366 = load ptr, ptr %365, align 8, !tbaa !35
  %367 = icmp ne ptr %366, null
  br i1 %367, label %368, label %376

368:                                              ; preds = %363
  %369 = load ptr, ptr %2, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %369, i32 0, i32 6
  %371 = load ptr, ptr %370, align 8, !tbaa !35
  %372 = getelementptr inbounds %struct.USBH_ClassTypeDef, ptr %371, i32 0, i32 5
  %373 = load ptr, ptr %372, align 8, !tbaa !44
  %374 = load ptr, ptr %2, align 8, !tbaa !5
  %375 = call i32 %373(ptr noundef %374)
  br label %376

376:                                              ; preds = %368, %363
  br label %429

377:                                              ; preds = %14
  %378 = load ptr, ptr %2, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %378, i32 0, i32 4
  %380 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %379, i32 0, i32 7
  store volatile i8 0, ptr %380, align 1, !tbaa !12
  %381 = load ptr, ptr %2, align 8, !tbaa !5
  %382 = call i32 @DeInitStateMachine(ptr noundef %381)
  %383 = load ptr, ptr %2, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %383, i32 0, i32 6
  %385 = load ptr, ptr %384, align 8, !tbaa !35
  %386 = icmp ne ptr %385, null
  br i1 %386, label %387, label %397

387:                                              ; preds = %377
  %388 = load ptr, ptr %2, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %388, i32 0, i32 6
  %390 = load ptr, ptr %389, align 8, !tbaa !35
  %391 = getelementptr inbounds %struct.USBH_ClassTypeDef, ptr %390, i32 0, i32 3
  %392 = load ptr, ptr %391, align 8, !tbaa !45
  %393 = load ptr, ptr %2, align 8, !tbaa !5
  %394 = call i32 %392(ptr noundef %393)
  %395 = load ptr, ptr %2, align 8, !tbaa !5
  %396 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %395, i32 0, i32 6
  store ptr null, ptr %396, align 8, !tbaa !35
  br label %397

397:                                              ; preds = %387, %377
  %398 = load ptr, ptr %2, align 8, !tbaa !5
  %399 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %398, i32 0, i32 13
  %400 = load ptr, ptr %399, align 8, !tbaa !25
  %401 = icmp ne ptr %400, null
  br i1 %401, label %402, label %407

402:                                              ; preds = %397
  %403 = load ptr, ptr %2, align 8, !tbaa !5
  %404 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %403, i32 0, i32 13
  %405 = load ptr, ptr %404, align 8, !tbaa !25
  %406 = load ptr, ptr %2, align 8, !tbaa !5
  call void %405(ptr noundef %406, i8 noundef zeroext 5)
  br label %407

407:                                              ; preds = %402, %397
  br label %408

408:                                              ; preds = %407
  br label %409

409:                                              ; preds = %408
  br label %410

410:                                              ; preds = %409
  %411 = load ptr, ptr %2, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %411, i32 0, i32 4
  %413 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %412, i32 0, i32 8
  %414 = load volatile i8, ptr %413, align 2, !tbaa !46
  %415 = zext i8 %414 to i32
  %416 = icmp eq i32 %415, 1
  br i1 %416, label %417, label %423

417:                                              ; preds = %410
  %418 = load ptr, ptr %2, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct._USBH_HandleTypeDef, ptr %418, i32 0, i32 4
  %420 = getelementptr inbounds %struct.USBH_DeviceTypeDef, ptr %419, i32 0, i32 8
  store volatile i8 0, ptr %420, align 2, !tbaa !46
  %421 = load ptr, ptr %2, align 8, !tbaa !5
  %422 = call i32 @USBH_Start(ptr noundef %421)
  br label %426

423:                                              ; preds = %410
  %424 = load ptr, ptr %2, align 8, !tbaa !5
  %425 = call i32 @USBH_LL_Start(ptr noundef %424)
  br label %426

426:                                              ; preds = %423, %417
  br label %429

427:                                              ; preds = %14
  br label %428

428:                                              ; preds = %427, %14
  br label %429

429:                                              ; preds = %428, %426, %376, %362, %325, %238, %214, %197, %184, %98, %87, %37
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret i32 0
}

declare void @USBH_Delay(i32 noundef) #2

declare i32 @USBH_LL_ResetPort(ptr noundef) #2

declare i32 @USBH_LL_GetSpeed(ptr noundef) #2

declare zeroext i8 @USBH_AllocPipe(ptr noundef, i8 noundef zeroext) #2

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

; Function Attrs: nounwind uwtable
declare hidden i32 @USBH_HandleEnum(ptr noundef) #0

declare i32 @USBH_SetCfg(ptr noundef, i16 noundef zeroext) #2

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

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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !7, i64 829}
!13 = !{!"_USBH_HandleTypeDef", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 16, !16, i64 56, !7, i64 920, !6, i64 928, !10, i64 936, !7, i64 940, !10, i64 1004, !10, 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, !10, 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 = !{!13, !10, i64 0}
!20 = !{!13, !7, i64 828}
!21 = !{!13, !7, i64 824}
!22 = !{!13, !10, i64 1008}
!23 = !{!13, !7, i64 831}
!24 = !{!13, !7, i64 827}
!25 = !{!13, !6, i64 1024}
!26 = !{!13, !7, i64 825}
!27 = !{!13, !7, i64 17}
!28 = !{!13, !7, i64 16}
!29 = !{!13, !7, i64 18}
!30 = !{!13, !7, i64 832}
!31 = !{!13, !7, i64 851}
!32 = !{!13, !7, i64 857}
!33 = !{!13, !7, i64 859}
!34 = !{!13, !10, i64 936}
!35 = !{!13, !6, i64 928}
!36 = !{!37, !7, i64 8}
!37 = !{!"", !6, i64 0, !7, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!38 = !{!39, !7, i64 5}
!39 = !{!"_InterfaceDescriptor", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 10}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!37, !6, i64 16}
!43 = !{!37, !6, i64 32}
!44 = !{!37, !6, i64 40}
!45 = !{!37, !6, i64 24}
!46 = !{!13, !7, i64 830}


; 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 hidden i32 @DeInitStateMachine(ptr noundef) local_unnamed_addr #0

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

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

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

declare i32 @USBH_LL_Start(ptr noundef) local_unnamed_addr #2

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

6:                                                ; preds = %1
  store volatile i32 3, ptr %0, align 8, !tbaa !17
  br label %7

7:                                                ; preds = %6, %1
  %8 = load volatile i32, ptr %0, align 8, !tbaa !17
  switch i32 %8, label %153 [
    i32 0, label %9
    i32 1, label %16
    i32 2, label %35
    i32 5, label %60
    i32 7, label %70
    i32 8, label %74
    i32 9, label %81
    i32 10, label %90
    i32 6, label %113
    i32 11, label %126
    i32 3, label %133
  ]

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %0, i64 828
  %11 = load volatile i8, ptr %10, align 4, !tbaa !18
  %.not110 = icmp eq i8 %11, 0
  br i1 %.not110, label %153, label %12

12:                                               ; preds = %9
  store volatile i32 1, ptr %0, align 8, !tbaa !17
  tail call void @USBH_Delay(i32 noundef 200) #3
  %13 = tail call i32 @USBH_LL_ResetPort(ptr noundef nonnull %0) #3
  %14 = getelementptr inbounds i8, ptr %0, i64 824
  store i8 0, ptr %14, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %0, i64 1008
  store i32 0, ptr %15, align 8, !tbaa !20
  br label %153

16:                                               ; preds = %7
  %17 = getelementptr inbounds i8, ptr %0, i64 831
  %18 = load i8, ptr %17, align 1, !tbaa !21
  %19 = icmp eq i8 %18, 1
  br i1 %19, label %20, label %22

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %0, i64 827
  store i8 0, ptr %21, align 1, !tbaa !22
  store volatile i32 2, ptr %0, align 8, !tbaa !17
  br label %153

22:                                               ; preds = %16
  %23 = getelementptr inbounds i8, ptr %0, i64 1008
  %24 = load i32, ptr %23, align 8, !tbaa !20
  %25 = icmp ugt i32 %24, 1000
  br i1 %25, label %26, label %33

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %0, i64 827
  %28 = load i8, ptr %27, align 1, !tbaa !22
  %29 = add i8 %28, 1
  store i8 %29, ptr %27, align 1, !tbaa !22
  %30 = icmp ugt i8 %29, 3
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  store volatile i32 13, ptr %0, align 8, !tbaa !17
  br label %153

32:                                               ; preds = %26
  store volatile i32 0, ptr %0, align 8, !tbaa !17
  br label %153

33:                                               ; preds = %22
  %34 = add nuw nsw i32 %24, 10
  store i32 %34, ptr %23, align 8, !tbaa !20
  tail call void @USBH_Delay(i32 noundef 10) #3
  br label %153

35:                                               ; preds = %7
  %36 = getelementptr inbounds i8, ptr %0, i64 1024
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  %.not109 = icmp eq ptr %37, null
  br i1 %.not109, label %39, label %38

38:                                               ; preds = %35
  tail call void %37(ptr noundef nonnull %0, i8 noundef zeroext 4) #3
  br label %39

39:                                               ; preds = %38, %35
  tail call void @USBH_Delay(i32 noundef 100) #3
  %40 = tail call i32 @USBH_LL_GetSpeed(ptr noundef nonnull %0) #3
  %41 = trunc i32 %40 to i8
  %42 = getelementptr inbounds i8, ptr %0, i64 825
  store i8 %41, ptr %42, align 1, !tbaa !24
  store volatile i32 5, ptr %0, align 8, !tbaa !17
  %43 = tail call zeroext i8 @USBH_AllocPipe(ptr noundef nonnull %0, i8 noundef zeroext 0) #3
  %44 = getelementptr inbounds i8, ptr %0, i64 16
  %45 = getelementptr inbounds i8, ptr %0, i64 17
  store i8 %43, ptr %45, align 1, !tbaa !25
  %46 = tail call zeroext i8 @USBH_AllocPipe(ptr noundef nonnull %0, i8 noundef zeroext -128) #3
  store i8 %46, ptr %44, align 8, !tbaa !26
  %47 = getelementptr inbounds i8, ptr %0, i64 824
  %48 = load i8, ptr %47, align 8, !tbaa !19
  %49 = load i8, ptr %42, align 1, !tbaa !24
  %50 = getelementptr inbounds i8, ptr %0, i64 18
  %51 = load i8, ptr %50, align 2, !tbaa !27
  %52 = zext i8 %51 to i16
  %53 = tail call i32 @USBH_OpenPipe(ptr noundef nonnull %0, i8 noundef zeroext %46, i8 noundef zeroext -128, i8 noundef zeroext %48, i8 noundef zeroext %49, i8 noundef zeroext 0, i16 noundef zeroext %52) #3
  %54 = load i8, ptr %45, align 1, !tbaa !25
  %55 = load i8, ptr %47, align 8, !tbaa !19
  %56 = load i8, ptr %42, align 1, !tbaa !24
  %57 = load i8, ptr %50, align 2, !tbaa !27
  %58 = zext i8 %57 to i16
  %59 = tail call i32 @USBH_OpenPipe(ptr noundef nonnull %0, i8 noundef zeroext %54, i8 noundef zeroext 0, i8 noundef zeroext %55, i8 noundef zeroext %56, i8 noundef zeroext 0, i16 noundef zeroext %58) #3
  br label %153

60:                                               ; preds = %7
  %61 = tail call i32 @USBH_HandleEnum(ptr noundef nonnull %0)
  store volatile i32 %61, ptr %2, align 4, !tbaa !5
  %.0..0..0..0. = load volatile i32, ptr %2, align 4, !tbaa !5
  %62 = icmp eq i32 %.0..0..0..0., 0
  br i1 %62, label %63, label %153

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %0, i64 832
  store i8 0, ptr %64, align 8, !tbaa !28
  %65 = getelementptr inbounds i8, ptr %0, i64 851
  %66 = load i8, ptr %65, align 1, !tbaa !29
  %67 = icmp eq i8 %66, 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  store volatile i32 8, ptr %0, align 8, !tbaa !17
  br label %153

69:                                               ; preds = %63
  store volatile i32 7, ptr %0, align 8, !tbaa !17
  br label %153

70:                                               ; preds = %7
  %71 = getelementptr inbounds i8, ptr %0, i64 1024
  %72 = load ptr, ptr %71, align 8, !tbaa !23
  %.not108 = icmp eq ptr %72, null
  br i1 %.not108, label %153, label %73

73:                                               ; preds = %70
  tail call void %72(ptr noundef nonnull %0, i8 noundef zeroext 1) #3
  store volatile i32 8, ptr %0, align 8, !tbaa !17
  br label %153

74:                                               ; preds = %7
  %75 = getelementptr inbounds i8, ptr %0, i64 857
  %76 = load i8, ptr %75, align 1, !tbaa !30
  %77 = zext i8 %76 to i16
  %78 = tail call i32 @USBH_SetCfg(ptr noundef nonnull %0, i16 noundef zeroext %77) #3
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %153

80:                                               ; preds = %74
  store volatile i32 9, ptr %0, align 8, !tbaa !17
  br label %153

81:                                               ; preds = %7
  %82 = getelementptr inbounds i8, ptr %0, i64 859
  %83 = load i8, ptr %82, align 1, !tbaa !31
  %84 = and i8 %83, 32
  %.not107 = icmp eq i8 %84, 0
  br i1 %.not107, label %89, label %85

85:                                               ; preds = %81
  %86 = tail call i32 @USBH_SetFeature(ptr noundef nonnull %0, i8 noundef zeroext 1) #3
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %153

88:                                               ; preds = %85
  store volatile i32 10, ptr %0, align 8, !tbaa !17
  br label %153

89:                                               ; preds = %81
  store volatile i32 10, ptr %0, align 8, !tbaa !17
  br label %153

90:                                               ; preds = %7
  %91 = getelementptr inbounds i8, ptr %0, i64 936
  %92 = load i32, ptr %91, align 8, !tbaa !32
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %153, label %94

94:                                               ; preds = %90
  %95 = getelementptr inbounds i8, ptr %0, i64 928
  store ptr null, ptr %95, align 8, !tbaa !33
  %96 = getelementptr inbounds i8, ptr %0, i64 920
  %97 = getelementptr inbounds i8, ptr %0, i64 867
  %98 = load ptr, ptr %96, align 8, !tbaa !34
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  %100 = load i8, ptr %99, align 8, !tbaa !35
  %101 = load i8, ptr %97, align 1, !tbaa !37
  %102 = icmp eq i8 %100, %101
  br i1 %102, label %103, label %112, !llvm.loop !39

103:                                              ; preds = %94
  store ptr %98, ptr %95, align 8, !tbaa !33
  %104 = getelementptr inbounds i8, ptr %98, i64 16
  %105 = load ptr, ptr %104, align 8, !tbaa !41
  %106 = tail call i32 %105(ptr noundef nonnull %0) #3
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %111

108:                                              ; preds = %103
  store volatile i32 6, ptr %0, align 8, !tbaa !17
  %109 = getelementptr inbounds i8, ptr %0, i64 1024
  %110 = load ptr, ptr %109, align 8, !tbaa !23
  tail call void %110(ptr noundef nonnull %0, i8 noundef zeroext 3) #3
  br label %153

111:                                              ; preds = %103
  store volatile i32 13, ptr %0, align 8, !tbaa !17
  br label %153

112:                                              ; preds = %94
  store volatile i32 13, ptr %0, align 8, !tbaa !17
  br label %153

113:                                              ; preds = %7
  %114 = getelementptr inbounds i8, ptr %0, i64 928
  %115 = load ptr, ptr %114, align 8, !tbaa !33
  %.not105 = icmp eq ptr %115, null
  br i1 %.not105, label %125, label %116

116:                                              ; preds = %113
  %117 = getelementptr inbounds i8, ptr %115, i64 32
  %118 = load ptr, ptr %117, align 8, !tbaa !42
  %119 = tail call i32 %118(ptr noundef nonnull %0) #3
  store volatile i32 %119, ptr %2, align 4, !tbaa !5
  %.0..0..0..0.4 = load volatile i32, ptr %2, align 4, !tbaa !5
  %120 = icmp eq i32 %.0..0..0..0.4, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %116
  store volatile i32 11, ptr %0, align 8, !tbaa !17
  br label %153

122:                                              ; preds = %116
  %.0..0..0..0.5 = load volatile i32, ptr %2, align 4, !tbaa !5
  %123 = icmp eq i32 %.0..0..0..0.5, 2
  br i1 %123, label %124, label %153

124:                                              ; preds = %122
  store volatile i32 13, ptr %0, align 8, !tbaa !17
  br label %153

125:                                              ; preds = %113
  store volatile i32 13, ptr %0, align 8, !tbaa !17
  br label %153

126:                                              ; preds = %7
  %127 = getelementptr inbounds i8, ptr %0, i64 928
  %128 = load ptr, ptr %127, align 8, !tbaa !33
  %.not104 = icmp eq ptr %128, null
  br i1 %.not104, label %153, label %129

129:                                              ; preds = %126
  %130 = getelementptr inbounds i8, ptr %128, i64 40
  %131 = load ptr, ptr %130, align 8, !tbaa !43
  %132 = tail call i32 %131(ptr noundef nonnull %0) #3
  br label %153

133:                                              ; preds = %7
  store volatile i8 0, ptr %3, align 1, !tbaa !9
  %134 = tail call i32 @DeInitStateMachine(ptr noundef nonnull %0)
  %135 = getelementptr inbounds i8, ptr %0, i64 928
  %136 = load ptr, ptr %135, align 8, !tbaa !33
  %.not = icmp eq ptr %136, null
  br i1 %.not, label %141, label %137

137:                                              ; preds = %133
  %138 = getelementptr inbounds i8, ptr %136, i64 24
  %139 = load ptr, ptr %138, align 8, !tbaa !44
  %140 = tail call i32 %139(ptr noundef nonnull %0) #3
  store ptr null, ptr %135, align 8, !tbaa !33
  br label %141

141:                                              ; preds = %137, %133
  %142 = getelementptr inbounds i8, ptr %0, i64 1024
  %143 = load ptr, ptr %142, align 8, !tbaa !23
  %.not103 = icmp eq ptr %143, null
  br i1 %.not103, label %145, label %144

144:                                              ; preds = %141
  tail call void %143(ptr noundef nonnull %0, i8 noundef zeroext 5) #3
  br label %145

145:                                              ; preds = %141, %144
  %146 = getelementptr inbounds i8, ptr %0, i64 830
  %147 = load volatile i8, ptr %146, align 2, !tbaa !45
  %148 = icmp eq i8 %147, 1
  br i1 %148, label %149, label %151

149:                                              ; preds = %145
  store volatile i8 0, ptr %146, align 2, !tbaa !45
  %150 = tail call i32 @USBH_Start(ptr noundef nonnull %0)
  br label %153

151:                                              ; preds = %145
  %152 = tail call i32 @USBH_LL_Start(ptr noundef nonnull %0) #3
  br label %153

153:                                              ; preds = %7, %149, %151, %126, %129, %125, %124, %122, %121, %90, %108, %111, %112, %89, %88, %85, %74, %80, %70, %73, %60, %69, %68, %20, %31, %32, %33, %9, %12, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2)
  ret i32 0
}

declare void @USBH_Delay(i32 noundef) local_unnamed_addr #2

declare i32 @USBH_LL_ResetPort(ptr noundef) local_unnamed_addr #2

declare i32 @USBH_LL_GetSpeed(ptr noundef) local_unnamed_addr #2

declare zeroext i8 @USBH_AllocPipe(ptr noundef, i8 noundef zeroext) local_unnamed_addr #2

declare i32 @USBH_OpenPipe(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i16 noundef zeroext) local_unnamed_addr #2

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

declare i32 @USBH_SetCfg(ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

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

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 = { mustprogress 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 829}
!10 = !{!"_USBH_HandleTypeDef", !6, i64 0, !6, i64 4, !6, i64 8, !11, i64 16, !14, i64 56, !7, i64 920, !12, i64 928, !6, i64 936, !7, i64 940, !6, i64 1004, !6, i64 1008, !7, i64 1012, !12, i64 1016, !12, i64 1024}
!11 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !12, i64 8, !13, i64 16, !13, i64 18, !7, i64 20, !6, i64 28, !7, i64 32}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !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, !15, i64 778, !16, i64 796}
!15 = !{!"_DeviceDescriptor", !7, i64 0, !7, i64 1, !13, i64 2, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !13, i64 8, !13, i64 10, !13, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17}
!16 = !{!"_ConfigurationDescriptor", !7, i64 0, !7, i64 1, !13, i64 2, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 10}
!17 = !{!10, !6, i64 0}
!18 = !{!10, !7, i64 828}
!19 = !{!10, !7, i64 824}
!20 = !{!10, !6, i64 1008}
!21 = !{!10, !7, i64 831}
!22 = !{!10, !7, i64 827}
!23 = !{!10, !12, i64 1024}
!24 = !{!10, !7, i64 825}
!25 = !{!10, !7, i64 17}
!26 = !{!10, !7, i64 16}
!27 = !{!10, !7, i64 18}
!28 = !{!10, !7, i64 832}
!29 = !{!10, !7, i64 851}
!30 = !{!10, !7, i64 857}
!31 = !{!10, !7, i64 859}
!32 = !{!10, !6, i64 936}
!33 = !{!10, !12, i64 928}
!34 = !{!12, !12, i64 0}
!35 = !{!36, !7, i64 8}
!36 = !{!"", !12, i64 0, !7, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56}
!37 = !{!38, !7, i64 5}
!38 = !{!"_InterfaceDescriptor", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 10}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!36, !12, i64 16}
!42 = !{!36, !12, i64 32}
!43 = !{!36, !12, i64 40}
!44 = !{!36, !12, i64 24}
!45 = !{!10, !7, i64 830}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass