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

; 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, 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 %16, align 1, !tbaa !9
  %18 = load i8, ptr %11, align 1, !tbaa !9
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %19, i32 0, i32 2
  %21 = load i8, ptr %10, align 1, !tbaa !9
  %22 = zext i8 %21 to i64
  %23 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %20, i64 0, i64 %22
  %24 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %23, i32 0, i32 3
  store i8 %18, ptr %24, align 1, !tbaa !12
  %25 = load i8, ptr %12, align 1, !tbaa !9
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %26, i32 0, i32 2
  %28 = load i8, ptr %10, align 1, !tbaa !9
  %29 = zext i8 %28 to i64
  %30 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %27, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %30, i32 0, i32 7
  store i8 %25, ptr %31, align 1, !tbaa !15
  %32 = load i8, ptr %13, align 1, !tbaa !9
  %33 = zext i8 %32 to i32
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %42

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

42:                                               ; preds = %8
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %43, i32 0, i32 2
  %45 = load i8, ptr %10, align 1, !tbaa !9
  %46 = zext i8 %45 to i64
  %47 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %44, i64 0, i64 %46
  %48 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %47, i32 0, i32 9
  store i8 2, ptr %48, align 2, !tbaa !16
  br label %49

49:                                               ; preds = %42, %35
  %50 = load i8, ptr %12, align 1, !tbaa !9
  %51 = zext i8 %50 to i32
  switch i32 %51, label %214 [
    i32 0, label %52
    i32 2, label %97
    i32 3, label %152
    i32 1, label %207
  ]

52:                                               ; preds = %49
  %53 = load i8, ptr %13, align 1, !tbaa !9
  %54 = zext i8 %53 to i32
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %96

56:                                               ; preds = %52
  %57 = load i8, ptr %11, align 1, !tbaa !9
  %58 = zext i8 %57 to i32
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %96

60:                                               ; preds = %56
  %61 = load i16, ptr %15, align 2, !tbaa !10
  %62 = zext i16 %61 to i32
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %71

64:                                               ; preds = %60
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %65, i32 0, i32 2
  %67 = load i8, ptr %10, align 1, !tbaa !9
  %68 = zext i8 %67 to i64
  %69 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %66, i64 0, i64 %68
  %70 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %69, i32 0, i32 14
  store i8 1, ptr %70, align 1, !tbaa !17
  br label %71

71:                                               ; preds = %64, %60
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %72, i32 0, i32 2
  %74 = load i8, ptr %10, align 1, !tbaa !9
  %75 = zext i8 %74 to i64
  %76 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %73, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %76, i32 0, i32 14
  %78 = load i8, ptr %77, align 1, !tbaa !17
  %79 = zext i8 %78 to i32
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %88

81:                                               ; preds = %71
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %82, i32 0, i32 2
  %84 = load i8, ptr %10, align 1, !tbaa !9
  %85 = zext i8 %84 to i64
  %86 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %83, i64 0, i64 %85
  %87 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %86, i32 0, i32 9
  store i8 0, ptr %87, align 2, !tbaa !16
  br label %95

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

95:                                               ; preds = %88, %81
  br label %96

96:                                               ; preds = %95, %56, %52
  br label %215

97:                                               ; preds = %49
  %98 = load i8, ptr %11, align 1, !tbaa !9
  %99 = zext i8 %98 to i32
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %126

101:                                              ; preds = %97
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %102, i32 0, i32 2
  %104 = load i8, ptr %10, align 1, !tbaa !9
  %105 = zext i8 %104 to i64
  %106 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %103, i64 0, i64 %105
  %107 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %106, i32 0, i32 14
  %108 = load i8, ptr %107, align 1, !tbaa !17
  %109 = zext i8 %108 to i32
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %118

111:                                              ; preds = %101
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %112, i32 0, i32 2
  %114 = load i8, ptr %10, align 1, !tbaa !9
  %115 = zext i8 %114 to i64
  %116 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %113, i64 0, i64 %115
  %117 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %116, i32 0, i32 9
  store i8 0, ptr %117, align 2, !tbaa !16
  br label %125

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

125:                                              ; preds = %118, %111
  br label %151

126:                                              ; preds = %97
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %127, i32 0, i32 2
  %129 = load i8, ptr %10, align 1, !tbaa !9
  %130 = zext i8 %129 to i64
  %131 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %128, i64 0, i64 %130
  %132 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %131, i32 0, i32 13
  %133 = load i8, ptr %132, align 8, !tbaa !18
  %134 = zext i8 %133 to i32
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %143

136:                                              ; preds = %126
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %137, i32 0, i32 2
  %139 = load i8, ptr %10, align 1, !tbaa !9
  %140 = zext i8 %139 to i64
  %141 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %138, i64 0, i64 %140
  %142 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %141, i32 0, i32 9
  store i8 0, ptr %142, align 2, !tbaa !16
  br label %150

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

150:                                              ; preds = %143, %136
  br label %151

151:                                              ; preds = %150, %125
  br label %215

152:                                              ; preds = %49
  %153 = load i8, ptr %11, align 1, !tbaa !9
  %154 = zext i8 %153 to i32
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %156, label %181

156:                                              ; preds = %152
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %157, i32 0, i32 2
  %159 = load i8, ptr %10, align 1, !tbaa !9
  %160 = zext i8 %159 to i64
  %161 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %158, i64 0, i64 %160
  %162 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %161, i32 0, i32 14
  %163 = load i8, ptr %162, align 1, !tbaa !17
  %164 = zext i8 %163 to i32
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %166, label %173

166:                                              ; preds = %156
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %167, i32 0, i32 2
  %169 = load i8, ptr %10, align 1, !tbaa !9
  %170 = zext i8 %169 to i64
  %171 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %168, i64 0, i64 %170
  %172 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %171, i32 0, i32 9
  store i8 0, ptr %172, align 2, !tbaa !16
  br label %180

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

180:                                              ; preds = %173, %166
  br label %206

181:                                              ; preds = %152
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %182, i32 0, i32 2
  %184 = load i8, ptr %10, align 1, !tbaa !9
  %185 = zext i8 %184 to i64
  %186 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %183, i64 0, i64 %185
  %187 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %186, i32 0, i32 13
  %188 = load i8, ptr %187, align 8, !tbaa !18
  %189 = zext i8 %188 to i32
  %190 = icmp eq i32 %189, 0
  br i1 %190, label %191, label %198

191:                                              ; preds = %181
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %192, i32 0, i32 2
  %194 = load i8, ptr %10, align 1, !tbaa !9
  %195 = zext i8 %194 to i64
  %196 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %193, i64 0, i64 %195
  %197 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %196, i32 0, i32 9
  store i8 0, ptr %197, align 2, !tbaa !16
  br label %205

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

205:                                              ; preds = %198, %191
  br label %206

206:                                              ; preds = %205, %180
  br label %215

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

214:                                              ; preds = %49
  br label %215

215:                                              ; preds = %214, %207, %206, %151, %96
  %216 = load ptr, ptr %14, align 8, !tbaa !5
  %217 = load ptr, ptr %9, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %217, i32 0, i32 2
  %219 = load i8, ptr %10, align 1, !tbaa !9
  %220 = zext i8 %219 to i64
  %221 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %218, i64 0, i64 %220
  %222 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %221, i32 0, i32 10
  store ptr %216, ptr %222, align 8, !tbaa !19
  %223 = load i16, ptr %15, align 2, !tbaa !10
  %224 = zext i16 %223 to i32
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %225, i32 0, i32 2
  %227 = load i8, ptr %10, align 1, !tbaa !9
  %228 = zext i8 %227 to i64
  %229 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %226, i64 0, i64 %228
  %230 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %229, i32 0, i32 11
  store i32 %224, ptr %230, align 8, !tbaa !20
  %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 17
  store i32 0, 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 12
  store i32 0, ptr %242, align 4, !tbaa !22
  %243 = load i8, ptr %10, align 1, !tbaa !9
  %244 = load ptr, ptr %9, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %244, i32 0, i32 2
  %246 = load i8, ptr %10, align 1, !tbaa !9
  %247 = zext i8 %246 to i64
  %248 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %245, i64 0, i64 %247
  %249 = getelementptr inbounds %struct.USB_OTG_HCTypeDef, ptr %248, i32 0, i32 1
  store i8 %243, ptr %249, align 1, !tbaa !23
  %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 18
  store i32 0, ptr %255, align 8, !tbaa !24
  %256 = load ptr, ptr %9, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %256, i32 0, i32 0
  %258 = load ptr, ptr %257, align 8, !tbaa !25
  %259 = load ptr, ptr %9, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %259, i32 0, i32 2
  %261 = load i8, ptr %10, align 1, !tbaa !9
  %262 = zext i8 %261 to i64
  %263 = getelementptr inbounds [16 x %struct.USB_OTG_HCTypeDef], ptr %260, i64 0, i64 %262
  %264 = load ptr, ptr %9, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.HCD_HandleTypeDef, ptr %264, i32 0, i32 1
  %266 = getelementptr inbounds %struct.USB_OTG_CfgTypeDef, ptr %265, i32 0, i32 3
  %267 = load i32, ptr %266, align 4, !tbaa !28
  %268 = trunc i32 %267 to i8
  %269 = call i32 @USB_HC_StartXfer(ptr noundef %258, ptr noundef %263, i8 noundef zeroext %268)
  ret i32 %269
}

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, !7, i64 32, !7, i64 33, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48}
!14 = !{!"int", !7, i64 0}
!15 = !{!13, !7, i64 7}
!16 = !{!13, !7, i64 10}
!17 = !{!13, !7, i64 33}
!18 = !{!13, !7, i64 32}
!19 = !{!13, !6, i64 16}
!20 = !{!13, !14, i64 24}
!21 = !{!13, !14, i64 44}
!22 = !{!13, !14, i64 28}
!23 = !{!13, !7, i64 1}
!24 = !{!13, !14, i64 48}
!25 = !{!26, !6, i64 0}
!26 = !{!"", !6, i64 0, !27, i64 8, !7, i64 64, !14, i64 960, !14, i64 964, !14, i64 968, !6, i64 976}
!27 = !{!"", !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}
!28 = !{!26, !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, 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
  %spec.select = select i1 %14, i8 3, i8 2
  %15 = getelementptr inbounds i8, ptr %11, i64 10
  store i8 %spec.select, ptr %15, align 2
  switch i8 %3, label %45 [
    i8 0, label %16
    i8 2, label %25
    i8 3, label %35
    i8 1, label %.sink.split
  ]

16:                                               ; preds = %8
  %17 = icmp eq i8 %4, 1
  %18 = icmp eq i8 %2, 0
  %or.cond = and i1 %18, %17
  br i1 %or.cond, label %19, label %45

19:                                               ; preds = %16
  %20 = icmp eq i16 %6, 0
  %21 = getelementptr inbounds i8, ptr %11, i64 33
  br i1 %20, label %.thread, label %22

.thread:                                          ; preds = %19
  store i8 1, ptr %21, align 1, !tbaa !13
  br label %24

22:                                               ; preds = %19
  %.pre = load i8, ptr %21, align 1, !tbaa !13
  %23 = icmp eq i8 %.pre, 0
  br i1 %23, label %.sink.split, label %24

24:                                               ; preds = %.thread, %22
  br label %.sink.split

25:                                               ; preds = %8
  %26 = icmp eq i8 %2, 0
  br i1 %26, label %27, label %31

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %11, i64 33
  %29 = load i8, ptr %28, align 1, !tbaa !13
  %30 = icmp eq i8 %29, 0
  %. = select i1 %30, i8 0, i8 2
  br label %.sink.split

31:                                               ; preds = %25
  %32 = getelementptr inbounds i8, ptr %11, i64 32
  %33 = load i8, ptr %32, align 8, !tbaa !14
  %34 = icmp eq i8 %33, 0
  %.72 = select i1 %34, i8 0, i8 2
  br label %.sink.split

35:                                               ; preds = %8
  %36 = icmp eq i8 %2, 0
  br i1 %36, label %37, label %41

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %11, i64 33
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %40 = icmp eq i8 %39, 0
  %.73 = select i1 %40, i8 0, i8 2
  br label %.sink.split

41:                                               ; preds = %35
  %42 = getelementptr inbounds i8, ptr %11, i64 32
  %43 = load i8, ptr %42, align 8, !tbaa !14
  %44 = icmp eq i8 %43, 0
  %.74 = select i1 %44, i8 0, i8 2
  br label %.sink.split

.sink.split:                                      ; preds = %8, %41, %37, %31, %27, %22, %24
  %.sink = phi i8 [ 2, %24 ], [ 0, %22 ], [ %., %27 ], [ %.72, %31 ], [ %.73, %37 ], [ %.74, %41 ], [ 0, %8 ]
  store i8 %.sink, ptr %15, align 2, !tbaa !15
  br label %45

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

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, !7, i64 32, !7, i64 33, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48}
!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 33}
!14 = !{!6, !7, i64 32}
!15 = !{!6, !7, i64 10}
!16 = !{!6, !10, i64 16}
!17 = !{!6, !11, i64 24}
!18 = !{!6, !11, i64 44}
!19 = !{!6, !11, i64 28}
!20 = !{!6, !7, i64 1}
!21 = !{!6, !11, i64 48}
!22 = !{!23, !10, i64 0}
!23 = !{!"", !10, i64 0, !24, i64 8, !7, i64 64, !11, i64 960, !11, i64 964, !11, i64 968, !10, i64 976}
!24 = !{!"", !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}
!25 = !{!23, !11, i64 20}


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