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

; 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.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_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.NIC_DEVICE = type { i64, ptr, ptr, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, i8, ptr, i16, i8, i8, i8, i8, i64, i64, i16, ptr, ptr, [8 x i8], %struct.EFI_MAC_ADDRESS, i8, ptr, ptr, ptr, ptr, ptr, i64, ptr }
%struct._RX_PKT = type <{ ptr, i8, i16, [2048 x i8] }>

@.str = external hidden unnamed_addr constant [161 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, 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

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

declare ptr @SetMem(ptr noundef, i64 noundef, i8 noundef zeroext) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @SN_Start(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store ptr null, ptr %8, align 8, !tbaa !5
  %9 = load ptr, ptr @gBS, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %9, i32 0, i32 1
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = call i64 %11(i64 noundef 8)
  store i64 %12, ptr %6, align 8, !tbaa !15
  store i64 -9223372036854775806, ptr %5, align 8, !tbaa !15
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = icmp ne ptr null, %13
  br i1 %14, label %15, label %119

15:                                               ; preds = %1
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %16, i32 0, i32 15
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  %19 = icmp ne ptr null, %18
  br i1 %19, label %20, label %119

20:                                               ; preds = %15
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %21, i32 0, i32 15
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  store ptr %23, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 4, !tbaa !18
  %27 = icmp eq i32 0, %26
  br i1 %27, label %28, label %117

28:                                               ; preds = %20
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call ptr @ZeroMem(ptr noundef %29, i64 noundef 656)
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %31, i32 0, i32 0
  store i32 1, ptr %32, align 4, !tbaa !18
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %33, i32 0, i32 1
  store i32 6, ptr %34, align 4, !tbaa !21
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %35, i32 0, i32 2
  store i32 14, ptr %36, align 4, !tbaa !22
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %37, i32 0, i32 3
  store i32 1500, ptr %38, align 4, !tbaa !23
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %39, i32 0, i32 6
  store i32 31, ptr %40, align 4, !tbaa !24
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %41, i32 0, i32 7
  store i32 1, ptr %42, align 4, !tbaa !25
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %43, i32 0, i32 8
  store i32 16, ptr %44, align 4, !tbaa !26
  %45 = call zeroext i8 @DebugAssertEnabled()
  %46 = zext i8 %45 to i32
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %58

48:                                               ; preds = %28
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = ptrtoint ptr %49 to i64
  %51 = sub i64 %50, ptrtoint (ptr getelementptr inbounds (%struct.NIC_DEVICE, ptr null, i32 0, i32 3) to i64)
  %52 = inttoptr i64 %51 to ptr
  %53 = getelementptr inbounds %struct.NIC_DEVICE, ptr %52, i32 0, i32 0
  %54 = load i64, ptr %53, align 8, !tbaa !27
  %55 = icmp ne i64 %54, 943216705
  br i1 %55, label %56, label %58

56:                                               ; preds = %48
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1102, ptr noundef @.str.1)
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  br label %63

58:                                               ; preds = %48, %28
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = ptrtoint ptr %59 to i64
  %61 = sub i64 %60, ptrtoint (ptr getelementptr inbounds (%struct.NIC_DEVICE, ptr null, i32 0, i32 3) to i64)
  %62 = inttoptr i64 %61 to ptr
  br label %63

63:                                               ; preds = %58, %56
  %64 = phi ptr [ %57, %56 ], [ %62, %58 ]
  store ptr %64, ptr %3, align 8, !tbaa !5
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %66, i32 0, i32 13
  %68 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds [32 x i8], ptr %68, i64 0, i64 0
  %70 = call i64 @Ax88772MacAddressGet(ptr noundef %65, ptr noundef %69)
  store i64 %70, ptr %5, align 8, !tbaa !15
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %71, i32 0, i32 11
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %73, i32 0, i32 13
  %75 = call ptr @CopyMem(ptr noundef %72, ptr noundef %74, i64 noundef 32)
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %76, i32 0, i32 12
  %78 = call ptr @SetMem(ptr noundef %77, i64 noundef 6, i8 noundef zeroext -1)
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %79, i32 0, i32 14
  store i8 1, ptr %80, align 4, !tbaa !30
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %81, i32 0, i32 15
  store i8 1, ptr %82, align 1, !tbaa !31
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %83, i32 0, i32 16
  store i8 0, ptr %84, align 2, !tbaa !32
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %85, i32 0, i32 17
  store i8 1, ptr %86, align 1, !tbaa !33
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %87, i32 0, i32 18
  store i8 0, ptr %88, align 4, !tbaa !34
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.NIC_DEVICE, ptr %89, i32 0, i32 26
  store i64 0, ptr %90, align 8, !tbaa !35
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.NIC_DEVICE, ptr %91, i32 0, i32 23
  %93 = load ptr, ptr %92, align 8, !tbaa !36
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.NIC_DEVICE, ptr %94, i32 0, i32 24
  store ptr %93, ptr %95, align 8, !tbaa !37
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.NIC_DEVICE, ptr %96, i32 0, i32 23
  %98 = load ptr, ptr %97, align 8, !tbaa !36
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.NIC_DEVICE, ptr %99, i32 0, i32 25
  store ptr %98, ptr %100, align 8, !tbaa !38
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.NIC_DEVICE, ptr %101, i32 0, i32 23
  %103 = load ptr, ptr %102, align 8, !tbaa !36
  store ptr %103, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %113, %63
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = icmp slt i32 %105, 50
  br i1 %106, label %107, label %116

107:                                              ; preds = %104
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._RX_PKT, ptr %108, i32 0, i32 1
  store i8 0, ptr %109, align 1, !tbaa !39
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._RX_PKT, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 1, !tbaa !41
  store ptr %112, ptr %8, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %107
  %114 = load i32, ptr %7, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %7, align 4, !tbaa !9
  br label %104, !llvm.loop !42

116:                                              ; preds = %104
  br label %118

117:                                              ; preds = %20
  store i64 -9223372036854775788, ptr %5, align 8, !tbaa !15
  br label %118

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

119:                                              ; preds = %118, %15, %1
  %120 = load ptr, ptr @gBS, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %120, i32 0, i32 2
  %122 = load ptr, ptr %121, align 8, !tbaa !44
  %123 = load i64, ptr %6, align 8, !tbaa !15
  call void %122(i64 noundef %123)
  %124 = load i64, ptr %5, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret i64 %124
}

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

declare ptr @ZeroMem(ptr noundef, i64 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, !6, i64 24}
!12 = !{!"", !13, 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}
!13 = !{!"", !14, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!14 = !{!"long long", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !6, i64 120}
!17 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !14, 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}
!18 = !{!19, !10, i64 0}
!19 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !20, i64 552, !20, i64 584, !20, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!20 = !{!"", !7, i64 0}
!21 = !{!19, !10, i64 4}
!22 = !{!19, !10, i64 8}
!23 = !{!19, !10, i64 12}
!24 = !{!19, !10, i64 24}
!25 = !{!19, !10, i64 28}
!26 = !{!19, !10, i64 32}
!27 = !{!28, !14, i64 0}
!28 = !{!"", !14, i64 0, !6, i64 8, !6, i64 16, !17, i64 24, !17, i64 152, !19, i64 280, !7, i64 936, !6, i64 944, !29, i64 952, !7, i64 954, !7, i64 955, !7, i64 956, !7, i64 957, !14, i64 960, !14, i64 968, !29, i64 976, !6, i64 984, !6, i64 992, !7, i64 1000, !20, i64 1008, !7, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !14, i64 1088, !6, i64 1096}
!29 = !{!"short", !7, i64 0}
!30 = !{!19, !7, i64 648}
!31 = !{!19, !7, i64 649}
!32 = !{!19, !7, i64 650}
!33 = !{!19, !7, i64 651}
!34 = !{!19, !7, i64 652}
!35 = !{!28, !14, i64 1088}
!36 = !{!28, !6, i64 1064}
!37 = !{!28, !6, i64 1072}
!38 = !{!28, !6, i64 1080}
!39 = !{!40, !7, i64 8}
!40 = !{!"_RX_PKT", !6, i64 0, !7, i64 8, !29, i64 9, !7, i64 11}
!41 = !{!40, !6, i64 0}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{!12, !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"

@.str = external hidden unnamed_addr constant [161 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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

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

declare ptr @SetMem(ptr noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @SN_Start(ptr noundef %0) local_unnamed_addr #1 {
  %2 = load ptr, ptr @gBS, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %2, i64 24
  %4 = load ptr, ptr %3, align 8, !tbaa !9
  %5 = tail call i64 %4(i64 noundef 8) #2
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %.loopexit, label %6

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 120
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %.not40 = icmp eq ptr %8, null
  br i1 %.not40, label %.loopexit, label %9

9:                                                ; preds = %6
  %10 = load i32, ptr %8, align 4, !tbaa !16
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %.loopexit

12:                                               ; preds = %9
  %13 = tail call ptr @ZeroMem(ptr noundef nonnull %8, i64 noundef 656) #2
  store <4 x i32> <i32 1, i32 6, i32 14, i32 1500>, ptr %8, align 4, !tbaa !19
  %14 = getelementptr inbounds i8, ptr %8, i64 24
  store i32 31, ptr %14, align 4, !tbaa !20
  %15 = getelementptr inbounds i8, ptr %8, i64 28
  store i32 1, ptr %15, align 4, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %8, i64 32
  store i32 16, ptr %16, align 4, !tbaa !22
  %17 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not41 = icmp eq i8 %17, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre45 = add i64 %.pre, -24
  %.pre47 = inttoptr i64 %.pre45 to ptr
  br i1 %.not41, label %.loopexit.loopexit, label %18

18:                                               ; preds = %12
  %19 = load i64, ptr %.pre47, align 8, !tbaa !23
  %.not42 = icmp eq i64 %19, 943216705
  br i1 %.not42, label %.loopexit.loopexit, label %20

20:                                               ; preds = %18
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1102, ptr noundef nonnull @.str.1) #2
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %12, %18, %20
  %21 = phi ptr [ %0, %20 ], [ %.pre47, %18 ], [ %.pre47, %12 ]
  %22 = getelementptr inbounds i8, ptr %8, i64 616
  %23 = tail call i64 @Ax88772MacAddressGet(ptr noundef %21, ptr noundef nonnull %22) #2
  %24 = getelementptr inbounds i8, ptr %8, i64 552
  %25 = tail call ptr @CopyMem(ptr noundef nonnull %24, ptr noundef nonnull %22, i64 noundef 32) #2
  %26 = getelementptr inbounds i8, ptr %8, i64 584
  %27 = tail call ptr @SetMem(ptr noundef nonnull %26, i64 noundef 6, i8 noundef zeroext -1) #2
  %28 = getelementptr inbounds i8, ptr %8, i64 648
  store <4 x i8> <i8 1, i8 1, i8 0, i8 1>, ptr %28, align 4, !tbaa !26
  %29 = getelementptr inbounds i8, ptr %8, i64 652
  store i8 0, ptr %29, align 4, !tbaa !27
  %30 = getelementptr inbounds i8, ptr %21, i64 1088
  store i64 0, ptr %30, align 8, !tbaa !28
  %31 = getelementptr inbounds i8, ptr %21, i64 1064
  %32 = load ptr, ptr %31, align 8, !tbaa !29
  %33 = getelementptr inbounds i8, ptr %21, i64 1072
  store ptr %32, ptr %33, align 8, !tbaa !30
  %34 = getelementptr inbounds i8, ptr %21, i64 1080
  store ptr %32, ptr %34, align 8, !tbaa !31
  %35 = getelementptr inbounds i8, ptr %32, i64 8
  store i8 0, ptr %35, align 1, !tbaa !32
  %36 = load ptr, ptr %32, align 1, !tbaa !34
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  store i8 0, ptr %37, align 1, !tbaa !32
  %38 = load ptr, ptr %36, align 1, !tbaa !34
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  store i8 0, ptr %39, align 1, !tbaa !32
  %40 = load ptr, ptr %38, align 1, !tbaa !34
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  store i8 0, ptr %41, align 1, !tbaa !32
  %42 = load ptr, ptr %40, align 1, !tbaa !34
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  store i8 0, ptr %43, align 1, !tbaa !32
  %44 = load ptr, ptr %42, align 1, !tbaa !34
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  store i8 0, ptr %45, align 1, !tbaa !32
  %46 = load ptr, ptr %44, align 1, !tbaa !34
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  store i8 0, ptr %47, align 1, !tbaa !32
  %48 = load ptr, ptr %46, align 1, !tbaa !34
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  store i8 0, ptr %49, align 1, !tbaa !32
  %50 = load ptr, ptr %48, align 1, !tbaa !34
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  store i8 0, ptr %51, align 1, !tbaa !32
  %52 = load ptr, ptr %50, align 1, !tbaa !34
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  store i8 0, ptr %53, align 1, !tbaa !32
  %54 = load ptr, ptr %52, align 1, !tbaa !34
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  store i8 0, ptr %55, align 1, !tbaa !32
  %56 = load ptr, ptr %54, align 1, !tbaa !34
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  store i8 0, ptr %57, align 1, !tbaa !32
  %58 = load ptr, ptr %56, align 1, !tbaa !34
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  store i8 0, ptr %59, align 1, !tbaa !32
  %60 = load ptr, ptr %58, align 1, !tbaa !34
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  store i8 0, ptr %61, align 1, !tbaa !32
  %62 = load ptr, ptr %60, align 1, !tbaa !34
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  store i8 0, ptr %63, align 1, !tbaa !32
  %64 = load ptr, ptr %62, align 1, !tbaa !34
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  store i8 0, ptr %65, align 1, !tbaa !32
  %66 = load ptr, ptr %64, align 1, !tbaa !34
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  store i8 0, ptr %67, align 1, !tbaa !32
  %68 = load ptr, ptr %66, align 1, !tbaa !34
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  store i8 0, ptr %69, align 1, !tbaa !32
  %70 = load ptr, ptr %68, align 1, !tbaa !34
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  store i8 0, ptr %71, align 1, !tbaa !32
  %72 = load ptr, ptr %70, align 1, !tbaa !34
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  store i8 0, ptr %73, align 1, !tbaa !32
  %74 = load ptr, ptr %72, align 1, !tbaa !34
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  store i8 0, ptr %75, align 1, !tbaa !32
  %76 = load ptr, ptr %74, align 1, !tbaa !34
  %77 = getelementptr inbounds i8, ptr %76, i64 8
  store i8 0, ptr %77, align 1, !tbaa !32
  %78 = load ptr, ptr %76, align 1, !tbaa !34
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  store i8 0, ptr %79, align 1, !tbaa !32
  %80 = load ptr, ptr %78, align 1, !tbaa !34
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  store i8 0, ptr %81, align 1, !tbaa !32
  %82 = load ptr, ptr %80, align 1, !tbaa !34
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  store i8 0, ptr %83, align 1, !tbaa !32
  %84 = load ptr, ptr %82, align 1, !tbaa !34
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  store i8 0, ptr %85, align 1, !tbaa !32
  %86 = load ptr, ptr %84, align 1, !tbaa !34
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  store i8 0, ptr %87, align 1, !tbaa !32
  %88 = load ptr, ptr %86, align 1, !tbaa !34
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  store i8 0, ptr %89, align 1, !tbaa !32
  %90 = load ptr, ptr %88, align 1, !tbaa !34
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  store i8 0, ptr %91, align 1, !tbaa !32
  %92 = load ptr, ptr %90, align 1, !tbaa !34
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  store i8 0, ptr %93, align 1, !tbaa !32
  %94 = load ptr, ptr %92, align 1, !tbaa !34
  %95 = getelementptr inbounds i8, ptr %94, i64 8
  store i8 0, ptr %95, align 1, !tbaa !32
  %96 = load ptr, ptr %94, align 1, !tbaa !34
  %97 = getelementptr inbounds i8, ptr %96, i64 8
  store i8 0, ptr %97, align 1, !tbaa !32
  %98 = load ptr, ptr %96, align 1, !tbaa !34
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  store i8 0, ptr %99, align 1, !tbaa !32
  %100 = load ptr, ptr %98, align 1, !tbaa !34
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  store i8 0, ptr %101, align 1, !tbaa !32
  %102 = load ptr, ptr %100, align 1, !tbaa !34
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  store i8 0, ptr %103, align 1, !tbaa !32
  %104 = load ptr, ptr %102, align 1, !tbaa !34
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  store i8 0, ptr %105, align 1, !tbaa !32
  %106 = load ptr, ptr %104, align 1, !tbaa !34
  %107 = getelementptr inbounds i8, ptr %106, i64 8
  store i8 0, ptr %107, align 1, !tbaa !32
  %108 = load ptr, ptr %106, align 1, !tbaa !34
  %109 = getelementptr inbounds i8, ptr %108, i64 8
  store i8 0, ptr %109, align 1, !tbaa !32
  %110 = load ptr, ptr %108, align 1, !tbaa !34
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  store i8 0, ptr %111, align 1, !tbaa !32
  %112 = load ptr, ptr %110, align 1, !tbaa !34
  %113 = getelementptr inbounds i8, ptr %112, i64 8
  store i8 0, ptr %113, align 1, !tbaa !32
  %114 = load ptr, ptr %112, align 1, !tbaa !34
  %115 = getelementptr inbounds i8, ptr %114, i64 8
  store i8 0, ptr %115, align 1, !tbaa !32
  %116 = load ptr, ptr %114, align 1, !tbaa !34
  %117 = getelementptr inbounds i8, ptr %116, i64 8
  store i8 0, ptr %117, align 1, !tbaa !32
  %118 = load ptr, ptr %116, align 1, !tbaa !34
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  store i8 0, ptr %119, align 1, !tbaa !32
  %120 = load ptr, ptr %118, align 1, !tbaa !34
  %121 = getelementptr inbounds i8, ptr %120, i64 8
  store i8 0, ptr %121, align 1, !tbaa !32
  %122 = load ptr, ptr %120, align 1, !tbaa !34
  %123 = getelementptr inbounds i8, ptr %122, i64 8
  store i8 0, ptr %123, align 1, !tbaa !32
  %124 = load ptr, ptr %122, align 1, !tbaa !34
  %125 = getelementptr inbounds i8, ptr %124, i64 8
  store i8 0, ptr %125, align 1, !tbaa !32
  %126 = load ptr, ptr %124, align 1, !tbaa !34
  %127 = getelementptr inbounds i8, ptr %126, i64 8
  store i8 0, ptr %127, align 1, !tbaa !32
  %128 = load ptr, ptr %126, align 1, !tbaa !34
  %129 = getelementptr inbounds i8, ptr %128, i64 8
  store i8 0, ptr %129, align 1, !tbaa !32
  %130 = load ptr, ptr %128, align 1, !tbaa !34
  %131 = getelementptr inbounds i8, ptr %130, i64 8
  store i8 0, ptr %131, align 1, !tbaa !32
  %132 = load ptr, ptr %130, align 1, !tbaa !34
  %133 = getelementptr inbounds i8, ptr %132, i64 8
  store i8 0, ptr %133, align 1, !tbaa !32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %9, %6, %1
  %.037 = phi i64 [ -9223372036854775806, %6 ], [ -9223372036854775806, %1 ], [ -9223372036854775788, %9 ], [ %23, %.loopexit.loopexit ]
  %134 = load ptr, ptr @gBS, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i64 32
  %136 = load ptr, ptr %135, align 8, !tbaa !35
  tail call void %136(i64 noundef %5) #2
  ret i64 %.037
}

declare i64 @Ax88772MacAddressGet(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @ZeroMem(ptr noundef, i64 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, !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 = !{!15, !6, i64 120}
!15 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !12, 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 = !{!17, !13, i64 0}
!17 = !{!"", !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, !18, i64 552, !18, i64 584, !18, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!18 = !{!"", !7, i64 0}
!19 = !{!13, !13, i64 0}
!20 = !{!17, !13, i64 24}
!21 = !{!17, !13, i64 28}
!22 = !{!17, !13, i64 32}
!23 = !{!24, !12, i64 0}
!24 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !15, i64 152, !17, i64 280, !7, i64 936, !6, i64 944, !25, i64 952, !7, i64 954, !7, i64 955, !7, i64 956, !7, i64 957, !12, i64 960, !12, i64 968, !25, i64 976, !6, i64 984, !6, i64 992, !7, i64 1000, !18, i64 1008, !7, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !12, i64 1088, !6, i64 1096}
!25 = !{!"short", !7, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!17, !7, i64 652}
!28 = !{!24, !12, i64 1088}
!29 = !{!24, !6, i64 1064}
!30 = !{!24, !6, i64 1072}
!31 = !{!24, !6, i64 1080}
!32 = !{!33, !7, i64 8}
!33 = !{!"_RX_PKT", !6, i64 0, !7, i64 8, !25, i64 9, !7, i64 11}
!34 = !{!33, !6, i64 0}
!35 = !{!10, !6, i64 32}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass