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

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH = type { %struct.EFI_DEVICE_PATH_PROTOCOL, i8 }
%struct.EFI_DEVICE_PATH_PROTOCOL = type { i8, i8, [2 x i8] }
%struct._USB_MASS_DEVICE = type { i32, ptr, ptr, ptr, %struct._EFI_BLOCK_IO_PROTOCOL, %struct.EFI_BLOCK_IO_MEDIA, i8, i8, i8, ptr, ptr, %struct._EFI_DISK_INFO_PROTOCOL, %struct.USB_BOOT_INQUIRY_DATA, i8 }
%struct._EFI_BLOCK_IO_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_BLOCK_IO_MEDIA = type { i32, i8, i8, i8, i8, i8, i32, i32, i64, i64, i32, i32 }
%struct._EFI_DISK_INFO_PROTOCOL = type { %struct.GUID, ptr, ptr, ptr, ptr }
%struct.USB_BOOT_INQUIRY_DATA = type { i8, i8, [2 x i8], i8, [3 x i8], [8 x i8], [16 x i8], [4 x i8] }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%struct._EFI_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }

@gBS = external global ptr, align 8
@.str = external hidden unnamed_addr constant [154 x i8], align 1
@gEfiUsbIoProtocolGuid = external global %struct.GUID, align 4
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [69 x i8], align 1
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@gEfiBlockIoProtocolGuid = external global %struct.GUID, align 4
@gEfiDiskInfoProtocolGuid = external global %struct.GUID, align 4
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [61 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbMassReset(ptr noundef, i8 noundef zeroext) #0

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

declare zeroext i8 @DebugAssertEnabled() #2

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #2

; 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 i64 @UsbMassReadBlocks(ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef) #0

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbMassFlushBlocks(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbMassInitMedia(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i64 @UsbMassInitMultiLun(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i8 noundef zeroext %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH, align 1
  %16 = alloca i8, align 1
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store i8 %5, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 5, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  br label %19

19:                                               ; preds = %6
  %20 = call zeroext i8 @DebugAssertEnabled()
  %21 = icmp ne i8 %20, 0
  br i1 %21, label %22, label %28

22:                                               ; preds = %19
  %23 = load i8, ptr %12, align 1, !tbaa !9
  %24 = zext i8 %23 to i32
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @DebugAssert(ptr noundef @.str, i64 noundef 487, ptr noundef @.str.4)
  br label %27

27:                                               ; preds = %26, %22
  br label %28

28:                                               ; preds = %27, %19
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  store i64 -9223372036854775794, ptr %18, align 8, !tbaa !10
  store i8 0, ptr %16, align 1, !tbaa !9
  br label %31

31:                                               ; preds = %260, %30
  %32 = load i8, ptr %16, align 1, !tbaa !9
  %33 = zext i8 %32 to i32
  %34 = load i8, ptr %12, align 1, !tbaa !9
  %35 = zext i8 %34 to i32
  %36 = icmp sle i32 %33, %35
  br i1 %36, label %37, label %263

37:                                               ; preds = %31
  br label %38

38:                                               ; preds = %37
  %39 = call zeroext i8 @DebugPrintEnabled()
  %40 = icmp ne i8 %39, 0
  br i1 %40, label %41, label %51

41:                                               ; preds = %38
  br label %42

42:                                               ; preds = %41
  %43 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 64)
  %44 = icmp ne i8 %43, 0
  br i1 %44, label %45, label %48

45:                                               ; preds = %42
  %46 = load i8, ptr %16, align 1, !tbaa !9
  %47 = zext i8 %46 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 64, ptr noundef @.str.5, i32 noundef %47)
  br label %48

48:                                               ; preds = %45, %42
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50, %38
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  store ptr null, ptr %14, align 8, !tbaa !5
  %54 = call ptr @AllocateZeroPool(i64 noundef 240)
  store ptr %54, ptr %13, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %53
  %56 = call zeroext i8 @DebugAssertEnabled()
  %57 = icmp ne i8 %56, 0
  br i1 %57, label %58, label %63

58:                                               ; preds = %55
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  call void @DebugAssert(ptr noundef @.str, i64 noundef 496, ptr noundef @.str.6)
  br label %62

62:                                               ; preds = %61, %58
  br label %63

63:                                               ; preds = %62, %55
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %66, i32 0, i32 0
  store i32 1298297685, ptr %67, align 8, !tbaa !12
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %69, i32 0, i32 2
  store ptr %68, ptr %70, align 8, !tbaa !21
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %71, i32 0, i32 5
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %73, i32 0, i32 4
  %75 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %74, i32 0, i32 1
  store ptr %72, ptr %75, align 8, !tbaa !22
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %76, i32 0, i32 4
  %78 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %77, i32 0, i32 2
  store ptr @UsbMassReset, ptr %78, align 8, !tbaa !23
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %79, i32 0, i32 4
  %81 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %80, i32 0, i32 3
  store ptr @UsbMassReadBlocks, ptr %81, align 8, !tbaa !24
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %82, i32 0, i32 4
  %84 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %83, i32 0, i32 4
  store ptr @UsbMassWriteBlocks, ptr %84, align 8, !tbaa !25
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %85, i32 0, i32 4
  %87 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %86, i32 0, i32 5
  store ptr @UsbMassFlushBlocks, ptr %87, align 8, !tbaa !26
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %88, i32 0, i32 6
  store i8 0, ptr %89, align 8, !tbaa !27
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %91, i32 0, i32 9
  store ptr %90, ptr %92, align 8, !tbaa !28
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %94, i32 0, i32 10
  store ptr %93, ptr %95, align 8, !tbaa !29
  %96 = load i8, ptr %16, align 1, !tbaa !9
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %97, i32 0, i32 7
  store i8 %96, ptr %98, align 1, !tbaa !30
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = call i64 @UsbMassInitMedia(ptr noundef %99)
  store i64 %100, ptr %17, align 8, !tbaa !10
  %101 = load i64, ptr %17, align 8, !tbaa !10
  %102 = icmp slt i64 %101, 0
  br i1 %102, label %103, label %123

103:                                              ; preds = %65
  %104 = load i64, ptr %17, align 8, !tbaa !10
  %105 = icmp ne i64 %104, -9223372036854775796
  br i1 %105, label %106, label %123

106:                                              ; preds = %103
  br label %107

107:                                              ; preds = %106
  %108 = call zeroext i8 @DebugPrintEnabled()
  %109 = icmp ne i8 %108, 0
  br i1 %109, label %110, label %119

110:                                              ; preds = %107
  br label %111

111:                                              ; preds = %110
  %112 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %113 = icmp ne i8 %112, 0
  br i1 %113, label %114, label %116

114:                                              ; preds = %111
  %115 = load i64, ptr %17, align 8, !tbaa !10
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.7, i64 noundef %115)
  br label %116

116:                                              ; preds = %114, %111
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  br label %119

119:                                              ; preds = %118, %107
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %122)
  br label %260

123:                                              ; preds = %103, %65
  %124 = getelementptr inbounds %struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH, ptr %15, i32 0, i32 0
  %125 = getelementptr inbounds %struct.EFI_DEVICE_PATH_PROTOCOL, ptr %124, i32 0, i32 0
  store i8 3, ptr %125, align 1, !tbaa !31
  %126 = getelementptr inbounds %struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH, ptr %15, i32 0, i32 0
  %127 = getelementptr inbounds %struct.EFI_DEVICE_PATH_PROTOCOL, ptr %126, i32 0, i32 1
  store i8 17, ptr %127, align 1, !tbaa !34
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %128, i32 0, i32 7
  %130 = load i8, ptr %129, align 1, !tbaa !30
  %131 = getelementptr inbounds %struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH, ptr %15, i32 0, i32 1
  store i8 %130, ptr %131, align 1, !tbaa !35
  %132 = getelementptr inbounds %struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH, ptr %15, i32 0, i32 0
  %133 = call zeroext i16 @SetDevicePathNodeLength(ptr noundef %132, i64 noundef 5)
  %134 = load ptr, ptr %11, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH, ptr %15, i32 0, i32 0
  %136 = call ptr @AppendDevicePathNode(ptr noundef %134, ptr noundef %135)
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %137, i32 0, i32 3
  store ptr %136, ptr %138, align 8, !tbaa !36
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %139, i32 0, i32 3
  %141 = load ptr, ptr %140, align 8, !tbaa !36
  %142 = icmp eq ptr %141, null
  br i1 %142, label %143, label %159

143:                                              ; preds = %123
  br label %144

144:                                              ; preds = %143
  %145 = call zeroext i8 @DebugPrintEnabled()
  %146 = icmp ne i8 %145, 0
  br i1 %146, label %147, label %155

147:                                              ; preds = %144
  br label %148

148:                                              ; preds = %147
  %149 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %150 = icmp ne i8 %149, 0
  br i1 %150, label %151, label %152

151:                                              ; preds = %148
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.8)
  br label %152

152:                                              ; preds = %151, %148
  br label %153

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154, %144
  br label %156

156:                                              ; preds = %155
  br label %157

157:                                              ; preds = %156
  store i64 -9223372036854775799, ptr %17, align 8, !tbaa !10
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %158)
  br label %260

159:                                              ; preds = %123
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  call void @InitializeDiskInfo(ptr noundef %160)
  %161 = load ptr, ptr @gBS, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %161, i32 0, i32 39
  %163 = load ptr, ptr %162, align 8, !tbaa !37
  %164 = load ptr, ptr %13, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %166, i32 0, i32 3
  %168 = load ptr, ptr %167, align 8, !tbaa !36
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %13, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %171, i32 0, i32 11
  %173 = call i64 (ptr, ...) %163(ptr noundef %165, ptr noundef @gEfiDevicePathProtocolGuid, ptr noundef %168, ptr noundef @gEfiBlockIoProtocolGuid, ptr noundef %170, ptr noundef @gEfiDiskInfoProtocolGuid, ptr noundef %172, ptr noundef null)
  store i64 %173, ptr %17, align 8, !tbaa !10
  %174 = load i64, ptr %17, align 8, !tbaa !10
  %175 = icmp slt i64 %174, 0
  br i1 %175, label %176, label %196

176:                                              ; preds = %159
  br label %177

177:                                              ; preds = %176
  %178 = call zeroext i8 @DebugPrintEnabled()
  %179 = icmp ne i8 %178, 0
  br i1 %179, label %180, label %189

180:                                              ; preds = %177
  br label %181

181:                                              ; preds = %180
  %182 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %183 = icmp ne i8 %182, 0
  br i1 %183, label %184, label %186

184:                                              ; preds = %181
  %185 = load i64, ptr %17, align 8, !tbaa !10
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.9, i64 noundef %185)
  br label %186

186:                                              ; preds = %184, %181
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188, %177
  br label %190

190:                                              ; preds = %189
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %13, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %192, i32 0, i32 3
  %194 = load ptr, ptr %193, align 8, !tbaa !36
  call void @FreePool(ptr noundef %194)
  %195 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %195)
  br label %260

196:                                              ; preds = %159
  %197 = load ptr, ptr @gBS, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %197, i32 0, i32 33
  %199 = load ptr, ptr %198, align 8, !tbaa !40
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %201, i32 0, i32 5
  %203 = load ptr, ptr %202, align 8, !tbaa !41
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %204, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8, !tbaa !43
  %207 = call i64 %199(ptr noundef %200, ptr noundef @gEfiUsbIoProtocolGuid, ptr noundef %14, ptr noundef %203, ptr noundef %206, i32 noundef 8)
  store i64 %207, ptr %17, align 8, !tbaa !10
  %208 = load i64, ptr %17, align 8, !tbaa !10
  %209 = icmp slt i64 %208, 0
  br i1 %209, label %210, label %243

210:                                              ; preds = %196
  br label %211

211:                                              ; preds = %210
  %212 = call zeroext i8 @DebugPrintEnabled()
  %213 = icmp ne i8 %212, 0
  br i1 %213, label %214, label %223

214:                                              ; preds = %211
  br label %215

215:                                              ; preds = %214
  %216 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %217 = icmp ne i8 %216, 0
  br i1 %217, label %218, label %220

218:                                              ; preds = %215
  %219 = load i64, ptr %17, align 8, !tbaa !10
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.10, i64 noundef %219)
  br label %220

220:                                              ; preds = %218, %215
  br label %221

221:                                              ; preds = %220
  br label %222

222:                                              ; preds = %221
  br label %223

223:                                              ; preds = %222, %211
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224
  %226 = load ptr, ptr @gBS, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %226, i32 0, i32 40
  %228 = load ptr, ptr %227, align 8, !tbaa !44
  %229 = load ptr, ptr %13, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %229, i32 0, i32 1
  %231 = load ptr, ptr %13, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %231, i32 0, i32 3
  %233 = load ptr, ptr %232, align 8, !tbaa !36
  %234 = load ptr, ptr %13, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %234, i32 0, i32 4
  %236 = load ptr, ptr %13, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %236, i32 0, i32 11
  %238 = call i64 (ptr, ...) %228(ptr noundef %230, ptr noundef @gEfiDevicePathProtocolGuid, ptr noundef %233, ptr noundef @gEfiBlockIoProtocolGuid, ptr noundef %235, ptr noundef @gEfiDiskInfoProtocolGuid, ptr noundef %237, ptr noundef null)
  %239 = load ptr, ptr %13, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct._USB_MASS_DEVICE, ptr %239, i32 0, i32 3
  %241 = load ptr, ptr %240, align 8, !tbaa !36
  call void @FreePool(ptr noundef %241)
  %242 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %242)
  br label %260

243:                                              ; preds = %196
  store i64 0, ptr %18, align 8, !tbaa !10
  br label %244

244:                                              ; preds = %243
  %245 = call zeroext i8 @DebugPrintEnabled()
  %246 = icmp ne i8 %245, 0
  br i1 %246, label %247, label %257

247:                                              ; preds = %244
  br label %248

248:                                              ; preds = %247
  %249 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 64)
  %250 = icmp ne i8 %249, 0
  br i1 %250, label %251, label %254

251:                                              ; preds = %248
  %252 = load i8, ptr %16, align 1, !tbaa !9
  %253 = zext i8 %252 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 64, ptr noundef @.str.11, i32 noundef %253)
  br label %254

254:                                              ; preds = %251, %248
  br label %255

255:                                              ; preds = %254
  br label %256

256:                                              ; preds = %255
  br label %257

257:                                              ; preds = %256, %244
  br label %258

258:                                              ; preds = %257
  br label %259

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259, %225, %191, %157, %121
  %261 = load i8, ptr %16, align 1, !tbaa !9
  %262 = add i8 %261, 1
  store i8 %262, ptr %16, align 1, !tbaa !9
  br label %31, !llvm.loop !45

263:                                              ; preds = %31
  %264 = load i64, ptr %18, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 5, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret i64 %264
}

declare ptr @AllocateZeroPool(i64 noundef) #2

declare void @FreePool(ptr noundef) #2

declare zeroext i16 @SetDevicePathNodeLength(ptr noundef, i64 noundef) #2

declare ptr @AppendDevicePathNode(ptr noundef, ptr noundef) #2

declare void @InitializeDiskInfo(ptr noundef) #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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"_USB_MASS_DEVICE", !14, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !15, i64 32, !16, i64 80, !7, i64 128, !7, i64 129, !7, i64 130, !6, i64 136, !6, i64 144, !17, i64 152, !20, i64 200, !7, i64 236}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_EFI_BLOCK_IO_PROTOCOL", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!16 = !{!"", !14, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !14, i64 12, !14, i64 16, !11, i64 24, !11, i64 32, !14, i64 40, !14, i64 44}
!17 = !{!"_EFI_DISK_INFO_PROTOCOL", !18, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!"", !14, i64 0, !19, i64 4, !19, i64 6, !7, i64 8}
!19 = !{!"short", !7, i64 0}
!20 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 4, !7, i64 5, !7, i64 8, !7, i64 16, !7, i64 32}
!21 = !{!13, !6, i64 16}
!22 = !{!13, !6, i64 40}
!23 = !{!13, !6, i64 48}
!24 = !{!13, !6, i64 56}
!25 = !{!13, !6, i64 64}
!26 = !{!13, !6, i64 72}
!27 = !{!13, !7, i64 128}
!28 = !{!13, !6, i64 136}
!29 = !{!13, !6, i64 144}
!30 = !{!13, !7, i64 129}
!31 = !{!32, !7, i64 0}
!32 = !{!"", !33, i64 0, !7, i64 4}
!33 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!34 = !{!32, !7, i64 1}
!35 = !{!32, !7, i64 4}
!36 = !{!13, !6, i64 24}
!37 = !{!38, !6, i64 328}
!38 = !{!"", !39, i64 0, !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, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!39 = !{!"", !11, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!40 = !{!38, !6, i64 280}
!41 = !{!42, !6, i64 40}
!42 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !6, i64 32, !6, i64 40}
!43 = !{!13, !6, i64 8}
!44 = !{!38, !6, i64 336}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}


; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH = type { %struct.EFI_DEVICE_PATH_PROTOCOL, i8 }
%struct.EFI_DEVICE_PATH_PROTOCOL = type { i8, i8, [2 x i8] }

@gBS = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [154 x i8], align 1
@gEfiUsbIoProtocolGuid = external global %struct.GUID, align 4
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [69 x i8], align 1
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@gEfiBlockIoProtocolGuid = external global %struct.GUID, align 4
@gEfiDiskInfoProtocolGuid = external global %struct.GUID, align 4
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [61 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbMassReset(ptr noundef, i8 noundef zeroext) #0

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

; 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 i64 @UsbMassReadBlocks(ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef) #0

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
declare dso_local i64 @UsbMassWriteBlocks(ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbMassFlushBlocks(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775794, 1) i64 @UsbMassInitMultiLun(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i8 noundef zeroext %5) local_unnamed_addr #0 {
  %7 = alloca ptr, align 8
  %8 = alloca %struct.DEVICE_LOGICAL_UNIT_DEVICE_PATH, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %8) #3
  %9 = tail call zeroext i8 @DebugAssertEnabled() #3
  %10 = icmp eq i8 %9, 0
  %11 = icmp ne i8 %5, 0
  %or.cond4 = or i1 %11, %10
  br i1 %or.cond4, label %13, label %12

12:                                               ; preds = %6
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 487, ptr noundef nonnull @.str.4) #3
  br label %13

13:                                               ; preds = %12, %6
  %14 = getelementptr inbounds i8, ptr %8, i64 1
  %15 = getelementptr inbounds i8, ptr %8, i64 4
  %16 = getelementptr inbounds i8, ptr %0, i64 40
  br label %17

17:                                               ; preds = %13, %104
  %18 = phi i32 [ 0, %13 ], [ %106, %104 ]
  %.076 = phi i64 [ -9223372036854775794, %13 ], [ %.1, %104 ]
  %.05875 = phi i8 [ 0, %13 ], [ %105, %104 ]
  %19 = call zeroext i8 @DebugPrintEnabled() #3
  %.not63 = icmp eq i8 %19, 0
  br i1 %.not63, label %23, label %20

20:                                               ; preds = %17
  %21 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 64) #3
  %.not64 = icmp eq i8 %21, 0
  br i1 %.not64, label %23, label %22

22:                                               ; preds = %20
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 64, ptr noundef nonnull @.str.5, i32 noundef %18) #3
  br label %23

23:                                               ; preds = %20, %22, %17
  store ptr null, ptr %7, align 8, !tbaa !5
  %24 = call ptr @AllocateZeroPool(i64 noundef 240) #3
  %25 = call zeroext i8 @DebugAssertEnabled() #3
  %26 = icmp eq i8 %25, 0
  %27 = icmp ne ptr %24, null
  %or.cond6 = select i1 %26, i1 true, i1 %27
  br i1 %or.cond6, label %29, label %28

28:                                               ; preds = %23
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 496, ptr noundef nonnull @.str.6) #3
  br label %29

29:                                               ; preds = %28, %23
  store i32 1298297685, ptr %24, align 8, !tbaa !9
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %24, i64 16
  store ptr %30, ptr %31, align 8, !tbaa !19
  %32 = getelementptr inbounds i8, ptr %24, i64 80
  %33 = getelementptr inbounds i8, ptr %24, i64 32
  %34 = getelementptr inbounds i8, ptr %24, i64 40
  store ptr %32, ptr %34, align 8, !tbaa !20
  %35 = getelementptr inbounds i8, ptr %24, i64 48
  store ptr @UsbMassReset, ptr %35, align 8, !tbaa !21
  %36 = getelementptr inbounds i8, ptr %24, i64 56
  store ptr @UsbMassReadBlocks, ptr %36, align 8, !tbaa !22
  %37 = getelementptr inbounds i8, ptr %24, i64 64
  store ptr @UsbMassWriteBlocks, ptr %37, align 8, !tbaa !23
  %38 = getelementptr inbounds i8, ptr %24, i64 72
  store ptr @UsbMassFlushBlocks, ptr %38, align 8, !tbaa !24
  %39 = getelementptr inbounds i8, ptr %24, i64 128
  store i8 0, ptr %39, align 8, !tbaa !25
  %40 = getelementptr inbounds i8, ptr %24, i64 136
  store ptr %2, ptr %40, align 8, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %24, i64 144
  store ptr %3, ptr %41, align 8, !tbaa !27
  %42 = getelementptr inbounds i8, ptr %24, i64 129
  store i8 %.05875, ptr %42, align 1, !tbaa !28
  %43 = call i64 @UsbMassInitMedia(ptr noundef nonnull %24)
  %44 = icmp slt i64 %43, 0
  %45 = icmp ne i64 %43, -9223372036854775796
  %or.cond = and i1 %44, %45
  br i1 %or.cond, label %46, label %52

46:                                               ; preds = %29
  %47 = call zeroext i8 @DebugPrintEnabled() #3
  %.not73 = icmp eq i8 %47, 0
  br i1 %.not73, label %51, label %48

48:                                               ; preds = %46
  %49 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not74 = icmp eq i8 %49, 0
  br i1 %.not74, label %51, label %50

50:                                               ; preds = %48
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.7, i64 noundef %43) #3
  br label %51

51:                                               ; preds = %48, %50, %46
  call void @FreePool(ptr noundef nonnull %24) #3
  br label %104

52:                                               ; preds = %29
  store i8 3, ptr %8, align 1, !tbaa !29
  store i8 17, ptr %14, align 1, !tbaa !32
  %53 = load i8, ptr %42, align 1, !tbaa !28
  store i8 %53, ptr %15, align 1, !tbaa !33
  %54 = call zeroext i16 @SetDevicePathNodeLength(ptr noundef nonnull %8, i64 noundef 5) #3
  %55 = call ptr @AppendDevicePathNode(ptr noundef %4, ptr noundef nonnull %8) #3
  %56 = getelementptr inbounds i8, ptr %24, i64 24
  store ptr %55, ptr %56, align 8, !tbaa !34
  %57 = icmp eq ptr %55, null
  br i1 %57, label %58, label %64

58:                                               ; preds = %52
  %59 = call zeroext i8 @DebugPrintEnabled() #3
  %.not71 = icmp eq i8 %59, 0
  br i1 %.not71, label %63, label %60

60:                                               ; preds = %58
  %61 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not72 = icmp eq i8 %61, 0
  br i1 %.not72, label %63, label %62

62:                                               ; preds = %60
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.8) #3
  br label %63

63:                                               ; preds = %60, %62, %58
  call void @FreePool(ptr noundef nonnull %24) #3
  br label %104

64:                                               ; preds = %52
  call void @InitializeDiskInfo(ptr noundef nonnull %24) #3
  %65 = load ptr, ptr @gBS, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 328
  %67 = load ptr, ptr %66, align 8, !tbaa !35
  %68 = getelementptr inbounds i8, ptr %24, i64 8
  %69 = load ptr, ptr %56, align 8, !tbaa !34
  %70 = getelementptr inbounds i8, ptr %24, i64 152
  %71 = call i64 (ptr, ...) %67(ptr noundef nonnull %68, ptr noundef nonnull @gEfiDevicePathProtocolGuid, ptr noundef %69, ptr noundef nonnull @gEfiBlockIoProtocolGuid, ptr noundef nonnull %33, ptr noundef nonnull @gEfiDiskInfoProtocolGuid, ptr noundef nonnull %70, ptr noundef null) #3
  %72 = icmp slt i64 %71, 0
  br i1 %72, label %73, label %80

73:                                               ; preds = %64
  %74 = call zeroext i8 @DebugPrintEnabled() #3
  %.not69 = icmp eq i8 %74, 0
  br i1 %.not69, label %78, label %75

75:                                               ; preds = %73
  %76 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not70 = icmp eq i8 %76, 0
  br i1 %.not70, label %78, label %77

77:                                               ; preds = %75
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.9, i64 noundef %71) #3
  br label %78

78:                                               ; preds = %75, %77, %73
  %79 = load ptr, ptr %56, align 8, !tbaa !34
  call void @FreePool(ptr noundef %79) #3
  call void @FreePool(ptr noundef nonnull %24) #3
  br label %104

80:                                               ; preds = %64
  %81 = load ptr, ptr @gBS, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 280
  %83 = load ptr, ptr %82, align 8, !tbaa !38
  %84 = load ptr, ptr %16, align 8, !tbaa !39
  %85 = load ptr, ptr %68, align 8, !tbaa !41
  %86 = call i64 %83(ptr noundef %1, ptr noundef nonnull @gEfiUsbIoProtocolGuid, ptr noundef nonnull %7, ptr noundef %84, ptr noundef %85, i32 noundef 8) #3
  %87 = icmp slt i64 %86, 0
  %88 = call zeroext i8 @DebugPrintEnabled() #3
  %.not67 = icmp eq i8 %88, 0
  br i1 %87, label %89, label %100

89:                                               ; preds = %80
  br i1 %.not67, label %93, label %90

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

92:                                               ; preds = %90
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.10, i64 noundef %86) #3
  br label %93

93:                                               ; preds = %90, %92, %89
  %94 = load ptr, ptr @gBS, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 336
  %96 = load ptr, ptr %95, align 8, !tbaa !42
  %97 = load ptr, ptr %56, align 8, !tbaa !34
  %98 = call i64 (ptr, ...) %96(ptr noundef nonnull %68, ptr noundef nonnull @gEfiDevicePathProtocolGuid, ptr noundef %97, ptr noundef nonnull @gEfiBlockIoProtocolGuid, ptr noundef nonnull %33, ptr noundef nonnull @gEfiDiskInfoProtocolGuid, ptr noundef nonnull %70, ptr noundef null) #3
  %99 = load ptr, ptr %56, align 8, !tbaa !34
  call void @FreePool(ptr noundef %99) #3
  call void @FreePool(ptr noundef nonnull %24) #3
  br label %104

100:                                              ; preds = %80
  br i1 %.not67, label %104, label %101

101:                                              ; preds = %100
  %102 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 64) #3
  %.not66 = icmp eq i8 %102, 0
  br i1 %.not66, label %104, label %103

103:                                              ; preds = %101
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 64, ptr noundef nonnull @.str.11, i32 noundef %18) #3
  br label %104

104:                                              ; preds = %100, %103, %101, %93, %78, %63, %51
  %.1 = phi i64 [ %.076, %51 ], [ %.076, %63 ], [ %.076, %78 ], [ %.076, %93 ], [ 0, %103 ], [ 0, %101 ], [ 0, %100 ]
  %105 = add i8 %.05875, 1
  %106 = zext i8 %105 to i32
  %.not = icmp ugt i8 %105, %5
  br i1 %.not, label %107, label %17, !llvm.loop !43

107:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret i64 %.1
}

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #2

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare zeroext i16 @SetDevicePathNodeLength(ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @AppendDevicePathNode(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @InitializeDiskInfo(ptr noundef) 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_USB_MASS_DEVICE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !14, i64 80, !7, i64 128, !7, i64 129, !7, i64 130, !6, i64 136, !6, i64 144, !15, i64 152, !18, i64 200, !7, i64 236}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_BLOCK_IO_PROTOCOL", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"", !11, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !11, i64 12, !11, i64 16, !13, i64 24, !13, i64 32, !11, i64 40, !11, i64 44}
!15 = !{!"_EFI_DISK_INFO_PROTOCOL", !16, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!16 = !{!"", !11, i64 0, !17, i64 4, !17, i64 6, !7, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 4, !7, i64 5, !7, i64 8, !7, i64 16, !7, i64 32}
!19 = !{!10, !6, i64 16}
!20 = !{!10, !6, i64 40}
!21 = !{!10, !6, i64 48}
!22 = !{!10, !6, i64 56}
!23 = !{!10, !6, i64 64}
!24 = !{!10, !6, i64 72}
!25 = !{!10, !7, i64 128}
!26 = !{!10, !6, i64 136}
!27 = !{!10, !6, i64 144}
!28 = !{!10, !7, i64 129}
!29 = !{!30, !7, i64 0}
!30 = !{!"", !31, i64 0, !7, i64 4}
!31 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!32 = !{!30, !7, i64 1}
!33 = !{!30, !7, i64 4}
!34 = !{!10, !6, i64 24}
!35 = !{!36, !6, i64 328}
!36 = !{!"", !37, i64 0, !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, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!37 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!38 = !{!36, !6, i64 280}
!39 = !{!40, !6, i64 40}
!40 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !6, i64 32, !6, i64 40}
!41 = !{!10, !6, i64 8}
!42 = !{!36, !6, i64 336}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass