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

; 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.CIRRUS_LOGIC_5430_VIDEO_MODES = type { i32, i32, i32, i32, ptr, ptr, i8 }
%struct.CIRRUS_LOGIC_5430_PRIVATE_DATA = type { i64, ptr, ptr, i64, %struct._EFI_UGA_DRAW_PROTOCOL, %struct._EFI_GRAPHICS_OUTPUT_PROTOCOL, %struct.EFI_EDID_DISCOVERED_PROTOCOL, %struct.EFI_EDID_ACTIVE_PROTOCOL, ptr, ptr, i64, i64, [3 x %struct.CIRRUS_LOGIC_5430_MODE_DATA], ptr, i8 }
%struct._EFI_UGA_DRAW_PROTOCOL = type { ptr, ptr, ptr }
%struct._EFI_GRAPHICS_OUTPUT_PROTOCOL = type { ptr, ptr, ptr, ptr }
%struct.EFI_EDID_DISCOVERED_PROTOCOL = type { i32, ptr }
%struct.EFI_EDID_ACTIVE_PROTOCOL = type { i32, ptr }
%struct.CIRRUS_LOGIC_5430_MODE_DATA = type { i32, i32, i32, i32, i32 }
%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 }

@.str = external hidden unnamed_addr constant [158 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8
@CirrusLogic5430VideoModes = external global [0 x %struct.CIRRUS_LOGIC_5430_VIDEO_MODES], align 8

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

declare zeroext i8 @DebugAssertEnabled() #1

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

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

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

18:                                               ; preds = %5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = ptrtoint ptr %19 to i64
  %21 = sub i64 %20, ptrtoint (ptr getelementptr inbounds (%struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr null, i32 0, i32 4) to i64)
  %22 = inttoptr i64 %21 to ptr
  %23 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %22, i32 0, i32 0
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = icmp ne i64 %24, 875908163
  br i1 %25, label %26, label %28

26:                                               ; preds = %18
  call void @DebugAssert(ptr noundef @.str, i64 noundef 68, ptr noundef @.str.1)
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  br label %33

28:                                               ; preds = %18, %5
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = ptrtoint ptr %29 to i64
  %31 = sub i64 %30, ptrtoint (ptr getelementptr inbounds (%struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr null, i32 0, i32 4) to i64)
  %32 = inttoptr i64 %31 to ptr
  br label %33

33:                                               ; preds = %28, %26
  %34 = phi ptr [ %27, %26 ], [ %32, %28 ]
  store ptr %34, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %35

35:                                               ; preds = %122, %33
  %36 = load i64, ptr %13, align 8, !tbaa !17
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %37, i32 0, i32 11
  %39 = load i64, ptr %38, align 8, !tbaa !18
  %40 = icmp ult i64 %36, %39
  br i1 %40, label %41, label %125

41:                                               ; preds = %35
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %43, i32 0, i32 12
  %45 = load i64, ptr %13, align 8, !tbaa !17
  %46 = getelementptr inbounds [3 x %struct.CIRRUS_LOGIC_5430_MODE_DATA], ptr %44, i64 0, i64 %45
  %47 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_MODE_DATA, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !19
  %49 = icmp ne i32 %42, %48
  br i1 %49, label %50, label %51

50:                                               ; preds = %41
  br label %122

51:                                               ; preds = %41
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %53, i32 0, i32 12
  %55 = load i64, ptr %13, align 8, !tbaa !17
  %56 = getelementptr inbounds [3 x %struct.CIRRUS_LOGIC_5430_MODE_DATA], ptr %54, i64 0, i64 %55
  %57 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_MODE_DATA, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !21
  %59 = icmp ne i32 %52, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %51
  br label %122

61:                                               ; preds = %51
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %63, i32 0, i32 12
  %65 = load i64, ptr %13, align 8, !tbaa !17
  %66 = getelementptr inbounds [3 x %struct.CIRRUS_LOGIC_5430_MODE_DATA], ptr %64, i64 0, i64 %65
  %67 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_MODE_DATA, ptr %66, i32 0, i32 3
  %68 = load i32, ptr %67, align 4, !tbaa !22
  %69 = icmp ne i32 %62, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %61
  br label %122

71:                                               ; preds = %61
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %73, i32 0, i32 12
  %75 = load i64, ptr %13, align 8, !tbaa !17
  %76 = getelementptr inbounds [3 x %struct.CIRRUS_LOGIC_5430_MODE_DATA], ptr %74, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_MODE_DATA, ptr %76, i32 0, i32 4
  %78 = load i32, ptr %77, align 4, !tbaa !23
  %79 = icmp ne i32 %72, %78
  br i1 %79, label %80, label %81

80:                                               ; preds = %71
  br label %122

81:                                               ; preds = %71
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %82, i32 0, i32 13
  %84 = load ptr, ptr %83, align 8, !tbaa !24
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %94

86:                                               ; preds = %81
  %87 = load ptr, ptr @gBS, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %87, i32 0, i32 7
  %89 = load ptr, ptr %88, align 8, !tbaa !25
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %90, i32 0, i32 13
  %92 = load ptr, ptr %91, align 8, !tbaa !24
  %93 = call i64 %89(ptr noundef %92)
  br label %94

94:                                               ; preds = %86, %81
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %95, i32 0, i32 13
  store ptr null, ptr %96, align 8, !tbaa !24
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = call ptr @AllocatePool(i64 noundef %98)
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %100, i32 0, i32 13
  store ptr %99, ptr %101, align 8, !tbaa !24
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %102, i32 0, i32 13
  %104 = load ptr, ptr %103, align 8, !tbaa !24
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %107

106:                                              ; preds = %94
  store i64 -9223372036854775799, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %126

107:                                              ; preds = %94
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %109, i32 0, i32 12
  %111 = load i64, ptr %13, align 8, !tbaa !17
  %112 = getelementptr inbounds [3 x %struct.CIRRUS_LOGIC_5430_MODE_DATA], ptr %110, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_MODE_DATA, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 4, !tbaa !28
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds [0 x %struct.CIRRUS_LOGIC_5430_VIDEO_MODES], ptr @CirrusLogic5430VideoModes, i64 0, i64 %115
  call void @InitializeGraphicsMode(ptr noundef %108, ptr noundef %116)
  %117 = load i64, ptr %13, align 8, !tbaa !17
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %118, i32 0, i32 10
  store i64 %117, ptr %119, align 8, !tbaa !29
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.CIRRUS_LOGIC_5430_PRIVATE_DATA, ptr %120, i32 0, i32 14
  store i8 0, ptr %121, align 8, !tbaa !30
  store i64 0, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %126

122:                                              ; preds = %80, %70, %60, %50
  %123 = load i64, ptr %13, align 8, !tbaa !17
  %124 = add i64 %123, 1
  store i64 %124, ptr %13, align 8, !tbaa !17
  br label %35, !llvm.loop !31

125:                                              ; preds = %35
  store i64 -9223372036854775794, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %126

126:                                              ; preds = %125, %107, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %127 = load i64, ptr %6, align 8
  ret i64 %127
}

declare ptr @AllocatePool(i64 noundef) #1

declare void @InitializeGraphicsMode(ptr 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !14, i64 32, !15, i64 56, !16, i64 88, !16, i64 104, !6, i64 120, !6, i64 128, !13, i64 136, !13, i64 144, !7, i64 152, !6, i64 216, !7, i64 224}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_EFI_UGA_DRAW_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_EFI_GRAPHICS_OUTPUT_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"", !10, i64 0, !6, i64 8}
!17 = !{!13, !13, i64 0}
!18 = !{!12, !13, i64 144}
!19 = !{!20, !10, i64 4}
!20 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!21 = !{!20, !10, i64 8}
!22 = !{!20, !10, i64 12}
!23 = !{!20, !10, i64 16}
!24 = !{!12, !6, i64 216}
!25 = !{!26, !6, i64 72}
!26 = !{!"", !27, 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}
!27 = !{!"", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!28 = !{!20, !10, i64 0}
!29 = !{!12, !13, i64 136}
!30 = !{!12, !7, i64 224}
!31 = distinct !{!31, !32}
!32 = !{!"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.CIRRUS_LOGIC_5430_VIDEO_MODES = type { i32, i32, i32, i32, ptr, ptr, i8 }
%struct.CIRRUS_LOGIC_5430_MODE_DATA = type { i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [158 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@CirrusLogic5430VideoModes = external global [0 x %struct.CIRRUS_LOGIC_5430_VIDEO_MODES], align 8

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775799, 1) i64 @CirrusLogic5430UgaDrawSetMode(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #1 {
  %6 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %6, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre44 = add i64 %.pre, -32
  %.pre46 = inttoptr i64 %.pre44 to ptr
  br i1 %.not, label %._crit_edge, label %7

7:                                                ; preds = %5
  %8 = load i64, ptr %.pre46, align 8, !tbaa !5
  %.not33 = icmp eq i64 %8, 875908163
  br i1 %.not33, label %._crit_edge, label %9

9:                                                ; preds = %7
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 68, ptr noundef nonnull @.str.1) #2
  br label %._crit_edge

._crit_edge:                                      ; preds = %5, %7, %9
  %10 = phi ptr [ %0, %9 ], [ %.pre46, %7 ], [ %.pre46, %5 ]
  %11 = getelementptr inbounds i8, ptr %10, i64 144
  %12 = load i64, ptr %11, align 8, !tbaa !15
  %.not41 = icmp eq i64 %12, 0
  br i1 %.not41, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge
  %13 = getelementptr inbounds i8, ptr %10, i64 152
  br label %14

14:                                               ; preds = %.lr.ph, %45
  %.040 = phi i64 [ 0, %.lr.ph ], [ %46, %45 ]
  %15 = getelementptr inbounds [3 x %struct.CIRRUS_LOGIC_5430_MODE_DATA], ptr %13, i64 0, i64 %.040
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !16
  %.not34 = icmp eq i32 %17, %1
  br i1 %.not34, label %18, label %45

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %15, i64 8
  %20 = load i32, ptr %19, align 4, !tbaa !18
  %.not35 = icmp eq i32 %20, %2
  br i1 %.not35, label %21, label %45

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %15, i64 12
  %23 = load i32, ptr %22, align 4, !tbaa !19
  %.not36 = icmp eq i32 %23, %3
  br i1 %.not36, label %24, label %45

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %15, i64 16
  %26 = load i32, ptr %25, align 4, !tbaa !20
  %.not37 = icmp eq i32 %26, %4
  br i1 %.not37, label %27, label %45

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %10, i64 216
  %29 = load ptr, ptr %28, align 8, !tbaa !21
  %.not38 = icmp eq ptr %29, null
  br i1 %.not38, label %35, label %30

30:                                               ; preds = %27
  %31 = load ptr, ptr @gBS, align 8, !tbaa !22
  %32 = getelementptr inbounds i8, ptr %31, i64 72
  %33 = load ptr, ptr %32, align 8, !tbaa !23
  %34 = tail call i64 %33(ptr noundef nonnull %29) #2
  br label %35

35:                                               ; preds = %30, %27
  store ptr null, ptr %28, align 8, !tbaa !21
  %36 = zext i32 %1 to i64
  %37 = tail call ptr @AllocatePool(i64 noundef %36) #2
  store ptr %37, ptr %28, align 8, !tbaa !21
  %38 = icmp eq ptr %37, null
  br i1 %38, label %.loopexit, label %39

39:                                               ; preds = %35
  %40 = load i32, ptr %15, align 4, !tbaa !26
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds [0 x %struct.CIRRUS_LOGIC_5430_VIDEO_MODES], ptr @CirrusLogic5430VideoModes, i64 0, i64 %41
  tail call void @InitializeGraphicsMode(ptr noundef nonnull %10, ptr noundef nonnull %42) #2
  %43 = getelementptr inbounds i8, ptr %10, i64 136
  store i64 %.040, ptr %43, align 8, !tbaa !27
  %44 = getelementptr inbounds i8, ptr %10, i64 224
  store i8 0, ptr %44, align 8, !tbaa !28
  br label %.loopexit

45:                                               ; preds = %24, %21, %18, %14
  %46 = add nuw i64 %.040, 1
  %exitcond.not = icmp eq i64 %46, %12
  br i1 %exitcond.not, label %.loopexit, label %14, !llvm.loop !29

.loopexit:                                        ; preds = %45, %._crit_edge, %35, %39
  %.030 = phi i64 [ 0, %39 ], [ -9223372036854775799, %35 ], [ -9223372036854775794, %._crit_edge ], [ -9223372036854775794, %45 ]
  ret i64 %.030
}

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #0

declare void @InitializeGraphicsMode(ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !7, i64 24, !11, i64 32, !12, i64 56, !13, i64 88, !13, i64 104, !10, i64 120, !10, i64 128, !7, i64 136, !7, i64 144, !8, i64 152, !10, i64 216, !8, i64 224}
!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_UGA_DRAW_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16}
!12 = !{!"_EFI_GRAPHICS_OUTPUT_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!13 = !{!"", !14, i64 0, !10, i64 8}
!14 = !{!"int", !8, i64 0}
!15 = !{!6, !7, i64 144}
!16 = !{!17, !14, i64 4}
!17 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16}
!18 = !{!17, !14, i64 8}
!19 = !{!17, !14, i64 12}
!20 = !{!17, !14, i64 16}
!21 = !{!6, !10, i64 216}
!22 = !{!10, !10, i64 0}
!23 = !{!24, !10, i64 72}
!24 = !{!"", !25, 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}
!25 = !{!"", !7, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!26 = !{!17, !14, i64 0}
!27 = !{!6, !7, i64 136}
!28 = !{!6, !8, i64 224}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass