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

; 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._EFI_PXE_BASE_CODE_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._PXEBC_PRIVATE_DATA = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct._EFI_PXE_BASE_CODE_PROTOCOL, %struct._EFI_LOAD_FILE_PROTOCOL, %struct._EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL, ptr, ptr, ptr, ptr, %struct.EFI_IP4_CONFIG_DATA, ptr, ptr, ptr, i16, %struct.EFI_UDP4_CONFIG_DATA, %struct.EFI_PXE_BASE_CODE_MODE, i32, ptr, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, i8, i32, i64, i64, [312 x i8], %struct.EFI_DHCP4_PACKET, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i32, i32, i32, %struct.PXEBC_CACHED_DHCP4_PACKET, %struct.PXEBC_CACHED_DHCP4_PACKET, %struct.PXEBC_CACHED_DHCP4_PACKET, [16 x %struct.PXEBC_CACHED_DHCP4_PACKET], [5 x i32], [5 x [16 x i32]], i32, [5 x i32], [16 x i32], ptr, %struct.EFI_IP4_COMPLETION_TOKEN }
%struct._EFI_LOAD_FILE_PROTOCOL = type { ptr }
%struct._EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL = type { i64, ptr }
%struct.EFI_IP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, i8, i8, i8, i32, i32 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct.EFI_UDP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, i8, i32, i32, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i16 }
%struct.EFI_PXE_BASE_CODE_MODE = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %struct.EFI_PXE_BASE_CODE_IP_FILTER, i32, [8 x %struct.EFI_PXE_BASE_CODE_ARP_ENTRY], i32, [8 x %struct.EFI_PXE_BASE_CODE_ROUTE_ENTRY], %struct.EFI_PXE_BASE_CODE_ICMP_ERROR, %struct.EFI_PXE_BASE_CODE_TFTP_ERROR }
%union.EFI_PXE_BASE_CODE_PACKET = type { %struct.EFI_PXE_BASE_CODE_DHCPV6_PACKET, [444 x i8] }
%struct.EFI_PXE_BASE_CODE_DHCPV6_PACKET = type { i32, [1024 x i8] }
%struct.EFI_PXE_BASE_CODE_IP_FILTER = type { i8, i8, i16, [8 x %union.EFI_IP_ADDRESS] }
%struct.EFI_PXE_BASE_CODE_ARP_ENTRY = type { %union.EFI_IP_ADDRESS, %struct.EFI_MAC_ADDRESS }
%struct.EFI_PXE_BASE_CODE_ROUTE_ENTRY = type { %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS }
%struct.EFI_PXE_BASE_CODE_ICMP_ERROR = type { i8, i8, i16, %union.anon, [494 x i8] }
%union.anon = type { i32 }
%struct.EFI_PXE_BASE_CODE_TFTP_ERROR = type { i8, [127 x i8] }
%union.EFI_IP_ADDRESS = type { [4 x i32] }
%struct.EFI_DHCP4_PACKET = type <{ i32, i32, %struct.anon.0 }>
%struct.anon.0 = type <{ %struct.EFI_DHCP4_HEADER, i32, [1 x i8] }>
%struct.EFI_DHCP4_HEADER = type { i8, i8, i8, i8, i32, i16, i16, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, [16 x i8], [64 x i8], [128 x i8] }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.PXEBC_CACHED_DHCP4_PACKET = type { %union.PXEBC_DHCP4_PACKET, i8, i8, [7 x ptr], %struct.PXEBC_VENDOR_OPTION }
%union.PXEBC_DHCP4_PACKET = type { [1480 x i8] }
%struct.PXEBC_VENDOR_OPTION = type { [8 x i32], %struct.EFI_IPv4_ADDRESS, i16, i16, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, i16, i16, i16, ptr, i8, ptr, i8, ptr, i8, ptr, i8 }
%struct.EFI_IP4_COMPLETION_TOKEN = type { ptr, i64, %union.anon.1 }
%union.anon.1 = type { ptr }

@gBS = external global ptr, align 8
@gEfiPxeBaseCodeProtocolGuid = external global %struct.GUID, align 4
@gEfiDhcp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiMtftp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiArpServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiArpProtocolGuid = external global %struct.GUID, align 4
@gEfiDhcp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiIp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiIp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiMtftp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiUdp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiUdp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiLoadFileProtocolGuid = external global %struct.GUID, align 4
@.str = external hidden unnamed_addr constant [159 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeBcDriverBindingStop(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #0 {
  %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 ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, 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 %7, align 8, !tbaa !5
  %16 = call ptr @NetLibGetNicHandle(ptr noundef %15, ptr noundef @gEfiArpProtocolGuid)
  store ptr %16, ptr %12, align 8, !tbaa !5
  %17 = load ptr, ptr %12, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %44

19:                                               ; preds = %4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call ptr @NetLibGetNicHandle(ptr noundef %20, ptr noundef @gEfiDhcp4ProtocolGuid)
  store ptr %21, ptr %12, align 8, !tbaa !5
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %43

24:                                               ; preds = %19
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call ptr @NetLibGetNicHandle(ptr noundef %25, ptr noundef @gEfiIp4ProtocolGuid)
  store ptr %26, ptr %12, align 8, !tbaa !5
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %42

29:                                               ; preds = %24
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = call ptr @NetLibGetNicHandle(ptr noundef %30, ptr noundef @gEfiUdp4ProtocolGuid)
  store ptr %31, ptr %12, align 8, !tbaa !5
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %41

34:                                               ; preds = %29
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call ptr @NetLibGetNicHandle(ptr noundef %35, ptr noundef @gEfiMtftp4ProtocolGuid)
  store ptr %36, ptr %12, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %40

39:                                               ; preds = %34
  store i64 0, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %221

40:                                               ; preds = %34
  br label %41

41:                                               ; preds = %40, %29
  br label %42

42:                                               ; preds = %41, %24
  br label %43

43:                                               ; preds = %42, %19
  br label %44

44:                                               ; preds = %43, %4
  %45 = load ptr, ptr @gBS, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %45, i32 0, i32 33
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %49, i32 0, i32 5
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = call i64 %47(ptr noundef %48, ptr noundef @gEfiPxeBaseCodeProtocolGuid, ptr noundef %11, ptr noundef %51, ptr noundef %52, i32 noundef 2)
  store i64 %53, ptr %13, align 8, !tbaa !9
  %54 = load i64, ptr %13, align 8, !tbaa !9
  %55 = icmp slt i64 %54, 0
  br i1 %55, label %56, label %58

56:                                               ; preds = %44
  %57 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %57, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %221

58:                                               ; preds = %44
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._EFI_PXE_BASE_CODE_PROTOCOL, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = call i64 %61(ptr noundef %62)
  store i64 %63, ptr %13, align 8, !tbaa !9
  %64 = load i64, ptr %13, align 8, !tbaa !9
  %65 = icmp ne i64 %64, 0
  br i1 %65, label %66, label %71

66:                                               ; preds = %58
  %67 = load i64, ptr %13, align 8, !tbaa !9
  %68 = icmp ne i64 %67, -9223372036854775789
  br i1 %68, label %69, label %71

69:                                               ; preds = %66
  %70 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %70, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %221

71:                                               ; preds = %66, %58
  %72 = call zeroext i8 @DebugAssertEnabled()
  %73 = zext i8 %72 to i32
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %85

75:                                               ; preds = %71
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = ptrtoint ptr %76 to i64
  %78 = sub i64 %77, ptrtoint (ptr getelementptr inbounds (%struct._PXEBC_PRIVATE_DATA, ptr null, i32 0, i32 10) to i64)
  %79 = inttoptr i64 %78 to ptr
  %80 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !19
  %82 = icmp ne i32 %81, 1346721872
  br i1 %82, label %83, label %85

83:                                               ; preds = %75
  call void @DebugAssert(ptr noundef @.str, i64 noundef 557, ptr noundef @.str.1)
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  br label %90

85:                                               ; preds = %75, %71
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = ptrtoint ptr %86 to i64
  %88 = sub i64 %87, ptrtoint (ptr getelementptr inbounds (%struct._PXEBC_PRIVATE_DATA, ptr null, i32 0, i32 10) to i64)
  %89 = inttoptr i64 %88 to ptr
  br label %90

90:                                               ; preds = %85, %83
  %91 = phi ptr [ %84, %83 ], [ %89, %85 ]
  store ptr %91, ptr %10, align 8, !tbaa !5
  %92 = load ptr, ptr @gBS, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %92, i32 0, i32 40
  %94 = load ptr, ptr %93, align 8, !tbaa !37
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %96, i32 0, i32 10
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %98, i32 0, i32 11
  %100 = call i64 (ptr, ...) %94(ptr noundef %95, ptr noundef @gEfiPxeBaseCodeProtocolGuid, ptr noundef %97, ptr noundef @gEfiLoadFileProtocolGuid, ptr noundef %99, ptr noundef null)
  store i64 %100, ptr %13, align 8, !tbaa !9
  %101 = load i64, ptr %13, align 8, !tbaa !9
  %102 = icmp slt i64 %101, 0
  br i1 %102, label %219, label %103

103:                                              ; preds = %90
  %104 = load ptr, ptr @gBS, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %104, i32 0, i32 34
  %106 = load ptr, ptr %105, align 8, !tbaa !38
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %107, i32 0, i32 8
  %109 = load ptr, ptr %108, align 8, !tbaa !39
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %110, i32 0, i32 5
  %112 = load ptr, ptr %111, align 8, !tbaa !15
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = call i64 %106(ptr noundef %109, ptr noundef @gEfiUdp4ProtocolGuid, ptr noundef %112, ptr noundef %113)
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %116, i32 0, i32 5
  %118 = load ptr, ptr %117, align 8, !tbaa !15
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %119, i32 0, i32 8
  %121 = load ptr, ptr %120, align 8, !tbaa !39
  %122 = call i64 @NetLibDestroyServiceChild(ptr noundef %115, ptr noundef %118, ptr noundef @gEfiUdp4ServiceBindingProtocolGuid, ptr noundef %121)
  %123 = load ptr, ptr @gBS, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %123, i32 0, i32 34
  %125 = load ptr, ptr %124, align 8, !tbaa !38
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %126, i32 0, i32 7
  %128 = load ptr, ptr %127, align 8, !tbaa !40
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %129, i32 0, i32 5
  %131 = load ptr, ptr %130, align 8, !tbaa !15
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = call i64 %125(ptr noundef %128, ptr noundef @gEfiUdp4ProtocolGuid, ptr noundef %131, ptr noundef %132)
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %135, i32 0, i32 5
  %137 = load ptr, ptr %136, align 8, !tbaa !15
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %138, i32 0, i32 7
  %140 = load ptr, ptr %139, align 8, !tbaa !40
  %141 = call i64 @NetLibDestroyServiceChild(ptr noundef %134, ptr noundef %137, ptr noundef @gEfiUdp4ServiceBindingProtocolGuid, ptr noundef %140)
  %142 = load ptr, ptr @gBS, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %142, i32 0, i32 34
  %144 = load ptr, ptr %143, align 8, !tbaa !38
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %145, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !41
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %148, i32 0, i32 5
  %150 = load ptr, ptr %149, align 8, !tbaa !15
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = call i64 %144(ptr noundef %147, ptr noundef @gEfiDhcp4ProtocolGuid, ptr noundef %150, ptr noundef %151)
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %154, i32 0, i32 5
  %156 = load ptr, ptr %155, align 8, !tbaa !15
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %157, i32 0, i32 4
  %159 = load ptr, ptr %158, align 8, !tbaa !41
  %160 = call i64 @NetLibDestroyServiceChild(ptr noundef %153, ptr noundef %156, ptr noundef @gEfiDhcp4ServiceBindingProtocolGuid, ptr noundef %159)
  %161 = load ptr, ptr @gBS, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %161, i32 0, i32 34
  %163 = load ptr, ptr %162, align 8, !tbaa !38
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %164, i32 0, i32 6
  %166 = load ptr, ptr %165, align 8, !tbaa !42
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %167, i32 0, i32 5
  %169 = load ptr, ptr %168, align 8, !tbaa !15
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  %171 = call i64 %163(ptr noundef %166, ptr noundef @gEfiMtftp4ProtocolGuid, ptr noundef %169, ptr noundef %170)
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %173, i32 0, i32 5
  %175 = load ptr, ptr %174, align 8, !tbaa !15
  %176 = load ptr, ptr %10, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %176, i32 0, i32 6
  %178 = load ptr, ptr %177, align 8, !tbaa !42
  %179 = call i64 @NetLibDestroyServiceChild(ptr noundef %172, ptr noundef %175, ptr noundef @gEfiMtftp4ServiceBindingProtocolGuid, ptr noundef %178)
  %180 = load ptr, ptr @gBS, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %180, i32 0, i32 34
  %182 = load ptr, ptr %181, align 8, !tbaa !38
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %183, i32 0, i32 5
  %185 = load ptr, ptr %184, align 8, !tbaa !43
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %186, i32 0, i32 5
  %188 = load ptr, ptr %187, align 8, !tbaa !15
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  %190 = call i64 %182(ptr noundef %185, ptr noundef @gEfiIp4ProtocolGuid, ptr noundef %188, ptr noundef %189)
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %192, i32 0, i32 5
  %194 = load ptr, ptr %193, align 8, !tbaa !15
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %195, i32 0, i32 5
  %197 = load ptr, ptr %196, align 8, !tbaa !43
  %198 = call i64 @NetLibDestroyServiceChild(ptr noundef %191, ptr noundef %194, ptr noundef @gEfiIp4ServiceBindingProtocolGuid, ptr noundef %197)
  %199 = load ptr, ptr @gBS, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %199, i32 0, i32 34
  %201 = load ptr, ptr %200, align 8, !tbaa !38
  %202 = load ptr, ptr %10, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %202, i32 0, i32 3
  %204 = load ptr, ptr %203, align 8, !tbaa !44
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %205, i32 0, i32 5
  %207 = load ptr, ptr %206, align 8, !tbaa !15
  %208 = load ptr, ptr %12, align 8, !tbaa !5
  %209 = call i64 %201(ptr noundef %204, ptr noundef @gEfiArpProtocolGuid, ptr noundef %207, ptr noundef %208)
  %210 = load ptr, ptr %12, align 8, !tbaa !5
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %211, i32 0, i32 5
  %213 = load ptr, ptr %212, align 8, !tbaa !15
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %214, i32 0, i32 3
  %216 = load ptr, ptr %215, align 8, !tbaa !44
  %217 = call i64 @NetLibDestroyServiceChild(ptr noundef %210, ptr noundef %213, ptr noundef @gEfiArpServiceBindingProtocolGuid, ptr noundef %216)
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  call void @FreePool(ptr noundef %218)
  br label %219

219:                                              ; preds = %103, %90
  %220 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %220, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %221

221:                                              ; preds = %219, %69, %56, %39
  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
  %222 = load i64, ptr %5, align 8
  ret i64 %222
}

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

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

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

declare void @FreePool(ptr noundef) #2

declare ptr @NetLibGetNicHandle(ptr noundef, ptr noundef) #2

declare zeroext i8 @DebugAssertEnabled() #2

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

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 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, !6, i64 16}
!18 = !{!"_EFI_PXE_BASE_CODE_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}
!19 = !{!20, !14, i64 0}
!20 = !{!"_PXEBC_PRIVATE_DATA", !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, !18, i64 80, !21, i64 192, !22, i64 200, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !23, i64 248, !6, i64 280, !6, i64 288, !6, i64 296, !25, i64 304, !26, i64 308, !27, i64 344, !14, i64 10768, !6, i64 10776, !7, i64 10784, !7, i64 10800, !7, i64 10816, !7, i64 10832, !7, i64 10848, !14, i64 10852, !10, i64 10856, !10, i64 10864, !7, i64 10872, !31, i64 11184, !24, i64 11433, !7, i64 11465, !7, i64 11466, !7, i64 11467, !14, i64 11468, !14, i64 11472, !14, i64 11476, !34, i64 11480, !34, i64 13152, !34, i64 14824, !7, i64 16496, !7, i64 43248, !7, i64 43268, !14, i64 43588, !7, i64 43592, !7, i64 43612, !6, i64 43680, !36, i64 43688}
!21 = !{!"_EFI_LOAD_FILE_PROTOCOL", !6, i64 0}
!22 = !{!"_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL", !10, i64 0, !6, i64 8}
!23 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !24, i64 6, !24, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !14, i64 20, !14, i64 24}
!24 = !{!"", !7, i64 0}
!25 = !{!"short", !7, i64 0}
!26 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !14, i64 8, !14, i64 12, !7, i64 16, !24, i64 17, !24, i64 21, !25, i64 26, !24, i64 28, !25, i64 32}
!27 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 20, !7, i64 36, !7, i64 52, !7, i64 1524, !7, i64 2996, !7, i64 4468, !7, i64 5940, !7, i64 7412, !28, i64 8884, !14, i64 9016, !7, i64 9020, !14, i64 9404, !7, i64 9408, !29, i64 9792, !30, i64 10296}
!28 = !{!"", !7, i64 0, !7, i64 1, !25, i64 2, !7, i64 4}
!29 = !{!"", !7, i64 0, !7, i64 1, !25, i64 2, !7, i64 4, !7, i64 8}
!30 = !{!"", !7, i64 0, !7, i64 1}
!31 = !{!"", !14, i64 0, !14, i64 4, !32, i64 8}
!32 = !{!"", !33, i64 0, !14, i64 236, !7, i64 240}
!33 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !14, i64 4, !25, i64 8, !25, i64 10, !24, i64 12, !24, i64 16, !24, i64 20, !24, i64 24, !7, i64 28, !7, i64 44, !7, i64 108}
!34 = !{!"", !7, i64 0, !7, i64 1480, !7, i64 1481, !7, i64 1488, !35, i64 1544}
!35 = !{!"", !7, i64 0, !24, i64 32, !25, i64 36, !25, i64 38, !7, i64 40, !7, i64 41, !7, i64 42, !24, i64 43, !24, i64 47, !25, i64 52, !25, i64 54, !25, i64 56, !25, i64 58, !6, i64 64, !7, i64 72, !6, i64 80, !7, i64 88, !6, i64 96, !7, i64 104, !6, i64 112, !7, i64 120}
!36 = !{!"", !6, i64 0, !10, i64 8, !7, i64 16}
!37 = !{!12, !6, i64 336}
!38 = !{!12, !6, i64 288}
!39 = !{!20, !6, i64 64}
!40 = !{!20, !6, i64 56}
!41 = !{!20, !6, i64 32}
!42 = !{!20, !6, i64 48}
!43 = !{!20, !6, i64 40}
!44 = !{!20, !6, i64 24}


; 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
@gEfiPxeBaseCodeProtocolGuid = external global %struct.GUID, align 4
@gEfiDhcp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiMtftp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiArpServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiArpProtocolGuid = external global %struct.GUID, align 4
@gEfiDhcp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiIp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiIp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiMtftp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiUdp4ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gEfiUdp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiLoadFileProtocolGuid = external global %struct.GUID, align 4
@.str = external hidden unnamed_addr constant [159 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeBcDriverBindingStop(ptr nocapture noundef readonly %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #0 {
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %6 = tail call ptr @NetLibGetNicHandle(ptr noundef %1, ptr noundef nonnull @gEfiArpProtocolGuid) #3
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %20

8:                                                ; preds = %4
  %9 = tail call ptr @NetLibGetNicHandle(ptr noundef %1, ptr noundef nonnull @gEfiDhcp4ProtocolGuid) #3
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %20

11:                                               ; preds = %8
  %12 = tail call ptr @NetLibGetNicHandle(ptr noundef %1, ptr noundef nonnull @gEfiIp4ProtocolGuid) #3
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %20

14:                                               ; preds = %11
  %15 = tail call ptr @NetLibGetNicHandle(ptr noundef %1, ptr noundef nonnull @gEfiUdp4ProtocolGuid) #3
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %20

17:                                               ; preds = %14
  %18 = tail call ptr @NetLibGetNicHandle(ptr noundef %1, ptr noundef nonnull @gEfiMtftp4ProtocolGuid) #3
  %19 = icmp eq ptr %18, null
  br i1 %19, label %108, label %20

20:                                               ; preds = %8, %14, %17, %11, %4
  %.0 = phi ptr [ %18, %17 ], [ %15, %14 ], [ %12, %11 ], [ %9, %8 ], [ %6, %4 ]
  %21 = load ptr, ptr @gBS, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 280
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %0, i64 40
  %25 = load ptr, ptr %24, align 8, !tbaa !14
  %26 = call i64 %23(ptr noundef nonnull %.0, ptr noundef nonnull @gEfiPxeBaseCodeProtocolGuid, ptr noundef nonnull %5, ptr noundef %25, ptr noundef %1, i32 noundef 2) #3
  %27 = icmp slt i64 %26, 0
  br i1 %27, label %108, label %28

28:                                               ; preds = %20
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = call i64 %31(ptr noundef %29) #3
  switch i64 %32, label %108 [
    i64 -9223372036854775789, label %33
    i64 0, label %33
  ]

33:                                               ; preds = %28, %28
  %34 = call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %34, 0
  %.pre = load ptr, ptr %5, align 8, !tbaa !5
  %.pre70 = ptrtoint ptr %.pre to i64
  %.pre71 = add i64 %.pre70, -80
  %.pre73 = inttoptr i64 %.pre71 to ptr
  br i1 %.not, label %._crit_edge, label %35

35:                                               ; preds = %33
  %36 = load i32, ptr %.pre73, align 8, !tbaa !18
  %.not69 = icmp eq i32 %36, 1346721872
  br i1 %.not69, label %._crit_edge, label %37

37:                                               ; preds = %35
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 557, ptr noundef nonnull @.str.1) #3
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %33, %35, %37
  %39 = phi ptr [ %38, %37 ], [ %.pre73, %35 ], [ %.pre73, %33 ]
  %40 = load ptr, ptr @gBS, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 336
  %42 = load ptr, ptr %41, align 8, !tbaa !36
  %43 = getelementptr inbounds i8, ptr %39, i64 80
  %44 = getelementptr inbounds i8, ptr %39, i64 192
  %45 = call i64 (ptr, ...) %42(ptr noundef nonnull %.0, ptr noundef nonnull @gEfiPxeBaseCodeProtocolGuid, ptr noundef nonnull %43, ptr noundef nonnull @gEfiLoadFileProtocolGuid, ptr noundef nonnull %44, ptr noundef null) #3
  %46 = icmp slt i64 %45, 0
  br i1 %46, label %108, label %47

47:                                               ; preds = %._crit_edge
  %48 = load ptr, ptr @gBS, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 288
  %50 = load ptr, ptr %49, align 8, !tbaa !37
  %51 = getelementptr inbounds i8, ptr %39, i64 64
  %52 = load ptr, ptr %51, align 8, !tbaa !38
  %53 = load ptr, ptr %24, align 8, !tbaa !14
  %54 = call i64 %50(ptr noundef %52, ptr noundef nonnull @gEfiUdp4ProtocolGuid, ptr noundef %53, ptr noundef nonnull %.0) #3
  %55 = load ptr, ptr %24, align 8, !tbaa !14
  %56 = load ptr, ptr %51, align 8, !tbaa !38
  %57 = call i64 @NetLibDestroyServiceChild(ptr noundef %1, ptr noundef %55, ptr noundef nonnull @gEfiUdp4ServiceBindingProtocolGuid, ptr noundef %56) #3
  %58 = load ptr, ptr @gBS, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 288
  %60 = load ptr, ptr %59, align 8, !tbaa !37
  %61 = getelementptr inbounds i8, ptr %39, i64 56
  %62 = load ptr, ptr %61, align 8, !tbaa !39
  %63 = load ptr, ptr %24, align 8, !tbaa !14
  %64 = call i64 %60(ptr noundef %62, ptr noundef nonnull @gEfiUdp4ProtocolGuid, ptr noundef %63, ptr noundef nonnull %.0) #3
  %65 = load ptr, ptr %24, align 8, !tbaa !14
  %66 = load ptr, ptr %61, align 8, !tbaa !39
  %67 = call i64 @NetLibDestroyServiceChild(ptr noundef nonnull %.0, ptr noundef %65, ptr noundef nonnull @gEfiUdp4ServiceBindingProtocolGuid, ptr noundef %66) #3
  %68 = load ptr, ptr @gBS, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 288
  %70 = load ptr, ptr %69, align 8, !tbaa !37
  %71 = getelementptr inbounds i8, ptr %39, i64 32
  %72 = load ptr, ptr %71, align 8, !tbaa !40
  %73 = load ptr, ptr %24, align 8, !tbaa !14
  %74 = call i64 %70(ptr noundef %72, ptr noundef nonnull @gEfiDhcp4ProtocolGuid, ptr noundef %73, ptr noundef nonnull %.0) #3
  %75 = load ptr, ptr %24, align 8, !tbaa !14
  %76 = load ptr, ptr %71, align 8, !tbaa !40
  %77 = call i64 @NetLibDestroyServiceChild(ptr noundef nonnull %.0, ptr noundef %75, ptr noundef nonnull @gEfiDhcp4ServiceBindingProtocolGuid, ptr noundef %76) #3
  %78 = load ptr, ptr @gBS, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 288
  %80 = load ptr, ptr %79, align 8, !tbaa !37
  %81 = getelementptr inbounds i8, ptr %39, i64 48
  %82 = load ptr, ptr %81, align 8, !tbaa !41
  %83 = load ptr, ptr %24, align 8, !tbaa !14
  %84 = call i64 %80(ptr noundef %82, ptr noundef nonnull @gEfiMtftp4ProtocolGuid, ptr noundef %83, ptr noundef nonnull %.0) #3
  %85 = load ptr, ptr %24, align 8, !tbaa !14
  %86 = load ptr, ptr %81, align 8, !tbaa !41
  %87 = call i64 @NetLibDestroyServiceChild(ptr noundef nonnull %.0, ptr noundef %85, ptr noundef nonnull @gEfiMtftp4ServiceBindingProtocolGuid, ptr noundef %86) #3
  %88 = load ptr, ptr @gBS, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i64 288
  %90 = load ptr, ptr %89, align 8, !tbaa !37
  %91 = getelementptr inbounds i8, ptr %39, i64 40
  %92 = load ptr, ptr %91, align 8, !tbaa !42
  %93 = load ptr, ptr %24, align 8, !tbaa !14
  %94 = call i64 %90(ptr noundef %92, ptr noundef nonnull @gEfiIp4ProtocolGuid, ptr noundef %93, ptr noundef nonnull %.0) #3
  %95 = load ptr, ptr %24, align 8, !tbaa !14
  %96 = load ptr, ptr %91, align 8, !tbaa !42
  %97 = call i64 @NetLibDestroyServiceChild(ptr noundef nonnull %.0, ptr noundef %95, ptr noundef nonnull @gEfiIp4ServiceBindingProtocolGuid, ptr noundef %96) #3
  %98 = load ptr, ptr @gBS, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i64 288
  %100 = load ptr, ptr %99, align 8, !tbaa !37
  %101 = getelementptr inbounds i8, ptr %39, i64 24
  %102 = load ptr, ptr %101, align 8, !tbaa !43
  %103 = load ptr, ptr %24, align 8, !tbaa !14
  %104 = call i64 %100(ptr noundef %102, ptr noundef nonnull @gEfiArpProtocolGuid, ptr noundef %103, ptr noundef nonnull %.0) #3
  %105 = load ptr, ptr %24, align 8, !tbaa !14
  %106 = load ptr, ptr %101, align 8, !tbaa !43
  %107 = call i64 @NetLibDestroyServiceChild(ptr noundef nonnull %.0, ptr noundef %105, ptr noundef nonnull @gEfiArpServiceBindingProtocolGuid, ptr noundef %106) #3
  call void @FreePool(ptr noundef %39) #3
  br label %108

108:                                              ; preds = %._crit_edge, %47, %28, %20, %17
  %.061 = phi i64 [ 0, %17 ], [ %26, %20 ], [ %32, %28 ], [ %45, %47 ], [ %45, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i64 %.061
}

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

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

declare i64 @NetLibDestroyServiceChild(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare ptr @NetLibGetNicHandle(ptr noundef, ptr noundef) local_unnamed_addr #2

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

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 = { mustprogress 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, !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, !6, i64 16}
!17 = !{!"_EFI_PXE_BASE_CODE_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}
!18 = !{!19, !13, i64 0}
!19 = !{!"_PXEBC_PRIVATE_DATA", !13, 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, !17, i64 80, !20, i64 192, !21, i64 200, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !22, i64 248, !6, i64 280, !6, i64 288, !6, i64 296, !24, i64 304, !25, i64 308, !26, i64 344, !13, i64 10768, !6, i64 10776, !7, i64 10784, !7, i64 10800, !7, i64 10816, !7, i64 10832, !7, i64 10848, !13, i64 10852, !12, i64 10856, !12, i64 10864, !7, i64 10872, !30, i64 11184, !23, i64 11433, !7, i64 11465, !7, i64 11466, !7, i64 11467, !13, i64 11468, !13, i64 11472, !13, i64 11476, !33, i64 11480, !33, i64 13152, !33, i64 14824, !7, i64 16496, !7, i64 43248, !7, i64 43268, !13, i64 43588, !7, i64 43592, !7, i64 43612, !6, i64 43680, !35, i64 43688}
!20 = !{!"_EFI_LOAD_FILE_PROTOCOL", !6, i64 0}
!21 = !{!"_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL", !12, i64 0, !6, i64 8}
!22 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !23, i64 6, !23, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !13, i64 20, !13, i64 24}
!23 = !{!"", !7, i64 0}
!24 = !{!"short", !7, i64 0}
!25 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !13, i64 8, !13, i64 12, !7, i64 16, !23, i64 17, !23, i64 21, !24, i64 26, !23, i64 28, !24, i64 32}
!26 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 20, !7, i64 36, !7, i64 52, !7, i64 1524, !7, i64 2996, !7, i64 4468, !7, i64 5940, !7, i64 7412, !27, i64 8884, !13, i64 9016, !7, i64 9020, !13, i64 9404, !7, i64 9408, !28, i64 9792, !29, i64 10296}
!27 = !{!"", !7, i64 0, !7, i64 1, !24, i64 2, !7, i64 4}
!28 = !{!"", !7, i64 0, !7, i64 1, !24, i64 2, !7, i64 4, !7, i64 8}
!29 = !{!"", !7, i64 0, !7, i64 1}
!30 = !{!"", !13, i64 0, !13, i64 4, !31, i64 8}
!31 = !{!"", !32, i64 0, !13, i64 236, !7, i64 240}
!32 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !13, i64 4, !24, i64 8, !24, i64 10, !23, i64 12, !23, i64 16, !23, i64 20, !23, i64 24, !7, i64 28, !7, i64 44, !7, i64 108}
!33 = !{!"", !7, i64 0, !7, i64 1480, !7, i64 1481, !7, i64 1488, !34, i64 1544}
!34 = !{!"", !7, i64 0, !23, i64 32, !24, i64 36, !24, i64 38, !7, i64 40, !7, i64 41, !7, i64 42, !23, i64 43, !23, i64 47, !24, i64 52, !24, i64 54, !24, i64 56, !24, i64 58, !6, i64 64, !7, i64 72, !6, i64 80, !7, i64 88, !6, i64 96, !7, i64 104, !6, i64 112, !7, i64 120}
!35 = !{!"", !6, i64 0, !12, i64 8, !7, i64 16}
!36 = !{!10, !6, i64 336}
!37 = !{!10, !6, i64 288}
!38 = !{!19, !6, i64 64}
!39 = !{!19, !6, i64 56}
!40 = !{!19, !6, i64 32}
!41 = !{!19, !6, i64 48}
!42 = !{!19, !6, i64 40}
!43 = !{!19, !6, i64 24}


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