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

; 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_IPv4_ADDRESS = type { [4 x i8] }
%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] }

@.str = external hidden unnamed_addr constant [138 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@mZeroIp4Addr = external global %struct.EFI_IPv4_ADDRESS, align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [50 x i8], align 1

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

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

declare zeroext i8 @DebugAssertEnabled() #1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeBcRetryBinlOffer(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeBcHandleDhcp4Offer(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  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
  br label %13

13:                                               ; preds = %1
  %14 = call zeroext i8 @DebugAssertEnabled()
  %15 = icmp ne i8 %14, 0
  br i1 %15, label %16, label %23

16:                                               ; preds = %13
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %17, i32 0, i32 68
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = icmp ugt i32 %19, 0
  br i1 %20, label %22, label %21

21:                                               ; preds = %16
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1003, ptr noundef @.str.11)
  br label %22

22:                                               ; preds = %21, %16
  br label %23

23:                                               ; preds = %22, %13
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %26, i32 0, i32 68
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = sub i32 %28, 1
  store i32 %29, ptr %9, align 4, !tbaa !30
  br label %30

30:                                               ; preds = %25
  %31 = call zeroext i8 @DebugAssertEnabled()
  %32 = icmp ne i8 %31, 0
  br i1 %32, label %33, label %38

33:                                               ; preds = %30
  %34 = load i32, ptr %9, align 4, !tbaa !30
  %35 = icmp ult i32 %34, 16
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1005, ptr noundef @.str.12)
  br label %37

37:                                               ; preds = %36, %33
  br label %38

38:                                               ; preds = %37, %30
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %41, i32 0, i32 70
  %43 = load i32, ptr %9, align 4, !tbaa !30
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds [16 x %union.PXEBC_DHCP_PACKET_CACHE], ptr %42, i64 0, i64 %44
  store ptr %45, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %46, i32 0, i32 2
  %48 = getelementptr inbounds [7 x ptr], ptr %47, i64 0, i64 0
  store ptr %48, ptr %4, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !31
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 8, !tbaa !32
  %52 = icmp eq i32 %51, 3
  br i1 %52, label %53, label %60

53:                                               ; preds = %40
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = load i32, ptr %9, align 4, !tbaa !30
  %56 = call i64 @PxeBcRetryBinlOffer(ptr noundef %54, i32 noundef %55)
  %57 = icmp slt i64 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %53
  store i64 -9223372036854775792, ptr %10, align 8, !tbaa !31
  br label %59

59:                                               ; preds = %58, %53
  br label %258

60:                                               ; preds = %40
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !32
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %257

65:                                               ; preds = %60
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %66, i32 0, i32 50
  %68 = load i8, ptr %67, align 2, !tbaa !35
  %69 = icmp ne i8 %68, 0
  br i1 %69, label %70, label %249

70:                                               ; preds = %65
  store i32 0, ptr %8, align 4, !tbaa !30
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %71, i32 0, i32 49
  %73 = load i8, ptr %72, align 1, !tbaa !36
  %74 = icmp ne i8 %73, 0
  br i1 %74, label %75, label %179

75:                                               ; preds = %70
  br label %76

76:                                               ; preds = %75
  %77 = call zeroext i8 @DebugAssertEnabled()
  %78 = icmp ne i8 %77, 0
  br i1 %78, label %79, label %86

79:                                               ; preds = %76
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %80, i32 0, i32 69
  %82 = load i32, ptr %81, align 8, !tbaa !37
  %83 = icmp ult i32 %82, 8
  br i1 %83, label %85, label %84

84:                                               ; preds = %79
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1029, ptr noundef @.str.13)
  br label %85

85:                                               ; preds = %84, %79
  br label %86

86:                                               ; preds = %85, %76
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  %90 = call zeroext i8 @DebugAssertEnabled()
  %91 = icmp ne i8 %90, 0
  br i1 %91, label %92, label %104

92:                                               ; preds = %89
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %93, i32 0, i32 72
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %95, i32 0, i32 69
  %97 = load i32, ptr %96, align 8, !tbaa !37
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds [8 x i32], ptr %94, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !30
  %101 = icmp ugt i32 %100, 0
  br i1 %101, label %103, label %102

102:                                              ; preds = %92
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1030, ptr noundef @.str.14)
  br label %103

103:                                              ; preds = %102, %92
  br label %104

104:                                              ; preds = %103, %89
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %107, i32 0, i32 69
  %109 = load i32, ptr %108, align 8, !tbaa !37
  %110 = icmp eq i32 %109, 6
  br i1 %110, label %111, label %168

111:                                              ; preds = %106
  store i32 0, ptr %5, align 4, !tbaa !30
  br label %112

112:                                              ; preds = %152, %111
  %113 = load i32, ptr %5, align 4, !tbaa !30
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %114, i32 0, i32 72
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %116, i32 0, i32 69
  %118 = load i32, ptr %117, align 8, !tbaa !37
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [8 x i32], ptr %115, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !30
  %122 = icmp ult i32 %113, %121
  br i1 %122, label %123, label %155

123:                                              ; preds = %112
  br label %124

124:                                              ; preds = %123
  %125 = call zeroext i8 @DebugAssertEnabled()
  %126 = icmp ne i8 %125, 0
  br i1 %126, label %127, label %132

127:                                              ; preds = %124
  %128 = load i32, ptr %5, align 4, !tbaa !30
  %129 = icmp ult i32 %128, 16
  br i1 %129, label %131, label %130

130:                                              ; preds = %127
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1037, ptr noundef @.str.6)
  br label %131

131:                                              ; preds = %130, %127
  br label %132

132:                                              ; preds = %131, %124
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %135, i32 0, i32 73
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %137, i32 0, i32 69
  %139 = load i32, ptr %138, align 8, !tbaa !37
  %140 = zext i32 %139 to i64
  %141 = getelementptr inbounds [8 x [16 x i32]], ptr %136, i64 0, i64 %140
  %142 = load i32, ptr %5, align 4, !tbaa !30
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds [16 x i32], ptr %141, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !30
  store i32 %145, ptr %8, align 4, !tbaa !30
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = load i32, ptr %8, align 4, !tbaa !30
  %148 = call i64 @PxeBcRetryBinlOffer(ptr noundef %146, i32 noundef %147)
  %149 = icmp slt i64 %148, 0
  br i1 %149, label %151, label %150

150:                                              ; preds = %134
  br label %155

151:                                              ; preds = %134
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %5, align 4, !tbaa !30
  %154 = add i32 %153, 1
  store i32 %154, ptr %5, align 4, !tbaa !30
  br label %112, !llvm.loop !38

155:                                              ; preds = %150, %112
  %156 = load i32, ptr %5, align 4, !tbaa !30
  %157 = load ptr, ptr %2, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %157, i32 0, i32 72
  %159 = load ptr, ptr %2, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %159, i32 0, i32 69
  %161 = load i32, ptr %160, align 8, !tbaa !37
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds [8 x i32], ptr %158, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !30
  %165 = icmp eq i32 %156, %164
  br i1 %165, label %166, label %167

166:                                              ; preds = %155
  store i64 -9223372036854775792, ptr %10, align 8, !tbaa !31
  br label %167

167:                                              ; preds = %166, %155
  br label %178

168:                                              ; preds = %106
  %169 = load ptr, ptr %2, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %169, i32 0, i32 73
  %171 = load ptr, ptr %2, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %171, i32 0, i32 69
  %173 = load i32, ptr %172, align 8, !tbaa !37
  %174 = zext i32 %173 to i64
  %175 = getelementptr inbounds [8 x [16 x i32]], ptr %170, i64 0, i64 %174
  %176 = getelementptr inbounds [16 x i32], ptr %175, i64 0, i64 0
  %177 = load i32, ptr %176, align 4, !tbaa !30
  store i32 %177, ptr %8, align 4, !tbaa !30
  br label %178

178:                                              ; preds = %168, %167
  br label %237

179:                                              ; preds = %70
  store i64 -9223372036854775792, ptr %10, align 8, !tbaa !31
  store i32 0, ptr %5, align 4, !tbaa !30
  br label %180

180:                                              ; preds = %233, %179
  %181 = load i32, ptr %5, align 4, !tbaa !30
  %182 = load ptr, ptr %2, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %182, i32 0, i32 71
  %184 = load i32, ptr %183, align 8, !tbaa !40
  %185 = icmp ult i32 %181, %184
  br i1 %185, label %186, label %236

186:                                              ; preds = %180
  br label %187

187:                                              ; preds = %186
  %188 = call zeroext i8 @DebugAssertEnabled()
  %189 = icmp ne i8 %188, 0
  br i1 %189, label %190, label %195

190:                                              ; preds = %187
  %191 = load i32, ptr %5, align 4, !tbaa !30
  %192 = icmp ult i32 %191, 16
  br i1 %192, label %194, label %193

193:                                              ; preds = %190
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1059, ptr noundef @.str.6)
  br label %194

194:                                              ; preds = %193, %190
  br label %195

195:                                              ; preds = %194, %187
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %2, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %198, i32 0, i32 70
  %200 = load i32, ptr %5, align 4, !tbaa !30
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds [16 x %union.PXEBC_DHCP_PACKET_CACHE], ptr %199, i64 0, i64 %201
  %203 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %202, i32 0, i32 0
  store ptr %203, ptr %6, align 8, !tbaa !5
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %204, i32 0, i32 70
  %206 = load i32, ptr %5, align 4, !tbaa !30
  %207 = zext i32 %206 to i64
  %208 = getelementptr inbounds [16 x %union.PXEBC_DHCP_PACKET_CACHE], ptr %205, i64 0, i64 %207
  %209 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %208, i32 0, i32 1
  %210 = load i32, ptr %209, align 8, !tbaa !41
  store i32 %210, ptr %7, align 4, !tbaa !30
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %211, i32 0, i32 2
  %213 = getelementptr inbounds %struct.anon.2, ptr %212, i32 0, i32 0
  %214 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %213, i32 0, i32 8
  %215 = call i64 @CompareMem(ptr noundef %214, ptr noundef @mZeroIp4Addr, i64 noundef 4)
  %216 = icmp eq i64 %215, 0
  br i1 %216, label %218, label %217

217:                                              ; preds = %197
  br label %233

218:                                              ; preds = %197
  %219 = load i32, ptr %7, align 4, !tbaa !30
  %220 = icmp eq i32 %219, 6
  br i1 %220, label %221, label %228

221:                                              ; preds = %218
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = load i32, ptr %5, align 4, !tbaa !30
  %224 = call i64 @PxeBcRetryBinlOffer(ptr noundef %222, i32 noundef %223)
  %225 = icmp slt i64 %224, 0
  br i1 %225, label %226, label %227

226:                                              ; preds = %221
  br label %233

227:                                              ; preds = %221
  br label %228

228:                                              ; preds = %227, %218
  %229 = load i32, ptr %7, align 4, !tbaa !30
  %230 = load ptr, ptr %2, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %230, i32 0, i32 69
  store i32 %229, ptr %231, align 8, !tbaa !37
  %232 = load i32, ptr %5, align 4, !tbaa !30
  store i32 %232, ptr %8, align 4, !tbaa !30
  store i64 0, ptr %10, align 8, !tbaa !31
  br label %236

233:                                              ; preds = %226, %217
  %234 = load i32, ptr %5, align 4, !tbaa !30
  %235 = add i32 %234, 1
  store i32 %235, ptr %5, align 4, !tbaa !30
  br label %180, !llvm.loop !42

236:                                              ; preds = %228, %180
  br label %237

237:                                              ; preds = %236, %178
  %238 = load i64, ptr %10, align 8, !tbaa !31
  %239 = icmp slt i64 %238, 0
  br i1 %239, label %248, label %240

240:                                              ; preds = %237
  %241 = load ptr, ptr %2, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %241, i32 0, i32 69
  %243 = load i32, ptr %242, align 8, !tbaa !37
  %244 = icmp ne i32 %243, 6
  br i1 %244, label %245, label %248

245:                                              ; preds = %240
  %246 = load ptr, ptr %2, align 8, !tbaa !5
  %247 = load i32, ptr %8, align 4, !tbaa !30
  call void @PxeBcCopyProxyOffer(ptr noundef %246, i32 noundef %247)
  br label %248

248:                                              ; preds = %245, %240, %237
  br label %256

249:                                              ; preds = %65
  %250 = load ptr, ptr %4, align 8, !tbaa !5
  %251 = getelementptr inbounds ptr, ptr %250, i64 6
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  %253 = icmp eq ptr %252, null
  br i1 %253, label %254, label %255

254:                                              ; preds = %249
  store i64 -9223372036854775794, ptr %10, align 8, !tbaa !31
  br label %255

255:                                              ; preds = %254, %249
  br label %256

256:                                              ; preds = %255, %248
  br label %257

257:                                              ; preds = %256, %60
  br label %258

258:                                              ; preds = %257, %59
  %259 = load i64, ptr %10, align 8, !tbaa !31
  %260 = icmp slt i64 %259, 0
  br i1 %260, label %282, label %261

261:                                              ; preds = %258
  %262 = load ptr, ptr %2, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %262, i32 0, i32 31
  %264 = getelementptr inbounds %struct._EFI_PXE_BASE_CODE_PROTOCOL, ptr %263, i32 0, i32 13
  %265 = load ptr, ptr %264, align 8, !tbaa !43
  store ptr %265, ptr %11, align 8, !tbaa !5
  %266 = load ptr, ptr %3, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %266, i32 0, i32 0
  store ptr %267, ptr %6, align 8, !tbaa !5
  %268 = load ptr, ptr %2, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %268, i32 0, i32 64
  %270 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %269, i32 0, i32 0
  store ptr %270, ptr %12, align 8, !tbaa !5
  %271 = load ptr, ptr %3, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %271, i32 0, i32 1
  %273 = load i32, ptr %272, align 8, !tbaa !32
  %274 = icmp eq i32 %273, 7
  br i1 %274, label %275, label %277

275:                                              ; preds = %261
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %276, ptr %12, align 8, !tbaa !5
  br label %277

277:                                              ; preds = %275, %261
  %278 = load ptr, ptr %2, align 8, !tbaa !5
  %279 = load ptr, ptr %12, align 8, !tbaa !5
  call void @PxeBcCopyDhcp4Ack(ptr noundef %278, ptr noundef %279, i8 noundef zeroext 1)
  %280 = load ptr, ptr %11, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %280, i32 0, i32 8
  store i8 1, ptr %281, align 4, !tbaa !44
  br label %282

282:                                              ; preds = %277, %258
  %283 = load i64, ptr %10, align 8, !tbaa !31
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret i64 %283
}

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, !11, i64 16436}
!10 = !{!"_PXEBC_PRIVATE_DATA", !11, i64 0, !6, i64 8, !6, i64 16, !12, 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, !14, i64 248, !15, i64 360, !6, i64 376, !6, i64 384, !16, i64 392, !11, i64 10816, !11, i64 10820, !11, i64 10824, !13, i64 10832, !21, i64 10840, !23, i64 10876, !24, i64 10928, !25, i64 10956, !6, i64 11008, !6, i64 11016, !26, i64 11024, !26, 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, !18, i64 11140, !11, i64 11144, !11, i64 11148, !11, i64 11152, !6, i64 11160, !13, i64 11168, !13, i64 11176, !7, i64 11184, !7, i64 12848, !7, i64 14512, !6, i64 16176, !27, i64 16184, !11, i64 16436, !11, i64 16440, !7, i64 16448, !11, i64 43072, !7, i64 43076, !7, i64 43108}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_PXEBC_PRIVATE_PROTOCOL", !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_EFI_PXE_BASE_CODE_PROTOCOL", !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, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104}
!15 = !{!"_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL", !13, i64 0, !6, i64 8}
!16 = !{!"", !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, !17, i64 8884, !11, i64 9016, !7, i64 9020, !11, i64 9404, !7, i64 9408, !19, i64 9792, !20, i64 10296}
!17 = !{!"", !7, i64 0, !7, i64 1, !18, i64 2, !7, i64 4}
!18 = !{!"short", !7, i64 0}
!19 = !{!"", !7, i64 0, !7, i64 1, !18, i64 2, !7, i64 4, !7, i64 8}
!20 = !{!"", !7, i64 0, !7, i64 1}
!21 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !11, i64 8, !11, i64 12, !7, i64 16, !22, i64 17, !22, i64 21, !18, i64 26, !22, i64 28, !18, i64 32}
!22 = !{!"", !7, i64 0}
!23 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !11, i64 8, !11, i64 12, !22, i64 16, !18, i64 32, !22, i64 34, !18, i64 50}
!24 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !22, i64 6, !22, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !11, i64 20, !11, i64 24}
!25 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !22, i64 4, !22, i64 20, !7, i64 36, !7, i64 37, !11, i64 40, !11, i64 44, !11, i64 48}
!26 = !{!"", !6, i64 0, !13, i64 8, !7, i64 16}
!27 = !{!"", !11, i64 0, !11, i64 4, !28, i64 8}
!28 = !{!"", !29, i64 0, !11, i64 236, !7, i64 240}
!29 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !11, i64 4, !18, i64 8, !18, i64 10, !22, i64 12, !22, i64 16, !22, i64 20, !22, i64 24, !7, i64 28, !7, i64 44, !7, i64 108}
!30 = !{!11, !11, i64 0}
!31 = !{!13, !13, i64 0}
!32 = !{!33, !11, i64 1472}
!33 = !{!"", !7, i64 0, !11, i64 1472, !7, i64 1480, !34, i64 1536}
!34 = !{!"", !7, i64 0, !22, i64 32, !18, i64 36, !18, i64 38, !7, i64 40, !7, i64 41, !7, i64 42, !22, i64 43, !22, i64 47, !18, i64 52, !18, i64 54, !18, i64 56, !18, 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 = !{!10, !7, i64 11074}
!36 = !{!10, !7, i64 11073}
!37 = !{!10, !11, i64 16440}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!10, !11, i64 43072}
!41 = !{!7, !7, i64 0}
!42 = distinct !{!42, !39}
!43 = !{!10, !6, i64 352}
!44 = !{!16, !7, i64 8}


; 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_IPv4_ADDRESS = type { [4 x i8] }
%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 }

@.str = external hidden unnamed_addr constant [138 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@mZeroIp4Addr = external global %struct.EFI_IPv4_ADDRESS, align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [50 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @PxeBcCopyDhcp4Ack(ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @PxeBcCopyProxyOffer(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeBcRetryBinlOffer(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775794, 1) i64 @PxeBcHandleDhcp4Offer(ptr noundef %0) local_unnamed_addr #1 {
  %2 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %2, 0
  br i1 %.not, label %7, label %3

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 16436
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not72 = icmp eq i32 %5, 0
  br i1 %.not72, label %6, label %7

6:                                                ; preds = %3
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1003, ptr noundef nonnull @.str.11) #2
  br label %7

7:                                                ; preds = %3, %6, %1
  %8 = getelementptr inbounds i8, ptr %0, i64 16436
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = add i32 %9, -1
  %11 = tail call zeroext i8 @DebugAssertEnabled() #2
  %12 = icmp eq i8 %11, 0
  %13 = icmp ult i32 %10, 16
  %or.cond = select i1 %12, i1 true, i1 %13
  br i1 %or.cond, label %15, label %14

14:                                               ; preds = %7
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1005, ptr noundef nonnull @.str.12) #2
  br label %15

15:                                               ; preds = %14, %7
  %16 = getelementptr inbounds i8, ptr %0, i64 16448
  %17 = zext i32 %10 to i64
  %18 = getelementptr inbounds [16 x %union.PXEBC_DHCP_PACKET_CACHE], ptr %16, i64 0, i64 %17
  %19 = getelementptr inbounds i8, ptr %18, i64 1472
  %20 = load i32, ptr %19, align 8, !tbaa !29
  switch i32 %20, label %.thread91 [
    i32 3, label %21
    i32 0, label %24
  ]

21:                                               ; preds = %15
  %22 = tail call i64 @PxeBcRetryBinlOffer(ptr noundef nonnull %0, i32 noundef %10)
  %23 = icmp slt i64 %22, 0
  br i1 %23, label %.thread96, label %.thread91

24:                                               ; preds = %15
  %25 = getelementptr inbounds i8, ptr %0, i64 11074
  %26 = load i8, ptr %25, align 2, !tbaa !32
  %.not73 = icmp eq i8 %26, 0
  br i1 %.not73, label %105, label %27

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %0, i64 11073
  %29 = load i8, ptr %28, align 1, !tbaa !33
  %.not74 = icmp eq i8 %29, 0
  br i1 %.not74, label %.preheader, label %32

.preheader:                                       ; preds = %27
  %30 = getelementptr inbounds i8, ptr %0, i64 43072
  %31 = load i32, ptr %30, align 8, !tbaa !34
  %.not111 = icmp eq i32 %31, 0
  br i1 %.not111, label %.thread96, label %.lr.ph109

32:                                               ; preds = %27
  %33 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not75 = icmp eq i8 %33, 0
  br i1 %.not75, label %39, label %34

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %0, i64 16440
  %36 = load i32, ptr %35, align 8, !tbaa !35
  %37 = icmp ult i32 %36, 8
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1029, ptr noundef nonnull @.str.13) #2
  br label %39

39:                                               ; preds = %32, %38, %34
  %40 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not76 = icmp eq i8 %40, 0
  br i1 %.not76, label %49, label %41

41:                                               ; preds = %39
  %42 = getelementptr inbounds i8, ptr %0, i64 43076
  %43 = getelementptr inbounds i8, ptr %0, i64 16440
  %44 = load i32, ptr %43, align 8, !tbaa !35
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds [8 x i32], ptr %42, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !36
  %.not77 = icmp eq i32 %47, 0
  br i1 %.not77, label %48, label %49

48:                                               ; preds = %41
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1030, ptr noundef nonnull @.str.14) #2
  br label %49

49:                                               ; preds = %41, %48, %39
  %50 = getelementptr inbounds i8, ptr %0, i64 16440
  %51 = load i32, ptr %50, align 8, !tbaa !35
  %52 = icmp eq i32 %51, 6
  br i1 %52, label %.preheader98, label %.thread.thread

.preheader98:                                     ; preds = %49
  %53 = getelementptr inbounds i8, ptr %0, i64 43076
  %54 = getelementptr inbounds i8, ptr %0, i64 43100
  %55 = load i32, ptr %54, align 4, !tbaa !36
  %.not110 = icmp eq i32 %55, 0
  br i1 %.not110, label %.thread96, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader98
  %56 = getelementptr inbounds i8, ptr %0, i64 43108
  br label %57

57:                                               ; preds = %.lr.ph, %69
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %69 ]
  %58 = tail call zeroext i8 @DebugAssertEnabled() #2
  %59 = icmp eq i8 %58, 0
  %60 = icmp ult i64 %indvars.iv, 16
  %or.cond3 = or i1 %60, %59
  br i1 %or.cond3, label %62, label %61

61:                                               ; preds = %57
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1037, ptr noundef nonnull @.str.6) #2
  br label %62

62:                                               ; preds = %61, %57
  %63 = load i32, ptr %50, align 8, !tbaa !35
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds [8 x [16 x i32]], ptr %56, i64 0, i64 %64, i64 %indvars.iv
  %66 = load i32, ptr %65, align 4, !tbaa !36
  %67 = tail call i64 @PxeBcRetryBinlOffer(ptr noundef nonnull %0, i32 noundef %66)
  %68 = icmp slt i64 %67, 0
  %.pre.pre = load i32, ptr %50, align 8, !tbaa !35
  br i1 %68, label %69, label %.._crit_edge.loopexit_crit_edge

.._crit_edge.loopexit_crit_edge:                  ; preds = %62
  %.phi.trans.insert.phi.trans.insert = zext i32 %.pre.pre to i64
  %.phi.trans.insert120.phi.trans.insert = getelementptr inbounds [8 x i32], ptr %53, i64 0, i64 %.phi.trans.insert.phi.trans.insert
  %.pre121.pre = load i32, ptr %.phi.trans.insert120.phi.trans.insert, align 4, !tbaa !36
  br label %._crit_edge

69:                                               ; preds = %62
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = zext i32 %.pre.pre to i64
  %71 = getelementptr inbounds [8 x i32], ptr %53, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !36
  %73 = zext i32 %72 to i64
  %74 = icmp ult i64 %indvars.iv.next, %73
  br i1 %74, label %57, label %._crit_edge, !llvm.loop !37

.thread.thread:                                   ; preds = %49
  %75 = getelementptr inbounds i8, ptr %0, i64 43108
  %76 = zext i32 %51 to i64
  %77 = getelementptr inbounds [8 x [16 x i32]], ptr %75, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !36
  br label %104

.lr.ph109:                                        ; preds = %.preheader, %98
  %indvars.iv116 = phi i64 [ %indvars.iv.next117, %98 ], [ 0, %.preheader ]
  %79 = tail call zeroext i8 @DebugAssertEnabled() #2
  %80 = icmp eq i8 %79, 0
  %81 = icmp ult i64 %indvars.iv116, 16
  %or.cond5 = or i1 %81, %80
  br i1 %or.cond5, label %83, label %82

82:                                               ; preds = %.lr.ph109
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1059, ptr noundef nonnull @.str.6) #2
  br label %83

83:                                               ; preds = %82, %.lr.ph109
  %84 = getelementptr inbounds [16 x %union.PXEBC_DHCP_PACKET_CACHE], ptr %16, i64 0, i64 %indvars.iv116
  %85 = getelementptr inbounds i8, ptr %84, i64 1472
  %86 = load i32, ptr %85, align 8, !tbaa !39
  %87 = getelementptr inbounds i8, ptr %84, i64 24
  %88 = tail call i64 @CompareMem(ptr noundef nonnull %87, ptr noundef nonnull @mZeroIp4Addr, i64 noundef 4) #2
  %89 = icmp eq i64 %88, 0
  br i1 %89, label %90, label %98

90:                                               ; preds = %83
  %91 = icmp eq i32 %86, 6
  %92 = trunc nuw i64 %indvars.iv116 to i32
  br i1 %91, label %93, label %96

93:                                               ; preds = %90
  %94 = tail call i64 @PxeBcRetryBinlOffer(ptr noundef nonnull %0, i32 noundef %92)
  %95 = icmp slt i64 %94, 0
  br i1 %95, label %98, label %96

96:                                               ; preds = %93, %90
  %97 = getelementptr inbounds i8, ptr %0, i64 16440
  store i32 %86, ptr %97, align 8, !tbaa !35
  br label %.thread

98:                                               ; preds = %93, %83
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %99 = load i32, ptr %30, align 8, !tbaa !34
  %100 = zext i32 %99 to i64
  %101 = icmp ult i64 %indvars.iv.next117, %100
  br i1 %101, label %.lr.ph109, label %.thread96, !llvm.loop !40

._crit_edge:                                      ; preds = %69, %.._crit_edge.loopexit_crit_edge
  %.pre121 = phi i32 [ %.pre121.pre, %.._crit_edge.loopexit_crit_edge ], [ %72, %69 ]
  %.065.lcssa.ph.in = phi i64 [ %indvars.iv, %.._crit_edge.loopexit_crit_edge ], [ %indvars.iv.next, %69 ]
  %.065.lcssa.ph = trunc i64 %.065.lcssa.ph.in to i32
  %102 = icmp eq i32 %.pre121, %.065.lcssa.ph
  br i1 %102, label %.thread96, label %.thread

.thread:                                          ; preds = %96, %._crit_edge
  %103 = phi i32 [ %.pre.pre, %._crit_edge ], [ %86, %96 ]
  %.285 = phi i32 [ %66, %._crit_edge ], [ %92, %96 ]
  %.not78 = icmp eq i32 %103, 6
  br i1 %.not78, label %.thread91, label %104

104:                                              ; preds = %.thread.thread, %.thread
  %.285127 = phi i32 [ %78, %.thread.thread ], [ %.285, %.thread ]
  tail call void @PxeBcCopyProxyOffer(ptr noundef nonnull %0, i32 noundef %.285127)
  br label %.thread91

105:                                              ; preds = %24
  %106 = getelementptr inbounds i8, ptr %18, i64 1528
  %107 = load ptr, ptr %106, align 8, !tbaa !41
  %108 = icmp eq ptr %107, null
  br i1 %108, label %.thread96, label %.thread91

.thread91:                                        ; preds = %105, %15, %21, %.thread, %104
  %109 = getelementptr inbounds i8, ptr %0, i64 352
  %110 = load ptr, ptr %109, align 8, !tbaa !42
  %111 = getelementptr inbounds i8, ptr %0, i64 12848
  %112 = load i32, ptr %19, align 8, !tbaa !29
  %113 = icmp eq i32 %112, 7
  %spec.select82 = select i1 %113, ptr %18, ptr %111
  tail call void @PxeBcCopyDhcp4Ack(ptr noundef nonnull %0, ptr noundef nonnull %spec.select82, i8 noundef zeroext 1)
  %114 = getelementptr inbounds i8, ptr %110, i64 8
  store i8 1, ptr %114, align 4, !tbaa !43
  br label %.thread96

.thread96:                                        ; preds = %98, %.preheader98, %.preheader, %._crit_edge, %105, %21, %.thread91
  %.16794 = phi i64 [ 0, %.thread91 ], [ -9223372036854775792, %21 ], [ -9223372036854775794, %105 ], [ -9223372036854775792, %._crit_edge ], [ -9223372036854775792, %.preheader ], [ -9223372036854775792, %.preheader98 ], [ -9223372036854775792, %98 ]
  ret i64 %.16794
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 16436}
!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 = !{!30, !7, i64 1472}
!30 = !{!"", !8, i64 0, !7, i64 1472, !8, i64 1480, !31, i64 1536}
!31 = !{!"", !8, i64 0, !21, i64 32, !17, i64 36, !17, i64 38, !8, i64 40, !8, i64 41, !8, i64 42, !21, i64 43, !21, i64 47, !17, i64 52, !17, i64 54, !17, i64 56, !17, i64 58, !10, i64 64, !8, i64 72, !10, i64 80, !8, i64 88, !10, i64 96, !8, i64 104, !10, i64 112, !8, i64 120}
!32 = !{!6, !8, i64 11074}
!33 = !{!6, !8, i64 11073}
!34 = !{!6, !7, i64 43072}
!35 = !{!6, !7, i64 16440}
!36 = !{!7, !7, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!8, !8, i64 0}
!40 = distinct !{!40, !38}
!41 = !{!10, !10, i64 0}
!42 = !{!6, !10, i64 352}
!43 = !{!15, !8, i64 8}


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