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

; 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.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@mZeroIp4Addr = external global %struct.EFI_IPv4_ADDRESS, 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @PxeBcCacheDhcp4Offer(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  br label %9

9:                                                ; preds = %2
  %10 = call zeroext i8 @DebugAssertEnabled()
  %11 = icmp ne i8 %10, 0
  br i1 %11, label %12, label %19

12:                                               ; preds = %9
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %13, i32 0, i32 71
  %15 = load i32, ptr %14, align 8, !tbaa !9
  %16 = icmp ult i32 %15, 16
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  call void @DebugAssert(ptr noundef @.str, i64 noundef 791, ptr noundef @.str.8)
  br label %18

18:                                               ; preds = %17, %12
  br label %19

19:                                               ; preds = %18, %9
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %22, i32 0, i32 70
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %24, i32 0, i32 71
  %26 = load i32, ptr %25, align 8, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds [16 x %union.PXEBC_DHCP_PACKET_CACHE], ptr %23, i64 0, i64 %27
  store ptr %28, ptr %5, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %29, i32 0, i32 0
  store ptr %30, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PxeBcCacheDhcp4Packet(ptr noundef %31, ptr noundef %32)
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call i64 @PxeBcParseDhcp4Packet(ptr noundef %33)
  %35 = icmp slt i64 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %21
  store i32 1, ptr %8, align 4
  br label %187

37:                                               ; preds = %21
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.PXEBC_DHCP4_PACKET_CACHE, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !30
  store i32 %40, ptr %7, align 4, !tbaa !33
  br label %41

41:                                               ; preds = %37
  %42 = call zeroext i8 @DebugAssertEnabled()
  %43 = icmp ne i8 %42, 0
  br i1 %43, label %44, label %49

44:                                               ; preds = %41
  %45 = load i32, ptr %7, align 4, !tbaa !33
  %46 = icmp ult i32 %45, 8
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @DebugAssert(ptr noundef @.str, i64 noundef 811, ptr noundef @.str.9)
  br label %48

48:                                               ; preds = %47, %44
  br label %49

49:                                               ; preds = %48, %41
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  %52 = load i32, ptr %7, align 4, !tbaa !33
  %53 = icmp eq i32 %52, 7
  br i1 %53, label %54, label %79

54:                                               ; preds = %51
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %55, i32 0, i32 72
  %57 = load i32, ptr %7, align 4, !tbaa !33
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds [8 x i32], ptr %56, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !33
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %77

62:                                               ; preds = %54
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %63, i32 0, i32 71
  %65 = load i32, ptr %64, align 8, !tbaa !9
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %66, i32 0, i32 73
  %68 = load i32, ptr %7, align 4, !tbaa !33
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds [8 x [16 x i32]], ptr %67, i64 0, i64 %69
  %71 = getelementptr inbounds [16 x i32], ptr %70, i64 0, i64 0
  store i32 %65, ptr %71, align 4, !tbaa !33
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %72, i32 0, i32 72
  %74 = load i32, ptr %7, align 4, !tbaa !33
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds [8 x i32], ptr %73, i64 0, i64 %75
  store i32 1, ptr %76, align 4, !tbaa !33
  br label %78

77:                                               ; preds = %54
  store i32 1, ptr %8, align 4
  br label %187

78:                                               ; preds = %62
  br label %182

79:                                               ; preds = %51
  br label %80

80:                                               ; preds = %79
  %81 = call zeroext i8 @DebugAssertEnabled()
  %82 = icmp ne i8 %81, 0
  br i1 %82, label %83, label %93

83:                                               ; preds = %80
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %84, i32 0, i32 72
  %86 = load i32, ptr %7, align 4, !tbaa !33
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds [8 x i32], ptr %85, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !33
  %90 = icmp ult i32 %89, 16
  br i1 %90, label %92, label %91

91:                                               ; preds = %83
  call void @DebugAssert(ptr noundef @.str, i64 noundef 824, ptr noundef @.str.10)
  br label %92

92:                                               ; preds = %91, %83
  br label %93

93:                                               ; preds = %92, %80
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %96, i32 0, i32 2
  %98 = getelementptr inbounds %struct.anon.2, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %98, i32 0, i32 8
  %100 = call i64 @CompareMem(ptr noundef %99, ptr noundef @mZeroIp4Addr, i64 noundef 4)
  %101 = icmp eq i64 %100, 0
  br i1 %101, label %102, label %157

102:                                              ; preds = %95
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %103, i32 0, i32 50
  store i8 1, ptr %104, align 2, !tbaa !34
  %105 = load i32, ptr %7, align 4, !tbaa !33
  %106 = icmp eq i32 %105, 6
  br i1 %106, label %107, label %131

107:                                              ; preds = %102
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %108, i32 0, i32 71
  %110 = load i32, ptr %109, align 8, !tbaa !9
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %111, i32 0, i32 73
  %113 = load i32, ptr %7, align 4, !tbaa !33
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds [8 x [16 x i32]], ptr %112, i64 0, i64 %114
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %116, i32 0, i32 72
  %118 = load i32, ptr %7, align 4, !tbaa !33
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [8 x i32], ptr %117, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !33
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds [16 x i32], ptr %115, i64 0, i64 %122
  store i32 %110, ptr %123, align 4, !tbaa !33
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %124, i32 0, i32 72
  %126 = load i32, ptr %7, align 4, !tbaa !33
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds [8 x i32], ptr %125, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !33
  %130 = add i32 %129, 1
  store i32 %130, ptr %128, align 4, !tbaa !33
  br label %156

131:                                              ; preds = %102
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %132, i32 0, i32 72
  %134 = load i32, ptr %7, align 4, !tbaa !33
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds [8 x i32], ptr %133, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !33
  %138 = icmp ugt i32 %137, 0
  br i1 %138, label %139, label %154

139:                                              ; preds = %131
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %140, i32 0, i32 71
  %142 = load i32, ptr %141, align 8, !tbaa !9
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %143, i32 0, i32 73
  %145 = load i32, ptr %7, align 4, !tbaa !33
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds [8 x [16 x i32]], ptr %144, i64 0, i64 %146
  %148 = getelementptr inbounds [16 x i32], ptr %147, i64 0, i64 0
  store i32 %142, ptr %148, align 4, !tbaa !33
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %149, i32 0, i32 72
  %151 = load i32, ptr %7, align 4, !tbaa !33
  %152 = zext i32 %151 to i64
  %153 = getelementptr inbounds [8 x i32], ptr %150, i64 0, i64 %152
  store i32 1, ptr %153, align 4, !tbaa !33
  br label %155

154:                                              ; preds = %131
  store i32 1, ptr %8, align 4
  br label %187

155:                                              ; preds = %139
  br label %156

156:                                              ; preds = %155, %107
  br label %181

157:                                              ; preds = %95
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %158, i32 0, i32 71
  %160 = load i32, ptr %159, align 8, !tbaa !9
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %161, i32 0, i32 73
  %163 = load i32, ptr %7, align 4, !tbaa !33
  %164 = zext i32 %163 to i64
  %165 = getelementptr inbounds [8 x [16 x i32]], ptr %162, i64 0, i64 %164
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %166, i32 0, i32 72
  %168 = load i32, ptr %7, align 4, !tbaa !33
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds [8 x i32], ptr %167, i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !33
  %172 = zext i32 %171 to i64
  %173 = getelementptr inbounds [16 x i32], ptr %165, i64 0, i64 %172
  store i32 %160, ptr %173, align 4, !tbaa !33
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %174, i32 0, i32 72
  %176 = load i32, ptr %7, align 4, !tbaa !33
  %177 = zext i32 %176 to i64
  %178 = getelementptr inbounds [8 x i32], ptr %175, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !33
  %180 = add i32 %179, 1
  store i32 %180, ptr %178, align 4, !tbaa !33
  br label %181

181:                                              ; preds = %157, %156
  br label %182

182:                                              ; preds = %181, %78
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %183, i32 0, i32 71
  %185 = load i32, ptr %184, align 8, !tbaa !9
  %186 = add i32 %185, 1
  store i32 %186, ptr %184, align 8, !tbaa !9
  store i32 0, ptr %8, align 4
  br label %187

187:                                              ; preds = %182, %154, %77, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  %188 = load i32, ptr %8, align 4
  switch i32 %188, label %190 [
    i32 0, label %189
    i32 1, label %189
  ]

189:                                              ; preds = %187, %187
  ret void

190:                                              ; preds = %187
  unreachable
}

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 43072}
!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 = !{!31, !11, i64 1472}
!31 = !{!"", !7, i64 0, !11, i64 1472, !7, i64 1480, !32, i64 1536}
!32 = !{!"", !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}
!33 = !{!11, !11, i64 0}
!34 = !{!10, !7, i64 11074}


; 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.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@mZeroIp4Addr = external global %struct.EFI_IPv4_ADDRESS, align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @PxeBcCacheDhcp4Offer(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %3, 0
  br i1 %.not, label %9, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 43072
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp ult i32 %6, 16
  br i1 %7, label %9, label %8

8:                                                ; preds = %4
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 791, ptr noundef nonnull @.str.8) #2
  br label %9

9:                                                ; preds = %4, %8, %2
  %10 = getelementptr inbounds i8, ptr %0, i64 16448
  %11 = getelementptr inbounds i8, ptr %0, i64 43072
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = zext i32 %12 to i64
  %14 = getelementptr inbounds [16 x %union.PXEBC_DHCP_PACKET_CACHE], ptr %10, i64 0, i64 %13
  tail call void @PxeBcCacheDhcp4Packet(ptr noundef nonnull %14, ptr noundef %1)
  %15 = tail call i64 @PxeBcParseDhcp4Packet(ptr noundef nonnull %14)
  %16 = icmp slt i64 %15, 0
  br i1 %16, label %78, label %17

17:                                               ; preds = %9
  %18 = getelementptr inbounds i8, ptr %14, i64 1472
  %19 = load i32, ptr %18, align 8, !tbaa !29
  %20 = tail call zeroext i8 @DebugAssertEnabled() #2
  %21 = icmp eq i8 %20, 0
  %22 = icmp ult i32 %19, 8
  %or.cond = select i1 %21, i1 true, i1 %22
  br i1 %or.cond, label %23, label %.thread

.thread:                                          ; preds = %17
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 811, ptr noundef nonnull @.str.9) #2
  br label %32

23:                                               ; preds = %17
  %24 = icmp eq i32 %19, 7
  br i1 %24, label %25, label %32

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %0, i64 43104
  %27 = load i32, ptr %26, align 4, !tbaa !32
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %78

29:                                               ; preds = %25
  %30 = load i32, ptr %11, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %0, i64 43556
  store i32 %30, ptr %31, align 4, !tbaa !32
  store i32 1, ptr %26, align 4, !tbaa !32
  br label %75

32:                                               ; preds = %.thread, %23
  %33 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not44 = icmp eq i8 %33, 0
  br i1 %.not44, label %41, label %34

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %0, i64 43076
  %36 = zext i32 %19 to i64
  %37 = getelementptr inbounds [8 x i32], ptr %35, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !32
  %39 = icmp ult i32 %38, 16
  br i1 %39, label %41, label %40

40:                                               ; preds = %34
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 824, ptr noundef nonnull @.str.10) #2
  br label %41

41:                                               ; preds = %34, %40, %32
  %42 = getelementptr inbounds i8, ptr %14, i64 24
  %43 = tail call i64 @CompareMem(ptr noundef nonnull %42, ptr noundef nonnull @mZeroIp4Addr, i64 noundef 4) #2
  %44 = icmp eq i64 %43, 0
  br i1 %44, label %45, label %65

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %0, i64 11074
  store i8 1, ptr %46, align 2, !tbaa !33
  %47 = icmp eq i32 %19, 6
  br i1 %47, label %48, label %56

48:                                               ; preds = %45
  %49 = load i32, ptr %11, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %0, i64 43492
  %51 = getelementptr inbounds i8, ptr %0, i64 43100
  %52 = load i32, ptr %51, align 4, !tbaa !32
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds [16 x i32], ptr %50, i64 0, i64 %53
  store i32 %49, ptr %54, align 4, !tbaa !32
  %55 = add i32 %52, 1
  store i32 %55, ptr %51, align 4, !tbaa !32
  br label %75

56:                                               ; preds = %45
  %57 = getelementptr inbounds i8, ptr %0, i64 43076
  %58 = zext i32 %19 to i64
  %59 = getelementptr inbounds [8 x i32], ptr %57, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !32
  %.not45 = icmp eq i32 %60, 0
  br i1 %.not45, label %78, label %61

61:                                               ; preds = %56
  %62 = load i32, ptr %11, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %0, i64 43108
  %64 = getelementptr inbounds [8 x [16 x i32]], ptr %63, i64 0, i64 %58
  store i32 %62, ptr %64, align 4, !tbaa !32
  store i32 1, ptr %59, align 4, !tbaa !32
  br label %75

65:                                               ; preds = %41
  %66 = load i32, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %0, i64 43108
  %68 = zext i32 %19 to i64
  %69 = getelementptr inbounds i8, ptr %0, i64 43076
  %70 = getelementptr inbounds [8 x i32], ptr %69, i64 0, i64 %68
  %71 = load i32, ptr %70, align 4, !tbaa !32
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds [8 x [16 x i32]], ptr %67, i64 0, i64 %68, i64 %72
  store i32 %66, ptr %73, align 4, !tbaa !32
  %74 = add i32 %71, 1
  store i32 %74, ptr %70, align 4, !tbaa !32
  br label %75

75:                                               ; preds = %65, %61, %48, %29
  %76 = phi i32 [ %66, %65 ], [ %62, %61 ], [ %49, %48 ], [ %30, %29 ]
  %77 = add i32 %76, 1
  store i32 %77, ptr %11, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %56, %25, %9, %75
  ret void
}

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 43072}
!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 = !{!7, !7, i64 0}
!33 = !{!6, !8, i64 11074}


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