; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/OptionRomPkg/Bus/Usb (Ax88772RxControl)

; 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.USB_DEVICE_REQUEST = type { i8, i8, i16, i16, i16 }
%struct.NIC_DEVICE = type { i64, ptr, ptr, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, i8, ptr, i16, i8, i8, i8, i8, i8, ptr, i64, ptr, ptr, ptr, [2 x i32], ptr }
%struct._EFI_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }

@.str.16 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [53 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ax88772UsbCommand(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ax88772MacAddressSet(ptr noundef, ptr noundef) #1

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

declare void @DebugPrint(i64 noundef, ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @Ax88772RxControl(ptr noundef %0, i32 noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i16, align 2
  %6 = alloca [2 x i32], align 4
  %7 = alloca i16, align 2
  %8 = alloca %struct.USB_DEVICE_REQUEST, align 1
  %9 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %10 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  store i32 0, ptr %10, align 4, !tbaa !9
  %11 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  store i32 0, ptr %11, align 4, !tbaa !9
  store i64 0, ptr %9, align 8, !tbaa !11
  store i16 896, ptr %7, align 2, !tbaa !13
  %12 = load i32, ptr %4, align 4, !tbaa !9
  %13 = icmp ne i32 0, %12
  br i1 %13, label %14, label %139

14:                                               ; preds = %2
  %15 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 0
  store i8 -64, ptr %15, align 1, !tbaa !15
  %16 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 1
  store i8 26, ptr %16, align 1, !tbaa !17
  %17 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 2
  store i16 0, ptr %17, align 1, !tbaa !18
  %18 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 3
  store i16 0, ptr %18, align 1, !tbaa !19
  %19 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 4
  store i16 2, ptr %19, align 1, !tbaa !20
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call i64 @Ax88772UsbCommand(ptr noundef %20, ptr noundef %8, ptr noundef %5)
  store i64 %21, ptr %9, align 8, !tbaa !11
  %22 = load i64, ptr %9, align 8, !tbaa !11
  %23 = icmp slt i64 %22, 0
  br i1 %23, label %72, label %24

24:                                               ; preds = %14
  %25 = load i16, ptr %5, align 2, !tbaa !13
  %26 = zext i16 %25 to i32
  %27 = and i32 %26, 256
  %28 = icmp eq i32 0, %27
  br i1 %28, label %29, label %71

29:                                               ; preds = %24
  %30 = load i16, ptr %5, align 2, !tbaa !13
  %31 = zext i16 %30 to i32
  %32 = or i32 %31, 260
  %33 = trunc i32 %32 to i16
  store i16 %33, ptr %5, align 2, !tbaa !13
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.NIC_DEVICE, ptr %34, i32 0, i32 10
  %36 = load i8, ptr %35, align 4, !tbaa !21
  %37 = icmp ne i8 %36, 0
  br i1 %37, label %38, label %43

38:                                               ; preds = %29
  %39 = load i16, ptr %5, align 2, !tbaa !13
  %40 = zext i16 %39 to i32
  %41 = or i32 %40, 48
  %42 = trunc i32 %41 to i16
  store i16 %42, ptr %5, align 2, !tbaa !13
  br label %43

43:                                               ; preds = %38, %29
  %44 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 0
  store i8 64, ptr %44, align 1, !tbaa !15
  %45 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 1
  store i8 27, ptr %45, align 1, !tbaa !17
  %46 = load i16, ptr %5, align 2, !tbaa !13
  %47 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 2
  store i16 %46, ptr %47, align 1, !tbaa !18
  %48 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 3
  store i16 0, ptr %48, align 1, !tbaa !19
  %49 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 4
  store i16 0, ptr %49, align 1, !tbaa !20
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = call i64 @Ax88772UsbCommand(ptr noundef %50, ptr noundef %8, ptr noundef null)
  store i64 %51, ptr %9, align 8, !tbaa !11
  %52 = load i64, ptr %9, align 8, !tbaa !11
  %53 = icmp slt i64 %52, 0
  br i1 %53, label %54, label %70

54:                                               ; preds = %43
  br label %55

55:                                               ; preds = %54
  %56 = call zeroext i8 @DebugPrintEnabled()
  %57 = icmp ne i8 %56, 0
  br i1 %57, label %58, label %67

58:                                               ; preds = %55
  br label %59

59:                                               ; preds = %58
  %60 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712)
  %61 = icmp ne i8 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %59
  %63 = load i64, ptr %9, align 8, !tbaa !11
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef @.str.16, i64 noundef %63)
  br label %64

64:                                               ; preds = %62, %59
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66, %55
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69, %43
  br label %71

71:                                               ; preds = %70, %24
  br label %88

72:                                               ; preds = %14
  br label %73

73:                                               ; preds = %72
  %74 = call zeroext i8 @DebugPrintEnabled()
  %75 = icmp ne i8 %74, 0
  br i1 %75, label %76, label %85

76:                                               ; preds = %73
  br label %77

77:                                               ; preds = %76
  %78 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712)
  %79 = icmp ne i8 %78, 0
  br i1 %79, label %80, label %82

80:                                               ; preds = %77
  %81 = load i64, ptr %9, align 8, !tbaa !11
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef @.str.17, i64 noundef %81)
  br label %82

82:                                               ; preds = %80, %77
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84, %73
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87, %71
  %89 = load i32, ptr %4, align 4, !tbaa !9
  %90 = and i32 %89, 2
  %91 = icmp ne i32 0, %90
  br i1 %91, label %92, label %107

92:                                               ; preds = %88
  %93 = load i16, ptr %7, align 2, !tbaa !13
  %94 = zext i16 %93 to i32
  %95 = or i32 %94, 16
  %96 = trunc i32 %95 to i16
  store i16 %96, ptr %7, align 2, !tbaa !13
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.NIC_DEVICE, ptr %97, i32 0, i32 18
  %99 = getelementptr inbounds [2 x i32], ptr %98, i64 0, i64 0
  %100 = load i32, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  store i32 %100, ptr %101, align 4, !tbaa !9
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.NIC_DEVICE, ptr %102, i32 0, i32 18
  %104 = getelementptr inbounds [2 x i32], ptr %103, i64 0, i64 1
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  store i32 %105, ptr %106, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %92, %88
  %108 = load i32, ptr %4, align 4, !tbaa !9
  %109 = and i32 %108, 16
  %110 = icmp ne i32 0, %109
  br i1 %110, label %111, label %118

111:                                              ; preds = %107
  %112 = load i16, ptr %7, align 2, !tbaa !13
  %113 = zext i16 %112 to i32
  %114 = or i32 %113, 2
  %115 = trunc i32 %114 to i16
  store i16 %115, ptr %7, align 2, !tbaa !13
  %116 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  store i32 -1, ptr %116, align 4, !tbaa !9
  %117 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  store i32 -1, ptr %117, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %111, %107
  %119 = load i32, ptr %4, align 4, !tbaa !9
  %120 = and i32 %119, 4
  %121 = icmp ne i32 0, %120
  br i1 %121, label %122, label %127

122:                                              ; preds = %118
  %123 = load i16, ptr %7, align 2, !tbaa !13
  %124 = zext i16 %123 to i32
  %125 = or i32 %124, 8
  %126 = trunc i32 %125 to i16
  store i16 %126, ptr %7, align 2, !tbaa !13
  br label %127

127:                                              ; preds = %122, %118
  %128 = load i32, ptr %4, align 4, !tbaa !9
  %129 = and i32 %128, 8
  %130 = icmp ne i32 0, %129
  br i1 %130, label %131, label %138

131:                                              ; preds = %127
  %132 = load i16, ptr %7, align 2, !tbaa !13
  %133 = zext i16 %132 to i32
  %134 = or i32 %133, 1
  %135 = trunc i32 %134 to i16
  store i16 %135, ptr %7, align 2, !tbaa !13
  %136 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  store i32 -1, ptr %136, align 4, !tbaa !9
  %137 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  store i32 -1, ptr %137, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %131, %127
  br label %139

139:                                              ; preds = %138, %2
  %140 = load i64, ptr %9, align 8, !tbaa !11
  %141 = icmp slt i64 %140, 0
  br i1 %141, label %150, label %142

142:                                              ; preds = %139
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.NIC_DEVICE, ptr %144, i32 0, i32 4
  %146 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %145, i32 0, i32 11
  %147 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds [32 x i8], ptr %147, i64 0, i64 0
  %149 = call i64 @Ax88772MacAddressSet(ptr noundef %143, ptr noundef %148)
  store i64 %149, ptr %9, align 8, !tbaa !11
  br label %150

150:                                              ; preds = %142, %139
  %151 = load i64, ptr %9, align 8, !tbaa !11
  %152 = icmp slt i64 %151, 0
  br i1 %152, label %279, label %153

153:                                              ; preds = %150
  %154 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 0
  store i8 64, ptr %154, align 1, !tbaa !15
  %155 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 1
  store i8 16, ptr %155, align 1, !tbaa !17
  %156 = load i16, ptr %7, align 2, !tbaa !13
  %157 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 2
  store i16 %156, ptr %157, align 1, !tbaa !18
  %158 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 3
  store i16 0, ptr %158, align 1, !tbaa !19
  %159 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 4
  store i16 0, ptr %159, align 1, !tbaa !20
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = call i64 @Ax88772UsbCommand(ptr noundef %160, ptr noundef %8, ptr noundef null)
  store i64 %161, ptr %9, align 8, !tbaa !11
  %162 = load i64, ptr %9, align 8, !tbaa !11
  %163 = icmp slt i64 %162, 0
  br i1 %163, label %262, label %164

164:                                              ; preds = %153
  br label %165

165:                                              ; preds = %164
  %166 = call zeroext i8 @DebugPrintEnabled()
  %167 = icmp ne i8 %166, 0
  br i1 %167, label %168, label %178

168:                                              ; preds = %165
  br label %169

169:                                              ; preds = %168
  %170 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 1879048256)
  %171 = icmp ne i8 %170, 0
  br i1 %171, label %172, label %175

172:                                              ; preds = %169
  %173 = load i16, ptr %7, align 2, !tbaa !13
  %174 = zext i16 %173 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 1879048256, ptr noundef @.str.18, i32 noundef %174)
  br label %175

175:                                              ; preds = %172, %169
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177, %165
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  %181 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 0
  store i8 64, ptr %181, align 1, !tbaa !15
  %182 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 1
  store i8 22, ptr %182, align 1, !tbaa !17
  %183 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 2
  store i16 0, ptr %183, align 1, !tbaa !18
  %184 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 3
  store i16 0, ptr %184, align 1, !tbaa !19
  %185 = getelementptr inbounds %struct.USB_DEVICE_REQUEST, ptr %8, i32 0, i32 4
  store i16 8, ptr %185, align 1, !tbaa !20
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.NIC_DEVICE, ptr %187, i32 0, i32 18
  %189 = call i64 @Ax88772UsbCommand(ptr noundef %186, ptr noundef %8, ptr noundef %188)
  store i64 %189, ptr %9, align 8, !tbaa !11
  %190 = load i64, ptr %9, align 8, !tbaa !11
  %191 = icmp slt i64 %190, 0
  br i1 %191, label %245, label %192

192:                                              ; preds = %180
  br label %193

193:                                              ; preds = %192
  %194 = call zeroext i8 @DebugPrintEnabled()
  %195 = icmp ne i8 %194, 0
  br i1 %195, label %196, label %242

196:                                              ; preds = %193
  br label %197

197:                                              ; preds = %196
  %198 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 536870976)
  %199 = icmp ne i8 %198, 0
  br i1 %199, label %200, label %239

200:                                              ; preds = %197
  %201 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  %202 = load i32, ptr %201, align 4, !tbaa !9
  %203 = trunc i32 %202 to i8
  %204 = zext i8 %203 to i32
  %205 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  %206 = load i32, ptr %205, align 4, !tbaa !9
  %207 = ashr i32 %206, 8
  %208 = trunc i32 %207 to i8
  %209 = zext i8 %208 to i32
  %210 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  %211 = load i32, ptr %210, align 4, !tbaa !9
  %212 = ashr i32 %211, 16
  %213 = trunc i32 %212 to i8
  %214 = zext i8 %213 to i32
  %215 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  %216 = load i32, ptr %215, align 4, !tbaa !9
  %217 = ashr i32 %216, 24
  %218 = trunc i32 %217 to i8
  %219 = zext i8 %218 to i32
  %220 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  %221 = load i32, ptr %220, align 4, !tbaa !9
  %222 = trunc i32 %221 to i8
  %223 = zext i8 %222 to i32
  %224 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  %225 = load i32, ptr %224, align 4, !tbaa !9
  %226 = ashr i32 %225, 8
  %227 = trunc i32 %226 to i8
  %228 = zext i8 %227 to i32
  %229 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  %230 = load i32, ptr %229, align 4, !tbaa !9
  %231 = ashr i32 %230, 16
  %232 = trunc i32 %231 to i8
  %233 = zext i8 %232 to i32
  %234 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  %235 = load i32, ptr %234, align 4, !tbaa !9
  %236 = ashr i32 %235, 24
  %237 = trunc i32 %236 to i8
  %238 = zext i8 %237 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 536870976, ptr noundef @.str.19, i32 noundef %204, i32 noundef %209, i32 noundef %214, i32 noundef %219, i32 noundef %223, i32 noundef %228, i32 noundef %233, i32 noundef %238)
  br label %239

239:                                              ; preds = %200, %197
  br label %240

240:                                              ; preds = %239
  br label %241

241:                                              ; preds = %240
  br label %242

242:                                              ; preds = %241, %193
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243
  br label %261

245:                                              ; preds = %180
  br label %246

246:                                              ; preds = %245
  %247 = call zeroext i8 @DebugPrintEnabled()
  %248 = icmp ne i8 %247, 0
  br i1 %248, label %249, label %258

249:                                              ; preds = %246
  br label %250

250:                                              ; preds = %249
  %251 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712)
  %252 = icmp ne i8 %251, 0
  br i1 %252, label %253, label %255

253:                                              ; preds = %250
  %254 = load i64, ptr %9, align 8, !tbaa !11
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef @.str.20, i64 noundef %254)
  br label %255

255:                                              ; preds = %253, %250
  br label %256

256:                                              ; preds = %255
  br label %257

257:                                              ; preds = %256
  br label %258

258:                                              ; preds = %257, %246
  br label %259

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259
  br label %261

261:                                              ; preds = %260, %244
  br label %278

262:                                              ; preds = %153
  br label %263

263:                                              ; preds = %262
  %264 = call zeroext i8 @DebugPrintEnabled()
  %265 = icmp ne i8 %264, 0
  br i1 %265, label %266, label %275

266:                                              ; preds = %263
  br label %267

267:                                              ; preds = %266
  %268 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712)
  %269 = icmp ne i8 %268, 0
  br i1 %269, label %270, label %272

270:                                              ; preds = %267
  %271 = load i64, ptr %9, align 8, !tbaa !11
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef @.str.21, i64 noundef %271)
  br label %272

272:                                              ; preds = %270, %267
  br label %273

273:                                              ; preds = %272
  br label %274

274:                                              ; preds = %273
  br label %275

275:                                              ; preds = %274, %263
  br label %276

276:                                              ; preds = %275
  br label %277

277:                                              ; preds = %276
  br label %278

278:                                              ; preds = %277, %261
  br label %279

279:                                              ; preds = %278, %150
  %280 = load i64, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #3
  ret i64 %280
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !7, i64 0}
!16 = !{!"", !7, i64 0, !7, i64 1, !14, i64 2, !14, i64 4, !14, i64 6}
!17 = !{!16, !7, i64 1}
!18 = !{!16, !14, i64 2}
!19 = !{!16, !14, i64 4}
!20 = !{!16, !14, i64 6}
!21 = !{!22, !7, i64 828}
!22 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !23, i64 24, !24, i64 152, !7, i64 808, !6, i64 816, !14, i64 824, !7, i64 826, !7, i64 827, !7, i64 828, !7, i64 829, !7, i64 830, !6, i64 832, !12, i64 840, !6, i64 848, !6, i64 856, !6, i64 864, !7, i64 872, !6, i64 880}
!23 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!24 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !25, i64 552, !25, i64 584, !25, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!25 = !{!"", !7, i64 0}


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

@.str.16 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [53 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ax88772UsbCommand(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ax88772MacAddressSet(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) local_unnamed_addr #2

declare void @DebugPrint(i64 noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i64 @Ax88772RxControl(ptr noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = alloca i16, align 2
  %4 = alloca %struct.USB_DEVICE_REQUEST, align 1
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %.not = icmp eq i32 %1, 0
  br i1 %.not, label %.thread, label %5

5:                                                ; preds = %2
  store i8 -64, ptr %4, align 1, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %4, i64 1
  store i8 26, ptr %6, align 1, !tbaa !10
  %7 = getelementptr inbounds i8, ptr %4, i64 2
  store i16 0, ptr %7, align 1, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %4, i64 4
  store i16 0, ptr %8, align 1, !tbaa !12
  %9 = getelementptr inbounds i8, ptr %4, i64 6
  store i16 2, ptr %9, align 1, !tbaa !13
  %10 = call i64 @Ax88772UsbCommand(ptr noundef %0, ptr noundef nonnull %4, ptr noundef nonnull %3)
  %11 = icmp slt i64 %10, 0
  br i1 %11, label %31, label %12

12:                                               ; preds = %5
  %13 = load i16, ptr %3, align 2, !tbaa !14
  %14 = and i16 %13, 256
  %15 = icmp eq i16 %14, 0
  br i1 %15, label %16, label %36

16:                                               ; preds = %12
  %17 = or i16 %13, 260
  store i16 %17, ptr %3, align 2, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %0, i64 828
  %19 = load i8, ptr %18, align 4, !tbaa !15
  %.not49 = icmp eq i8 %19, 0
  br i1 %.not49, label %22, label %20

20:                                               ; preds = %16
  %21 = or i16 %13, 308
  store i16 %21, ptr %3, align 2, !tbaa !14
  br label %22

22:                                               ; preds = %20, %16
  %23 = phi i16 [ %21, %20 ], [ %17, %16 ]
  store i8 64, ptr %4, align 1, !tbaa !5
  store i8 27, ptr %6, align 1, !tbaa !10
  store i16 %23, ptr %7, align 1, !tbaa !11
  store i16 0, ptr %8, align 1, !tbaa !12
  store i16 0, ptr %9, align 1, !tbaa !13
  %24 = call i64 @Ax88772UsbCommand(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef null)
  %25 = icmp slt i64 %24, 0
  br i1 %25, label %26, label %36

26:                                               ; preds = %22
  %27 = call zeroext i8 @DebugPrintEnabled() #3
  %.not50 = icmp eq i8 %27, 0
  br i1 %.not50, label %36, label %28

28:                                               ; preds = %26
  %29 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712) #3
  %.not51 = icmp eq i8 %29, 0
  br i1 %.not51, label %36, label %30

30:                                               ; preds = %28
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef nonnull @.str.16, i64 noundef %24) #3
  br label %36

31:                                               ; preds = %5
  %32 = call zeroext i8 @DebugPrintEnabled() #3
  %.not52 = icmp eq i8 %32, 0
  br i1 %.not52, label %36, label %33

33:                                               ; preds = %31
  %34 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712) #3
  %.not53 = icmp eq i8 %34, 0
  br i1 %.not53, label %36, label %35

35:                                               ; preds = %33
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef nonnull @.str.17, i64 noundef %10) #3
  br label %36

36:                                               ; preds = %31, %35, %33, %12, %26, %30, %28, %22
  %.0 = phi i64 [ %10, %35 ], [ %10, %33 ], [ %10, %31 ], [ %24, %30 ], [ %24, %28 ], [ %24, %26 ], [ %24, %22 ], [ %10, %12 ]
  %37 = and i32 %1, 2
  %.not54 = icmp eq i32 %37, 0
  br i1 %.not54, label %43, label %38

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %0, i64 872
  %40 = load i32, ptr %39, align 8, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %0, i64 876
  %42 = load i32, ptr %41, align 4, !tbaa !23
  br label %43

43:                                               ; preds = %38, %36
  %.sroa.10.0 = phi i32 [ %42, %38 ], [ 0, %36 ]
  %.sroa.0.0 = phi i32 [ %40, %38 ], [ 0, %36 ]
  %.037 = phi i16 [ 912, %38 ], [ 896, %36 ]
  %44 = trunc i32 %1 to i16
  %45 = lshr i16 %44, 3
  %46 = shl i16 %44, 1
  %47 = and i16 %46, 8
  %48 = and i32 %1, 24
  %49 = icmp eq i32 %48, 0
  %.sroa.10.2 = select i1 %49, i32 %.sroa.10.0, i32 -1
  %.sroa.0.2 = select i1 %49, i32 %.sroa.0.0, i32 -1
  %50 = and i16 %45, 3
  %.239 = or disjoint i16 %47, %50
  %.340 = or disjoint i16 %.239, %.037
  %51 = icmp slt i64 %.0, 0
  br i1 %51, label %.thread76, label %.thread

.thread:                                          ; preds = %2, %43
  %.34074 = phi i16 [ %.340, %43 ], [ 896, %2 ]
  %.sroa.0.272 = phi i32 [ %.sroa.0.2, %43 ], [ 0, %2 ]
  %.sroa.10.270 = phi i32 [ %.sroa.10.2, %43 ], [ 0, %2 ]
  %52 = getelementptr inbounds i8, ptr %0, i64 704
  %53 = call i64 @Ax88772MacAddressSet(ptr noundef %0, ptr noundef nonnull %52)
  %54 = icmp slt i64 %53, 0
  br i1 %54, label %.thread76, label %55

55:                                               ; preds = %.thread
  store i8 64, ptr %4, align 1, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %4, i64 1
  store i8 16, ptr %56, align 1, !tbaa !10
  %57 = getelementptr inbounds i8, ptr %4, i64 2
  store i16 %.34074, ptr %57, align 1, !tbaa !11
  %58 = getelementptr inbounds i8, ptr %4, i64 4
  store i16 0, ptr %58, align 1, !tbaa !12
  %59 = getelementptr inbounds i8, ptr %4, i64 6
  store i16 0, ptr %59, align 1, !tbaa !13
  %60 = call i64 @Ax88772UsbCommand(ptr noundef %0, ptr noundef nonnull %4, ptr noundef null)
  %61 = icmp slt i64 %60, 0
  %62 = call zeroext i8 @DebugPrintEnabled() #3
  %.not64 = icmp eq i8 %62, 0
  br i1 %61, label %93, label %63

63:                                               ; preds = %55
  br i1 %.not64, label %68, label %64

64:                                               ; preds = %63
  %65 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 1879048256) #3
  %.not59 = icmp eq i8 %65, 0
  br i1 %.not59, label %68, label %66

66:                                               ; preds = %64
  %67 = zext nneg i16 %.34074 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 1879048256, ptr noundef nonnull @.str.18, i32 noundef %67) #3
  br label %68

68:                                               ; preds = %64, %66, %63
  store i8 64, ptr %4, align 1, !tbaa !5
  store i8 22, ptr %56, align 1, !tbaa !10
  store i16 0, ptr %57, align 1, !tbaa !11
  store i16 0, ptr %58, align 1, !tbaa !12
  store i16 8, ptr %59, align 1, !tbaa !13
  %69 = getelementptr inbounds i8, ptr %0, i64 872
  %70 = call i64 @Ax88772UsbCommand(ptr noundef %0, ptr noundef nonnull %4, ptr noundef nonnull %69)
  %71 = icmp slt i64 %70, 0
  %72 = call zeroext i8 @DebugPrintEnabled() #3
  %.not62 = icmp eq i8 %72, 0
  br i1 %71, label %89, label %73

73:                                               ; preds = %68
  br i1 %.not62, label %.thread76, label %74

74:                                               ; preds = %73
  %75 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 536870976) #3
  %.not61 = icmp eq i8 %75, 0
  br i1 %.not61, label %.thread76, label %76

76:                                               ; preds = %74
  %77 = and i32 %.sroa.0.272, 255
  %78 = lshr i32 %.sroa.0.272, 8
  %79 = and i32 %78, 255
  %80 = lshr i32 %.sroa.0.272, 16
  %81 = and i32 %80, 255
  %82 = lshr i32 %.sroa.0.272, 24
  %83 = and i32 %.sroa.10.270, 255
  %84 = lshr i32 %.sroa.10.270, 8
  %85 = and i32 %84, 255
  %86 = lshr i32 %.sroa.10.270, 16
  %87 = and i32 %86, 255
  %88 = lshr i32 %.sroa.10.270, 24
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 536870976, ptr noundef nonnull @.str.19, i32 noundef %77, i32 noundef %79, i32 noundef %81, i32 noundef %82, i32 noundef %83, i32 noundef %85, i32 noundef %87, i32 noundef %88) #3
  br label %.thread76

89:                                               ; preds = %68
  br i1 %.not62, label %.thread76, label %90

90:                                               ; preds = %89
  %91 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712) #3
  %.not63 = icmp eq i8 %91, 0
  br i1 %.not63, label %.thread76, label %92

92:                                               ; preds = %90
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef nonnull @.str.20, i64 noundef %70) #3
  br label %.thread76

93:                                               ; preds = %55
  br i1 %.not64, label %.thread76, label %94

94:                                               ; preds = %93
  %95 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483712) #3
  %.not65 = icmp eq i8 %95, 0
  br i1 %.not65, label %.thread76, label %96

96:                                               ; preds = %94
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483712, ptr noundef nonnull @.str.21, i64 noundef %60) #3
  br label %.thread76

.thread76:                                        ; preds = %43, %89, %92, %90, %73, %76, %74, %94, %96, %93, %.thread
  %.3 = phi i64 [ %53, %.thread ], [ %60, %96 ], [ %60, %94 ], [ %60, %93 ], [ %70, %92 ], [ %70, %90 ], [ %70, %89 ], [ %70, %76 ], [ %70, %74 ], [ %70, %73 ], [ %.0, %43 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #3
  ret i64 %.3
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 1, !9, i64 2, !9, i64 4, !9, i64 6}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!6, !7, i64 1}
!11 = !{!6, !9, i64 2}
!12 = !{!6, !9, i64 4}
!13 = !{!6, !9, i64 6}
!14 = !{!9, !9, i64 0}
!15 = !{!16, !7, i64 828}
!16 = !{!"", !17, i64 0, !18, i64 8, !18, i64 16, !19, i64 24, !20, i64 152, !7, i64 808, !18, i64 816, !9, i64 824, !7, i64 826, !7, i64 827, !7, i64 828, !7, i64 829, !7, i64 830, !18, i64 832, !17, i64 840, !18, i64 848, !18, i64 856, !18, i64 864, !7, i64 872, !18, i64 880}
!17 = !{!"long long", !7, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !17, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40, !18, i64 48, !18, i64 56, !18, i64 64, !18, i64 72, !18, i64 80, !18, i64 88, !18, i64 96, !18, i64 104, !18, i64 112, !18, i64 120}
!20 = !{!"", !21, i64 0, !21, i64 4, !21, i64 8, !21, i64 12, !21, i64 16, !21, i64 20, !21, i64 24, !21, i64 28, !21, i64 32, !21, i64 36, !7, i64 40, !22, i64 552, !22, i64 584, !22, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!21 = !{!"int", !7, i64 0}
!22 = !{!"", !7, i64 0}
!23 = !{!21, !21, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass