; LLVM IR from ctlst-tech/catpilot :: bsp/mcu/core/stm32/h753/hal/src (stm32h7xx_hal_hcd)

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

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_HCD_HC_SubmitRequest(ptr noundef %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i8 noundef zeroext %3, i8 noundef zeroext %4, ptr noundef %5, i16 noundef zeroext %6, i8 noundef zeroext %7) #0 {
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  %15 = alloca i16, align 2
  %16 = alloca i8, align 1
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i8 %1, ptr %10, align 1, !tbaa !9
  store i8 %2, ptr %11, align 1, !tbaa !9
  store i8 %3, ptr %12, align 1, !tbaa !9
  store i8 %4, ptr %13, align 1, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i16 %6, ptr %15, align 2, !tbaa !10
  store i8 %7, ptr %16, align 1, !tbaa !9
  %17 = load i8, ptr %11, align 1, !tbaa !9
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %18, i32 0, i32 2
  %20 = load i8, ptr %10, align 1, !tbaa !9
  %21 = zext i8 %20 to i64
  %22 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %19, i64 0, i64 %21
  %23 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %22, i32 0, i32 3
  store i8 %17, ptr %23, align 1, !tbaa !12
  %24 = load i8, ptr %12, align 1, !tbaa !9
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %25, i32 0, i32 2
  %27 = load i8, ptr %10, align 1, !tbaa !9
  %28 = zext i8 %27 to i64
  %29 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %26, i64 0, i64 %28
  %30 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %29, i32 0, i32 7
  store i8 %24, ptr %30, align 1, !tbaa !15
  %31 = load i8, ptr %13, align 1, !tbaa !9
  %32 = zext i8 %31 to i32
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %48

34:                                               ; preds = %8
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %35, i32 0, i32 2
  %37 = load i8, ptr %10, align 1, !tbaa !9
  %38 = zext i8 %37 to i64
  %39 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %36, i64 0, i64 %38
  %40 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %39, i32 0, i32 9
  store i8 3, ptr %40, align 2, !tbaa !16
  %41 = load i8, ptr %16, align 1, !tbaa !9
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %42, i32 0, i32 2
  %44 = load i8, ptr %10, align 1, !tbaa !9
  %45 = zext i8 %44 to i64
  %46 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %43, i64 0, i64 %45
  %47 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %46, i32 0, i32 5
  store i8 %41, ptr %47, align 1, !tbaa !17
  br label %55

48:                                               ; preds = %8
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %49, i32 0, i32 2
  %51 = load i8, ptr %10, align 1, !tbaa !9
  %52 = zext i8 %51 to i64
  %53 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %50, i64 0, i64 %52
  %54 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %53, i32 0, i32 9
  store i8 2, ptr %54, align 2, !tbaa !16
  br label %55

55:                                               ; preds = %48, %34
  %56 = load i8, ptr %12, align 1, !tbaa !9
  %57 = zext i8 %56 to i32
  switch i32 %57, label %220 [
    i32 0, label %58
    i32 2, label %103
    i32 3, label %158
    i32 1, label %213
  ]

58:                                               ; preds = %55
  %59 = load i8, ptr %13, align 1, !tbaa !9
  %60 = zext i8 %59 to i32
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %102

62:                                               ; preds = %58
  %63 = load i8, ptr %11, align 1, !tbaa !9
  %64 = zext i8 %63 to i32
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %102

66:                                               ; preds = %62
  %67 = load i16, ptr %15, align 2, !tbaa !10
  %68 = zext i16 %67 to i32
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %77

70:                                               ; preds = %66
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %71, i32 0, i32 2
  %73 = load i8, ptr %10, align 1, !tbaa !9
  %74 = zext i8 %73 to i64
  %75 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %72, i64 0, i64 %74
  %76 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %75, i32 0, i32 15
  store i8 1, ptr %76, align 1, !tbaa !18
  br label %77

77:                                               ; preds = %70, %66
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %78, i32 0, i32 2
  %80 = load i8, ptr %10, align 1, !tbaa !9
  %81 = zext i8 %80 to i64
  %82 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %79, i64 0, i64 %81
  %83 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %82, i32 0, i32 15
  %84 = load i8, ptr %83, align 1, !tbaa !18
  %85 = zext i8 %84 to i32
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %94

87:                                               ; preds = %77
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %88, i32 0, i32 2
  %90 = load i8, ptr %10, align 1, !tbaa !9
  %91 = zext i8 %90 to i64
  %92 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %89, i64 0, i64 %91
  %93 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %92, i32 0, i32 9
  store i8 0, ptr %93, align 2, !tbaa !16
  br label %101

94:                                               ; preds = %77
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %95, i32 0, i32 2
  %97 = load i8, ptr %10, align 1, !tbaa !9
  %98 = zext i8 %97 to i64
  %99 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %96, i64 0, i64 %98
  %100 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %99, i32 0, i32 9
  store i8 2, ptr %100, align 2, !tbaa !16
  br label %101

101:                                              ; preds = %94, %87
  br label %102

102:                                              ; preds = %101, %62, %58
  br label %221

103:                                              ; preds = %55
  %104 = load i8, ptr %11, align 1, !tbaa !9
  %105 = zext i8 %104 to i32
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %107, label %132

107:                                              ; preds = %103
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %108, i32 0, i32 2
  %110 = load i8, ptr %10, align 1, !tbaa !9
  %111 = zext i8 %110 to i64
  %112 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %109, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %112, i32 0, i32 15
  %114 = load i8, ptr %113, align 1, !tbaa !18
  %115 = zext i8 %114 to i32
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %124

117:                                              ; preds = %107
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %118, i32 0, i32 2
  %120 = load i8, ptr %10, align 1, !tbaa !9
  %121 = zext i8 %120 to i64
  %122 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %119, i64 0, i64 %121
  %123 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %122, i32 0, i32 9
  store i8 0, ptr %123, align 2, !tbaa !16
  br label %131

124:                                              ; preds = %107
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %125, i32 0, i32 2
  %127 = load i8, ptr %10, align 1, !tbaa !9
  %128 = zext i8 %127 to i64
  %129 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %126, i64 0, i64 %128
  %130 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %129, i32 0, i32 9
  store i8 2, ptr %130, align 2, !tbaa !16
  br label %131

131:                                              ; preds = %124, %117
  br label %157

132:                                              ; preds = %103
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %133, i32 0, i32 2
  %135 = load i8, ptr %10, align 1, !tbaa !9
  %136 = zext i8 %135 to i64
  %137 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %134, i64 0, i64 %136
  %138 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %137, i32 0, i32 14
  %139 = load i8, ptr %138, align 4, !tbaa !19
  %140 = zext i8 %139 to i32
  %141 = icmp eq i32 %140, 0
  br i1 %141, label %142, label %149

142:                                              ; preds = %132
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %143, i32 0, i32 2
  %145 = load i8, ptr %10, align 1, !tbaa !9
  %146 = zext i8 %145 to i64
  %147 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %144, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %147, i32 0, i32 9
  store i8 0, ptr %148, align 2, !tbaa !16
  br label %156

149:                                              ; preds = %132
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %150, i32 0, i32 2
  %152 = load i8, ptr %10, align 1, !tbaa !9
  %153 = zext i8 %152 to i64
  %154 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %151, i64 0, i64 %153
  %155 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %154, i32 0, i32 9
  store i8 2, ptr %155, align 2, !tbaa !16
  br label %156

156:                                              ; preds = %149, %142
  br label %157

157:                                              ; preds = %156, %131
  br label %221

158:                                              ; preds = %55
  %159 = load i8, ptr %11, align 1, !tbaa !9
  %160 = zext i8 %159 to i32
  %161 = icmp eq i32 %160, 0
  br i1 %161, label %162, label %187

162:                                              ; preds = %158
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %163, i32 0, i32 2
  %165 = load i8, ptr %10, align 1, !tbaa !9
  %166 = zext i8 %165 to i64
  %167 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %164, i64 0, i64 %166
  %168 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %167, i32 0, i32 15
  %169 = load i8, ptr %168, align 1, !tbaa !18
  %170 = zext i8 %169 to i32
  %171 = icmp eq i32 %170, 0
  br i1 %171, label %172, label %179

172:                                              ; preds = %162
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %173, i32 0, i32 2
  %175 = load i8, ptr %10, align 1, !tbaa !9
  %176 = zext i8 %175 to i64
  %177 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %174, i64 0, i64 %176
  %178 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %177, i32 0, i32 9
  store i8 0, ptr %178, align 2, !tbaa !16
  br label %186

179:                                              ; preds = %162
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %180, i32 0, i32 2
  %182 = load i8, ptr %10, align 1, !tbaa !9
  %183 = zext i8 %182 to i64
  %184 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %181, i64 0, i64 %183
  %185 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %184, i32 0, i32 9
  store i8 2, ptr %185, align 2, !tbaa !16
  br label %186

186:                                              ; preds = %179, %172
  br label %212

187:                                              ; preds = %158
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %188, i32 0, i32 2
  %190 = load i8, ptr %10, align 1, !tbaa !9
  %191 = zext i8 %190 to i64
  %192 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %189, i64 0, i64 %191
  %193 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %192, i32 0, i32 14
  %194 = load i8, ptr %193, align 4, !tbaa !19
  %195 = zext i8 %194 to i32
  %196 = icmp eq i32 %195, 0
  br i1 %196, label %197, label %204

197:                                              ; preds = %187
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %198, i32 0, i32 2
  %200 = load i8, ptr %10, align 1, !tbaa !9
  %201 = zext i8 %200 to i64
  %202 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %199, i64 0, i64 %201
  %203 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %202, i32 0, i32 9
  store i8 0, ptr %203, align 2, !tbaa !16
  br label %211

204:                                              ; preds = %187
  %205 = load ptr, ptr %9, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %205, i32 0, i32 2
  %207 = load i8, ptr %10, align 1, !tbaa !9
  %208 = zext i8 %207 to i64
  %209 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %206, i64 0, i64 %208
  %210 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %209, i32 0, i32 9
  store i8 2, ptr %210, align 2, !tbaa !16
  br label %211

211:                                              ; preds = %204, %197
  br label %212

212:                                              ; preds = %211, %186
  br label %221

213:                                              ; preds = %55
  %214 = load ptr, ptr %9, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %214, i32 0, i32 2
  %216 = load i8, ptr %10, align 1, !tbaa !9
  %217 = zext i8 %216 to i64
  %218 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %215, i64 0, i64 %217
  %219 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %218, i32 0, i32 9
  store i8 0, ptr %219, align 2, !tbaa !16
  br label %221

220:                                              ; preds = %55
  br label %221

221:                                              ; preds = %220, %213, %212, %157, %102
  %222 = load ptr, ptr %14, align 8, !tbaa !5
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %223, i32 0, i32 2
  %225 = load i8, ptr %10, align 1, !tbaa !9
  %226 = zext i8 %225 to i64
  %227 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %224, i64 0, i64 %226
  %228 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %227, i32 0, i32 10
  store ptr %222, ptr %228, align 8, !tbaa !20
  %229 = load i16, ptr %15, align 2, !tbaa !10
  %230 = zext i16 %229 to i32
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %231, i32 0, i32 2
  %233 = load i8, ptr %10, align 1, !tbaa !9
  %234 = zext i8 %233 to i64
  %235 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %232, i64 0, i64 %234
  %236 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %235, i32 0, i32 12
  store i32 %230, ptr %236, align 4, !tbaa !21
  %237 = load ptr, ptr %9, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %237, i32 0, i32 2
  %239 = load i8, ptr %10, align 1, !tbaa !9
  %240 = zext i8 %239 to i64
  %241 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %238, i64 0, i64 %240
  %242 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %241, i32 0, i32 18
  store i32 0, ptr %242, align 8, !tbaa !22
  %243 = load ptr, ptr %9, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %243, i32 0, i32 2
  %245 = load i8, ptr %10, align 1, !tbaa !9
  %246 = zext i8 %245 to i64
  %247 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %244, i64 0, i64 %246
  %248 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %247, i32 0, i32 13
  store i32 0, ptr %248, align 8, !tbaa !23
  %249 = load i8, ptr %10, align 1, !tbaa !9
  %250 = load ptr, ptr %9, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %250, i32 0, i32 2
  %252 = load i8, ptr %10, align 1, !tbaa !9
  %253 = zext i8 %252 to i64
  %254 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %251, i64 0, i64 %253
  %255 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %254, i32 0, i32 1
  store i8 %249, ptr %255, align 1, !tbaa !24
  %256 = load ptr, ptr %9, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %256, i32 0, i32 2
  %258 = load i8, ptr %10, align 1, !tbaa !9
  %259 = zext i8 %258 to i64
  %260 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %257, i64 0, i64 %259
  %261 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %260, i32 0, i32 19
  store i32 0, ptr %261, align 4, !tbaa !25
  %262 = load ptr, ptr %9, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %263, align 8, !tbaa !26
  %265 = load ptr, ptr %9, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %265, i32 0, i32 2
  %267 = load i8, ptr %10, align 1, !tbaa !9
  %268 = zext i8 %267 to i64
  %269 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %266, i64 0, i64 %268
  %270 = load ptr, ptr %9, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %270, i32 0, i32 1
  %272 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %271, i32 0, i32 3
  %273 = load i32, ptr %272, align 4, !tbaa !29
  %274 = trunc i32 %273 to i8
  %275 = call i32 @USB_HC_StartXfer(ptr noundef %264, ptr noundef %269, i8 noundef zeroext %274)
  ret i32 %275
}

declare i32 @USB_HC_StartXfer(ptr noundef, ptr noundef, i8 noundef zeroext) #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" }

!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 = !{!"short", !7, i64 0}
!12 = !{!13, !7, i64 3}
!13 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !11, i64 8, !7, i64 10, !6, i64 16, !14, i64 24, !14, i64 28, !14, i64 32, !7, i64 36, !7, i64 37, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52}
!14 = !{!"int", !7, i64 0}
!15 = !{!13, !7, i64 7}
!16 = !{!13, !7, i64 10}
!17 = !{!13, !7, i64 5}
!18 = !{!13, !7, i64 37}
!19 = !{!13, !7, i64 36}
!20 = !{!13, !6, i64 16}
!21 = !{!13, !14, i64 28}
!22 = !{!13, !14, i64 48}
!23 = !{!13, !14, i64 32}
!24 = !{!13, !7, i64 1}
!25 = !{!13, !14, i64 52}
!26 = !{!27, !6, i64 0}
!27 = !{!"", !6, i64 0, !28, i64 8, !7, i64 64, !14, i64 960, !14, i64 964, !14, i64 968, !6, i64 976}
!28 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48}
!29 = !{!27, !14, i64 20}


; 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_HCTypeDef = type { i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, ptr, i32, i32, i32, i8, i8, i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local i32 @HAL_HCD_HC_SubmitRequest(ptr noundef %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i8 noundef zeroext %3, i8 noundef zeroext %4, ptr noundef %5, i16 noundef zeroext %6, i8 noundef zeroext %7) local_unnamed_addr #0 {
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  %10 = zext i8 %1 to i64
  %11 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %9, i64 0, i64 %10
  %12 = getelementptr inbounds i8, ptr %11, i64 3
  store i8 %2, ptr %12, align 1, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %11, i64 7
  store i8 %3, ptr %13, align 1, !tbaa !12
  %14 = icmp eq i8 %4, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %8
  %16 = getelementptr inbounds i8, ptr %11, i64 5
  store i8 %7, ptr %16, align 1, !tbaa !13
  br label %17

17:                                               ; preds = %8, %15
  %.sink = phi i8 [ 3, %15 ], [ 2, %8 ]
  %18 = getelementptr inbounds i8, ptr %11, i64 10
  store i8 %.sink, ptr %18, align 2
  switch i8 %3, label %48 [
    i8 0, label %19
    i8 2, label %28
    i8 3, label %38
    i8 1, label %.sink.split
  ]

19:                                               ; preds = %17
  %20 = icmp eq i8 %4, 1
  %21 = icmp eq i8 %2, 0
  %or.cond = and i1 %21, %20
  br i1 %or.cond, label %22, label %48

22:                                               ; preds = %19
  %23 = icmp eq i16 %6, 0
  %24 = getelementptr inbounds i8, ptr %11, i64 37
  br i1 %23, label %.thread, label %25

.thread:                                          ; preds = %22
  store i8 1, ptr %24, align 1, !tbaa !14
  br label %27

25:                                               ; preds = %22
  %.pre = load i8, ptr %24, align 1, !tbaa !14
  %26 = icmp eq i8 %.pre, 0
  br i1 %26, label %.sink.split, label %27

27:                                               ; preds = %.thread, %25
  br label %.sink.split

28:                                               ; preds = %17
  %29 = icmp eq i8 %2, 0
  br i1 %29, label %30, label %34

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %11, i64 37
  %32 = load i8, ptr %31, align 1, !tbaa !14
  %33 = icmp eq i8 %32, 0
  %. = select i1 %33, i8 0, i8 2
  br label %.sink.split

34:                                               ; preds = %28
  %35 = getelementptr inbounds i8, ptr %11, i64 36
  %36 = load i8, ptr %35, align 4, !tbaa !15
  %37 = icmp eq i8 %36, 0
  %.75 = select i1 %37, i8 0, i8 2
  br label %.sink.split

38:                                               ; preds = %17
  %39 = icmp eq i8 %2, 0
  br i1 %39, label %40, label %44

40:                                               ; preds = %38
  %41 = getelementptr inbounds i8, ptr %11, i64 37
  %42 = load i8, ptr %41, align 1, !tbaa !14
  %43 = icmp eq i8 %42, 0
  %.76 = select i1 %43, i8 0, i8 2
  br label %.sink.split

44:                                               ; preds = %38
  %45 = getelementptr inbounds i8, ptr %11, i64 36
  %46 = load i8, ptr %45, align 4, !tbaa !15
  %47 = icmp eq i8 %46, 0
  %.77 = select i1 %47, i8 0, i8 2
  br label %.sink.split

.sink.split:                                      ; preds = %17, %44, %40, %34, %30, %25, %27
  %.sink74 = phi i8 [ 2, %27 ], [ 0, %25 ], [ %., %30 ], [ %.75, %34 ], [ %.76, %40 ], [ %.77, %44 ], [ 0, %17 ]
  store i8 %.sink74, ptr %18, align 2, !tbaa !16
  br label %48

48:                                               ; preds = %.sink.split, %17, %19
  %49 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr %5, ptr %49, align 8, !tbaa !17
  %50 = zext i16 %6 to i32
  %51 = getelementptr inbounds i8, ptr %11, i64 28
  store i32 %50, ptr %51, align 4, !tbaa !18
  %52 = getelementptr inbounds i8, ptr %11, i64 48
  store i32 0, ptr %52, align 8, !tbaa !19
  %53 = getelementptr inbounds i8, ptr %11, i64 32
  store i32 0, ptr %53, align 8, !tbaa !20
  %54 = getelementptr inbounds i8, ptr %11, i64 1
  store i8 %1, ptr %54, align 1, !tbaa !21
  %55 = getelementptr inbounds i8, ptr %11, i64 52
  store i32 0, ptr %55, align 4, !tbaa !22
  %56 = load ptr, ptr %0, align 8, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %0, i64 20
  %58 = load i32, ptr %57, align 4, !tbaa !26
  %59 = trunc i32 %58 to i8
  %60 = tail call i32 @USB_HC_StartXfer(ptr noundef %56, ptr noundef nonnull %11, i8 noundef zeroext %59) #2
  ret i32 %60
}

declare i32 @USB_HC_StartXfer(ptr noundef, ptr noundef, i8 noundef zeroext) 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 3}
!6 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !9, i64 8, !7, i64 10, !10, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !7, i64 36, !7, i64 37, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!6, !7, i64 7}
!13 = !{!6, !7, i64 5}
!14 = !{!6, !7, i64 37}
!15 = !{!6, !7, i64 36}
!16 = !{!6, !7, i64 10}
!17 = !{!6, !10, i64 16}
!18 = !{!6, !11, i64 28}
!19 = !{!6, !11, i64 48}
!20 = !{!6, !11, i64 32}
!21 = !{!6, !7, i64 1}
!22 = !{!6, !11, i64 52}
!23 = !{!24, !10, i64 0}
!24 = !{!"", !10, i64 0, !25, i64 8, !7, i64 64, !11, i64 960, !11, i64 964, !11, i64 968, !10, i64 976}
!25 = !{!"", !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}
!26 = !{!24, !11, i64 20}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass