; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg (BiosBlockIoReset)

; 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"

%union.EFI_IA32_REGISTER_SET = type { %struct.EFI_DWORD_REGS }
%struct.EFI_DWORD_REGS = type { i32, i32, i32, i32, i32, i32, %struct.EFI_EFLAGS_REG, i16, i16, i16, i16, i16, i16, i32, i32 }
%struct.EFI_EFLAGS_REG = type { i32 }
%struct.BIOS_BLOCK_IO_DEV = type { i64, ptr, ptr, %struct._EFI_BLOCK_IO_PROTOCOL, %struct.EFI_BLOCK_IO_MEDIA, ptr, ptr, ptr, %struct.BIOS_LEGACY_DRIVE }
%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.BIOS_LEGACY_DRIVE = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, i8, i8, i8, i8, i16, i16, %struct.EDD_DRIVE_PARAMETERS }
%struct.EDD_DRIVE_PARAMETERS = type <{ i16, i16, i32, i32, i32, i64, i16, i32, i16, i8, i8, i16, [4 x i8], [8 x i8], %union.EDD_INTERFACE_PATH, %union.EDD_DEVICE_PATH, i8, i8 }>
%union.EDD_INTERFACE_PATH = type { %struct.EDD_PCI }
%struct.EDD_PCI = type { i8, i8, i8, i8, i32 }
%union.EDD_DEVICE_PATH = type { %struct.EDD_USB }
%struct.EDD_USB = type { i64, i64 }
%struct.EFI_BYTE_REGS = type { i8, i8, i16, i8, i8, i16, i8, i8, i16, i8, i8, i16 }
%struct._EFI_LEGACY_BIOS_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [162 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1

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

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @BiosBlockIoReset(ptr noundef %0, i8 noundef zeroext %1) #2 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca %union.EFI_IA32_REGISTER_SET, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i8 %1, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %10 = call zeroext i8 @DebugAssertEnabled()
  %11 = zext i8 %10 to i32
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %23

13:                                               ; preds = %2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = ptrtoint ptr %14 to i64
  %16 = sub i64 %15, ptrtoint (ptr getelementptr inbounds (%struct.BIOS_BLOCK_IO_DEV, ptr null, i32 0, i32 3) to i64)
  %17 = inttoptr i64 %16 to ptr
  %18 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %17, i32 0, i32 0
  %19 = load i64, ptr %18, align 8, !tbaa !10
  %20 = icmp ne i64 %19, 1869177442
  br i1 %20, label %21, label %23

21:                                               ; preds = %13
  call void @DebugAssert(ptr noundef @.str.5, i64 noundef 738, ptr noundef @.str.7)
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  br label %28

23:                                               ; preds = %13, %2
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = ptrtoint ptr %24 to i64
  %26 = sub i64 %25, ptrtoint (ptr getelementptr inbounds (%struct.BIOS_BLOCK_IO_DEV, ptr null, i32 0, i32 3) to i64)
  %27 = inttoptr i64 %26 to ptr
  br label %28

28:                                               ; preds = %23, %21
  %29 = phi ptr [ %22, %21 ], [ %27, %23 ]
  store ptr %29, ptr %6, align 8, !tbaa !5
  %30 = call ptr @ZeroMem(ptr noundef %7, i64 noundef 48)
  %31 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 1
  store i8 0, ptr %31, align 1, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %32, i32 0, i32 8
  %34 = getelementptr inbounds %struct.BIOS_LEGACY_DRIVE, ptr %33, i32 0, i32 1
  %35 = load i8, ptr %34, align 1, !tbaa !19
  %36 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 9
  store i8 %35, ptr %36, align 4, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %37, i32 0, i32 7
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  %40 = getelementptr inbounds %struct._EFI_LEGACY_BIOS_PROTOCOL, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !21
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %42, i32 0, i32 7
  %44 = load ptr, ptr %43, align 8, !tbaa !20
  %45 = call zeroext i8 %41(ptr noundef %44, i8 noundef zeroext 19, ptr noundef %7)
  %46 = zext i8 %45 to i64
  store i64 %46, ptr %8, align 8, !tbaa !23
  br label %47

47:                                               ; preds = %28
  %48 = call zeroext i8 @DebugPrintEnabled()
  %49 = icmp ne i8 %48, 0
  br i1 %49, label %50, label %67

50:                                               ; preds = %47
  br label %51

51:                                               ; preds = %50
  %52 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 1)
  %53 = icmp ne i8 %52, 0
  br i1 %53, label %54, label %64

54:                                               ; preds = %51
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %55, i32 0, i32 8
  %57 = getelementptr inbounds %struct.BIOS_LEGACY_DRIVE, ptr %56, i32 0, i32 1
  %58 = load i8, ptr %57, align 1, !tbaa !19
  %59 = zext i8 %58 to i32
  %60 = load i64, ptr %8, align 8, !tbaa !23
  %61 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 1
  %62 = load i8, ptr %61, align 1, !tbaa !9
  %63 = zext i8 %62 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 1, ptr noundef @.str.11, i32 noundef %59, i64 noundef %60, i32 noundef %63)
  br label %64

64:                                               ; preds = %54, %51
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  br label %67

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

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load i64, ptr %8, align 8, !tbaa !23
  %71 = icmp ne i64 %70, 0
  br i1 %71, label %72, label %127

72:                                               ; preds = %69
  %73 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 0
  %74 = load i8, ptr %73, align 4, !tbaa !9
  %75 = zext i8 %74 to i32
  %76 = icmp eq i32 %75, 5
  br i1 %76, label %77, label %126

77:                                               ; preds = %72
  %78 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 1
  store i8 0, ptr %78, align 1, !tbaa !9
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %79, i32 0, i32 8
  %81 = getelementptr inbounds %struct.BIOS_LEGACY_DRIVE, ptr %80, i32 0, i32 1
  %82 = load i8, ptr %81, align 1, !tbaa !19
  %83 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 9
  store i8 %82, ptr %83, align 4, !tbaa !9
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %84, i32 0, i32 7
  %86 = load ptr, ptr %85, align 8, !tbaa !20
  %87 = getelementptr inbounds %struct._EFI_LEGACY_BIOS_PROTOCOL, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %89, i32 0, i32 7
  %91 = load ptr, ptr %90, align 8, !tbaa !20
  %92 = call zeroext i8 %88(ptr noundef %91, i8 noundef zeroext 19, ptr noundef %7)
  %93 = zext i8 %92 to i64
  store i64 %93, ptr %8, align 8, !tbaa !23
  br label %94

94:                                               ; preds = %77
  %95 = call zeroext i8 @DebugPrintEnabled()
  %96 = icmp ne i8 %95, 0
  br i1 %96, label %97, label %114

97:                                               ; preds = %94
  br label %98

98:                                               ; preds = %97
  %99 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 1)
  %100 = icmp ne i8 %99, 0
  br i1 %100, label %101, label %111

101:                                              ; preds = %98
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %102, i32 0, i32 8
  %104 = getelementptr inbounds %struct.BIOS_LEGACY_DRIVE, ptr %103, i32 0, i32 1
  %105 = load i8, ptr %104, align 1, !tbaa !19
  %106 = zext i8 %105 to i32
  %107 = load i64, ptr %8, align 8, !tbaa !23
  %108 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 1
  %109 = load i8, ptr %108, align 1, !tbaa !9
  %110 = zext i8 %109 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 1, ptr noundef @.str.11, i32 noundef %106, i64 noundef %107, i32 noundef %110)
  br label %111

111:                                              ; preds = %101, %98
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113, %94
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  %117 = load i64, ptr %8, align 8, !tbaa !23
  %118 = icmp ne i64 %117, 0
  br i1 %118, label %119, label %125

119:                                              ; preds = %116
  %120 = getelementptr inbounds %struct.EFI_BYTE_REGS, ptr %7, i32 0, i32 1
  %121 = load i8, ptr %120, align 1, !tbaa !9
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.BIOS_BLOCK_IO_DEV, ptr %122, i32 0, i32 8
  %124 = getelementptr inbounds %struct.BIOS_LEGACY_DRIVE, ptr %123, i32 0, i32 8
  store i8 %121, ptr %124, align 8, !tbaa !24
  store i64 -9223372036854775801, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %128

125:                                              ; preds = %116
  br label %126

126:                                              ; preds = %125, %72
  br label %127

127:                                              ; preds = %126, %69
  store i64 0, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %128

128:                                              ; preds = %127, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %129 = load i64, ptr %3, align 8
  ret i64 %129
}

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

declare ptr @ZeroMem(ptr noundef, i64 noundef) #1

declare zeroext i8 @DebugAssertEnabled() #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 #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, !12, i64 0}
!11 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !14, i64 72, !6, i64 120, !6, i64 128, !6, i64 136, !16, i64 144}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"_EFI_BLOCK_IO_PROTOCOL", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!14 = !{!"", !15, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !15, i64 12, !15, i64 16, !12, i64 24, !12, i64 32, !15, i64 40, !15, i64 44}
!15 = !{!"int", !7, i64 0}
!16 = !{!"", !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, !6, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !17, i64 28, !17, i64 30, !18, i64 32}
!17 = !{!"short", !7, i64 0}
!18 = !{!"", !17, i64 0, !17, i64 2, !15, i64 4, !15, i64 8, !15, i64 12, !12, i64 16, !17, i64 24, !15, i64 26, !17, i64 30, !7, i64 32, !7, i64 33, !17, i64 34, !7, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 72, !7, i64 73}
!19 = !{!11, !7, i64 145}
!20 = !{!11, !6, i64 136}
!21 = !{!22, !6, i64 0}
!22 = !{!"_EFI_LEGACY_BIOS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!23 = !{!12, !12, i64 0}
!24 = !{!11, !7, i64 152}


; 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"

%union.EFI_IA32_REGISTER_SET = type { %struct.EFI_DWORD_REGS }
%struct.EFI_DWORD_REGS = type { i32, i32, i32, i32, i32, i32, %struct.EFI_EFLAGS_REG, i16, i16, i16, i16, i16, i16, i32, i32 }
%struct.EFI_EFLAGS_REG = type { i32 }

@.str.5 = external hidden unnamed_addr constant [162 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [53 x i8], align 1

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775801, 1) i64 @BiosBlockIoReset(ptr noundef %0, i8 noundef zeroext %1) local_unnamed_addr #2 {
  %3 = alloca %union.EFI_IA32_REGISTER_SET, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #3
  %4 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %4, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre25 = add i64 %.pre, -24
  %.pre27 = inttoptr i64 %.pre25 to ptr
  br i1 %.not, label %._crit_edge, label %5

5:                                                ; preds = %2
  %6 = load i64, ptr %.pre27, align 8, !tbaa !5
  %.not19 = icmp eq i64 %6, 1869177442
  br i1 %.not19, label %._crit_edge, label %7

7:                                                ; preds = %5
  tail call void @DebugAssert(ptr noundef nonnull @.str.5, i64 noundef 738, ptr noundef nonnull @.str.7) #3
  br label %._crit_edge

._crit_edge:                                      ; preds = %2, %5, %7
  %8 = phi ptr [ %0, %7 ], [ %.pre27, %5 ], [ %.pre27, %2 ]
  %9 = call ptr @ZeroMem(ptr noundef nonnull %3, i64 noundef 48) #3
  %10 = getelementptr inbounds i8, ptr %3, i64 1
  store i8 0, ptr %10, align 1, !tbaa !17
  %11 = getelementptr inbounds i8, ptr %8, i64 145
  %12 = load i8, ptr %11, align 1, !tbaa !18
  %13 = getelementptr inbounds i8, ptr %3, i64 12
  store i8 %12, ptr %13, align 4, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %8, i64 136
  %15 = load ptr, ptr %14, align 8, !tbaa !19
  %16 = load ptr, ptr %15, align 8, !tbaa !20
  %17 = call zeroext i8 %16(ptr noundef nonnull %15, i8 noundef zeroext 19, ptr noundef nonnull %3) #3
  %18 = zext i8 %17 to i64
  %19 = call zeroext i8 @DebugPrintEnabled() #3
  %.not20 = icmp eq i8 %19, 0
  br i1 %.not20, label %27, label %20

20:                                               ; preds = %._crit_edge
  %21 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 1) #3
  %.not21 = icmp eq i8 %21, 0
  br i1 %.not21, label %27, label %22

22:                                               ; preds = %20
  %23 = load i8, ptr %11, align 1, !tbaa !18
  %24 = zext i8 %23 to i32
  %25 = load i8, ptr %10, align 1, !tbaa !17
  %26 = zext i8 %25 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 1, ptr noundef nonnull @.str.11, i32 noundef %24, i64 noundef %18, i32 noundef %26) #3
  br label %27

27:                                               ; preds = %20, %22, %._crit_edge
  %28 = icmp ne i8 %17, 0
  %29 = load i8, ptr %3, align 4
  %30 = icmp eq i8 %29, 5
  %or.cond = select i1 %28, i1 %30, i1 false
  br i1 %or.cond, label %31, label %49

31:                                               ; preds = %27
  store i8 0, ptr %10, align 1, !tbaa !17
  %32 = load i8, ptr %11, align 1, !tbaa !18
  store i8 %32, ptr %13, align 4, !tbaa !17
  %33 = load ptr, ptr %14, align 8, !tbaa !19
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = call zeroext i8 %34(ptr noundef nonnull %33, i8 noundef zeroext 19, ptr noundef nonnull %3) #3
  %36 = zext i8 %35 to i64
  %37 = call zeroext i8 @DebugPrintEnabled() #3
  %.not22 = icmp eq i8 %37, 0
  br i1 %.not22, label %45, label %38

38:                                               ; preds = %31
  %39 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 1) #3
  %.not23 = icmp eq i8 %39, 0
  br i1 %.not23, label %45, label %40

40:                                               ; preds = %38
  %41 = load i8, ptr %11, align 1, !tbaa !18
  %42 = zext i8 %41 to i32
  %43 = load i8, ptr %10, align 1, !tbaa !17
  %44 = zext i8 %43 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 1, ptr noundef nonnull @.str.11, i32 noundef %42, i64 noundef %36, i32 noundef %44) #3
  br label %45

45:                                               ; preds = %38, %40, %31
  %.not24 = icmp eq i8 %35, 0
  br i1 %.not24, label %49, label %46

46:                                               ; preds = %45
  %47 = load i8, ptr %10, align 1, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %8, i64 152
  store i8 %47, ptr %48, align 8, !tbaa !22
  br label %49

49:                                               ; preds = %27, %45, %46
  %.0 = phi i64 [ -9223372036854775801, %46 ], [ 0, %45 ], [ 0, %27 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #3
  ret i64 %.0
}

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

declare ptr @ZeroMem(ptr noundef, i64 noundef) local_unnamed_addr #1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 72, !10, i64 120, !10, i64 128, !10, i64 136, !14, i64 144}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_EFI_BLOCK_IO_PROTOCOL", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!12 = !{!"", !13, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !13, i64 12, !13, i64 16, !7, i64 24, !7, i64 32, !13, i64 40, !13, i64 44}
!13 = !{!"int", !8, i64 0}
!14 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !10, i64 16, !8, i64 24, !8, i64 25, !8, i64 26, !8, i64 27, !15, i64 28, !15, i64 30, !16, i64 32}
!15 = !{!"short", !8, i64 0}
!16 = !{!"", !15, i64 0, !15, i64 2, !13, i64 4, !13, i64 8, !13, i64 12, !7, i64 16, !15, i64 24, !13, i64 26, !15, i64 30, !8, i64 32, !8, i64 33, !15, i64 34, !8, i64 36, !8, i64 40, !8, i64 48, !8, i64 56, !8, i64 72, !8, i64 73}
!17 = !{!8, !8, i64 0}
!18 = !{!6, !8, i64 145}
!19 = !{!6, !10, i64 136}
!20 = !{!21, !10, i64 0}
!21 = !{!"_EFI_LEGACY_BIOS_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !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}
!22 = !{!6, !8, i64 152}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass