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

; 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_CBI_STATUS = type { i8, 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.USB_CBI_PROTOCOL = type { %struct.USB_INTERFACE_DESCRIPTOR, ptr, ptr, ptr, ptr }
%struct.USB_INTERFACE_DESCRIPTOR = type { i8, i8, i8, i8, i8, i8, i8, i8, i8 }

@gBS = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @UsbCbiExecCommand(ptr noundef %0, ptr noundef %1, i8 noundef zeroext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, i8 noundef zeroext %6, i32 noundef %7, ptr noundef %8) #0 {
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %struct.USB_CBI_STATUS, align 1
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store i8 %2, ptr %13, align 1, !tbaa !9
  store i32 %3, ptr %14, align 4, !tbaa !10
  store ptr %4, ptr %15, align 8, !tbaa !5
  store i32 %5, ptr %16, align 4, !tbaa !10
  store i8 %6, ptr %17, align 1, !tbaa !9
  store i32 %7, ptr %18, align 4, !tbaa !10
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %25 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %25, align 4, !tbaa !10
  %26 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %26, ptr %20, align 8, !tbaa !5
  %27 = load ptr, ptr %20, align 8, !tbaa !5
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = load i8, ptr %13, align 1, !tbaa !9
  %30 = load i32, ptr %18, align 4, !tbaa !10
  %31 = call i64 @UsbCbiSendCommand(ptr noundef %27, ptr noundef %28, i8 noundef zeroext %29, i32 noundef %30)
  store i64 %31, ptr %22, align 8, !tbaa !12
  %32 = load i64, ptr %22, align 8, !tbaa !12
  %33 = icmp slt i64 %32, 0
  br i1 %33, label %34, label %55

34:                                               ; preds = %9
  %35 = load ptr, ptr @gBS, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %35, i32 0, i32 29
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = call i64 %37(i64 noundef 10000)
  br label %39

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

42:                                               ; preds = %39
  br label %43

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

46:                                               ; preds = %43
  %47 = load i64, ptr %22, align 8, !tbaa !12
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.2, i64 noundef %47)
  br label %48

48:                                               ; preds = %46, %43
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  br label %51

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

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  %54 = load i64, ptr %22, align 8, !tbaa !12
  store i64 %54, ptr %10, align 8
  store i32 1, ptr %24, align 4
  br label %143

55:                                               ; preds = %9
  %56 = load i32, ptr %16, align 4, !tbaa !10
  %57 = zext i32 %56 to i64
  store i64 %57, ptr %23, align 8, !tbaa !12
  %58 = load ptr, ptr %20, align 8, !tbaa !5
  %59 = load i32, ptr %14, align 4, !tbaa !10
  %60 = load ptr, ptr %15, align 8, !tbaa !5
  %61 = load i32, ptr %18, align 4, !tbaa !10
  %62 = call i64 @UsbCbiDataTransfer(ptr noundef %58, i32 noundef %59, ptr noundef %60, ptr noundef %23, i32 noundef %61)
  store i64 %62, ptr %22, align 8, !tbaa !12
  %63 = load ptr, ptr %20, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.USB_CBI_PROTOCOL, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = icmp eq ptr %65, null
  br i1 %66, label %67, label %84

67:                                               ; preds = %55
  br label %68

68:                                               ; preds = %67
  %69 = call zeroext i8 @DebugPrintEnabled()
  %70 = icmp ne i8 %69, 0
  br i1 %70, label %71, label %80

71:                                               ; preds = %68
  br label %72

72:                                               ; preds = %71
  %73 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %74 = icmp ne i8 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %72
  %76 = load i64, ptr %22, align 8, !tbaa !12
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.3, i64 noundef %76)
  br label %77

77:                                               ; preds = %75, %72
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79, %68
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load i64, ptr %22, align 8, !tbaa !12
  store i64 %83, ptr %10, align 8
  store i32 1, ptr %24, align 4
  br label %143

84:                                               ; preds = %55
  %85 = load ptr, ptr %20, align 8, !tbaa !5
  %86 = load i32, ptr %18, align 4, !tbaa !10
  %87 = call i64 @UsbCbiGetStatus(ptr noundef %85, i32 noundef %86, ptr noundef %21)
  store i64 %87, ptr %22, align 8, !tbaa !12
  %88 = load i64, ptr %22, align 8, !tbaa !12
  %89 = icmp slt i64 %88, 0
  br i1 %89, label %90, label %107

90:                                               ; preds = %84
  br label %91

91:                                               ; preds = %90
  %92 = call zeroext i8 @DebugPrintEnabled()
  %93 = icmp ne i8 %92, 0
  br i1 %93, label %94, label %103

94:                                               ; preds = %91
  br label %95

95:                                               ; preds = %94
  %96 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %97 = icmp ne i8 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %95
  %99 = load i64, ptr %22, align 8, !tbaa !12
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.4, i64 noundef %99)
  br label %100

100:                                              ; preds = %98, %95
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102, %91
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  %106 = load i64, ptr %22, align 8, !tbaa !12
  store i64 %106, ptr %10, align 8
  store i32 1, ptr %24, align 4
  br label %143

107:                                              ; preds = %84
  %108 = load ptr, ptr %20, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.USB_CBI_PROTOCOL, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %struct.USB_INTERFACE_DESCRIPTOR, ptr %109, i32 0, i32 6
  %111 = load i8, ptr %110, align 2, !tbaa !20
  %112 = zext i8 %111 to i32
  %113 = icmp eq i32 %112, 4
  br i1 %113, label %114, label %127

114:                                              ; preds = %107
  %115 = getelementptr inbounds %struct.USB_CBI_STATUS, ptr %21, i32 0, i32 0
  %116 = load i8, ptr %115, align 1, !tbaa !21
  %117 = zext i8 %116 to i32
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %126

119:                                              ; preds = %114
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = load i8, ptr %120, align 1, !tbaa !9
  %122 = zext i8 %121 to i32
  %123 = icmp ne i32 %122, 3
  br i1 %123, label %124, label %126

124:                                              ; preds = %119
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 1, ptr %125, align 4, !tbaa !10
  br label %126

126:                                              ; preds = %124, %119, %114
  br label %142

127:                                              ; preds = %107
  %128 = getelementptr inbounds %struct.USB_CBI_STATUS, ptr %21, i32 0, i32 1
  %129 = load i8, ptr %128, align 1, !tbaa !23
  %130 = zext i8 %129 to i32
  %131 = and i32 %130, 3
  switch i32 %131, label %141 [
    i32 0, label %132
    i32 2, label %134
    i32 1, label %137
    i32 3, label %139
  ]

132:                                              ; preds = %127
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %133, align 4, !tbaa !10
  br label %141

134:                                              ; preds = %127
  %135 = load ptr, ptr %20, align 8, !tbaa !5
  %136 = call i64 @UsbCbiResetDevice(ptr noundef %135, i8 noundef zeroext 0)
  br label %137

137:                                              ; preds = %134, %127
  %138 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 1, ptr %138, align 4, !tbaa !10
  br label %141

139:                                              ; preds = %127
  %140 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 2, ptr %140, align 4, !tbaa !10
  br label %141

141:                                              ; preds = %139, %137, %132, %127
  br label %142

142:                                              ; preds = %141, %126
  store i64 0, ptr %10, align 8
  store i32 1, ptr %24, align 4
  br label %143

143:                                              ; preds = %142, %105, %82, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  %144 = load i64, ptr %10, align 8
  ret i64 %144
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbCbiResetDevice(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

; 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 @UsbCbiSendCommand(ptr noundef, ptr noundef, i8 noundef zeroext, i32 noundef) #0

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

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

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

declare void @DebugPrint(i64 noundef, 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 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !6, i64 248}
!15 = !{!"", !16, 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}
!16 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!17 = !{!18, !6, i64 32}
!18 = !{!"", !19, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!19 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8}
!20 = !{!18, !7, i64 6}
!21 = !{!22, !7, i64 0}
!22 = !{!"", !7, i64 0, !7, i64 1}
!23 = !{!22, !7, i64 1}


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

@gBS = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @UsbCbiExecCommand(ptr noundef %0, ptr noundef %1, i8 noundef zeroext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, i8 noundef zeroext %6, i32 noundef %7, ptr nocapture noundef writeonly %8) local_unnamed_addr #0 {
  %10 = alloca %struct.USB_CBI_STATUS, align 1
  %11 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  store i32 0, ptr %8, align 4, !tbaa !5
  %12 = tail call i64 @UsbCbiSendCommand(ptr noundef %0, ptr noundef %1, i8 noundef zeroext %2, i32 noundef %7)
  %13 = icmp slt i64 %12, 0
  br i1 %13, label %14, label %23

14:                                               ; preds = %9
  %15 = load ptr, ptr @gBS, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %15, i64 248
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = tail call i64 %17(i64 noundef 10000) #3
  %19 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not36 = icmp eq i8 %19, 0
  br i1 %.not36, label %60, label %20

20:                                               ; preds = %14
  %21 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not37 = icmp eq i8 %21, 0
  br i1 %.not37, label %60, label %22

22:                                               ; preds = %20
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.2, i64 noundef %12) #3
  br label %60

23:                                               ; preds = %9
  %24 = zext i32 %5 to i64
  store i64 %24, ptr %11, align 8, !tbaa !15
  %25 = call i64 @UsbCbiDataTransfer(ptr noundef %0, i32 noundef %3, ptr noundef %4, ptr noundef nonnull %11, i32 noundef %7)
  %26 = getelementptr inbounds i8, ptr %0, i64 32
  %27 = load ptr, ptr %26, align 8, !tbaa !16
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %34

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

31:                                               ; preds = %29
  %32 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not35 = icmp eq i8 %32, 0
  br i1 %.not35, label %60, label %33

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

34:                                               ; preds = %23
  %35 = call i64 @UsbCbiGetStatus(ptr noundef nonnull %0, i32 noundef %7, ptr noundef nonnull %10)
  %36 = icmp slt i64 %35, 0
  br i1 %36, label %37, label %42

37:                                               ; preds = %34
  %38 = call zeroext i8 @DebugPrintEnabled() #3
  %.not32 = icmp eq i8 %38, 0
  br i1 %.not32, label %60, label %39

39:                                               ; preds = %37
  %40 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not33 = icmp eq i8 %40, 0
  br i1 %.not33, label %60, label %41

41:                                               ; preds = %39
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.4, i64 noundef %35) #3
  br label %60

42:                                               ; preds = %34
  %43 = getelementptr inbounds i8, ptr %0, i64 6
  %44 = load i8, ptr %43, align 2, !tbaa !19
  %45 = icmp eq i8 %44, 4
  br i1 %45, label %46, label %51

46:                                               ; preds = %42
  %47 = load i8, ptr %10, align 1, !tbaa !20
  %.not = icmp eq i8 %47, 0
  br i1 %.not, label %60, label %48

48:                                               ; preds = %46
  %49 = load i8, ptr %1, align 1, !tbaa !22
  %.not31 = icmp eq i8 %49, 3
  br i1 %.not31, label %60, label %50

50:                                               ; preds = %48
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %60

51:                                               ; preds = %42
  %52 = getelementptr inbounds i8, ptr %10, i64 1
  %53 = load i8, ptr %52, align 1, !tbaa !23
  %54 = and i8 %53, 3
  switch i8 %54, label %default.unreachable38 [
    i8 0, label %55
    i8 2, label %56
    i8 1, label %58
    i8 3, label %59
  ]

55:                                               ; preds = %51
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %60

56:                                               ; preds = %51
  %57 = call i64 @UsbCbiResetDevice(ptr noundef nonnull %0, i8 noundef zeroext 0)
  br label %58

58:                                               ; preds = %56, %51
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %60

59:                                               ; preds = %51
  store i32 2, ptr %8, align 4, !tbaa !5
  br label %60

default.unreachable38:                            ; preds = %51
  unreachable

60:                                               ; preds = %50, %48, %46, %59, %58, %55, %37, %41, %39, %29, %33, %31, %14, %22, %20
  %.0 = phi i64 [ %12, %20 ], [ %12, %22 ], [ %12, %14 ], [ %25, %31 ], [ %25, %33 ], [ %25, %29 ], [ %35, %39 ], [ %35, %41 ], [ %35, %37 ], [ 0, %55 ], [ 0, %58 ], [ 0, %59 ], [ 0, %46 ], [ 0, %48 ], [ 0, %50 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #3
  ret i64 %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbCbiResetDevice(ptr noundef, i8 noundef zeroext) local_unnamed_addr #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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @UsbCbiGetStatus(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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

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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 248}
!12 = !{!"", !13, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!13 = !{!"", !14, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!14 = !{!"long long", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !10, i64 32}
!17 = !{!"", !18, i64 0, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!18 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8}
!19 = !{!17, !7, i64 6}
!20 = !{!21, !7, i64 0}
!21 = !{!"", !7, i64 0, !7, i64 1}
!22 = !{!7, !7, i64 0}
!23 = !{!21, !7, i64 1}


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