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

; 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.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
@gEfiUsbIoProtocolGuid = external global %struct.GUID, align 4
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @USBMassDriverBindingStart(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, 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
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %14 = load ptr, ptr @gBS, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %14, i32 0, i32 1
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = call i64 %16(i64 noundef 8)
  store i64 %17, ptr %13, align 8, !tbaa !14
  store ptr null, ptr %7, align 8, !tbaa !5
  store ptr null, ptr %9, align 8, !tbaa !5
  store i8 0, ptr %10, align 1, !tbaa !15
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call i64 @UsbMassInitTransport(ptr noundef %18, ptr noundef %19, ptr noundef %7, ptr noundef %9, ptr noundef %10)
  store i64 %20, ptr %11, align 8, !tbaa !14
  %21 = load i64, ptr %11, align 8, !tbaa !14
  %22 = icmp slt i64 %21, 0
  br i1 %22, label %23, label %39

23:                                               ; preds = %3
  br label %24

24:                                               ; preds = %23
  %25 = call zeroext i8 @DebugPrintEnabled()
  %26 = icmp ne i8 %25, 0
  br i1 %26, label %27, label %36

27:                                               ; preds = %24
  br label %28

28:                                               ; preds = %27
  %29 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %30 = icmp ne i8 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = load i64, ptr %11, align 8, !tbaa !14
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.14, i64 noundef %32)
  br label %33

33:                                               ; preds = %31, %28
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35, %24
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37
  br label %181

39:                                               ; preds = %3
  %40 = load i8, ptr %10, align 1, !tbaa !15
  %41 = zext i8 %40 to i32
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %68

43:                                               ; preds = %39
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call i64 @UsbMassInitNonLun(ptr noundef %44, ptr noundef %45, ptr noundef %46, ptr noundef %47)
  store i64 %48, ptr %11, align 8, !tbaa !14
  %49 = load i64, ptr %11, align 8, !tbaa !14
  %50 = icmp slt i64 %49, 0
  br i1 %50, label %51, label %67

51:                                               ; preds = %43
  br label %52

52:                                               ; preds = %51
  %53 = call zeroext i8 @DebugPrintEnabled()
  %54 = icmp ne i8 %53, 0
  br i1 %54, label %55, label %64

55:                                               ; preds = %52
  br label %56

56:                                               ; preds = %55
  %57 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %58 = icmp ne i8 %57, 0
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = load i64, ptr %11, align 8, !tbaa !14
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.15, i64 noundef %60)
  br label %61

61:                                               ; preds = %59, %56
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63, %52
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66, %43
  br label %180

68:                                               ; preds = %39
  %69 = load ptr, ptr @gBS, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %69, i32 0, i32 33
  %71 = load ptr, ptr %70, align 8, !tbaa !16
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %73, i32 0, i32 5
  %75 = load ptr, ptr %74, align 8, !tbaa !17
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = call i64 %71(ptr noundef %72, ptr noundef @gEfiDevicePathProtocolGuid, ptr noundef %8, ptr noundef %75, ptr noundef %76, i32 noundef 16)
  store i64 %77, ptr %11, align 8, !tbaa !14
  %78 = load i64, ptr %11, align 8, !tbaa !14
  %79 = icmp slt i64 %78, 0
  br i1 %79, label %80, label %96

80:                                               ; preds = %68
  br label %81

81:                                               ; preds = %80
  %82 = call zeroext i8 @DebugPrintEnabled()
  %83 = icmp ne i8 %82, 0
  br i1 %83, label %84, label %93

84:                                               ; preds = %81
  br label %85

85:                                               ; preds = %84
  %86 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %87 = icmp ne i8 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %85
  %89 = load i64, ptr %11, align 8, !tbaa !14
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.16, i64 noundef %89)
  br label %90

90:                                               ; preds = %88, %85
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92, %81
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  br label %181

96:                                               ; preds = %68
  %97 = load ptr, ptr @gBS, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %97, i32 0, i32 33
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %101, i32 0, i32 5
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = call i64 %99(ptr noundef %100, ptr noundef @gEfiUsbIoProtocolGuid, ptr noundef %12, ptr noundef %103, ptr noundef %104, i32 noundef 16)
  store i64 %105, ptr %11, align 8, !tbaa !14
  %106 = load i64, ptr %11, align 8, !tbaa !14
  %107 = icmp slt i64 %106, 0
  br i1 %107, label %108, label %133

108:                                              ; preds = %96
  br label %109

109:                                              ; preds = %108
  %110 = call zeroext i8 @DebugPrintEnabled()
  %111 = icmp ne i8 %110, 0
  br i1 %111, label %112, label %121

112:                                              ; preds = %109
  br label %113

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

116:                                              ; preds = %113
  %117 = load i64, ptr %11, align 8, !tbaa !14
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.17, i64 noundef %117)
  br label %118

118:                                              ; preds = %116, %113
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120, %109
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr @gBS, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %124, i32 0, i32 34
  %126 = load ptr, ptr %125, align 8, !tbaa !19
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %128, i32 0, i32 5
  %130 = load ptr, ptr %129, align 8, !tbaa !17
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = call i64 %126(ptr noundef %127, ptr noundef @gEfiDevicePathProtocolGuid, ptr noundef %130, ptr noundef %131)
  br label %181

133:                                              ; preds = %96
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = load i8, ptr %10, align 1, !tbaa !15
  %140 = call i64 @UsbMassInitMultiLun(ptr noundef %134, ptr noundef %135, ptr noundef %136, ptr noundef %137, ptr noundef %138, i8 noundef zeroext %139)
  store i64 %140, ptr %11, align 8, !tbaa !14
  %141 = load i64, ptr %11, align 8, !tbaa !14
  %142 = icmp slt i64 %141, 0
  br i1 %142, label %143, label %179

143:                                              ; preds = %133
  %144 = load ptr, ptr @gBS, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %144, i32 0, i32 34
  %146 = load ptr, ptr %145, align 8, !tbaa !19
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %148, i32 0, i32 5
  %150 = load ptr, ptr %149, align 8, !tbaa !17
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = call i64 %146(ptr noundef %147, ptr noundef @gEfiDevicePathProtocolGuid, ptr noundef %150, ptr noundef %151)
  %153 = load ptr, ptr @gBS, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %153, i32 0, i32 34
  %155 = load ptr, ptr %154, align 8, !tbaa !19
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %157, i32 0, i32 5
  %159 = load ptr, ptr %158, align 8, !tbaa !17
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = call i64 %155(ptr noundef %156, ptr noundef @gEfiUsbIoProtocolGuid, ptr noundef %159, ptr noundef %160)
  br label %162

162:                                              ; preds = %143
  %163 = call zeroext i8 @DebugPrintEnabled()
  %164 = icmp ne i8 %163, 0
  br i1 %164, label %165, label %176

165:                                              ; preds = %162
  br label %166

166:                                              ; preds = %165
  %167 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %168 = icmp ne i8 %167, 0
  br i1 %168, label %169, label %173

169:                                              ; preds = %166
  %170 = load i64, ptr %11, align 8, !tbaa !14
  %171 = load i8, ptr %10, align 1, !tbaa !15
  %172 = zext i8 %171 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.18, i64 noundef %170, i32 noundef %172)
  br label %173

173:                                              ; preds = %169, %166
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175, %162
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178, %133
  br label %180

180:                                              ; preds = %179, %67
  br label %181

181:                                              ; preds = %180, %123, %95, %38
  %182 = load ptr, ptr @gBS, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %182, i32 0, i32 2
  %184 = load ptr, ptr %183, align 8, !tbaa !20
  %185 = load i64, ptr %13, align 8, !tbaa !14
  call void %184(i64 noundef %185)
  %186 = load i64, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  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 8, ptr %7) #3
  ret i64 %186
}

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

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

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 @UsbMassInitTransport(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"", !11, 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}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!10, !6, i64 280}
!17 = !{!18, !6, i64 40}
!18 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!19 = !{!10, !6, i64 288}
!20 = !{!10, !6, i64 32}


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

@gBS = external local_unnamed_addr global ptr, align 8
@gEfiUsbIoProtocolGuid = external global %struct.GUID, align 4
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @USBMassDriverBindingStart(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readnone %2) local_unnamed_addr #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %9 = load ptr, ptr @gBS, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 24
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = tail call i64 %11(i64 noundef 8) #3
  store ptr null, ptr %4, align 8, !tbaa !5
  store ptr null, ptr %6, align 8, !tbaa !5
  store i8 0, ptr %7, align 1, !tbaa !14
  %13 = call i64 @UsbMassInitTransport(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %4, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %14 = icmp slt i64 %13, 0
  br i1 %14, label %15, label %20

15:                                               ; preds = %3
  %16 = call zeroext i8 @DebugPrintEnabled() #3
  %.not45 = icmp eq i8 %16, 0
  br i1 %.not45, label %88, label %17

17:                                               ; preds = %15
  %18 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not46 = icmp eq i8 %18, 0
  br i1 %.not46, label %88, label %19

19:                                               ; preds = %17
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.14, i64 noundef %13) #3
  br label %88

20:                                               ; preds = %3
  %21 = load i8, ptr %7, align 1, !tbaa !14
  %22 = icmp eq i8 %21, 0
  br i1 %22, label %23, label %33

23:                                               ; preds = %20
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call i64 @UsbMassInitNonLun(ptr noundef %0, ptr noundef %1, ptr noundef %24, ptr noundef %25)
  %27 = icmp slt i64 %26, 0
  br i1 %27, label %28, label %88

28:                                               ; preds = %23
  %29 = call zeroext i8 @DebugPrintEnabled() #3
  %.not43 = icmp eq i8 %29, 0
  br i1 %.not43, label %88, label %30

30:                                               ; preds = %28
  %31 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not44 = icmp eq i8 %31, 0
  br i1 %.not44, label %88, label %32

32:                                               ; preds = %30
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.15, i64 noundef %26) #3
  br label %88

33:                                               ; preds = %20
  %34 = load ptr, ptr @gBS, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 280
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %0, i64 40
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = call i64 %36(ptr noundef %1, ptr noundef nonnull @gEfiDevicePathProtocolGuid, ptr noundef nonnull %5, ptr noundef %38, ptr noundef %1, i32 noundef 16) #3
  %40 = icmp slt i64 %39, 0
  br i1 %40, label %41, label %46

41:                                               ; preds = %33
  %42 = call zeroext i8 @DebugPrintEnabled() #3
  %.not41 = icmp eq i8 %42, 0
  br i1 %.not41, label %88, label %43

43:                                               ; preds = %41
  %44 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not42 = icmp eq i8 %44, 0
  br i1 %.not42, label %88, label %45

45:                                               ; preds = %43
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.16, i64 noundef %39) #3
  br label %88

46:                                               ; preds = %33
  %47 = load ptr, ptr @gBS, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 280
  %49 = load ptr, ptr %48, align 8, !tbaa !15
  %50 = load ptr, ptr %37, align 8, !tbaa !16
  %51 = call i64 %49(ptr noundef %1, ptr noundef nonnull @gEfiUsbIoProtocolGuid, ptr noundef nonnull %8, ptr noundef %50, ptr noundef %1, i32 noundef 16) #3
  %52 = icmp slt i64 %51, 0
  br i1 %52, label %53, label %64

53:                                               ; preds = %46
  %54 = call zeroext i8 @DebugPrintEnabled() #3
  %.not39 = icmp eq i8 %54, 0
  br i1 %.not39, label %58, label %55

55:                                               ; preds = %53
  %56 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not40 = icmp eq i8 %56, 0
  br i1 %.not40, label %58, label %57

57:                                               ; preds = %55
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.17, i64 noundef %51) #3
  br label %58

58:                                               ; preds = %55, %57, %53
  %59 = load ptr, ptr @gBS, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 288
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = load ptr, ptr %37, align 8, !tbaa !16
  %63 = call i64 %61(ptr noundef %1, ptr noundef nonnull @gEfiDevicePathProtocolGuid, ptr noundef %62, ptr noundef %1) #3
  br label %88

64:                                               ; preds = %46
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load i8, ptr %7, align 1, !tbaa !14
  %69 = call i64 @UsbMassInitMultiLun(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %65, ptr noundef %66, ptr noundef %67, i8 noundef zeroext %68)
  %70 = icmp slt i64 %69, 0
  br i1 %70, label %71, label %88

71:                                               ; preds = %64
  %72 = load ptr, ptr @gBS, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 288
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load ptr, ptr %37, align 8, !tbaa !16
  %76 = call i64 %74(ptr noundef %1, ptr noundef nonnull @gEfiDevicePathProtocolGuid, ptr noundef %75, ptr noundef %1) #3
  %77 = load ptr, ptr @gBS, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i64 288
  %79 = load ptr, ptr %78, align 8, !tbaa !18
  %80 = load ptr, ptr %37, align 8, !tbaa !16
  %81 = call i64 %79(ptr noundef %1, ptr noundef nonnull @gEfiUsbIoProtocolGuid, ptr noundef %80, ptr noundef %1) #3
  %82 = call zeroext i8 @DebugPrintEnabled() #3
  %.not = icmp eq i8 %82, 0
  br i1 %.not, label %88, label %83

83:                                               ; preds = %71
  %84 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not38 = icmp eq i8 %84, 0
  br i1 %.not38, label %88, label %85

85:                                               ; preds = %83
  %86 = load i8, ptr %7, align 1, !tbaa !14
  %87 = zext i8 %86 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.18, i64 noundef %69, i32 noundef %87) #3
  br label %88

88:                                               ; preds = %28, %32, %30, %23, %71, %85, %83, %64, %41, %45, %43, %15, %19, %17, %58
  %.0 = phi i64 [ %13, %19 ], [ %13, %17 ], [ %13, %15 ], [ %26, %32 ], [ %26, %30 ], [ %26, %28 ], [ %26, %23 ], [ %39, %45 ], [ %39, %43 ], [ %39, %41 ], [ %51, %58 ], [ %69, %85 ], [ %69, %83 ], [ %69, %71 ], [ %69, %64 ]
  %89 = load ptr, ptr @gBS, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 32
  %91 = load ptr, ptr %90, align 8, !tbaa !19
  call void %91(i64 noundef %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret i64 %.0
}

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

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

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 @UsbMassInitTransport(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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, !6, i64 24}
!10 = !{!"", !11, 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}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!10, !6, i64 280}
!16 = !{!17, !6, i64 40}
!17 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!10, !6, i64 288}
!19 = !{!10, !6, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass