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

; 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._DHCP_PROTOCOL = type { i32, %struct._EFI_DHCP4_PROTOCOL, %struct._LIST_ENTRY, ptr, ptr, i8, ptr, ptr, ptr, ptr, i32, i16, %struct.NET_BUF_QUEUE }
%struct._EFI_DHCP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32 }
%struct.NET_BUF = type { i32, i64, %struct._LIST_ENTRY, %union.NET_IP_HEAD, ptr, ptr, [64 x i8], ptr, i32, i32, [1 x %struct.NET_BLOCK_OP] }
%union.NET_IP_HEAD = type { ptr }
%struct.NET_BLOCK_OP = type { ptr, ptr, ptr, ptr, i32 }
%struct.EFI_DHCP4_PACKET = type <{ i32, i32, %struct.anon }>
%struct.anon = 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_IPv4_ADDRESS = type { [4 x i8] }
%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._DHCP_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, i64, ptr, ptr, %struct._LIST_ENTRY, i64, i64, i64, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i64, ptr, ptr, ptr, %struct.EFI_MAC_ADDRESS, i8, i8, [16 x i8], ptr, %struct.EFI_DHCP4_CONFIG_DATA, i32, ptr, i32, i32, i64, i64, i32 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.EFI_DHCP4_CONFIG_DATA = type { i32, ptr, i32, ptr, %struct.EFI_IPv4_ADDRESS, ptr, ptr, i32, ptr }

@.str = external hidden unnamed_addr constant [153 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @PxeDhcpInput(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %18, ptr %9, align 8, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %19, i32 0, i32 8
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  store ptr %21, ptr %14, align 8, !tbaa !5
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %22, i32 0, i32 4
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  store ptr %24, ptr %10, align 8, !tbaa !5
  %25 = load i64, ptr %7, align 8, !tbaa !9
  %26 = icmp slt i64 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %4
  store i32 1, ptr %17, align 4
  br label %173

28:                                               ; preds = %4
  br label %29

29:                                               ; preds = %28
  %30 = call zeroext i8 @DebugAssertEnabled()
  %31 = icmp ne i8 %30, 0
  br i1 %31, label %32, label %37

32:                                               ; preds = %29
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1325, ptr noundef @.str.4)
  br label %36

36:                                               ; preds = %35, %32
  br label %37

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

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.NET_BUF, ptr %40, i32 0, i32 9
  %42 = load i32, ptr %41, align 4, !tbaa !19
  %43 = zext i32 %42 to i64
  %44 = icmp ult i64 %43, 236
  br i1 %44, label %45, label %46

45:                                               ; preds = %39
  br label %156

46:                                               ; preds = %39
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.NET_BUF, ptr %47, i32 0, i32 9
  %49 = load i32, ptr %48, align 4, !tbaa !19
  %50 = zext i32 %49 to i64
  %51 = add i64 249, %50
  %52 = sub i64 %51, 236
  %53 = add i64 %52, 4
  %54 = sub i64 %53, 1
  %55 = and i64 %54, -4
  %56 = trunc i64 %55 to i32
  store i32 %56, ptr %15, align 4, !tbaa !21
  %57 = load i32, ptr %15, align 4, !tbaa !21
  %58 = call ptr @NetbufAlloc(i32 noundef %57)
  store ptr %58, ptr %12, align 8, !tbaa !5
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %62

61:                                               ; preds = %46
  br label %156

62:                                               ; preds = %46
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = load i32, ptr %15, align 4, !tbaa !21
  %65 = call ptr @NetbufAllocSpace(ptr noundef %63, i32 noundef %64, i8 noundef zeroext 0)
  store ptr %65, ptr %13, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %62
  %67 = call zeroext i8 @DebugAssertEnabled()
  %68 = icmp ne i8 %67, 0
  br i1 %68, label %69, label %74

69:                                               ; preds = %66
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1345, ptr noundef @.str.5)
  br label %73

73:                                               ; preds = %72, %69
  br label %74

74:                                               ; preds = %73, %66
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %15, align 4, !tbaa !21
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %78, i32 0, i32 0
  store i32 %77, ptr %79, align 1, !tbaa !22
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds %struct.anon, ptr %81, i32 0, i32 0
  store ptr %82, ptr %11, align 8, !tbaa !5
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.NET_BUF, ptr %84, i32 0, i32 9
  %86 = load i32, ptr %85, align 4, !tbaa !19
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = call i32 @NetbufCopy(ptr noundef %83, i32 noundef 0, i32 noundef %86, ptr noundef %87)
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %89, i32 0, i32 1
  store i32 %88, ptr %90, align 1, !tbaa !27
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 1, !tbaa !27
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.NET_BUF, ptr %94, i32 0, i32 9
  %96 = load i32, ptr %95, align 4, !tbaa !19
  %97 = icmp ne i32 %93, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %76
  br label %156

99:                                               ; preds = %76
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %100, i32 0, i32 0
  %102 = load i8, ptr %101, align 1, !tbaa !28
  %103 = zext i8 %102 to i32
  %104 = icmp ne i32 %103, 2
  br i1 %104, label %130, label %105

105:                                              ; preds = %99
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %106, i32 0, i32 4
  %108 = load i32, ptr %107, align 1, !tbaa !29
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN, ptr %109, i32 0, i32 8
  %111 = load ptr, ptr %110, align 8, !tbaa !30
  %112 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %111, i32 0, i32 2
  %113 = getelementptr inbounds %struct.anon, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %113, i32 0, i32 4
  %115 = load i32, ptr %114, align 1, !tbaa !32
  %116 = icmp ne i32 %108, %115
  br i1 %116, label %130, label %117

117:                                              ; preds = %105
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %118, i32 0, i32 26
  %120 = getelementptr inbounds [16 x i8], ptr %119, i64 0, i64 0
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %121, i32 0, i32 11
  %123 = getelementptr inbounds [16 x i8], ptr %122, i64 0, i64 0
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %124, i32 0, i32 2
  %126 = load i8, ptr %125, align 1, !tbaa !33
  %127 = zext i8 %126 to i64
  %128 = call i64 @CompareMem(ptr noundef %120, ptr noundef %123, i64 noundef %127)
  %129 = icmp ne i64 %128, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %117, %105, %99
  br label %156

131:                                              ; preds = %117
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 1, !tbaa !27
  %135 = zext i32 %134 to i64
  %136 = icmp ugt i64 %135, 240
  br i1 %136, label %137, label %148

137:                                              ; preds = %131
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %138, i32 0, i32 2
  %140 = getelementptr inbounds %struct.anon, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 1, !tbaa !34
  %142 = icmp eq i32 %141, 1666417251
  br i1 %142, label %143, label %148

143:                                              ; preds = %137
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = call i64 @DhcpValidateOptions(ptr noundef %144, ptr noundef null)
  %146 = icmp slt i64 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %143
  br label %156

148:                                              ; preds = %143, %137, %131
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.NET_BUF, ptr %149, i32 0, i32 1
  %151 = load i64, ptr %150, align 8, !tbaa !35
  %152 = add nsw i64 %151, 1
  store i64 %152, ptr %150, align 8, !tbaa !35
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %153, i32 0, i32 12
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  call void @NetbufQueAppend(ptr noundef %154, ptr noundef %155)
  br label %156

156:                                              ; preds = %148, %147, %130, %98, %61, %45
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %157)
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = icmp ne ptr %158, null
  br i1 %159, label %160, label %162

160:                                              ; preds = %156
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %161)
  br label %162

162:                                              ; preds = %160, %156
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %163, i32 0, i32 9
  %165 = load ptr, ptr %164, align 8, !tbaa !36
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = call i64 @UdpIoRecvDatagram(ptr noundef %165, ptr noundef @PxeDhcpInput, ptr noundef %166, i32 noundef 0)
  store i64 %167, ptr %16, align 8, !tbaa !9
  %168 = load i64, ptr %16, align 8, !tbaa !9
  %169 = icmp slt i64 %168, 0
  br i1 %169, label %170, label %172

170:                                              ; preds = %162
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  call void @PxeDhcpDone(ptr noundef %171)
  br label %172

172:                                              ; preds = %170, %162
  store i32 0, ptr %17, align 4
  br label %173

173:                                              ; preds = %172, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  %174 = load i32, ptr %17, align 4
  switch i32 %174, label %176 [
    i32 0, label %175
    i32 1, label %175
  ]

175:                                              ; preds = %173, %173
  ret void

176:                                              ; preds = %173
  unreachable
}

declare ptr @NetbufAlloc(i32 noundef) #1

declare ptr @NetbufAllocSpace(ptr noundef, i32 noundef, i8 noundef zeroext) #1

declare i32 @NetbufCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

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

declare void @NetbufQueAppend(ptr noundef, ptr noundef) #1

declare void @NetbufFree(ptr noundef) #1

declare i64 @UdpIoRecvDatagram(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 136}
!12 = !{!"_DHCP_PROTOCOL", !13, i64 0, !14, i64 8, !15, i64 80, !6, i64 96, !6, i64 104, !7, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !13, i64 152, !16, i64 156, !17, i64 160}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_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}
!15 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!16 = !{!"short", !7, i64 0}
!17 = !{!"", !13, i64 0, !10, i64 8, !15, i64 16, !15, i64 32, !13, i64 48, !13, i64 52}
!18 = !{!12, !6, i64 104}
!19 = !{!20, !13, i64 132}
!20 = !{!"", !13, i64 0, !10, i64 8, !15, i64 16, !7, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !13, i64 128, !13, i64 132, !7, i64 136}
!21 = !{!13, !13, i64 0}
!22 = !{!23, !13, i64 0}
!23 = !{!"", !13, i64 0, !13, i64 4, !24, i64 8}
!24 = !{!"", !25, i64 0, !13, i64 236, !7, i64 240}
!25 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !13, i64 4, !16, i64 8, !16, i64 10, !26, i64 12, !26, i64 16, !26, i64 20, !26, i64 24, !7, i64 28, !7, i64 44, !7, i64 108}
!26 = !{!"", !7, i64 0}
!27 = !{!23, !13, i64 4}
!28 = !{!25, !7, i64 0}
!29 = !{!25, !13, i64 4}
!30 = !{!31, !6, i64 48}
!31 = !{!"", !10, i64 0, !6, i64 8, !26, i64 16, !16, i64 20, !26, i64 22, !13, i64 28, !6, i64 32, !13, i64 40, !6, i64 48, !13, i64 56, !6, i64 64}
!32 = !{!23, !13, i64 12}
!33 = !{!25, !7, i64 2}
!34 = !{!23, !13, i64 244}
!35 = !{!20, !10, i64 8}
!36 = !{!12, !6, i64 144}


; 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"

@.str = external hidden unnamed_addr constant [153 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 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 @DhcpValidateOptions(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @PxeDhcpInput(ptr noundef %0, ptr nocapture readnone %1, i64 noundef %2, ptr noundef %3) #1 {
  %5 = getelementptr inbounds i8, ptr %3, i64 136
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %3, i64 104
  %8 = load ptr, ptr %7, align 8, !tbaa !16
  %9 = icmp slt i64 %2, 0
  br i1 %9, label %74, label %10

10:                                               ; preds = %4
  %11 = tail call zeroext i8 @DebugAssertEnabled() #2
  %12 = icmp eq i8 %11, 0
  %13 = icmp ne ptr %0, null
  %or.cond = or i1 %13, %12
  br i1 %or.cond, label %15, label %14

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

15:                                               ; preds = %14, %10
  %16 = getelementptr inbounds i8, ptr %0, i64 132
  %17 = load i32, ptr %16, align 4, !tbaa !17
  %18 = icmp ult i32 %17, 236
  br i1 %18, label %68, label %19

19:                                               ; preds = %15
  %20 = and i32 %17, -4
  %21 = add i32 %20, 16
  %22 = tail call ptr @NetbufAlloc(i32 noundef %21) #2
  %23 = icmp eq ptr %22, null
  br i1 %23, label %68, label %24

24:                                               ; preds = %19
  %25 = tail call ptr @NetbufAllocSpace(ptr noundef nonnull %22, i32 noundef %21, i8 noundef zeroext 0) #2
  %26 = tail call zeroext i8 @DebugAssertEnabled() #2
  %27 = icmp eq i8 %26, 0
  %28 = icmp ne ptr %25, null
  %or.cond3 = select i1 %27, i1 true, i1 %28
  br i1 %or.cond3, label %30, label %29

29:                                               ; preds = %24
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1345, ptr noundef nonnull @.str.5) #2
  br label %30

30:                                               ; preds = %29, %24
  store i32 %21, ptr %25, align 1, !tbaa !19
  %31 = getelementptr inbounds i8, ptr %25, i64 8
  %32 = load i32, ptr %16, align 4, !tbaa !17
  %33 = tail call i32 @NetbufCopy(ptr noundef nonnull %0, i32 noundef 0, i32 noundef %32, ptr noundef nonnull %31) #2
  %34 = getelementptr inbounds i8, ptr %25, i64 4
  store i32 %33, ptr %34, align 1, !tbaa !24
  %35 = load i32, ptr %16, align 4, !tbaa !17
  %.not = icmp eq i32 %33, %35
  br i1 %.not, label %36, label %67

36:                                               ; preds = %30
  %37 = load i8, ptr %31, align 1, !tbaa !25
  %.not44 = icmp eq i8 %37, 2
  br i1 %.not44, label %38, label %67

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %25, i64 12
  %40 = load i32, ptr %39, align 1, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %6, i64 48
  %42 = load ptr, ptr %41, align 8, !tbaa !27
  %43 = getelementptr inbounds i8, ptr %42, i64 12
  %44 = load i32, ptr %43, align 1, !tbaa !29
  %.not45 = icmp eq i32 %40, %44
  br i1 %.not45, label %45, label %67

45:                                               ; preds = %38
  %46 = getelementptr inbounds i8, ptr %8, i64 210
  %47 = getelementptr inbounds i8, ptr %25, i64 36
  %48 = getelementptr inbounds i8, ptr %25, i64 10
  %49 = load i8, ptr %48, align 1, !tbaa !30
  %50 = zext i8 %49 to i64
  %51 = tail call i64 @CompareMem(ptr noundef nonnull %46, ptr noundef nonnull %47, i64 noundef %50) #2
  %.not46 = icmp eq i64 %51, 0
  br i1 %.not46, label %52, label %67

52:                                               ; preds = %45
  %53 = load i32, ptr %34, align 1, !tbaa !24
  %54 = icmp ugt i32 %53, 240
  br i1 %54, label %55, label %62

55:                                               ; preds = %52
  %56 = getelementptr inbounds i8, ptr %25, i64 244
  %57 = load i32, ptr %56, align 1, !tbaa !31
  %58 = icmp eq i32 %57, 1666417251
  br i1 %58, label %59, label %62

59:                                               ; preds = %55
  %60 = tail call i64 @DhcpValidateOptions(ptr noundef nonnull %25, ptr noundef null) #2
  %61 = icmp slt i64 %60, 0
  br i1 %61, label %67, label %62

62:                                               ; preds = %59, %55, %52
  %63 = getelementptr inbounds i8, ptr %22, i64 8
  %64 = load i64, ptr %63, align 8, !tbaa !32
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %63, align 8, !tbaa !32
  %66 = getelementptr inbounds i8, ptr %3, i64 160
  tail call void @NetbufQueAppend(ptr noundef nonnull %66, ptr noundef nonnull %22) #2
  br label %67

67:                                               ; preds = %30, %36, %38, %45, %59, %62
  tail call void @NetbufFree(ptr noundef nonnull %0) #2
  br label %68

68:                                               ; preds = %15, %19, %67
  %.sink = phi ptr [ %22, %67 ], [ %0, %19 ], [ %0, %15 ]
  tail call void @NetbufFree(ptr noundef nonnull %.sink) #2
  %69 = getelementptr inbounds i8, ptr %3, i64 144
  %70 = load ptr, ptr %69, align 8, !tbaa !33
  %71 = tail call i64 @UdpIoRecvDatagram(ptr noundef %70, ptr noundef nonnull @PxeDhcpInput, ptr noundef nonnull %3, i32 noundef 0) #2
  %72 = icmp slt i64 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  tail call void @PxeDhcpDone(ptr noundef nonnull %3)
  br label %74

74:                                               ; preds = %68, %73, %4
  ret void
}

declare ptr @NetbufAlloc(i32 noundef) local_unnamed_addr #0

declare ptr @NetbufAllocSpace(ptr noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #0

declare i32 @NetbufCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

declare void @NetbufQueAppend(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @NetbufFree(ptr noundef) local_unnamed_addr #0

declare i64 @UdpIoRecvDatagram(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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, !11, i64 136}
!6 = !{!"_DHCP_PROTOCOL", !7, i64 0, !10, i64 8, !12, i64 80, !11, i64 96, !11, i64 104, !8, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !7, i64 152, !13, i64 156, !14, i64 160}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_EFI_DHCP4_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!13 = !{!"short", !8, i64 0}
!14 = !{!"", !7, i64 0, !15, i64 8, !12, i64 16, !12, i64 32, !7, i64 48, !7, i64 52}
!15 = !{!"long long", !8, i64 0}
!16 = !{!6, !11, i64 104}
!17 = !{!18, !7, i64 132}
!18 = !{!"", !7, i64 0, !15, i64 8, !12, i64 16, !8, i64 32, !11, i64 40, !11, i64 48, !8, i64 56, !11, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!19 = !{!20, !7, i64 0}
!20 = !{!"", !7, i64 0, !7, i64 4, !21, i64 8}
!21 = !{!"", !22, i64 0, !7, i64 236, !8, i64 240}
!22 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !7, i64 4, !13, i64 8, !13, i64 10, !23, i64 12, !23, i64 16, !23, i64 20, !23, i64 24, !8, i64 28, !8, i64 44, !8, i64 108}
!23 = !{!"", !8, i64 0}
!24 = !{!20, !7, i64 4}
!25 = !{!22, !8, i64 0}
!26 = !{!22, !7, i64 4}
!27 = !{!28, !11, i64 48}
!28 = !{!"", !15, i64 0, !11, i64 8, !23, i64 16, !13, i64 20, !23, i64 22, !7, i64 28, !11, i64 32, !7, i64 40, !11, i64 48, !7, i64 56, !11, i64 64}
!29 = !{!20, !7, i64 12}
!30 = !{!22, !8, i64 2}
!31 = !{!20, !7, i64 244}
!32 = !{!18, !15, i64 8}
!33 = !{!6, !11, i64 144}


; Effective O3 passes: CorrelatedValuePropagationPass,DeadArgumentEliminationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass