; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/UefiPxeBcDxe_ (PxeBcDhcp4Discover)

; 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_DHCP4_TRANSMIT_RECEIVE_TOKEN = type { i64, ptr, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i32, ptr, i32, ptr, i32, ptr }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct.EFI_DHCP4_LISTEN_POINT = type { %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16 }
%struct._PXEBC_PRIVATE_DATA = type { i32, ptr, ptr, %struct._PXEBC_PRIVATE_PROTOCOL, 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_PXE_BASE_CODE_PROTOCOL, %struct._EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL, ptr, ptr, %struct.EFI_PXE_BASE_CODE_MODE, i32, i32, i32, i64, %struct.EFI_UDP4_CONFIG_DATA, %struct.EFI_UDP6_CONFIG_DATA, %struct.EFI_IP4_CONFIG_DATA, %struct.EFI_IP6_CONFIG_DATA, ptr, ptr, %struct.EFI_IP4_COMPLETION_TOKEN, %struct.EFI_IP6_COMPLETION_TOKEN, i8, i8, i8, i8, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, i16, i32, i32, i32, ptr, i64, i64, %union.PXEBC_DHCP_PACKET_CACHE, %union.PXEBC_DHCP_PACKET_CACHE, %union.PXEBC_DHCP_PACKET_CACHE, ptr, %struct.EFI_DHCP4_PACKET, i32, i32, [16 x %union.PXEBC_DHCP_PACKET_CACHE], i32, [8 x i32], [8 x [16 x i32]] }
%struct._PXEBC_PRIVATE_PROTOCOL = type { i64 }
%struct._EFI_PXE_BASE_CODE_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL = type { i64, ptr }
%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_MAC_ADDRESS = type { [32 x i8] }
%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] }
%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_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%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_IP6_CONFIG_DATA = type { i8, i8, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS, i8, i8, i32, i32, i32 }
%struct.EFI_IP4_COMPLETION_TOKEN = type { ptr, i64, %union.anon.0 }
%union.anon.0 = type { ptr }
%struct.EFI_IP6_COMPLETION_TOKEN = type { ptr, i64, %union.anon.1 }
%union.anon.1 = type { ptr }
%union.EFI_IP_ADDRESS = type { [4 x i32] }
%union.PXEBC_DHCP_PACKET_CACHE = type { %struct.PXEBC_DHCP4_PACKET_CACHE }
%struct.PXEBC_DHCP4_PACKET_CACHE = type { %union.PXEBC_DHCP4_PACKET, i32, [7 x ptr], %struct.PXEBC_VENDOR_OPTION }
%union.PXEBC_DHCP4_PACKET = type { [1472 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_DHCP4_PACKET = type <{ i32, i32, %struct.anon.2 }>
%struct.anon.2 = 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_DHCP4_PACKET_OPTION = type { i8, i8, [1 x i8] }
%struct.PXEBC_OPTION_BOOT_ITEM = type { i16, i16 }
%struct._EFI_DHCP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_PXE_BASE_CODE_SRVLIST = type { i16, i8, i8, %union.EFI_IP_ADDRESS }

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

; 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

; Function Attrs: nounwind uwtable
declare dso_local i32 @PxeBcBuildDhcp4Options(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) #2

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) #1

declare i64 @NetLibGetSystemGuid(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @PxeBcCacheDhcp4Packet(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeBcDhcp4Discover(ptr noundef %0, i16 noundef zeroext %1, ptr noundef %2, i8 noundef zeroext %3, ptr noundef %4, i16 noundef zeroext %5, ptr noundef %6) #2 {
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i16, align 2
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i16, align 2
  %15 = alloca ptr, align 8
  %16 = alloca i16, align 2
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, align 8
  %20 = alloca i8, align 1
  %21 = alloca i64, align 8
  %22 = alloca i16, align 2
  %23 = alloca i16, align 2
  %24 = alloca i16, align 2
  %25 = alloca %struct.EFI_DHCP4_LISTEN_POINT, align 2
  %26 = alloca ptr, align 8
  %27 = alloca [312 x i8], align 16
  %28 = alloca [16 x ptr], align 16
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i8, align 1
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i16 %1, ptr %10, align 2, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i8 %3, ptr %12, align 1, !tbaa !11
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i16 %5, ptr %14, align 2, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 72, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 10, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 312, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 128, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %35, i32 0, i32 31
  %37 = getelementptr inbounds %struct._EFI_PXE_BASE_CODE_PROTOCOL, ptr %36, i32 0, i32 13
  %38 = load ptr, ptr %37, align 8, !tbaa !12
  store ptr %38, ptr %17, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %39, i32 0, i32 15
  %41 = load ptr, ptr %40, align 8, !tbaa !32
  store ptr %41, ptr %18, align 8, !tbaa !5
  store i64 0, ptr %21, align 8, !tbaa !33
  %42 = call ptr @ZeroMem(ptr noundef %19, i64 noundef 72)
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %7
  store i16 67, ptr %16, align 2, !tbaa !9
  store i8 1, ptr %20, align 1, !tbaa !11
  br label %47

46:                                               ; preds = %7
  store i16 4011, ptr %16, align 2, !tbaa !9
  store i8 0, ptr %20, align 1, !tbaa !11
  br label %47

47:                                               ; preds = %46, %45
  %48 = load i8, ptr %12, align 1, !tbaa !11
  %49 = icmp ne i8 %48, 0
  br i1 %49, label %59, label %50

50:                                               ; preds = %47
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %59

53:                                               ; preds = %50
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = load i16, ptr %54, align 2, !tbaa !9
  %56 = zext i16 %55 to i32
  %57 = and i32 %56, 32767
  %58 = trunc i32 %57 to i16
  store i16 %58, ptr %54, align 2, !tbaa !9
  br label %59

59:                                               ; preds = %53, %50, %47
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 0
  %62 = getelementptr inbounds [312 x i8], ptr %27, i64 0, i64 0
  %63 = call i32 @PxeBcBuildDhcp4Options(ptr noundef %60, ptr noundef %61, ptr noundef %62, i8 noundef zeroext 1)
  store i32 %63, ptr %29, align 4, !tbaa !34
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %64, i32 0, i32 51
  %66 = load i8, ptr %65, align 1, !tbaa !35
  %67 = icmp ne i8 %66, 0
  br i1 %67, label %68, label %131

68:                                               ; preds = %59
  store i8 9, ptr %32, align 1, !tbaa !11
  %69 = load i8, ptr %32, align 1, !tbaa !11
  %70 = zext i8 %69 to i64
  %71 = call ptr @AllocateZeroPool(i64 noundef %70)
  %72 = load i32, ptr %29, align 4, !tbaa !34
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 %73
  store ptr %71, ptr %74, align 8, !tbaa !5
  %75 = load i32, ptr %29, align 4, !tbaa !34
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %81

80:                                               ; preds = %68
  store i64 -9223372036854775799, ptr %8, align 8
  store i32 1, ptr %34, align 4
  br label %421

81:                                               ; preds = %68
  %82 = load i32, ptr %29, align 4, !tbaa !34
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %85, i32 0, i32 0
  store i8 43, ptr %86, align 1, !tbaa !36
  %87 = load i8, ptr %32, align 1, !tbaa !11
  %88 = zext i8 %87 to i32
  %89 = sub nsw i32 %88, 2
  %90 = trunc i32 %89 to i8
  %91 = load i32, ptr %29, align 4, !tbaa !34
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %94, i32 0, i32 1
  store i8 %90, ptr %95, align 1, !tbaa !38
  %96 = load i32, ptr %29, align 4, !tbaa !34
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %99, i32 0, i32 2
  %101 = getelementptr inbounds [1 x i8], ptr %100, i64 0, i64 0
  store ptr %101, ptr %30, align 8, !tbaa !5
  %102 = load ptr, ptr %30, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %102, i32 0, i32 0
  store i8 71, ptr %103, align 1, !tbaa !36
  %104 = load ptr, ptr %30, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %104, i32 0, i32 1
  store i8 4, ptr %105, align 1, !tbaa !38
  %106 = load ptr, ptr %30, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %106, i32 0, i32 2
  %108 = getelementptr inbounds [1 x i8], ptr %107, i64 0, i64 0
  store ptr %108, ptr %31, align 8, !tbaa !5
  %109 = load i16, ptr %10, align 2, !tbaa !9
  %110 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %109)
  %111 = load ptr, ptr %31, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.PXEBC_OPTION_BOOT_ITEM, ptr %111, i32 0, i32 0
  store i16 %110, ptr %112, align 1, !tbaa !39
  %113 = load ptr, ptr %30, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %113, i32 0, i32 2
  %115 = load ptr, ptr %30, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %115, i32 0, i32 1
  %117 = load i8, ptr %116, align 1, !tbaa !38
  %118 = zext i8 %117 to i64
  %119 = getelementptr inbounds [1 x i8], ptr %114, i64 0, i64 %118
  store i8 -1, ptr %119, align 1, !tbaa !11
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %128

122:                                              ; preds = %81
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = load i16, ptr %123, align 2, !tbaa !9
  %125 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %124)
  %126 = load ptr, ptr %31, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.PXEBC_OPTION_BOOT_ITEM, ptr %126, i32 0, i32 1
  store i16 %125, ptr %127, align 1, !tbaa !41
  br label %128

128:                                              ; preds = %122, %81
  %129 = load i32, ptr %29, align 4, !tbaa !34
  %130 = add i32 %129, 1
  store i32 %130, ptr %29, align 4, !tbaa !34
  br label %131

131:                                              ; preds = %128, %59
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._EFI_DHCP4_PROTOCOL, ptr %132, i32 0, i32 6
  %134 = load ptr, ptr %133, align 8, !tbaa !42
  %135 = load ptr, ptr %18, align 8, !tbaa !5
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %136, i32 0, i32 67
  %138 = load i32, ptr %29, align 4, !tbaa !34
  %139 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 0
  %140 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %141 = call i64 %134(ptr noundef %135, ptr noundef %137, i32 noundef 0, ptr noundef null, i32 noundef %138, ptr noundef %139, ptr noundef %140)
  store i64 %141, ptr %21, align 8, !tbaa !33
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %142, i32 0, i32 51
  %144 = load i8, ptr %143, align 1, !tbaa !35
  %145 = icmp ne i8 %144, 0
  br i1 %145, label %146, label %152

146:                                              ; preds = %131
  %147 = load i32, ptr %29, align 4, !tbaa !34
  %148 = sub i32 %147, 1
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds [16 x ptr], ptr %28, i64 0, i64 %149
  %151 = load ptr, ptr %150, align 8, !tbaa !5
  call void @FreePool(ptr noundef %151)
  br label %152

152:                                              ; preds = %146, %131
  %153 = load i64, ptr %21, align 8, !tbaa !33
  %154 = icmp slt i64 %153, 0
  br i1 %154, label %155, label %157

155:                                              ; preds = %152
  %156 = load i64, ptr %21, align 8, !tbaa !33
  store i64 %156, ptr %8, align 8
  store i32 1, ptr %34, align 4
  br label %421

157:                                              ; preds = %152
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %158, i32 0, i32 7
  %160 = load i8, ptr %159, align 1, !tbaa !44
  %161 = icmp ne i8 %160, 0
  br i1 %161, label %162, label %185

162:                                              ; preds = %157
  %163 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %164 = load ptr, ptr %163, align 8, !tbaa !45
  %165 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %164, i32 0, i32 2
  %166 = getelementptr inbounds %struct.anon.2, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %166, i32 0, i32 11
  %168 = getelementptr inbounds [16 x i8], ptr %167, i64 0, i64 0
  %169 = call i64 @NetLibGetSystemGuid(ptr noundef %168)
  %170 = icmp slt i64 %169, 0
  br i1 %170, label %171, label %179

171:                                              ; preds = %162
  %172 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %173 = load ptr, ptr %172, align 8, !tbaa !45
  %174 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %173, i32 0, i32 2
  %175 = getelementptr inbounds %struct.anon.2, ptr %174, i32 0, i32 0
  %176 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %175, i32 0, i32 11
  %177 = getelementptr inbounds [16 x i8], ptr %176, i64 0, i64 0
  %178 = call ptr @ZeroMem(ptr noundef %177, i64 noundef 16)
  br label %179

179:                                              ; preds = %171, %162
  %180 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %181 = load ptr, ptr %180, align 8, !tbaa !45
  %182 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %181, i32 0, i32 2
  %183 = getelementptr inbounds %struct.anon.2, ptr %182, i32 0, i32 0
  %184 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %183, i32 0, i32 2
  store i8 16, ptr %184, align 1, !tbaa !47
  br label %185

185:                                              ; preds = %179, %157
  %186 = call i32 @NetRandomInitSeed()
  %187 = zext i32 %186 to i64
  %188 = mul i64 %187, 1103515245
  %189 = add i64 %188, 12345
  %190 = trunc i64 %189 to i32
  %191 = zext i32 %190 to i64
  %192 = urem i64 %191, 4294967295
  %193 = trunc i64 %192 to i32
  store i32 %193, ptr %33, align 4, !tbaa !34
  %194 = load i32, ptr %33, align 4, !tbaa !34
  %195 = call i32 @SwapBytes32(i32 noundef %194)
  %196 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %197 = load ptr, ptr %196, align 8, !tbaa !45
  %198 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %197, i32 0, i32 2
  %199 = getelementptr inbounds %struct.anon.2, ptr %198, i32 0, i32 0
  %200 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %199, i32 0, i32 4
  store i32 %195, ptr %200, align 1, !tbaa !48
  %201 = load i8, ptr %20, align 1, !tbaa !11
  %202 = zext i8 %201 to i32
  %203 = icmp ne i32 %202, 0
  %204 = zext i1 %203 to i64
  %205 = select i1 %203, i32 32768, i32 0
  %206 = trunc i32 %205 to i16
  %207 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %206)
  %208 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %209 = load ptr, ptr %208, align 8, !tbaa !45
  %210 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %209, i32 0, i32 2
  %211 = getelementptr inbounds %struct.anon.2, ptr %210, i32 0, i32 0
  %212 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %211, i32 0, i32 6
  store i16 %207, ptr %212, align 1, !tbaa !49
  %213 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %214 = load ptr, ptr %213, align 8, !tbaa !45
  %215 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %214, i32 0, i32 2
  %216 = getelementptr inbounds %struct.anon.2, ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %216, i32 0, i32 7
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %218, i32 0, i32 52
  %220 = call ptr @CopyMem(ptr noundef %217, ptr noundef %219, i64 noundef 4)
  %221 = load i16, ptr %16, align 2, !tbaa !9
  %222 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 3
  store i16 %221, ptr %222, align 4, !tbaa !50
  %223 = load i8, ptr %20, align 1, !tbaa !11
  %224 = icmp ne i8 %223, 0
  br i1 %224, label %225, label %228

225:                                              ; preds = %185
  %226 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 2
  %227 = call ptr @SetMem(ptr noundef %226, i64 noundef 4, i8 noundef zeroext -1)
  br label %232

228:                                              ; preds = %185
  %229 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 2
  %230 = load ptr, ptr %13, align 8, !tbaa !5
  %231 = call ptr @CopyMem(ptr noundef %229, ptr noundef %230, i64 noundef 4)
  br label %232

232:                                              ; preds = %228, %225
  %233 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 4
  %234 = load ptr, ptr %9, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %234, i32 0, i32 54
  %236 = call ptr @CopyMem(ptr noundef %233, ptr noundef %235, i64 noundef 4)
  %237 = load i8, ptr %20, align 1, !tbaa !11
  %238 = icmp ne i8 %237, 0
  br i1 %238, label %260, label %239

239:                                              ; preds = %232
  %240 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 5
  store i32 1, ptr %240, align 4, !tbaa !51
  %241 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 6
  store ptr %25, ptr %241, align 8, !tbaa !52
  %242 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 6
  %243 = load ptr, ptr %242, align 8, !tbaa !52
  %244 = getelementptr inbounds %struct.EFI_DHCP4_LISTEN_POINT, ptr %243, i64 0
  %245 = getelementptr inbounds %struct.EFI_DHCP4_LISTEN_POINT, ptr %244, i32 0, i32 2
  store i16 4011, ptr %245, align 2, !tbaa !53
  %246 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 6
  %247 = load ptr, ptr %246, align 8, !tbaa !52
  %248 = getelementptr inbounds %struct.EFI_DHCP4_LISTEN_POINT, ptr %247, i64 0
  %249 = getelementptr inbounds %struct.EFI_DHCP4_LISTEN_POINT, ptr %248, i32 0, i32 0
  %250 = load ptr, ptr %9, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %250, i32 0, i32 52
  %252 = call ptr @CopyMem(ptr noundef %249, ptr noundef %251, i64 noundef 4)
  %253 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 6
  %254 = load ptr, ptr %253, align 8, !tbaa !52
  %255 = getelementptr inbounds %struct.EFI_DHCP4_LISTEN_POINT, ptr %254, i64 0
  %256 = getelementptr inbounds %struct.EFI_DHCP4_LISTEN_POINT, ptr %255, i32 0, i32 1
  %257 = load ptr, ptr %9, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %257, i32 0, i32 53
  %259 = call ptr @CopyMem(ptr noundef %256, ptr noundef %258, i64 noundef 4)
  br label %260

260:                                              ; preds = %239, %232
  store i16 1, ptr %24, align 2, !tbaa !9
  br label %261

261:                                              ; preds = %292, %260
  %262 = load i16, ptr %24, align 2, !tbaa !9
  %263 = zext i16 %262 to i32
  %264 = icmp sle i32 %263, 4
  br i1 %264, label %265, label %295

265:                                              ; preds = %261
  %266 = load i16, ptr %24, align 2, !tbaa !9
  %267 = zext i16 %266 to i32
  %268 = mul nsw i32 1, %267
  %269 = trunc i32 %268 to i16
  %270 = zext i16 %269 to i32
  %271 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 7
  store i32 %270, ptr %271, align 8, !tbaa !55
  %272 = load i16, ptr %24, align 2, !tbaa !9
  %273 = zext i16 %272 to i32
  %274 = sub nsw i32 %273, 1
  %275 = mul nsw i32 1, %274
  %276 = trunc i32 %275 to i16
  %277 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %278 = load ptr, ptr %277, align 8, !tbaa !45
  %279 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %278, i32 0, i32 2
  %280 = getelementptr inbounds %struct.anon.2, ptr %279, i32 0, i32 0
  %281 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %280, i32 0, i32 5
  store i16 %276, ptr %281, align 1, !tbaa !56
  %282 = load ptr, ptr %18, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct._EFI_DHCP4_PROTOCOL, ptr %282, i32 0, i32 7
  %284 = load ptr, ptr %283, align 8, !tbaa !57
  %285 = load ptr, ptr %18, align 8, !tbaa !5
  %286 = call i64 %284(ptr noundef %285, ptr noundef %19)
  store i64 %286, ptr %21, align 8, !tbaa !33
  %287 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 0
  %288 = load i64, ptr %287, align 8, !tbaa !58
  %289 = icmp ne i64 %288, -9223372036854775790
  br i1 %289, label %290, label %291

290:                                              ; preds = %265
  br label %295

291:                                              ; preds = %265
  br label %292

292:                                              ; preds = %291
  %293 = load i16, ptr %24, align 2, !tbaa !9
  %294 = add i16 %293, 1
  store i16 %294, ptr %24, align 2, !tbaa !9
  br label %261, !llvm.loop !59

295:                                              ; preds = %290, %261
  %296 = load i16, ptr %24, align 2, !tbaa !9
  %297 = zext i16 %296 to i32
  %298 = icmp sgt i32 %297, 4
  br i1 %298, label %299, label %300

299:                                              ; preds = %295
  store i64 -9223372036854775790, ptr %21, align 8, !tbaa !33
  br label %300

300:                                              ; preds = %299, %295
  %301 = load i64, ptr %21, align 8, !tbaa !33
  %302 = icmp slt i64 %301, 0
  br i1 %302, label %417, label %303

303:                                              ; preds = %300
  store i16 0, ptr %22, align 2, !tbaa !9
  store i16 0, ptr %23, align 2, !tbaa !9
  %304 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 10
  %305 = load ptr, ptr %304, align 8, !tbaa !61
  store ptr %305, ptr %26, align 8, !tbaa !5
  br label %306

306:                                              ; preds = %366, %303
  %307 = load i16, ptr %22, align 2, !tbaa !9
  %308 = zext i16 %307 to i32
  %309 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 9
  %310 = load i32, ptr %309, align 8, !tbaa !62
  %311 = icmp ult i32 %308, %310
  br i1 %311, label %312, label %375

312:                                              ; preds = %306
  br label %313

313:                                              ; preds = %352, %312
  %314 = load i16, ptr %23, align 2, !tbaa !9
  %315 = zext i16 %314 to i32
  %316 = load i16, ptr %14, align 2, !tbaa !9
  %317 = zext i16 %316 to i32
  %318 = icmp slt i32 %315, %317
  br i1 %318, label %319, label %355

319:                                              ; preds = %313
  %320 = load ptr, ptr %15, align 8, !tbaa !5
  %321 = load i16, ptr %23, align 2, !tbaa !9
  %322 = zext i16 %321 to i64
  %323 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_SRVLIST, ptr %320, i64 %322
  %324 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_SRVLIST, ptr %323, i32 0, i32 1
  %325 = load i8, ptr %324, align 2, !tbaa !63
  %326 = icmp ne i8 %325, 0
  br i1 %326, label %327, label %328

327:                                              ; preds = %319
  br label %355

328:                                              ; preds = %319
  %329 = load ptr, ptr %15, align 8, !tbaa !5
  %330 = load i16, ptr %23, align 2, !tbaa !9
  %331 = zext i16 %330 to i64
  %332 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_SRVLIST, ptr %329, i64 %331
  %333 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_SRVLIST, ptr %332, i32 0, i32 0
  %334 = load i16, ptr %333, align 4, !tbaa !65
  %335 = zext i16 %334 to i32
  %336 = load i16, ptr %10, align 2, !tbaa !9
  %337 = zext i16 %336 to i32
  %338 = icmp eq i32 %335, %337
  br i1 %338, label %339, label %352

339:                                              ; preds = %328
  %340 = load ptr, ptr %26, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %340, i32 0, i32 2
  %342 = getelementptr inbounds %struct.anon.2, ptr %341, i32 0, i32 0
  %343 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %342, i32 0, i32 9
  %344 = load ptr, ptr %15, align 8, !tbaa !5
  %345 = load i16, ptr %23, align 2, !tbaa !9
  %346 = zext i16 %345 to i64
  %347 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_SRVLIST, ptr %344, i64 %346
  %348 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_SRVLIST, ptr %347, i32 0, i32 3
  %349 = call i64 @CompareMem(ptr noundef %343, ptr noundef %348, i64 noundef 4)
  %350 = icmp eq i64 %349, 0
  br i1 %350, label %351, label %352

351:                                              ; preds = %339
  br label %355

352:                                              ; preds = %339, %328
  %353 = load i16, ptr %23, align 2, !tbaa !9
  %354 = add i16 %353, 1
  store i16 %354, ptr %23, align 2, !tbaa !9
  br label %313, !llvm.loop !66

355:                                              ; preds = %351, %327, %313
  %356 = load i16, ptr %14, align 2, !tbaa !9
  %357 = zext i16 %356 to i32
  %358 = load i16, ptr %23, align 2, !tbaa !9
  %359 = zext i16 %358 to i32
  %360 = icmp ne i32 %357, %359
  br i1 %360, label %365, label %361

361:                                              ; preds = %355
  %362 = load i16, ptr %14, align 2, !tbaa !9
  %363 = zext i16 %362 to i32
  %364 = icmp eq i32 %363, 0
  br i1 %364, label %365, label %366

365:                                              ; preds = %361, %355
  br label %375

366:                                              ; preds = %361
  store i16 0, ptr %23, align 2, !tbaa !9
  %367 = load i16, ptr %22, align 2, !tbaa !9
  %368 = add i16 %367, 1
  store i16 %368, ptr %22, align 2, !tbaa !9
  %369 = load ptr, ptr %26, align 8, !tbaa !5
  %370 = load ptr, ptr %26, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %370, i32 0, i32 0
  %372 = load i32, ptr %371, align 1, !tbaa !67
  %373 = zext i32 %372 to i64
  %374 = getelementptr inbounds i8, ptr %369, i64 %373
  store ptr %374, ptr %26, align 8, !tbaa !5
  br label %306, !llvm.loop !68

375:                                              ; preds = %365, %306
  %376 = load i16, ptr %22, align 2, !tbaa !9
  %377 = zext i16 %376 to i32
  %378 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 9
  %379 = load i32, ptr %378, align 8, !tbaa !62
  %380 = icmp ult i32 %377, %379
  br i1 %380, label %381, label %408

381:                                              ; preds = %375
  %382 = load ptr, ptr %9, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %382, i32 0, i32 51
  %384 = load i8, ptr %383, align 1, !tbaa !35
  %385 = icmp ne i8 %384, 0
  br i1 %385, label %386, label %402

386:                                              ; preds = %381
  %387 = load ptr, ptr %9, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %387, i32 0, i32 65
  %389 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %388, i32 0, i32 0
  %390 = load ptr, ptr %26, align 8, !tbaa !5
  call void @PxeBcCacheDhcp4Packet(ptr noundef %389, ptr noundef %390)
  %391 = load ptr, ptr %17, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %391, i32 0, i32 24
  %393 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %394 = load ptr, ptr %393, align 8, !tbaa !45
  %395 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %394, i32 0, i32 2
  %396 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %397 = load ptr, ptr %396, align 8, !tbaa !45
  %398 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %397, i32 0, i32 1
  %399 = load i32, ptr %398, align 1, !tbaa !69
  %400 = zext i32 %399 to i64
  %401 = call ptr @CopyMem(ptr noundef %392, ptr noundef %395, i64 noundef %400)
  br label %407

402:                                              ; preds = %381
  %403 = load ptr, ptr %9, align 8, !tbaa !5
  %404 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %403, i32 0, i32 63
  %405 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %404, i32 0, i32 0
  %406 = load ptr, ptr %26, align 8, !tbaa !5
  call void @PxeBcCacheDhcp4Packet(ptr noundef %405, ptr noundef %406)
  br label %407

407:                                              ; preds = %402, %386
  br label %409

408:                                              ; preds = %375
  store i64 -9223372036854775794, ptr %21, align 8, !tbaa !33
  br label %409

409:                                              ; preds = %408, %407
  %410 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 10
  %411 = load ptr, ptr %410, align 8, !tbaa !61
  %412 = icmp ne ptr %411, null
  br i1 %412, label %413, label %416

413:                                              ; preds = %409
  %414 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 10
  %415 = load ptr, ptr %414, align 8, !tbaa !61
  call void @FreePool(ptr noundef %415)
  br label %416

416:                                              ; preds = %413, %409
  br label %417

417:                                              ; preds = %416, %300
  %418 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %19, i32 0, i32 8
  %419 = load ptr, ptr %418, align 8, !tbaa !45
  call void @FreePool(ptr noundef %419)
  %420 = load i64, ptr %21, align 8, !tbaa !33
  store i64 %420, ptr %8, align 8
  store i32 1, ptr %34, align 4
  br label %421

421:                                              ; preds = %417, %155, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 312, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 10, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 72, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #3
  %422 = load i64, ptr %8, align 8
  ret i64 %422
}

declare ptr @AllocateZeroPool(i64 noundef) #1

declare void @FreePool(ptr noundef) #1

declare i32 @NetRandomInitSeed() #1

declare i32 @SwapBytes32(i32 noundef) #1

declare ptr @SetMem(ptr noundef, i64 noundef, i8 noundef zeroext) #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 = !{!"short", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 352}
!13 = !{!"_PXEBC_PRIVATE_DATA", !14, i64 0, !6, i64 8, !6, i64 16, !15, 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, !17, i64 248, !18, i64 360, !6, i64 376, !6, i64 384, !19, i64 392, !14, i64 10816, !14, i64 10820, !14, i64 10824, !16, i64 10832, !23, i64 10840, !25, i64 10876, !26, i64 10928, !27, i64 10956, !6, i64 11008, !6, i64 11016, !28, i64 11024, !28, i64 11048, !7, i64 11072, !7, i64 11073, !7, i64 11074, !7, i64 11075, !7, i64 11076, !7, i64 11092, !7, i64 11108, !7, i64 11124, !10, i64 11140, !14, i64 11144, !14, i64 11148, !14, i64 11152, !6, i64 11160, !16, i64 11168, !16, i64 11176, !7, i64 11184, !7, i64 12848, !7, i64 14512, !6, i64 16176, !29, i64 16184, !14, i64 16436, !14, i64 16440, !7, i64 16448, !14, i64 43072, !7, i64 43076, !7, i64 43108}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_PXEBC_PRIVATE_PROTOCOL", !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = !{!"_EFI_PXE_BASE_CODE_PROTOCOL", !16, 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 = !{!"_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL", !16, i64 0, !6, i64 8}
!19 = !{!"", !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, !20, i64 8884, !14, i64 9016, !7, i64 9020, !14, i64 9404, !7, i64 9408, !21, i64 9792, !22, i64 10296}
!20 = !{!"", !7, i64 0, !7, i64 1, !10, i64 2, !7, i64 4}
!21 = !{!"", !7, i64 0, !7, i64 1, !10, i64 2, !7, i64 4, !7, i64 8}
!22 = !{!"", !7, i64 0, !7, i64 1}
!23 = !{!"", !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, !10, i64 26, !24, i64 28, !10, i64 32}
!24 = !{!"", !7, i64 0}
!25 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !14, i64 8, !14, i64 12, !24, i64 16, !10, i64 32, !24, i64 34, !10, i64 50}
!26 = !{!"", !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}
!27 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !24, i64 4, !24, i64 20, !7, i64 36, !7, i64 37, !14, i64 40, !14, i64 44, !14, i64 48}
!28 = !{!"", !6, i64 0, !16, i64 8, !7, i64 16}
!29 = !{!"", !14, i64 0, !14, i64 4, !30, i64 8}
!30 = !{!"", !31, i64 0, !14, i64 236, !7, i64 240}
!31 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !14, i64 4, !10, i64 8, !10, i64 10, !24, i64 12, !24, i64 16, !24, i64 20, !24, i64 24, !7, i64 28, !7, i64 44, !7, i64 108}
!32 = !{!13, !6, i64 120}
!33 = !{!16, !16, i64 0}
!34 = !{!14, !14, i64 0}
!35 = !{!13, !7, i64 11075}
!36 = !{!37, !7, i64 0}
!37 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!38 = !{!37, !7, i64 1}
!39 = !{!40, !10, i64 0}
!40 = !{!"", !10, i64 0, !10, i64 2}
!41 = !{!40, !10, i64 2}
!42 = !{!43, !6, i64 48}
!43 = !{!"_EFI_DHCP4_PROTOCOL", !6, 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}
!44 = !{!19, !7, i64 7}
!45 = !{!46, !6, i64 48}
!46 = !{!"", !16, i64 0, !6, i64 8, !24, i64 16, !10, i64 20, !24, i64 22, !14, i64 28, !6, i64 32, !14, i64 40, !6, i64 48, !14, i64 56, !6, i64 64}
!47 = !{!29, !7, i64 10}
!48 = !{!29, !14, i64 12}
!49 = !{!29, !10, i64 18}
!50 = !{!46, !10, i64 20}
!51 = !{!46, !14, i64 28}
!52 = !{!46, !6, i64 32}
!53 = !{!54, !10, i64 8}
!54 = !{!"", !24, i64 0, !24, i64 4, !10, i64 8}
!55 = !{!46, !14, i64 40}
!56 = !{!29, !10, i64 16}
!57 = !{!43, !6, i64 56}
!58 = !{!46, !16, i64 0}
!59 = distinct !{!59, !60}
!60 = !{!"llvm.loop.mustprogress"}
!61 = !{!46, !6, i64 64}
!62 = !{!46, !14, i64 56}
!63 = !{!64, !7, i64 2}
!64 = !{!"", !10, i64 0, !7, i64 2, !7, i64 3, !7, i64 4}
!65 = !{!64, !10, i64 0}
!66 = distinct !{!66, !60}
!67 = !{!29, !14, i64 0}
!68 = distinct !{!68, !60}
!69 = !{!29, !14, i64 4}


; 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.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN = type { i64, ptr, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i32, ptr, i32, ptr, i32, ptr }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct.EFI_DHCP4_LISTEN_POINT = type { %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16 }
%struct.EFI_PXE_BASE_CODE_SRVLIST = type { i16, i8, i8, %union.EFI_IP_ADDRESS }
%union.EFI_IP_ADDRESS = type { [4 x i32] }

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

; Function Attrs: mustprogress 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) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @PxeBcBuildDhcp4Options(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #2

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) local_unnamed_addr #1

declare i64 @NetLibGetSystemGuid(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @PxeBcCacheDhcp4Packet(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeBcDhcp4Discover(ptr noundef %0, i16 noundef zeroext %1, ptr noundef %2, i8 noundef zeroext %3, ptr noundef %4, i16 noundef zeroext %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, align 8
  %9 = alloca %struct.EFI_DHCP4_LISTEN_POINT, align 2
  %10 = alloca [312 x i8], align 16
  %11 = alloca [16 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 312, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %11) #3
  %12 = getelementptr inbounds i8, ptr %0, i64 352
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 120
  %15 = load ptr, ptr %14, align 8, !tbaa !29
  %16 = call ptr @ZeroMem(ptr noundef nonnull %8, i64 noundef 72) #3
  %.not104.not = icmp eq ptr %4, null
  %. = select i1 %.not104.not, i16 67, i16 4011
  %17 = icmp eq i8 %3, 0
  %18 = icmp ne ptr %2, null
  %or.cond = and i1 %18, %17
  br i1 %or.cond, label %19, label %22

19:                                               ; preds = %7
  %20 = load i16, ptr %2, align 2, !tbaa !30
  %21 = and i16 %20, 32767
  store i16 %21, ptr %2, align 2, !tbaa !30
  br label %22

22:                                               ; preds = %19, %7
  %23 = call i32 @PxeBcBuildDhcp4Options(ptr noundef nonnull %0, ptr noundef nonnull %11, ptr noundef nonnull %10, i8 noundef zeroext 1)
  %24 = getelementptr inbounds i8, ptr %0, i64 11075
  %25 = load i8, ptr %24, align 1, !tbaa !31
  %.not = icmp eq i8 %25, 0
  br i1 %.not, label %44, label %26

26:                                               ; preds = %22
  %27 = call ptr @AllocateZeroPool(i64 noundef 9) #3
  %28 = zext i32 %23 to i64
  %29 = getelementptr inbounds [16 x ptr], ptr %11, i64 0, i64 %28
  store ptr %27, ptr %29, align 8, !tbaa !32
  %30 = icmp eq ptr %27, null
  br i1 %30, label %182, label %31

31:                                               ; preds = %26
  %32 = getelementptr inbounds i8, ptr %27, i64 3
  store <4 x i8> <i8 43, i8 7, i8 71, i8 4>, ptr %27, align 1, !tbaa !33
  %33 = getelementptr inbounds i8, ptr %27, i64 4
  %34 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %1) #3
  store i16 %34, ptr %33, align 1, !tbaa !34
  %35 = load i8, ptr %32, align 1, !tbaa !36
  %36 = zext i8 %35 to i64
  %37 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 %36
  store i8 -1, ptr %37, align 1, !tbaa !33
  br i1 %18, label %38, label %42

38:                                               ; preds = %31
  %39 = load i16, ptr %2, align 2, !tbaa !30
  %40 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %39) #3
  %41 = getelementptr inbounds i8, ptr %27, i64 6
  store i16 %40, ptr %41, align 1, !tbaa !38
  br label %42

42:                                               ; preds = %38, %31
  %43 = add i32 %23, 1
  br label %44

44:                                               ; preds = %42, %22
  %.086 = phi i32 [ %43, %42 ], [ %23, %22 ]
  %45 = getelementptr inbounds i8, ptr %15, i64 48
  %46 = load ptr, ptr %45, align 8, !tbaa !39
  %47 = getelementptr inbounds i8, ptr %0, i64 16184
  %48 = getelementptr inbounds i8, ptr %8, i64 48
  %49 = call i64 %46(ptr noundef %15, ptr noundef nonnull %47, i32 noundef 0, ptr noundef null, i32 noundef %.086, ptr noundef nonnull %11, ptr noundef nonnull %48) #3
  %50 = load i8, ptr %24, align 1, !tbaa !31
  %.not99 = icmp eq i8 %50, 0
  br i1 %.not99, label %56, label %51

51:                                               ; preds = %44
  %52 = add i32 %.086, -1
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds [16 x ptr], ptr %11, i64 0, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !32
  call void @FreePool(ptr noundef %55) #3
  br label %56

56:                                               ; preds = %51, %44
  %57 = icmp slt i64 %49, 0
  br i1 %57, label %182, label %58

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %13, i64 7
  %60 = load i8, ptr %59, align 1, !tbaa !41
  %.not100 = icmp eq i8 %60, 0
  br i1 %.not100, label %73, label %61

61:                                               ; preds = %58
  %62 = load ptr, ptr %48, align 8, !tbaa !42
  %63 = getelementptr inbounds i8, ptr %62, i64 36
  %64 = call i64 @NetLibGetSystemGuid(ptr noundef nonnull %63) #3
  %65 = icmp slt i64 %64, 0
  br i1 %65, label %66, label %70

66:                                               ; preds = %61
  %67 = load ptr, ptr %48, align 8, !tbaa !42
  %68 = getelementptr inbounds i8, ptr %67, i64 36
  %69 = call ptr @ZeroMem(ptr noundef nonnull %68, i64 noundef 16) #3
  br label %70

70:                                               ; preds = %66, %61
  %71 = load ptr, ptr %48, align 8, !tbaa !42
  %72 = getelementptr inbounds i8, ptr %71, i64 10
  store i8 16, ptr %72, align 1, !tbaa !44
  br label %73

73:                                               ; preds = %70, %58
  %74 = call i32 @NetRandomInitSeed() #3
  %.fr = freeze i32 %74
  %75 = mul i32 %.fr, 1103515245
  %76 = add i32 %75, 12345
  %.not102 = icmp eq i32 %76, -1
  %77 = add nsw i32 %75, 12346
  %78 = select i1 %.not102, i32 %77, i32 %76
  %79 = call i32 @SwapBytes32(i32 noundef %78) #3
  %80 = load ptr, ptr %48, align 8, !tbaa !42
  %81 = getelementptr inbounds i8, ptr %80, i64 12
  store i32 %79, ptr %81, align 1, !tbaa !45
  %82 = select i1 %.not104.not, i16 -32768, i16 0
  %83 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %82) #3
  %84 = load ptr, ptr %48, align 8, !tbaa !42
  %85 = getelementptr inbounds i8, ptr %84, i64 18
  store i16 %83, ptr %85, align 1, !tbaa !46
  %86 = getelementptr inbounds i8, ptr %84, i64 20
  %87 = getelementptr inbounds i8, ptr %0, i64 11076
  %88 = call ptr @CopyMem(ptr noundef nonnull %86, ptr noundef nonnull %87, i64 noundef 4) #3
  %89 = getelementptr inbounds i8, ptr %8, i64 20
  store i16 %., ptr %89, align 4, !tbaa !47
  %90 = getelementptr inbounds i8, ptr %8, i64 16
  %91 = getelementptr inbounds i8, ptr %8, i64 22
  %92 = getelementptr inbounds i8, ptr %0, i64 11108
  br i1 %.not104.not, label %.thread, label %95

.thread:                                          ; preds = %73
  %93 = call ptr @SetMem(ptr noundef nonnull %90, i64 noundef 4, i8 noundef zeroext -1) #3
  %94 = call ptr @CopyMem(ptr noundef nonnull %91, ptr noundef nonnull %92, i64 noundef 4) #3
  br label %106

95:                                               ; preds = %73
  %96 = call ptr @CopyMem(ptr noundef nonnull %90, ptr noundef nonnull %4, i64 noundef 4) #3
  %97 = call ptr @CopyMem(ptr noundef nonnull %91, ptr noundef nonnull %92, i64 noundef 4) #3
  %98 = getelementptr inbounds i8, ptr %8, i64 28
  store i32 1, ptr %98, align 4, !tbaa !48
  %99 = getelementptr inbounds i8, ptr %8, i64 32
  store ptr %9, ptr %99, align 8, !tbaa !49
  %100 = getelementptr inbounds i8, ptr %9, i64 8
  store i16 4011, ptr %100, align 2, !tbaa !50
  %101 = call ptr @CopyMem(ptr noundef nonnull %9, ptr noundef nonnull %87, i64 noundef 4) #3
  %102 = load ptr, ptr %99, align 8, !tbaa !49
  %103 = getelementptr inbounds i8, ptr %102, i64 4
  %104 = getelementptr inbounds i8, ptr %0, i64 11092
  %105 = call ptr @CopyMem(ptr noundef nonnull %103, ptr noundef nonnull %104, i64 noundef 4) #3
  br label %106

106:                                              ; preds = %.thread, %95
  %107 = getelementptr inbounds i8, ptr %8, i64 40
  %108 = getelementptr inbounds i8, ptr %15, i64 56
  store i32 1, ptr %107, align 8, !tbaa !52
  %109 = load ptr, ptr %48, align 8, !tbaa !42
  %110 = getelementptr inbounds i8, ptr %109, i64 16
  store i16 0, ptr %110, align 1, !tbaa !53
  %111 = load ptr, ptr %108, align 8, !tbaa !54
  %112 = call i64 %111(ptr noundef nonnull %15, ptr noundef nonnull %8) #3
  %113 = load i64, ptr %8, align 8, !tbaa !55
  %.not106 = icmp eq i64 %113, -9223372036854775790
  br i1 %.not106, label %114, label %132

114:                                              ; preds = %106
  store i32 2, ptr %107, align 8, !tbaa !52
  %115 = load ptr, ptr %48, align 8, !tbaa !42
  %116 = getelementptr inbounds i8, ptr %115, i64 16
  store i16 1, ptr %116, align 1, !tbaa !53
  %117 = load ptr, ptr %108, align 8, !tbaa !54
  %118 = call i64 %117(ptr noundef nonnull %15, ptr noundef nonnull %8) #3
  %119 = load i64, ptr %8, align 8, !tbaa !55
  %.not106.1 = icmp eq i64 %119, -9223372036854775790
  br i1 %.not106.1, label %120, label %132

120:                                              ; preds = %114
  store i32 3, ptr %107, align 8, !tbaa !52
  %121 = load ptr, ptr %48, align 8, !tbaa !42
  %122 = getelementptr inbounds i8, ptr %121, i64 16
  store i16 2, ptr %122, align 1, !tbaa !53
  %123 = load ptr, ptr %108, align 8, !tbaa !54
  %124 = call i64 %123(ptr noundef nonnull %15, ptr noundef nonnull %8) #3
  %125 = load i64, ptr %8, align 8, !tbaa !55
  %.not106.2 = icmp eq i64 %125, -9223372036854775790
  br i1 %.not106.2, label %126, label %132

126:                                              ; preds = %120
  store i32 4, ptr %107, align 8, !tbaa !52
  %127 = load ptr, ptr %48, align 8, !tbaa !42
  %128 = getelementptr inbounds i8, ptr %127, i64 16
  store i16 3, ptr %128, align 1, !tbaa !53
  %129 = load ptr, ptr %108, align 8, !tbaa !54
  %130 = call i64 %129(ptr noundef nonnull %15, ptr noundef nonnull %8) #3
  %131 = load i64, ptr %8, align 8, !tbaa !55
  %.not106.3 = icmp eq i64 %131, -9223372036854775790
  br i1 %.not106.3, label %.thread110, label %132

132:                                              ; preds = %126, %120, %114, %106
  %.lcssa = phi i64 [ %112, %106 ], [ %118, %114 ], [ %124, %120 ], [ %130, %126 ]
  %133 = icmp slt i64 %.lcssa, 0
  br i1 %133, label %.thread110, label %134

134:                                              ; preds = %132
  %135 = getelementptr inbounds i8, ptr %8, i64 64
  %136 = load ptr, ptr %135, align 8, !tbaa !56
  %137 = getelementptr inbounds i8, ptr %8, i64 56
  %138 = load i32, ptr %137, align 8, !tbaa !57
  %139 = icmp ne i32 %138, 0
  %140 = icmp ne i16 %5, 0
  %or.cond137 = and i1 %139, %140
  br i1 %or.cond137, label %.preheader.us.preheader, label %._crit_edge123

.preheader.us.preheader:                          ; preds = %134
  %wide.trip.count = zext i16 %5 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %156
  %141 = phi i32 [ %161, %156 ], [ 0, %.preheader.us.preheader ]
  %.087122.us = phi ptr [ %160, %156 ], [ %136, %.preheader.us.preheader ]
  %.091121.us = phi i16 [ %157, %156 ], [ 0, %.preheader.us.preheader ]
  %142 = getelementptr inbounds i8, ptr %.087122.us, i64 28
  br label %143

143:                                              ; preds = %.preheader.us, %154
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %154 ]
  %144 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_SRVLIST, ptr %6, i64 %indvars.iv
  %145 = getelementptr inbounds i8, ptr %144, i64 2
  %146 = load i8, ptr %145, align 2, !tbaa !58
  %.not107.us = icmp eq i8 %146, 0
  br i1 %.not107.us, label %147, label %._crit_edge.us

147:                                              ; preds = %143
  %148 = load i16, ptr %144, align 4, !tbaa !60
  %149 = icmp eq i16 %148, %1
  br i1 %149, label %150, label %154

150:                                              ; preds = %147
  %151 = getelementptr inbounds i8, ptr %144, i64 4
  %152 = call i64 @CompareMem(ptr noundef nonnull %142, ptr noundef nonnull %151, i64 noundef 4) #3
  %153 = icmp eq i64 %152, 0
  br i1 %153, label %._crit_edge.us, label %154

154:                                              ; preds = %150, %147
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us.thread, label %143, !llvm.loop !61

._crit_edge.us.thread:                            ; preds = %154
  %.pre.pre144 = load i32, ptr %137, align 8, !tbaa !57
  br label %156

._crit_edge.us:                                   ; preds = %143, %150
  %155 = trunc nuw i64 %indvars.iv to i16
  %.not138 = icmp eq i16 %155, %5
  %.pre.pre = load i32, ptr %137, align 8, !tbaa !57
  br i1 %.not138, label %156, label %._crit_edge123

156:                                              ; preds = %._crit_edge.us.thread, %._crit_edge.us
  %.pre.pre145 = phi i32 [ %.pre.pre144, %._crit_edge.us.thread ], [ %.pre.pre, %._crit_edge.us ]
  %157 = add i16 %.091121.us, 1
  %158 = load i32, ptr %.087122.us, align 1, !tbaa !63
  %159 = zext i32 %158 to i64
  %160 = getelementptr inbounds i8, ptr %.087122.us, i64 %159
  %161 = zext i16 %157 to i32
  %162 = icmp ugt i32 %.pre.pre145, %161
  br i1 %162, label %.preheader.us, label %._crit_edge123, !llvm.loop !64

._crit_edge123:                                   ; preds = %156, %._crit_edge.us, %134
  %163 = phi i32 [ %138, %134 ], [ %.pre.pre, %._crit_edge.us ], [ %.pre.pre145, %156 ]
  %.087.lcssa = phi ptr [ %136, %134 ], [ %.087122.us, %._crit_edge.us ], [ %160, %156 ]
  %.lcssa113 = phi i32 [ 0, %134 ], [ %141, %._crit_edge.us ], [ %161, %156 ]
  %164 = icmp ugt i32 %163, %.lcssa113
  br i1 %164, label %165, label %178

165:                                              ; preds = %._crit_edge123
  %166 = load i8, ptr %24, align 1, !tbaa !31
  %.not108 = icmp eq i8 %166, 0
  br i1 %.not108, label %176, label %167

167:                                              ; preds = %165
  %168 = getelementptr inbounds i8, ptr %0, i64 14512
  call void @PxeBcCacheDhcp4Packet(ptr noundef nonnull %168, ptr noundef %.087.lcssa)
  %169 = getelementptr inbounds i8, ptr %13, i64 4468
  %170 = load ptr, ptr %48, align 8, !tbaa !42
  %171 = getelementptr inbounds i8, ptr %170, i64 8
  %172 = getelementptr inbounds i8, ptr %170, i64 4
  %173 = load i32, ptr %172, align 1, !tbaa !65
  %174 = zext i32 %173 to i64
  %175 = call ptr @CopyMem(ptr noundef nonnull %169, ptr noundef nonnull %171, i64 noundef %174) #3
  br label %178

176:                                              ; preds = %165
  %177 = getelementptr inbounds i8, ptr %0, i64 11184
  call void @PxeBcCacheDhcp4Packet(ptr noundef nonnull %177, ptr noundef %.087.lcssa)
  br label %178

178:                                              ; preds = %._crit_edge123, %167, %176
  %.3 = phi i64 [ %.lcssa, %167 ], [ %.lcssa, %176 ], [ -9223372036854775794, %._crit_edge123 ]
  %179 = load ptr, ptr %135, align 8, !tbaa !56
  %.not109 = icmp eq ptr %179, null
  br i1 %.not109, label %.thread110, label %180

180:                                              ; preds = %178
  call void @FreePool(ptr noundef nonnull %179) #3
  br label %.thread110

.thread110:                                       ; preds = %126, %178, %180, %132
  %.4 = phi i64 [ %.lcssa, %132 ], [ %.3, %180 ], [ %.3, %178 ], [ -9223372036854775790, %126 ]
  %181 = load ptr, ptr %48, align 8, !tbaa !42
  call void @FreePool(ptr noundef %181) #3
  br label %182

182:                                              ; preds = %56, %26, %.thread110
  %.0 = phi i64 [ %.4, %.thread110 ], [ -9223372036854775799, %26 ], [ %49, %56 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #3
  ret i64 %.0
}

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #1

declare void @FreePool(ptr noundef) local_unnamed_addr #1

declare i32 @NetRandomInitSeed() local_unnamed_addr #1

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #1

declare ptr @SetMem(ptr noundef, i64 noundef, i8 noundef zeroext) 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, !10, i64 352}
!6 = !{!"_PXEBC_PRIVATE_DATA", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !13, i64 248, !14, i64 360, !10, i64 376, !10, i64 384, !15, i64 392, !7, i64 10816, !7, i64 10820, !7, i64 10824, !12, i64 10832, !20, i64 10840, !22, i64 10876, !23, i64 10928, !24, i64 10956, !10, i64 11008, !10, i64 11016, !25, i64 11024, !25, i64 11048, !8, i64 11072, !8, i64 11073, !8, i64 11074, !8, i64 11075, !8, i64 11076, !8, i64 11092, !8, i64 11108, !8, i64 11124, !17, i64 11140, !7, i64 11144, !7, i64 11148, !7, i64 11152, !10, i64 11160, !12, i64 11168, !12, i64 11176, !8, i64 11184, !8, i64 12848, !8, i64 14512, !10, i64 16176, !26, i64 16184, !7, i64 16436, !7, i64 16440, !8, i64 16448, !7, i64 43072, !8, i64 43076, !8, i64 43108}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_PXEBC_PRIVATE_PROTOCOL", !12, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_EFI_PXE_BASE_CODE_PROTOCOL", !12, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104}
!14 = !{!"_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL", !12, i64 0, !10, i64 8}
!15 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !8, i64 9, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !8, i64 18, !8, i64 20, !8, i64 36, !8, i64 52, !8, i64 1524, !8, i64 2996, !8, i64 4468, !8, i64 5940, !8, i64 7412, !16, i64 8884, !7, i64 9016, !8, i64 9020, !7, i64 9404, !8, i64 9408, !18, i64 9792, !19, i64 10296}
!16 = !{!"", !8, i64 0, !8, i64 1, !17, i64 2, !8, i64 4}
!17 = !{!"short", !8, i64 0}
!18 = !{!"", !8, i64 0, !8, i64 1, !17, i64 2, !8, i64 4, !8, i64 8}
!19 = !{!"", !8, i64 0, !8, i64 1}
!20 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !7, i64 8, !7, i64 12, !8, i64 16, !21, i64 17, !21, i64 21, !17, i64 26, !21, i64 28, !17, i64 32}
!21 = !{!"", !8, i64 0}
!22 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !7, i64 8, !7, i64 12, !21, i64 16, !17, i64 32, !21, i64 34, !17, i64 50}
!23 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !21, i64 6, !21, i64 10, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !7, i64 20, !7, i64 24}
!24 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !21, i64 4, !21, i64 20, !8, i64 36, !8, i64 37, !7, i64 40, !7, i64 44, !7, i64 48}
!25 = !{!"", !10, i64 0, !12, i64 8, !8, i64 16}
!26 = !{!"", !7, i64 0, !7, i64 4, !27, i64 8}
!27 = !{!"", !28, i64 0, !7, i64 236, !8, i64 240}
!28 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !7, i64 4, !17, i64 8, !17, i64 10, !21, i64 12, !21, i64 16, !21, i64 20, !21, i64 24, !8, i64 28, !8, i64 44, !8, i64 108}
!29 = !{!6, !10, i64 120}
!30 = !{!17, !17, i64 0}
!31 = !{!6, !8, i64 11075}
!32 = !{!10, !10, i64 0}
!33 = !{!8, !8, i64 0}
!34 = !{!35, !17, i64 0}
!35 = !{!"", !17, i64 0, !17, i64 2}
!36 = !{!37, !8, i64 1}
!37 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2}
!38 = !{!35, !17, i64 2}
!39 = !{!40, !10, i64 48}
!40 = !{!"_EFI_DHCP4_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!41 = !{!15, !8, i64 7}
!42 = !{!43, !10, i64 48}
!43 = !{!"", !12, i64 0, !10, i64 8, !21, i64 16, !17, i64 20, !21, i64 22, !7, i64 28, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64}
!44 = !{!26, !8, i64 10}
!45 = !{!26, !7, i64 12}
!46 = !{!26, !17, i64 18}
!47 = !{!43, !17, i64 20}
!48 = !{!43, !7, i64 28}
!49 = !{!43, !10, i64 32}
!50 = !{!51, !17, i64 8}
!51 = !{!"", !21, i64 0, !21, i64 4, !17, i64 8}
!52 = !{!43, !7, i64 40}
!53 = !{!26, !17, i64 16}
!54 = !{!40, !10, i64 56}
!55 = !{!43, !12, i64 0}
!56 = !{!43, !10, i64 64}
!57 = !{!43, !7, i64 56}
!58 = !{!59, !8, i64 2}
!59 = !{!"", !17, i64 0, !8, i64 2, !8, i64 3, !8, i64 4}
!60 = !{!59, !17, i64 0}
!61 = distinct !{!61, !62}
!62 = !{!"llvm.loop.mustprogress"}
!63 = !{!26, !7, i64 0}
!64 = distinct !{!64, !62}
!65 = !{!26, !7, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass