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

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%struct._EFI_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }
%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._EFI_PCI_IO_PROTOCOL = type { ptr, ptr, %struct.EFI_PCI_IO_PROTOCOL_ACCESS, %struct.EFI_PCI_IO_PROTOCOL_ACCESS, %struct.EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr }
%struct.EFI_PCI_IO_PROTOCOL_ACCESS = type { ptr, ptr }
%struct.EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS = type { ptr, ptr }

@gBS = external global ptr, align 8
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@gEfiNetworkInterfaceIdentifierProtocolGuid_31 = external global %struct.GUID, align 4
@gEfiSimpleNetworkProtocolGuid = external global %struct.GUID, align 4
@.str.20 = external hidden unnamed_addr constant [145 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 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 i64 @PxeShutdown(ptr noundef) #1

declare i64 @PxeStop(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 @SimpleNetworkDriverStop(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #2 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %15 = load ptr, ptr @gBS, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %15, i32 0, i32 33
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %19, i32 0, i32 5
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call i64 %17(ptr noundef %18, ptr noundef @gEfiSimpleNetworkProtocolGuid, ptr noundef %11, ptr noundef %21, ptr noundef %22, i32 noundef 2)
  store i64 %23, ptr %10, align 8, !tbaa !9
  %24 = load i64, ptr %10, align 8, !tbaa !9
  %25 = icmp slt i64 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %4
  store i64 -9223372036854775805, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %107

27:                                               ; preds = %4
  %28 = call zeroext i8 @DebugAssertEnabled()
  %29 = zext i8 %28 to i32
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %41

31:                                               ; preds = %27
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = ptrtoint ptr %32 to i64
  %34 = sub i64 %33, ptrtoint (ptr getelementptr inbounds (%struct.SNP_DRIVER, ptr null, i32 0, i32 3) to i64)
  %35 = inttoptr i64 %34 to ptr
  %36 = getelementptr inbounds %struct.SNP_DRIVER, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !17
  %38 = icmp ne i32 %37, 1935961715
  br i1 %38, label %39, label %41

39:                                               ; preds = %31
  call void @DebugAssert(ptr noundef @.str.20, i64 noundef 749, ptr noundef @.str.21)
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  br label %46

41:                                               ; preds = %31, %27
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = ptrtoint ptr %42 to i64
  %44 = sub i64 %43, ptrtoint (ptr getelementptr inbounds (%struct.SNP_DRIVER, ptr null, i32 0, i32 3) to i64)
  %45 = inttoptr i64 %44 to ptr
  br label %46

46:                                               ; preds = %41, %39
  %47 = phi ptr [ %40, %39 ], [ %45, %41 ]
  store ptr %47, ptr %12, align 8, !tbaa !5
  %48 = load ptr, ptr @gBS, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %48, i32 0, i32 16
  %50 = load ptr, ptr %49, align 8, !tbaa !26
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.SNP_DRIVER, ptr %52, i32 0, i32 3
  %54 = call i64 %50(ptr noundef %51, ptr noundef @gEfiSimpleNetworkProtocolGuid, ptr noundef %53)
  store i64 %54, ptr %10, align 8, !tbaa !9
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = icmp slt i64 %55, 0
  br i1 %56, label %57, label %59

57:                                               ; preds = %46
  %58 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %58, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %107

59:                                               ; preds = %46
  %60 = load ptr, ptr @gBS, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %60, i32 0, i32 12
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.SNP_DRIVER, ptr %63, i32 0, i32 29
  %65 = load ptr, ptr %64, align 8, !tbaa !28
  %66 = call i64 %62(ptr noundef %65)
  %67 = load ptr, ptr @gBS, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %67, i32 0, i32 34
  %69 = load ptr, ptr %68, align 8, !tbaa !29
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %71, i32 0, i32 5
  %73 = load ptr, ptr %72, align 8, !tbaa !15
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = call i64 %69(ptr noundef %70, ptr noundef @gEfiNetworkInterfaceIdentifierProtocolGuid_31, ptr noundef %73, ptr noundef %74)
  store i64 %75, ptr %10, align 8, !tbaa !9
  %76 = load ptr, ptr @gBS, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %76, i32 0, i32 34
  %78 = load ptr, ptr %77, align 8, !tbaa !29
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %80, i32 0, i32 5
  %82 = load ptr, ptr %81, align 8, !tbaa !15
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = call i64 %78(ptr noundef %79, ptr noundef @gEfiDevicePathProtocolGuid, ptr noundef %82, ptr noundef %83)
  store i64 %84, ptr %10, align 8, !tbaa !9
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = call i64 @PxeShutdown(ptr noundef %85)
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = call i64 @PxeStop(ptr noundef %87)
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.SNP_DRIVER, ptr %89, i32 0, i32 17
  %91 = load ptr, ptr %90, align 8, !tbaa !30
  store ptr %91, ptr %13, align 8, !tbaa !5
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._EFI_PCI_IO_PROTOCOL, ptr %92, i32 0, i32 9
  %94 = load ptr, ptr %93, align 8, !tbaa !31
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.SNP_DRIVER, ptr %96, i32 0, i32 22
  %98 = load ptr, ptr %97, align 8, !tbaa !34
  %99 = call i64 %94(ptr noundef %95, i64 noundef 1, ptr noundef %98)
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._EFI_PCI_IO_PROTOCOL, ptr %100, i32 0, i32 9
  %102 = load ptr, ptr %101, align 8, !tbaa !31
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = call i64 %102(ptr noundef %103, i64 noundef 1, ptr noundef %104)
  %106 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %106, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %107

107:                                              ; preds = %59, %57, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %108 = load i64, ptr %5, align 8
  ret i64 %108
}

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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 280}
!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 = !{!"", !10, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 40}
!16 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !6, i64 32, !6, i64 40}
!17 = !{!18, !14, i64 0}
!18 = !{!"", !14, i64 0, !19, i64 8, !20, i64 32, !21, i64 160, !6, i64 816, !6, i64 824, !6, i64 832, !7, i64 840, !23, i64 842, !14, 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, !24, i64 898, !6, i64 936, !6, i64 944, !6, i64 952, !25, i64 960, !6, i64 1008, !7, i64 1016, !6, i64 2616, !7, i64 2624}
!19 = !{!"", !10, i64 0, !10, i64 8, !14, i64 16}
!20 = !{!"_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}
!21 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !7, i64 40, !22, i64 552, !22, i64 584, !22, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!22 = !{!"", !7, i64 0}
!23 = !{!"short", !7, i64 0}
!24 = !{!"s_pxe_cdb", !23, i64 0, !23, i64 2, !23, i64 4, !23, i64 6, !10, i64 8, !10, i64 16, !23, i64 24, !23, i64 26, !23, i64 28, !23, i64 30}
!25 = !{!"s_pxe_db_get_init_info", !14, i64 0, !14, i64 4, !7, i64 8, !14, i64 24, !23, i64 28, !23, i64 30, !23, i64 32, !23, i64 34, !23, i64 36, !23, i64 38, !23, i64 40, !23, i64 42, !7, i64 44, !7, i64 45, !7, i64 46}
!26 = !{!12, !6, i64 144}
!27 = !{!12, !6, i64 112}
!28 = !{!18, !6, i64 2616}
!29 = !{!12, !6, i64 288}
!30 = !{!18, !6, i64 888}
!31 = !{!32, !6, i64 96}
!32 = !{!"_EFI_PCI_IO_PROTOCOL", !6, i64 0, !6, i64 8, !33, i64 16, !33, i64 32, !33, i64 48, !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, !10, i64 144, !6, i64 152}
!33 = !{!"", !6, i64 0, !6, i64 8}
!34 = !{!18, !6, i64 936}


; 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.GUID = type { i32, i16, i16, [8 x i8] }

@gBS = external local_unnamed_addr global ptr, align 8
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@gEfiNetworkInterfaceIdentifierProtocolGuid_31 = external global %struct.GUID, align 4
@gEfiSimpleNetworkProtocolGuid = external global %struct.GUID, align 4
@.str.20 = external hidden unnamed_addr constant [145 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 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 i64 @PxeShutdown(ptr noundef) local_unnamed_addr #1

declare i64 @PxeStop(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress 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 @SimpleNetworkDriverStop(ptr nocapture noundef readonly %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #2 {
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %6 = load ptr, ptr @gBS, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 280
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = load ptr, ptr %9, align 8, !tbaa !14
  %11 = call i64 %8(ptr noundef %1, ptr noundef nonnull @gEfiSimpleNetworkProtocolGuid, ptr noundef nonnull %5, ptr noundef %10, ptr noundef %1, i32 noundef 2) #3
  %12 = icmp slt i64 %11, 0
  br i1 %12, label %54, label %13

13:                                               ; preds = %4
  %14 = call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %14, 0
  %.pre = load ptr, ptr %5, align 8, !tbaa !5
  %.pre27 = ptrtoint ptr %.pre to i64
  %.pre28 = add i64 %.pre27, -32
  %.pre30 = inttoptr i64 %.pre28 to ptr
  br i1 %.not, label %._crit_edge, label %15

15:                                               ; preds = %13
  %16 = load i32, ptr %.pre30, align 8, !tbaa !16
  %.not26 = icmp eq i32 %16, 1935961715
  br i1 %.not26, label %._crit_edge, label %17

17:                                               ; preds = %15
  call void @DebugAssert(ptr noundef nonnull @.str.20, i64 noundef 749, ptr noundef nonnull @.str.21) #3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %13, %15, %17
  %19 = phi ptr [ %18, %17 ], [ %.pre30, %15 ], [ %.pre30, %13 ]
  %20 = load ptr, ptr @gBS, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 144
  %22 = load ptr, ptr %21, align 8, !tbaa !25
  %23 = getelementptr inbounds i8, ptr %19, i64 32
  %24 = call i64 %22(ptr noundef %1, ptr noundef nonnull @gEfiSimpleNetworkProtocolGuid, ptr noundef nonnull %23) #3
  %25 = icmp slt i64 %24, 0
  br i1 %25, label %54, label %26

26:                                               ; preds = %._crit_edge
  %27 = load ptr, ptr @gBS, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 112
  %29 = load ptr, ptr %28, align 8, !tbaa !26
  %30 = getelementptr inbounds i8, ptr %19, i64 2616
  %31 = load ptr, ptr %30, align 8, !tbaa !27
  %32 = call i64 %29(ptr noundef %31) #3
  %33 = load ptr, ptr @gBS, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 288
  %35 = load ptr, ptr %34, align 8, !tbaa !28
  %36 = load ptr, ptr %9, align 8, !tbaa !14
  %37 = call i64 %35(ptr noundef %1, ptr noundef nonnull @gEfiNetworkInterfaceIdentifierProtocolGuid_31, ptr noundef %36, ptr noundef %1) #3
  %38 = load ptr, ptr @gBS, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 288
  %40 = load ptr, ptr %39, align 8, !tbaa !28
  %41 = load ptr, ptr %9, align 8, !tbaa !14
  %42 = call i64 %40(ptr noundef %1, ptr noundef nonnull @gEfiDevicePathProtocolGuid, ptr noundef %41, ptr noundef %1) #3
  %43 = call i64 @PxeShutdown(ptr noundef %19) #3
  %44 = call i64 @PxeStop(ptr noundef %19) #3
  %45 = getelementptr inbounds i8, ptr %19, i64 888
  %46 = load ptr, ptr %45, align 8, !tbaa !29
  %47 = getelementptr inbounds i8, ptr %46, i64 96
  %48 = load ptr, ptr %47, align 8, !tbaa !30
  %49 = getelementptr inbounds i8, ptr %19, i64 936
  %50 = load ptr, ptr %49, align 8, !tbaa !33
  %51 = call i64 %48(ptr noundef %46, i64 noundef 1, ptr noundef %50) #3
  %52 = load ptr, ptr %47, align 8, !tbaa !30
  %53 = call i64 %52(ptr noundef %46, i64 noundef 1, ptr noundef %19) #3
  br label %54

54:                                               ; preds = %._crit_edge, %4, %26
  %.0 = phi i64 [ %42, %26 ], [ -9223372036854775805, %4 ], [ %24, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i64 %.0
}

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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 280}
!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 40}
!15 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!16 = !{!17, !13, i64 0}
!17 = !{!"", !13, i64 0, !18, i64 8, !19, i64 32, !20, i64 160, !6, i64 816, !6, i64 824, !6, i64 832, !7, i64 840, !22, 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, !23, i64 898, !6, i64 936, !6, i64 944, !6, i64 952, !24, i64 960, !6, i64 1008, !7, i64 1016, !6, i64 2616, !7, i64 2624}
!18 = !{!"", !12, i64 0, !12, i64 8, !13, i64 16}
!19 = !{!"_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}
!20 = !{!"", !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, !21, i64 552, !21, i64 584, !21, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!21 = !{!"", !7, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = !{!"s_pxe_cdb", !22, i64 0, !22, i64 2, !22, i64 4, !22, i64 6, !12, i64 8, !12, i64 16, !22, i64 24, !22, i64 26, !22, i64 28, !22, i64 30}
!24 = !{!"s_pxe_db_get_init_info", !13, i64 0, !13, i64 4, !7, i64 8, !13, i64 24, !22, i64 28, !22, i64 30, !22, i64 32, !22, i64 34, !22, i64 36, !22, i64 38, !22, i64 40, !22, i64 42, !7, i64 44, !7, i64 45, !7, i64 46}
!25 = !{!10, !6, i64 144}
!26 = !{!10, !6, i64 112}
!27 = !{!17, !6, i64 2616}
!28 = !{!10, !6, i64 288}
!29 = !{!17, !6, i64 888}
!30 = !{!31, !6, i64 96}
!31 = !{!"_EFI_PCI_IO_PROTOCOL", !6, i64 0, !6, i64 8, !32, i64 16, !32, i64 32, !32, i64 48, !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, !12, i64 144, !6, i64 152}
!32 = !{!"", !6, i64 0, !6, i64 8}
!33 = !{!17, !6, i64 936}


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