; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal (PxeNvDataRead)

; 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.SNP_DRIVER = type <{ i32, [4 x i8], %struct.EFI_LOCK, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, ptr, i8, i8, i16, i32, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, %struct.s_pxe_cdb, [6 x i8], ptr, ptr, ptr, %struct.s_pxe_db_get_init_info, i8, ptr, [100 x %struct.MAP_LIST], ptr, i8, [7 x i8] }>
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._EFI_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.s_pxe_cdb = type { i16, i16, i16, i16, i64, i64, i16, i16, i16, i16 }
%struct.s_pxe_db_get_init_info = type <{ i32, i32, [4 x i32], i32, i16, i16, i16, i16, i16, i16, i16, i16, i8, i8, i8 }>
%struct.MAP_LIST = type { i64, ptr }
%struct.s_pxe_db_nvdata = type { %union.anon }
%union.anon = type { [128 x i32] }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [148 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeNvDataRead(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) #0 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %12 = load ptr, ptr %6, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.SNP_DRIVER, ptr %12, i32 0, i32 24
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  store ptr %14, ptr %10, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.SNP_DRIVER, ptr %15, i32 0, i32 20
  %17 = getelementptr inbounds %struct.s_pxe_cdb, ptr %16, i32 0, i32 0
  store i16 13, ptr %17, align 2, !tbaa !21
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.SNP_DRIVER, ptr %18, i32 0, i32 20
  %20 = getelementptr inbounds %struct.s_pxe_cdb, ptr %19, i32 0, i32 1
  store i16 0, ptr %20, align 2, !tbaa !22
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.SNP_DRIVER, ptr %21, i32 0, i32 20
  %23 = getelementptr inbounds %struct.s_pxe_cdb, ptr %22, i32 0, i32 2
  store i16 0, ptr %23, align 2, !tbaa !23
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.SNP_DRIVER, ptr %24, i32 0, i32 20
  %26 = getelementptr inbounds %struct.s_pxe_cdb, ptr %25, i32 0, i32 4
  store i64 0, ptr %26, align 2, !tbaa !24
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.SNP_DRIVER, ptr %27, i32 0, i32 20
  %29 = getelementptr inbounds %struct.s_pxe_cdb, ptr %28, i32 0, i32 3
  store i16 512, ptr %29, align 2, !tbaa !25
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = ptrtoint ptr %30 to i64
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.SNP_DRIVER, ptr %32, i32 0, i32 20
  %34 = getelementptr inbounds %struct.s_pxe_cdb, ptr %33, i32 0, i32 5
  store i64 %31, ptr %34, align 2, !tbaa !26
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.SNP_DRIVER, ptr %35, i32 0, i32 20
  %37 = getelementptr inbounds %struct.s_pxe_cdb, ptr %36, i32 0, i32 6
  store i16 0, ptr %37, align 2, !tbaa !27
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.SNP_DRIVER, ptr %38, i32 0, i32 20
  %40 = getelementptr inbounds %struct.s_pxe_cdb, ptr %39, i32 0, i32 7
  store i16 0, ptr %40, align 2, !tbaa !28
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.SNP_DRIVER, ptr %41, i32 0, i32 10
  %43 = load i16, ptr %42, align 2, !tbaa !29
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.SNP_DRIVER, ptr %44, i32 0, i32 20
  %46 = getelementptr inbounds %struct.s_pxe_cdb, ptr %45, i32 0, i32 8
  store i16 %43, ptr %46, align 2, !tbaa !30
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.SNP_DRIVER, ptr %47, i32 0, i32 20
  %49 = getelementptr inbounds %struct.s_pxe_cdb, ptr %48, i32 0, i32 9
  store i16 0, ptr %49, align 2, !tbaa !31
  br label %50

50:                                               ; preds = %4
  %51 = call zeroext i8 @DebugPrintEnabled()
  %52 = icmp ne i8 %51, 0
  br i1 %52, label %53, label %61

53:                                               ; preds = %50
  br label %54

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

57:                                               ; preds = %54
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str)
  br label %58

58:                                               ; preds = %57, %54
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  br label %61

61:                                               ; preds = %60, %50
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.SNP_DRIVER, ptr %64, i32 0, i32 7
  %66 = load ptr, ptr %65, align 8, !tbaa !32
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.SNP_DRIVER, ptr %67, i32 0, i32 20
  %69 = ptrtoint ptr %68 to i64
  %70 = call i64 %66(i64 noundef %69)
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.SNP_DRIVER, ptr %71, i32 0, i32 20
  %73 = getelementptr inbounds %struct.s_pxe_cdb, ptr %72, i32 0, i32 6
  %74 = load i16, ptr %73, align 2, !tbaa !27
  %75 = zext i16 %74 to i32
  switch i32 %75, label %101 [
    i32 0, label %126
    i32 12, label %76
  ]

76:                                               ; preds = %63
  br label %77

77:                                               ; preds = %76
  %78 = call zeroext i8 @DebugPrintEnabled()
  %79 = icmp ne i8 %78, 0
  br i1 %79, label %80, label %98

80:                                               ; preds = %77
  br label %81

81:                                               ; preds = %80
  %82 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %83 = icmp ne i8 %82, 0
  br i1 %83, label %84, label %95

84:                                               ; preds = %81
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.SNP_DRIVER, ptr %85, i32 0, i32 20
  %87 = getelementptr inbounds %struct.s_pxe_cdb, ptr %86, i32 0, i32 7
  %88 = load i16, ptr %87, align 2, !tbaa !28
  %89 = zext i16 %88 to i32
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.SNP_DRIVER, ptr %90, i32 0, i32 20
  %92 = getelementptr inbounds %struct.s_pxe_cdb, ptr %91, i32 0, i32 6
  %93 = load i16, ptr %92, align 2, !tbaa !27
  %94 = zext i16 %93 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.1, i32 noundef %89, i32 noundef %94)
  br label %95

95:                                               ; preds = %84, %81
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97, %77
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  store i64 -9223372036854775805, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %145

101:                                              ; preds = %63
  br label %102

102:                                              ; preds = %101
  %103 = call zeroext i8 @DebugPrintEnabled()
  %104 = icmp ne i8 %103, 0
  br i1 %104, label %105, label %123

105:                                              ; preds = %102
  br label %106

106:                                              ; preds = %105
  %107 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %108 = icmp ne i8 %107, 0
  br i1 %108, label %109, label %120

109:                                              ; preds = %106
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.SNP_DRIVER, ptr %110, i32 0, i32 20
  %112 = getelementptr inbounds %struct.s_pxe_cdb, ptr %111, i32 0, i32 7
  %113 = load i16, ptr %112, align 2, !tbaa !28
  %114 = zext i16 %113 to i32
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.SNP_DRIVER, ptr %115, i32 0, i32 20
  %117 = getelementptr inbounds %struct.s_pxe_cdb, ptr %116, i32 0, i32 6
  %118 = load i16, ptr %117, align 2, !tbaa !27
  %119 = zext i16 %118 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.1, i32 noundef %114, i32 noundef %119)
  br label %120

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

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122, %102
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  store i64 -9223372036854775801, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %145

126:                                              ; preds = %63
  br label %127

127:                                              ; preds = %126
  %128 = call zeroext i8 @DebugAssertEnabled()
  %129 = icmp ne i8 %128, 0
  br i1 %129, label %130, label %135

130:                                              ; preds = %127
  %131 = load i64, ptr %7, align 8, !tbaa !9
  %132 = icmp ult i64 %131, 512
  br i1 %132, label %134, label %133

133:                                              ; preds = %130
  call void @DebugAssert(ptr noundef @.str.2, i64 noundef 91, ptr noundef @.str.3)
  br label %134

134:                                              ; preds = %133, %130
  br label %135

135:                                              ; preds = %134, %127
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.s_pxe_db_nvdata, ptr %139, i32 0, i32 0
  %141 = load i64, ptr %7, align 8, !tbaa !9
  %142 = getelementptr inbounds [512 x i8], ptr %140, i64 0, i64 %141
  %143 = load i64, ptr %8, align 8, !tbaa !9
  %144 = call ptr @CopyMem(ptr noundef %138, ptr noundef %142, i64 noundef %143)
  store i64 0, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %145

145:                                              ; preds = %137, %125, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %146 = load i64, ptr %5, align 8
  ret i64 %146
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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

declare zeroext i8 @DebugAssertEnabled() #2

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

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #2

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

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, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 952}
!12 = !{!"", !13, i64 0, !14, i64 8, !15, i64 32, !16, i64 160, !6, i64 816, !6, i64 824, !6, i64 832, !7, i64 840, !18, i64 842, !13, i64 844, !6, i64 848, !6, i64 856, !6, i64 864, !6, i64 872, !6, i64 880, !6, i64 888, !7, i64 896, !7, i64 897, !19, i64 898, !6, i64 936, !6, i64 944, !6, i64 952, !20, i64 960, !6, i64 1008, !7, i64 1016, !6, i64 2616, !7, i64 2624}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !10, i64 0, !10, i64 8, !13, i64 16}
!15 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !10, 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, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!16 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !7, i64 40, !17, i64 552, !17, i64 584, !17, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!17 = !{!"", !7, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{!"s_pxe_cdb", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !10, i64 8, !10, i64 16, !18, i64 24, !18, i64 26, !18, i64 28, !18, i64 30}
!20 = !{!"s_pxe_db_get_init_info", !13, i64 0, !13, i64 4, !7, i64 8, !13, i64 24, !18, i64 28, !18, i64 30, !18, i64 32, !18, i64 34, !18, i64 36, !18, i64 38, !18, i64 40, !18, i64 42, !7, i64 44, !7, i64 45, !7, i64 46}
!21 = !{!12, !18, i64 898}
!22 = !{!12, !18, i64 900}
!23 = !{!12, !18, i64 902}
!24 = !{!12, !10, i64 906}
!25 = !{!12, !18, i64 904}
!26 = !{!12, !10, i64 914}
!27 = !{!12, !18, i64 922}
!28 = !{!12, !18, i64 924}
!29 = !{!12, !18, i64 842}
!30 = !{!12, !18, i64 926}
!31 = !{!12, !18, i64 928}
!32 = !{!12, !6, i64 832}


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

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [148 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775805, 1) i64 @PxeNvDataRead(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 952
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 898
  store i16 13, ptr %7, align 2, !tbaa !19
  %8 = getelementptr inbounds i8, ptr %0, i64 900
  store i16 0, ptr %8, align 2, !tbaa !20
  %9 = getelementptr inbounds i8, ptr %0, i64 902
  store i16 0, ptr %9, align 2, !tbaa !21
  %10 = getelementptr inbounds i8, ptr %0, i64 906
  store i64 0, ptr %10, align 2, !tbaa !22
  %11 = getelementptr inbounds i8, ptr %0, i64 904
  store i16 512, ptr %11, align 2, !tbaa !23
  %12 = ptrtoint ptr %6 to i64
  %13 = getelementptr inbounds i8, ptr %0, i64 914
  store i64 %12, ptr %13, align 2, !tbaa !24
  %14 = getelementptr inbounds i8, ptr %0, i64 922
  store i16 0, ptr %14, align 2, !tbaa !25
  %15 = getelementptr inbounds i8, ptr %0, i64 924
  store i16 0, ptr %15, align 2, !tbaa !26
  %16 = getelementptr inbounds i8, ptr %0, i64 842
  %17 = load i16, ptr %16, align 2, !tbaa !27
  %18 = getelementptr inbounds i8, ptr %0, i64 926
  store i16 %17, ptr %18, align 2, !tbaa !28
  %19 = getelementptr inbounds i8, ptr %0, i64 928
  store i16 0, ptr %19, align 2, !tbaa !29
  %20 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not = icmp eq i8 %20, 0
  br i1 %.not, label %24, label %21

21:                                               ; preds = %4
  %22 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #2
  %.not26 = icmp eq i8 %22, 0
  br i1 %.not26, label %24, label %23

23:                                               ; preds = %21
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str) #2
  br label %24

24:                                               ; preds = %21, %23, %4
  %25 = getelementptr inbounds i8, ptr %0, i64 832
  %26 = load ptr, ptr %25, align 8, !tbaa !30
  %27 = ptrtoint ptr %7 to i64
  %28 = tail call i64 %26(i64 noundef %27) #2
  %29 = load i16, ptr %14, align 2, !tbaa !25
  switch i16 %29, label %39 [
    i16 0, label %48
    i16 12, label %30
  ]

30:                                               ; preds = %24
  %31 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not27 = icmp eq i8 %31, 0
  br i1 %.not27, label %56, label %32

32:                                               ; preds = %30
  %33 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #2
  %.not28 = icmp eq i8 %33, 0
  br i1 %.not28, label %56, label %34

34:                                               ; preds = %32
  %35 = load i16, ptr %15, align 2, !tbaa !26
  %36 = zext i16 %35 to i32
  %37 = load i16, ptr %14, align 2, !tbaa !25
  %38 = zext i16 %37 to i32
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.1, i32 noundef %36, i32 noundef %38) #2
  br label %56

39:                                               ; preds = %24
  %40 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not29 = icmp eq i8 %40, 0
  br i1 %.not29, label %56, label %41

41:                                               ; preds = %39
  %42 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #2
  %.not30 = icmp eq i8 %42, 0
  br i1 %.not30, label %56, label %43

43:                                               ; preds = %41
  %44 = load i16, ptr %15, align 2, !tbaa !26
  %45 = zext i16 %44 to i32
  %46 = load i16, ptr %14, align 2, !tbaa !25
  %47 = zext i16 %46 to i32
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.1, i32 noundef %45, i32 noundef %47) #2
  br label %56

48:                                               ; preds = %24
  %49 = tail call zeroext i8 @DebugAssertEnabled() #2
  %50 = icmp eq i8 %49, 0
  %51 = icmp ult i64 %1, 512
  %or.cond = or i1 %51, %50
  br i1 %or.cond, label %53, label %52

52:                                               ; preds = %48
  tail call void @DebugAssert(ptr noundef nonnull @.str.2, i64 noundef 91, ptr noundef nonnull @.str.3) #2
  br label %53

53:                                               ; preds = %52, %48
  %54 = getelementptr inbounds [512 x i8], ptr %6, i64 0, i64 %1
  %55 = tail call ptr @CopyMem(ptr noundef %3, ptr noundef %54, i64 noundef %2) #2
  br label %56

56:                                               ; preds = %39, %43, %41, %30, %34, %32, %53
  %.0 = phi i64 [ 0, %53 ], [ -9223372036854775805, %32 ], [ -9223372036854775805, %34 ], [ -9223372036854775805, %30 ], [ -9223372036854775801, %41 ], [ -9223372036854775801, %43 ], [ -9223372036854775801, %39 ]
  ret i64 %.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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

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 = { "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, !13, i64 952}
!6 = !{!"", !7, i64 0, !10, i64 8, !12, i64 32, !14, i64 160, !13, i64 816, !13, i64 824, !13, i64 832, !8, i64 840, !16, i64 842, !7, i64 844, !13, i64 848, !13, i64 856, !13, i64 864, !13, i64 872, !13, i64 880, !13, i64 888, !8, i64 896, !8, i64 897, !17, i64 898, !13, i64 936, !13, i64 944, !13, i64 952, !18, i64 960, !13, i64 1008, !8, i64 1016, !13, i64 2616, !8, i64 2624}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 8, !7, i64 16}
!11 = !{!"long long", !8, i64 0}
!12 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !11, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !15, i64 552, !15, i64 584, !15, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!15 = !{!"", !8, i64 0}
!16 = !{!"short", !8, i64 0}
!17 = !{!"s_pxe_cdb", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !11, i64 8, !11, i64 16, !16, i64 24, !16, i64 26, !16, i64 28, !16, i64 30}
!18 = !{!"s_pxe_db_get_init_info", !7, i64 0, !7, i64 4, !8, i64 8, !7, i64 24, !16, i64 28, !16, i64 30, !16, i64 32, !16, i64 34, !16, i64 36, !16, i64 38, !16, i64 40, !16, i64 42, !8, i64 44, !8, i64 45, !8, i64 46}
!19 = !{!6, !16, i64 898}
!20 = !{!6, !16, i64 900}
!21 = !{!6, !16, i64 902}
!22 = !{!6, !11, i64 906}
!23 = !{!6, !16, i64 904}
!24 = !{!6, !11, i64 914}
!25 = !{!6, !16, i64 922}
!26 = !{!6, !16, i64 924}
!27 = !{!6, !16, i64 842}
!28 = !{!6, !16, i64 926}
!29 = !{!6, !16, i64 928}
!30 = !{!6, !13, i64 832}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass