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

; 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.UDP_END_POINT = type { %union.EFI_IP_ADDRESS, i16, %union.EFI_IP_ADDRESS, i16 }
%union.EFI_IP_ADDRESS = type { [4 x i32] }
%struct.NET_FRAGMENT = type { 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._LIST_ENTRY = 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 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%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.DHCP_PARAMETER = type { i32, i32, i8, i8, i32, i32, i32, i32 }
%struct.EFI_DHCP4_PACKET_OPTION = type { i8, i8, [1 x i8] }
%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 }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 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: nounwind uwtable
define dso_local i64 @DhcpSendMessage(ptr noundef %0, ptr noundef %1, ptr noundef %2, i8 noundef zeroext %3, ptr noundef %4) #2 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.UDP_END_POINT, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %struct.NET_FRAGMENT, align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i16, align 2
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i8 %3, ptr %10, align 1, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  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 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %28, i32 0, i32 29
  %30 = load i32, ptr %29, align 8, !tbaa !10
  %31 = zext i32 %30 to i64
  %32 = add i64 377, %31
  %33 = trunc i64 %32 to i32
  store i32 %33, ptr %25, align 4, !tbaa !18
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %42

36:                                               ; preds = %5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call i64 @AsciiStrLen(ptr noundef %37)
  %39 = trunc i64 %38 to i32
  %40 = load i32, ptr %25, align 4, !tbaa !18
  %41 = add i32 %40, %39
  store i32 %41, ptr %25, align 4, !tbaa !18
  br label %42

42:                                               ; preds = %36, %5
  %43 = load i32, ptr %25, align 4, !tbaa !18
  %44 = zext i32 %43 to i64
  %45 = call ptr @AllocatePool(i64 noundef %44)
  store ptr %45, ptr %13, align 8, !tbaa !5
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %49

48:                                               ; preds = %42
  store i64 -9223372036854775799, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %518

49:                                               ; preds = %42
  %50 = load i32, ptr %25, align 4, !tbaa !18
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %51, i32 0, i32 0
  store i32 %50, ptr %52, align 1, !tbaa !19
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %53, i32 0, i32 1
  store i32 240, ptr %54, align 1, !tbaa !24
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %55, i32 0, i32 28
  store ptr %56, ptr %12, align 8, !tbaa !5
  store ptr null, ptr %16, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %63

59:                                               ; preds = %49
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %60, i32 0, i32 2
  %62 = getelementptr inbounds %struct.anon, ptr %61, i32 0, i32 0
  store ptr %62, ptr %16, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %59, %49
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %64, i32 0, i32 2
  %66 = getelementptr inbounds %struct.anon, ptr %65, i32 0, i32 0
  store ptr %66, ptr %15, align 8, !tbaa !5
  %67 = load ptr, ptr %15, align 8, !tbaa !5
  %68 = call ptr @ZeroMem(ptr noundef %67, i64 noundef 236)
  %69 = load ptr, ptr %15, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %69, i32 0, i32 0
  store i8 1, ptr %70, align 1, !tbaa !25
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %71, i32 0, i32 24
  %73 = load i8, ptr %72, align 8, !tbaa !26
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %74, i32 0, i32 1
  store i8 %73, ptr %75, align 1, !tbaa !27
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %76, i32 0, i32 25
  %78 = load i8, ptr %77, align 1, !tbaa !28
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %79, i32 0, i32 2
  store i8 %78, ptr %80, align 1, !tbaa !29
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %81, i32 0, i32 9
  %83 = load i32, ptr %82, align 8, !tbaa !30
  %84 = call i32 @SwapBytes32(i32 noundef %83)
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %85, i32 0, i32 4
  store i32 %84, ptr %86, align 1, !tbaa !31
  %87 = call zeroext i16 @SwapBytes16(i16 noundef zeroext -32768)
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %88, i32 0, i32 6
  store i16 %87, ptr %89, align 1, !tbaa !32
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %90, i32 0, i32 10
  %92 = load i32, ptr %91, align 4, !tbaa !33
  %93 = call i32 @SwapBytes32(i32 noundef %92)
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %94, i32 0, i32 7
  %96 = getelementptr inbounds %struct.EFI_IPv4_ADDRESS, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds [4 x i8], ptr %96, i64 0, i64 0
  store i32 %93, ptr %97, align 1, !tbaa !18
  %98 = load ptr, ptr %15, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %98, i32 0, i32 11
  %100 = getelementptr inbounds [16 x i8], ptr %99, i64 0, i64 0
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %101, i32 0, i32 23
  %103 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds [32 x i8], ptr %103, i64 0, i64 0
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %105, i32 0, i32 25
  %107 = load i8, ptr %106, align 1, !tbaa !28
  %108 = zext i8 %107 to i64
  %109 = call ptr @CopyMem(ptr noundef %100, ptr noundef %104, i64 noundef %108)
  %110 = load i8, ptr %10, align 1, !tbaa !9
  %111 = zext i8 %110 to i32
  %112 = icmp eq i32 %111, 4
  br i1 %112, label %117, label %113

113:                                              ; preds = %63
  %114 = load i8, ptr %10, align 1, !tbaa !9
  %115 = zext i8 %114 to i32
  %116 = icmp eq i32 %115, 7
  br i1 %116, label %117, label %120

117:                                              ; preds = %113, %63
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %118, i32 0, i32 5
  store i16 0, ptr %119, align 1, !tbaa !34
  br label %146

120:                                              ; preds = %113
  %121 = load i8, ptr %10, align 1, !tbaa !9
  %122 = zext i8 %121 to i32
  %123 = icmp eq i32 %122, 3
  br i1 %123, label %124, label %139

124:                                              ; preds = %120
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %125, i32 0, i32 7
  %127 = load i64, ptr %126, align 8, !tbaa !35
  %128 = icmp eq i64 %127, 3
  br i1 %128, label %129, label %139

129:                                              ; preds = %124
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %130, i32 0, i32 22
  %132 = load ptr, ptr %131, align 8, !tbaa !36
  %133 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %132, i32 0, i32 2
  %134 = getelementptr inbounds %struct.anon, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %134, i32 0, i32 5
  %136 = load i16, ptr %135, align 1, !tbaa !37
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %137, i32 0, i32 5
  store i16 %136, ptr %138, align 1, !tbaa !34
  br label %145

139:                                              ; preds = %124, %120
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %140, i32 0, i32 5
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %142, i32 0, i32 27
  %144 = load ptr, ptr %143, align 8, !tbaa !38
  call void @SetElapsedTime(ptr noundef %141, ptr noundef %144)
  br label %145

145:                                              ; preds = %139, %129
  br label %146

146:                                              ; preds = %145, %117
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %147, i32 0, i32 2
  %149 = getelementptr inbounds %struct.anon, ptr %148, i32 0, i32 1
  store i32 1666417251, ptr %149, align 1, !tbaa !39
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %150, i32 0, i32 2
  %152 = getelementptr inbounds %struct.anon, ptr %151, i32 0, i32 2
  %153 = getelementptr inbounds [1 x i8], ptr %152, i64 0, i64 0
  store ptr %153, ptr %23, align 8, !tbaa !5
  %154 = load ptr, ptr %23, align 8, !tbaa !5
  %155 = call ptr @DhcpAppendOption(ptr noundef %154, i8 noundef zeroext 53, i16 noundef zeroext 1, ptr noundef %10)
  store ptr %155, ptr %23, align 8, !tbaa !5
  %156 = load i8, ptr %10, align 1, !tbaa !9
  %157 = zext i8 %156 to i32
  %158 = icmp eq i32 %157, 4
  br i1 %158, label %172, label %159

159:                                              ; preds = %146
  %160 = load i8, ptr %10, align 1, !tbaa !9
  %161 = zext i8 %160 to i32
  %162 = icmp eq i32 %161, 7
  br i1 %162, label %172, label %163

163:                                              ; preds = %159
  %164 = load i8, ptr %10, align 1, !tbaa !9
  %165 = zext i8 %164 to i32
  %166 = icmp eq i32 %165, 3
  br i1 %166, label %167, label %195

167:                                              ; preds = %163
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %168, i32 0, i32 7
  %170 = load i64, ptr %169, align 8, !tbaa !35
  %171 = icmp eq i64 %170, 3
  br i1 %171, label %172, label %195

172:                                              ; preds = %167, %159, %146
  br label %173

173:                                              ; preds = %172
  %174 = call zeroext i8 @DebugAssertEnabled()
  %175 = icmp ne i8 %174, 0
  br i1 %175, label %176, label %186

176:                                              ; preds = %173
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %184

179:                                              ; preds = %176
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.DHCP_PARAMETER, ptr %180, i32 0, i32 4
  %182 = load i32, ptr %181, align 4, !tbaa !40
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %185, label %184

184:                                              ; preds = %179, %176
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1255, ptr noundef @.str.11)
  br label %185

185:                                              ; preds = %184, %179
  br label %186

186:                                              ; preds = %185, %173
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.DHCP_PARAMETER, ptr %189, i32 0, i32 4
  %191 = load i32, ptr %190, align 4, !tbaa !40
  %192 = call i32 @SwapBytes32(i32 noundef %191)
  store i32 %192, ptr %22, align 4, !tbaa !18
  %193 = load ptr, ptr %23, align 8, !tbaa !5
  %194 = call ptr @DhcpAppendOption(ptr noundef %193, i8 noundef zeroext 54, i16 noundef zeroext 4, ptr noundef %22)
  store ptr %194, ptr %23, align 8, !tbaa !5
  br label %195

195:                                              ; preds = %188, %167, %163
  store i32 0, ptr %22, align 4, !tbaa !18
  %196 = load i8, ptr %10, align 1, !tbaa !9
  %197 = zext i8 %196 to i32
  %198 = icmp eq i32 %197, 3
  br i1 %198, label %199, label %234

199:                                              ; preds = %195
  %200 = load ptr, ptr %7, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %200, i32 0, i32 7
  %202 = load i64, ptr %201, align 8, !tbaa !35
  %203 = icmp eq i64 %202, 8
  br i1 %203, label %204, label %210

204:                                              ; preds = %199
  %205 = load ptr, ptr %12, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.EFI_DHCP4_CONFIG_DATA, ptr %205, i32 0, i32 4
  %207 = getelementptr inbounds %struct.EFI_IPv4_ADDRESS, ptr %206, i32 0, i32 0
  %208 = getelementptr inbounds [4 x i8], ptr %207, i64 0, i64 0
  %209 = load i32, ptr %208, align 8, !tbaa !18
  store i32 %209, ptr %22, align 4, !tbaa !18
  br label %233

210:                                              ; preds = %199
  %211 = load ptr, ptr %7, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %211, i32 0, i32 7
  %213 = load i64, ptr %212, align 8, !tbaa !35
  %214 = icmp eq i64 %213, 3
  br i1 %214, label %215, label %232

215:                                              ; preds = %210
  br label %216

216:                                              ; preds = %215
  %217 = call zeroext i8 @DebugAssertEnabled()
  %218 = icmp ne i8 %217, 0
  br i1 %218, label %219, label %224

219:                                              ; preds = %216
  %220 = load ptr, ptr %16, align 8, !tbaa !5
  %221 = icmp ne ptr %220, null
  br i1 %221, label %223, label %222

222:                                              ; preds = %219
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1274, ptr noundef @.str.12)
  br label %223

223:                                              ; preds = %222, %219
  br label %224

224:                                              ; preds = %223, %216
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225
  %227 = load ptr, ptr %16, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %227, i32 0, i32 8
  %229 = getelementptr inbounds %struct.EFI_IPv4_ADDRESS, ptr %228, i32 0, i32 0
  %230 = getelementptr inbounds [4 x i8], ptr %229, i64 0, i64 0
  %231 = load i32, ptr %230, align 1, !tbaa !18
  store i32 %231, ptr %22, align 4, !tbaa !18
  br label %232

232:                                              ; preds = %226, %210
  br label %233

233:                                              ; preds = %232, %204
  br label %256

234:                                              ; preds = %195
  %235 = load i8, ptr %10, align 1, !tbaa !9
  %236 = zext i8 %235 to i32
  %237 = icmp eq i32 %236, 4
  br i1 %237, label %238, label %255

238:                                              ; preds = %234
  br label %239

239:                                              ; preds = %238
  %240 = call zeroext i8 @DebugAssertEnabled()
  %241 = icmp ne i8 %240, 0
  br i1 %241, label %242, label %247

242:                                              ; preds = %239
  %243 = load ptr, ptr %16, align 8, !tbaa !5
  %244 = icmp ne ptr %243, null
  br i1 %244, label %246, label %245

245:                                              ; preds = %242
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1279, ptr noundef @.str.12)
  br label %246

246:                                              ; preds = %245, %242
  br label %247

247:                                              ; preds = %246, %239
  br label %248

248:                                              ; preds = %247
  br label %249

249:                                              ; preds = %248
  %250 = load ptr, ptr %16, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %250, i32 0, i32 8
  %252 = getelementptr inbounds %struct.EFI_IPv4_ADDRESS, ptr %251, i32 0, i32 0
  %253 = getelementptr inbounds [4 x i8], ptr %252, i64 0, i64 0
  %254 = load i32, ptr %253, align 1, !tbaa !18
  store i32 %254, ptr %22, align 4, !tbaa !18
  br label %255

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

256:                                              ; preds = %255, %233
  %257 = load i32, ptr %22, align 4, !tbaa !18
  %258 = icmp ne i32 %257, 0
  br i1 %258, label %259, label %262

259:                                              ; preds = %256
  %260 = load ptr, ptr %23, align 8, !tbaa !5
  %261 = call ptr @DhcpAppendOption(ptr noundef %260, i8 noundef zeroext 50, i16 noundef zeroext 4, ptr noundef %22)
  store ptr %261, ptr %23, align 8, !tbaa !5
  br label %262

262:                                              ; preds = %259, %256
  %263 = load i8, ptr %10, align 1, !tbaa !9
  %264 = zext i8 %263 to i32
  %265 = icmp ne i32 %264, 4
  br i1 %265, label %266, label %274

266:                                              ; preds = %262
  %267 = load i8, ptr %10, align 1, !tbaa !9
  %268 = zext i8 %267 to i32
  %269 = icmp ne i32 %268, 7
  br i1 %269, label %270, label %274

270:                                              ; preds = %266
  %271 = call zeroext i16 @SwapBytes16(i16 noundef zeroext -256)
  store i16 %271, ptr %24, align 2, !tbaa !42
  %272 = load ptr, ptr %23, align 8, !tbaa !5
  %273 = call ptr @DhcpAppendOption(ptr noundef %272, i8 noundef zeroext 57, i16 noundef zeroext 2, ptr noundef %24)
  store ptr %273, ptr %23, align 8, !tbaa !5
  br label %274

274:                                              ; preds = %270, %266, %262
  %275 = load ptr, ptr %11, align 8, !tbaa !5
  %276 = icmp ne ptr %275, null
  br i1 %276, label %277, label %294

277:                                              ; preds = %274
  %278 = load ptr, ptr %11, align 8, !tbaa !5
  %279 = call i64 @AsciiStrLen(ptr noundef %278)
  %280 = trunc i64 %279 to i32
  %281 = icmp ult i32 %280, 255
  br i1 %281, label %282, label %286

282:                                              ; preds = %277
  %283 = load ptr, ptr %11, align 8, !tbaa !5
  %284 = call i64 @AsciiStrLen(ptr noundef %283)
  %285 = trunc i64 %284 to i32
  br label %287

286:                                              ; preds = %277
  br label %287

287:                                              ; preds = %286, %282
  %288 = phi i32 [ %285, %282 ], [ 255, %286 ]
  store i32 %288, ptr %25, align 4, !tbaa !18
  %289 = load ptr, ptr %23, align 8, !tbaa !5
  %290 = load i32, ptr %25, align 4, !tbaa !18
  %291 = trunc i32 %290 to i16
  %292 = load ptr, ptr %11, align 8, !tbaa !5
  %293 = call ptr @DhcpAppendOption(ptr noundef %289, i8 noundef zeroext 56, i16 noundef zeroext %291, ptr noundef %292)
  store ptr %293, ptr %23, align 8, !tbaa !5
  br label %294

294:                                              ; preds = %287, %274
  %295 = load ptr, ptr %7, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %295, i32 0, i32 29
  %297 = load i32, ptr %296, align 8, !tbaa !10
  %298 = icmp ne i32 %297, 0
  br i1 %298, label %299, label %362

299:                                              ; preds = %294
  store i32 0, ptr %26, align 4, !tbaa !18
  br label %300

300:                                              ; preds = %358, %299
  %301 = load i32, ptr %26, align 4, !tbaa !18
  %302 = load ptr, ptr %12, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.EFI_DHCP4_CONFIG_DATA, ptr %302, i32 0, i32 7
  %304 = load i32, ptr %303, align 8, !tbaa !43
  %305 = icmp ult i32 %301, %304
  br i1 %305, label %306, label %361

306:                                              ; preds = %300
  %307 = load i8, ptr %10, align 1, !tbaa !9
  %308 = zext i8 %307 to i32
  %309 = icmp eq i32 %308, 4
  br i1 %309, label %314, label %310

310:                                              ; preds = %306
  %311 = load i8, ptr %10, align 1, !tbaa !9
  %312 = zext i8 %311 to i32
  %313 = icmp eq i32 %312, 7
  br i1 %313, label %314, label %327

314:                                              ; preds = %310, %306
  %315 = load ptr, ptr %12, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.EFI_DHCP4_CONFIG_DATA, ptr %315, i32 0, i32 8
  %317 = load ptr, ptr %316, align 8, !tbaa !44
  %318 = load i32, ptr %26, align 4, !tbaa !18
  %319 = zext i32 %318 to i64
  %320 = getelementptr inbounds ptr, ptr %317, i64 %319
  %321 = load ptr, ptr %320, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %321, i32 0, i32 0
  %323 = load i8, ptr %322, align 1, !tbaa !45
  %324 = zext i8 %323 to i32
  %325 = icmp ne i32 %324, 61
  br i1 %325, label %326, label %327

326:                                              ; preds = %314
  br label %358

327:                                              ; preds = %314, %310
  %328 = load ptr, ptr %23, align 8, !tbaa !5
  %329 = load ptr, ptr %12, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.EFI_DHCP4_CONFIG_DATA, ptr %329, i32 0, i32 8
  %331 = load ptr, ptr %330, align 8, !tbaa !44
  %332 = load i32, ptr %26, align 4, !tbaa !18
  %333 = zext i32 %332 to i64
  %334 = getelementptr inbounds ptr, ptr %331, i64 %333
  %335 = load ptr, ptr %334, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %335, i32 0, i32 0
  %337 = load i8, ptr %336, align 1, !tbaa !45
  %338 = load ptr, ptr %12, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.EFI_DHCP4_CONFIG_DATA, ptr %338, i32 0, i32 8
  %340 = load ptr, ptr %339, align 8, !tbaa !44
  %341 = load i32, ptr %26, align 4, !tbaa !18
  %342 = zext i32 %341 to i64
  %343 = getelementptr inbounds ptr, ptr %340, i64 %342
  %344 = load ptr, ptr %343, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %344, i32 0, i32 1
  %346 = load i8, ptr %345, align 1, !tbaa !47
  %347 = zext i8 %346 to i16
  %348 = load ptr, ptr %12, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.EFI_DHCP4_CONFIG_DATA, ptr %348, i32 0, i32 8
  %350 = load ptr, ptr %349, align 8, !tbaa !44
  %351 = load i32, ptr %26, align 4, !tbaa !18
  %352 = zext i32 %351 to i64
  %353 = getelementptr inbounds ptr, ptr %350, i64 %352
  %354 = load ptr, ptr %353, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.EFI_DHCP4_PACKET_OPTION, ptr %354, i32 0, i32 2
  %356 = getelementptr inbounds [1 x i8], ptr %355, i64 0, i64 0
  %357 = call ptr @DhcpAppendOption(ptr noundef %328, i8 noundef zeroext %337, i16 noundef zeroext %347, ptr noundef %356)
  store ptr %357, ptr %23, align 8, !tbaa !5
  br label %358

358:                                              ; preds = %327, %326
  %359 = load i32, ptr %26, align 4, !tbaa !18
  %360 = add i32 %359, 1
  store i32 %360, ptr %26, align 4, !tbaa !18
  br label %300, !llvm.loop !48

361:                                              ; preds = %300
  br label %362

362:                                              ; preds = %361, %294
  %363 = load ptr, ptr %23, align 8, !tbaa !5
  %364 = getelementptr inbounds i8, ptr %363, i32 1
  store ptr %364, ptr %23, align 8, !tbaa !5
  store i8 -1, ptr %363, align 1, !tbaa !9
  %365 = load ptr, ptr %23, align 8, !tbaa !5
  %366 = load ptr, ptr %13, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %366, i32 0, i32 2
  %368 = getelementptr inbounds %struct.anon, ptr %367, i32 0, i32 2
  %369 = getelementptr inbounds [1 x i8], ptr %368, i64 0, i64 0
  %370 = ptrtoint ptr %365 to i64
  %371 = ptrtoint ptr %369 to i64
  %372 = sub i64 %370, %371
  %373 = trunc i64 %372 to i32
  %374 = load ptr, ptr %13, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %374, i32 0, i32 1
  %376 = load i32, ptr %375, align 1, !tbaa !24
  %377 = add i32 %376, %373
  store i32 %377, ptr %375, align 1, !tbaa !24
  store i64 0, ptr %21, align 8, !tbaa !50
  store ptr null, ptr %14, align 8, !tbaa !5
  %378 = load i8, ptr %10, align 1, !tbaa !9
  %379 = zext i8 %378 to i32
  %380 = icmp eq i32 %379, 1
  br i1 %380, label %381, label %385

381:                                              ; preds = %362
  %382 = load ptr, ptr %7, align 8, !tbaa !5
  %383 = load ptr, ptr %13, align 8, !tbaa !5
  %384 = call i64 @DhcpCallUser(ptr noundef %382, i32 noundef 1, ptr noundef %383, ptr noundef %14)
  store i64 %384, ptr %21, align 8, !tbaa !50
  br label %403

385:                                              ; preds = %362
  %386 = load i8, ptr %10, align 1, !tbaa !9
  %387 = zext i8 %386 to i32
  %388 = icmp eq i32 %387, 3
  br i1 %388, label %389, label %393

389:                                              ; preds = %385
  %390 = load ptr, ptr %7, align 8, !tbaa !5
  %391 = load ptr, ptr %13, align 8, !tbaa !5
  %392 = call i64 @DhcpCallUser(ptr noundef %390, i32 noundef 4, ptr noundef %391, ptr noundef %14)
  store i64 %392, ptr %21, align 8, !tbaa !50
  br label %402

393:                                              ; preds = %385
  %394 = load i8, ptr %10, align 1, !tbaa !9
  %395 = zext i8 %394 to i32
  %396 = icmp eq i32 %395, 4
  br i1 %396, label %397, label %401

397:                                              ; preds = %393
  %398 = load ptr, ptr %7, align 8, !tbaa !5
  %399 = load ptr, ptr %13, align 8, !tbaa !5
  %400 = call i64 @DhcpCallUser(ptr noundef %398, i32 noundef 7, ptr noundef %399, ptr noundef %14)
  store i64 %400, ptr %21, align 8, !tbaa !50
  br label %401

401:                                              ; preds = %397, %393
  br label %402

402:                                              ; preds = %401, %389
  br label %403

403:                                              ; preds = %402, %381
  %404 = load i64, ptr %21, align 8, !tbaa !50
  %405 = icmp slt i64 %404, 0
  br i1 %405, label %406, label %409

406:                                              ; preds = %403
  %407 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %407)
  %408 = load i64, ptr %21, align 8, !tbaa !50
  store i64 %408, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %518

409:                                              ; preds = %403
  %410 = load ptr, ptr %14, align 8, !tbaa !5
  %411 = icmp ne ptr %410, null
  br i1 %411, label %412, label %415

412:                                              ; preds = %409
  %413 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %413)
  %414 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %414, ptr %13, align 8, !tbaa !5
  br label %415

415:                                              ; preds = %412, %409
  %416 = load ptr, ptr %7, align 8, !tbaa !5
  %417 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %416, i32 0, i32 26
  %418 = getelementptr inbounds [16 x i8], ptr %417, i64 0, i64 0
  %419 = load ptr, ptr %13, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %419, i32 0, i32 2
  %421 = getelementptr inbounds %struct.anon, ptr %420, i32 0, i32 0
  %422 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %421, i32 0, i32 11
  %423 = getelementptr inbounds [16 x i8], ptr %422, i64 0, i64 0
  %424 = load ptr, ptr %13, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %424, i32 0, i32 2
  %426 = getelementptr inbounds %struct.anon, ptr %425, i32 0, i32 0
  %427 = getelementptr inbounds %struct.EFI_DHCP4_HEADER, ptr %426, i32 0, i32 2
  %428 = load i8, ptr %427, align 1, !tbaa !51
  %429 = zext i8 %428 to i64
  %430 = call ptr @CopyMem(ptr noundef %418, ptr noundef %423, i64 noundef %429)
  %431 = load ptr, ptr %13, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %431, i32 0, i32 2
  %433 = getelementptr inbounds %struct.anon, ptr %432, i32 0, i32 0
  %434 = getelementptr inbounds %struct.NET_FRAGMENT, ptr %20, i32 0, i32 1
  store ptr %433, ptr %434, align 8, !tbaa !52
  %435 = load ptr, ptr %13, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.EFI_DHCP4_PACKET, ptr %435, i32 0, i32 1
  %437 = load i32, ptr %436, align 1, !tbaa !24
  %438 = getelementptr inbounds %struct.NET_FRAGMENT, ptr %20, i32 0, i32 0
  store i32 %437, ptr %438, align 8, !tbaa !54
  %439 = load ptr, ptr %13, align 8, !tbaa !5
  %440 = call ptr @NetbufFromExt(ptr noundef %20, i32 noundef 1, i32 noundef 0, i32 noundef 0, ptr noundef @DhcpReleasePacket, ptr noundef %439)
  store ptr %440, ptr %19, align 8, !tbaa !5
  %441 = load ptr, ptr %19, align 8, !tbaa !5
  %442 = icmp eq ptr %441, null
  br i1 %442, label %443, label %445

443:                                              ; preds = %415
  %444 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %444)
  store i64 -9223372036854775799, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %518

445:                                              ; preds = %415
  %446 = load ptr, ptr %7, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %446, i32 0, i32 22
  %448 = load ptr, ptr %447, align 8, !tbaa !36
  %449 = icmp ne ptr %448, null
  br i1 %449, label %450, label %454

450:                                              ; preds = %445
  %451 = load ptr, ptr %7, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %451, i32 0, i32 22
  %453 = load ptr, ptr %452, align 8, !tbaa !36
  call void @FreePool(ptr noundef %453)
  br label %454

454:                                              ; preds = %450, %445
  %455 = load ptr, ptr %13, align 8, !tbaa !5
  %456 = load ptr, ptr %7, align 8, !tbaa !5
  %457 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %456, i32 0, i32 22
  store ptr %455, ptr %457, align 8, !tbaa !36
  %458 = load ptr, ptr %7, align 8, !tbaa !5
  call void @DhcpSetTransmitTimer(ptr noundef %458)
  %459 = getelementptr inbounds %struct.UDP_END_POINT, ptr %18, i32 0, i32 2
  %460 = getelementptr inbounds [4 x i32], ptr %459, i64 0, i64 0
  store i32 -1, ptr %460, align 4, !tbaa !9
  %461 = getelementptr inbounds %struct.UDP_END_POINT, ptr %18, i32 0, i32 0
  %462 = getelementptr inbounds [4 x i32], ptr %461, i64 0, i64 0
  store i32 0, ptr %462, align 4, !tbaa !9
  %463 = getelementptr inbounds %struct.UDP_END_POINT, ptr %18, i32 0, i32 3
  store i16 67, ptr %463, align 4, !tbaa !55
  %464 = getelementptr inbounds %struct.UDP_END_POINT, ptr %18, i32 0, i32 1
  store i16 68, ptr %464, align 4, !tbaa !57
  %465 = load ptr, ptr %7, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %465, i32 0, i32 20
  %467 = load ptr, ptr %466, align 8, !tbaa !58
  store ptr %467, ptr %17, align 8, !tbaa !5
  %468 = load ptr, ptr %7, align 8, !tbaa !5
  %469 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %468, i32 0, i32 7
  %470 = load i64, ptr %469, align 8, !tbaa !35
  %471 = icmp eq i64 %470, 5
  br i1 %471, label %476, label %472

472:                                              ; preds = %454
  %473 = load i8, ptr %10, align 1, !tbaa !9
  %474 = zext i8 %473 to i32
  %475 = icmp eq i32 %474, 7
  br i1 %475, label %476, label %490

476:                                              ; preds = %472, %454
  %477 = load ptr, ptr %7, align 8, !tbaa !5
  %478 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %477, i32 0, i32 12
  %479 = load i32, ptr %478, align 4, !tbaa !59
  %480 = getelementptr inbounds %struct.UDP_END_POINT, ptr %18, i32 0, i32 2
  %481 = getelementptr inbounds [4 x i32], ptr %480, i64 0, i64 0
  store i32 %479, ptr %481, align 4, !tbaa !9
  %482 = load ptr, ptr %7, align 8, !tbaa !5
  %483 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %482, i32 0, i32 10
  %484 = load i32, ptr %483, align 4, !tbaa !33
  %485 = getelementptr inbounds %struct.UDP_END_POINT, ptr %18, i32 0, i32 0
  %486 = getelementptr inbounds [4 x i32], ptr %485, i64 0, i64 0
  store i32 %484, ptr %486, align 4, !tbaa !9
  %487 = load ptr, ptr %7, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %487, i32 0, i32 21
  %489 = load ptr, ptr %488, align 8, !tbaa !60
  store ptr %489, ptr %17, align 8, !tbaa !5
  br label %490

490:                                              ; preds = %476, %472
  br label %491

491:                                              ; preds = %490
  %492 = call zeroext i8 @DebugAssertEnabled()
  %493 = icmp ne i8 %492, 0
  br i1 %493, label %494, label %499

494:                                              ; preds = %491
  %495 = load ptr, ptr %17, align 8, !tbaa !5
  %496 = icmp ne ptr %495, null
  br i1 %496, label %498, label %497

497:                                              ; preds = %494
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1405, ptr noundef @.str.13)
  br label %498

498:                                              ; preds = %497, %494
  br label %499

499:                                              ; preds = %498, %491
  br label %500

500:                                              ; preds = %499
  br label %501

501:                                              ; preds = %500
  %502 = load ptr, ptr %19, align 8, !tbaa !5
  %503 = getelementptr inbounds %struct.NET_BUF, ptr %502, i32 0, i32 1
  %504 = load i64, ptr %503, align 8, !tbaa !61
  %505 = add nsw i64 %504, 1
  store i64 %505, ptr %503, align 8, !tbaa !61
  %506 = load ptr, ptr %17, align 8, !tbaa !5
  %507 = load ptr, ptr %19, align 8, !tbaa !5
  %508 = load ptr, ptr %7, align 8, !tbaa !5
  %509 = call i64 @UdpIoSendDatagram(ptr noundef %506, ptr noundef %507, ptr noundef %18, ptr noundef null, ptr noundef @DhcpOnPacketSent, ptr noundef %508)
  store i64 %509, ptr %21, align 8, !tbaa !50
  %510 = load i64, ptr %21, align 8, !tbaa !50
  %511 = icmp slt i64 %510, 0
  br i1 %511, label %512, label %517

512:                                              ; preds = %501
  %513 = load ptr, ptr %19, align 8, !tbaa !5
  %514 = getelementptr inbounds %struct.NET_BUF, ptr %513, i32 0, i32 1
  %515 = load i64, ptr %514, align 8, !tbaa !61
  %516 = add nsw i64 %515, -1
  store i64 %516, ptr %514, align 8, !tbaa !61
  store i64 -9223372036854775793, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %518

517:                                              ; preds = %501
  store i64 0, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %518

518:                                              ; preds = %517, %512, %443, %406, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  %519 = load i64, ptr %6, align 8
  ret i64 %519
}

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

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

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

declare i32 @SwapBytes32(i32 noundef) #1

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

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

declare void @FreePool(ptr noundef) #1

declare ptr @AllocatePool(i64 noundef) #1

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

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

declare i64 @AsciiStrLen(ptr noundef) #1

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

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

declare ptr @DhcpAppendOption(ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef) #1

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 312}
!11 = !{!"_DHCP_SERVICE", !12, i64 0, !13, i64 8, !14, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !14, i64 64, !14, i64 72, !14, i64 80, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !6, i64 104, !6, i64 112, !6, i64 120, !12, i64 128, !12, i64 132, !12, i64 136, !14, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !16, i64 176, !7, i64 208, !7, i64 209, !7, i64 210, !6, i64 232, !17, i64 240, !12, i64 312, !6, i64 320, !12, i64 328, !12, i64 332, !14, i64 336, !14, i64 344, !12, i64 352}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!14 = !{!"long long", !7, i64 0}
!15 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!16 = !{!"", !7, i64 0}
!17 = !{!"", !12, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !16, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !6, i64 64}
!18 = !{!12, !12, i64 0}
!19 = !{!20, !12, i64 0}
!20 = !{!"", !12, i64 0, !12, i64 4, !21, i64 8}
!21 = !{!"", !22, i64 0, !12, i64 236, !7, i64 240}
!22 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !12, i64 4, !23, i64 8, !23, i64 10, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !7, i64 28, !7, i64 44, !7, i64 108}
!23 = !{!"short", !7, i64 0}
!24 = !{!20, !12, i64 4}
!25 = !{!22, !7, i64 0}
!26 = !{!11, !7, i64 208}
!27 = !{!22, !7, i64 1}
!28 = !{!11, !7, i64 209}
!29 = !{!22, !7, i64 2}
!30 = !{!11, !12, i64 88}
!31 = !{!22, !12, i64 4}
!32 = !{!22, !23, i64 10}
!33 = !{!11, !12, i64 92}
!34 = !{!22, !23, i64 8}
!35 = !{!11, !14, i64 72}
!36 = !{!11, !6, i64 168}
!37 = !{!20, !23, i64 16}
!38 = !{!11, !6, i64 232}
!39 = !{!20, !12, i64 244}
!40 = !{!41, !12, i64 12}
!41 = !{!"", !12, i64 0, !12, i64 4, !7, i64 8, !7, i64 9, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!42 = !{!23, !23, i64 0}
!43 = !{!17, !12, i64 56}
!44 = !{!17, !6, i64 64}
!45 = !{!46, !7, i64 0}
!46 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!47 = !{!46, !7, i64 1}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}
!50 = !{!14, !14, i64 0}
!51 = !{!20, !7, i64 10}
!52 = !{!53, !6, i64 8}
!53 = !{!"", !12, i64 0, !6, i64 8}
!54 = !{!53, !12, i64 0}
!55 = !{!56, !23, i64 36}
!56 = !{!"", !7, i64 0, !23, i64 16, !7, i64 20, !23, i64 36}
!57 = !{!56, !23, i64 16}
!58 = !{!11, !6, i64 152}
!59 = !{!11, !12, i64 100}
!60 = !{!11, !6, i64 160}
!61 = !{!62, !14, i64 8}
!62 = !{!"", !12, i64 0, !14, i64 8, !15, i64 16, !7, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !12, i64 128, !12, i64 132, !7, i64 136}


; 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.UDP_END_POINT = type { %union.EFI_IP_ADDRESS, i16, %union.EFI_IP_ADDRESS, i16 }
%union.EFI_IP_ADDRESS = type { [4 x i32] }
%struct.NET_FRAGMENT = type { i32, ptr }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @DhcpSendMessage(ptr noundef %0, ptr noundef readonly %1, ptr noundef readonly %2, i8 noundef zeroext %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca %struct.UDP_END_POINT, align 4
  %9 = alloca %struct.NET_FRAGMENT, align 8
  %10 = alloca i32, align 4
  %11 = alloca i16, align 2
  store i8 %3, ptr %6, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %11) #3
  %12 = getelementptr inbounds i8, ptr %0, i64 312
  %13 = load i32, ptr %12, align 8, !tbaa !8
  %14 = add i32 %13, 377
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %19, label %15

15:                                               ; preds = %5
  %16 = tail call i64 @AsciiStrLen(ptr noundef nonnull %4) #3
  %17 = trunc i64 %16 to i32
  %18 = add i32 %14, %17
  br label %19

19:                                               ; preds = %15, %5
  %.0128 = phi i32 [ %18, %15 ], [ %14, %5 ]
  %20 = zext i32 %.0128 to i64
  %21 = tail call ptr @AllocatePool(i64 noundef %20) #3
  %22 = icmp eq ptr %21, null
  br i1 %22, label %213, label %23

23:                                               ; preds = %19
  store i32 %.0128, ptr %21, align 1, !tbaa !17
  %24 = getelementptr inbounds i8, ptr %21, i64 4
  store i32 240, ptr %24, align 1, !tbaa !22
  %.not147 = icmp ne ptr %1, null
  %25 = getelementptr inbounds i8, ptr %1, i64 8
  %spec.select = select i1 %.not147, ptr %25, ptr null
  %26 = getelementptr inbounds i8, ptr %21, i64 8
  %27 = tail call ptr @ZeroMem(ptr noundef nonnull %26, i64 noundef 236) #3
  store i8 1, ptr %26, align 1, !tbaa !23
  %28 = getelementptr inbounds i8, ptr %0, i64 208
  %29 = load i8, ptr %28, align 8, !tbaa !24
  %30 = getelementptr inbounds i8, ptr %21, i64 9
  store i8 %29, ptr %30, align 1, !tbaa !25
  %31 = getelementptr inbounds i8, ptr %0, i64 209
  %32 = load i8, ptr %31, align 1, !tbaa !26
  %33 = getelementptr inbounds i8, ptr %21, i64 10
  store i8 %32, ptr %33, align 1, !tbaa !27
  %34 = getelementptr inbounds i8, ptr %0, i64 88
  %35 = load i32, ptr %34, align 8, !tbaa !28
  %36 = tail call i32 @SwapBytes32(i32 noundef %35) #3
  %37 = getelementptr inbounds i8, ptr %21, i64 12
  store i32 %36, ptr %37, align 1, !tbaa !29
  %38 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext -32768) #3
  %39 = getelementptr inbounds i8, ptr %21, i64 18
  store i16 %38, ptr %39, align 1, !tbaa !30
  %40 = getelementptr inbounds i8, ptr %0, i64 92
  %41 = load i32, ptr %40, align 4, !tbaa !31
  %42 = tail call i32 @SwapBytes32(i32 noundef %41) #3
  %43 = getelementptr inbounds i8, ptr %21, i64 20
  store i32 %42, ptr %43, align 1, !tbaa !32
  %44 = getelementptr inbounds i8, ptr %21, i64 36
  %45 = getelementptr inbounds i8, ptr %0, i64 176
  %46 = load i8, ptr %31, align 1, !tbaa !26
  %47 = zext i8 %46 to i64
  %48 = tail call ptr @CopyMem(ptr noundef nonnull %44, ptr noundef nonnull %45, i64 noundef %47) #3
  switch i8 %3, label %61 [
    i8 7, label %49
    i8 4, label %49
    i8 3, label %51
  ]

49:                                               ; preds = %23, %23
  %50 = getelementptr inbounds i8, ptr %21, i64 16
  store i16 0, ptr %50, align 1, !tbaa !33
  br label %65

51:                                               ; preds = %23
  %52 = getelementptr inbounds i8, ptr %0, i64 72
  %53 = load i64, ptr %52, align 8, !tbaa !34
  %54 = icmp eq i64 %53, 3
  br i1 %54, label %55, label %61

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %0, i64 168
  %57 = load ptr, ptr %56, align 8, !tbaa !35
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  %59 = load i16, ptr %58, align 1, !tbaa !36
  %60 = getelementptr inbounds i8, ptr %21, i64 16
  store i16 %59, ptr %60, align 1, !tbaa !33
  br label %65

61:                                               ; preds = %23, %51
  %62 = getelementptr inbounds i8, ptr %21, i64 16
  %63 = getelementptr inbounds i8, ptr %0, i64 232
  %64 = load ptr, ptr %63, align 8, !tbaa !37
  tail call void @SetElapsedTime(ptr noundef nonnull %62, ptr noundef %64) #3
  br label %65

65:                                               ; preds = %55, %61, %49
  %66 = getelementptr inbounds i8, ptr %21, i64 244
  store i32 1666417251, ptr %66, align 1, !tbaa !38
  %67 = getelementptr inbounds i8, ptr %21, i64 248
  %68 = call ptr @DhcpAppendOption(ptr noundef nonnull %67, i8 noundef zeroext 53, i16 noundef zeroext 1, ptr noundef nonnull %6) #3
  %69 = load i8, ptr %6, align 1
  switch i8 %69, label %86 [
    i8 7, label %74
    i8 4, label %74
    i8 3, label %70
  ]

70:                                               ; preds = %65
  %71 = getelementptr inbounds i8, ptr %0, i64 72
  %72 = load i64, ptr %71, align 8, !tbaa !34
  %73 = icmp eq i64 %72, 3
  br i1 %73, label %74, label %.thread

.thread:                                          ; preds = %70
  store i32 0, ptr %10, align 4, !tbaa !32
  br label %88

74:                                               ; preds = %65, %65, %70
  %75 = call zeroext i8 @DebugAssertEnabled() #3
  %.not148 = icmp eq i8 %75, 0
  br i1 %.not148, label %81, label %76

76:                                               ; preds = %74
  %.not149 = icmp eq ptr %2, null
  br i1 %.not149, label %80, label %77

77:                                               ; preds = %76
  %78 = getelementptr inbounds i8, ptr %2, i64 12
  %79 = load i32, ptr %78, align 4, !tbaa !39
  %.not150 = icmp eq i32 %79, 0
  br i1 %.not150, label %80, label %81

80:                                               ; preds = %77, %76
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1255, ptr noundef nonnull @.str.11) #3
  br label %81

81:                                               ; preds = %77, %80, %74
  %82 = getelementptr inbounds i8, ptr %2, i64 12
  %83 = load i32, ptr %82, align 4, !tbaa !39
  %84 = call i32 @SwapBytes32(i32 noundef %83) #3
  store i32 %84, ptr %10, align 4, !tbaa !32
  %85 = call ptr @DhcpAppendOption(ptr noundef %68, i8 noundef zeroext 54, i16 noundef zeroext 4, ptr noundef nonnull %10) #3
  %.pr = load i8, ptr %6, align 1, !tbaa !5
  br label %86

86:                                               ; preds = %65, %81
  %87 = phi i8 [ %69, %65 ], [ %.pr, %81 ]
  %.0129 = phi ptr [ %68, %65 ], [ %85, %81 ]
  store i32 0, ptr %10, align 4, !tbaa !32
  switch i8 %87, label %.thread160 [
    i8 3, label %._crit_edge
    i8 4, label %100
  ]

._crit_edge:                                      ; preds = %86
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 72
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !34
  br label %88

88:                                               ; preds = %._crit_edge, %.thread
  %89 = phi i64 [ %72, %.thread ], [ %.pre, %._crit_edge ]
  %.0129157 = phi ptr [ %68, %.thread ], [ %.0129, %._crit_edge ]
  switch i64 %89, label %.thread160 [
    i64 8, label %90
    i64 3, label %93
  ]

90:                                               ; preds = %88
  %91 = getelementptr inbounds i8, ptr %0, i64 272
  %92 = load i32, ptr %91, align 8, !tbaa !32
  store i32 %92, ptr %10, align 4, !tbaa !32
  br label %thread-pre-split

93:                                               ; preds = %88
  %94 = call zeroext i8 @DebugAssertEnabled() #3
  %95 = icmp eq i8 %94, 0
  %or.cond16 = or i1 %.not147, %95
  br i1 %or.cond16, label %97, label %96

96:                                               ; preds = %93
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1274, ptr noundef nonnull @.str.12) #3
  br label %97

97:                                               ; preds = %96, %93
  %98 = getelementptr inbounds i8, ptr %spec.select, i64 16
  %99 = load i32, ptr %98, align 1, !tbaa !32
  store i32 %99, ptr %10, align 4, !tbaa !32
  br label %thread-pre-split

100:                                              ; preds = %86
  %101 = call zeroext i8 @DebugAssertEnabled() #3
  %102 = icmp eq i8 %101, 0
  %or.cond18 = or i1 %.not147, %102
  br i1 %or.cond18, label %104, label %103

103:                                              ; preds = %100
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1279, ptr noundef nonnull @.str.12) #3
  br label %104

104:                                              ; preds = %103, %100
  %105 = getelementptr inbounds i8, ptr %spec.select, i64 16
  %106 = load i32, ptr %105, align 1, !tbaa !32
  store i32 %106, ptr %10, align 4, !tbaa !32
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %104, %90, %97
  %107 = phi i32 [ %106, %104 ], [ %92, %90 ], [ %99, %97 ]
  %.0129158 = phi ptr [ %.0129, %104 ], [ %.0129157, %90 ], [ %.0129157, %97 ]
  %.not151 = icmp eq i32 %107, 0
  br i1 %.not151, label %.thread160, label %108

108:                                              ; preds = %thread-pre-split
  %109 = call ptr @DhcpAppendOption(ptr noundef %.0129158, i8 noundef zeroext 50, i16 noundef zeroext 4, ptr noundef nonnull %10) #3
  br label %.thread160

.thread160:                                       ; preds = %88, %86, %108, %thread-pre-split
  %.1 = phi ptr [ %109, %108 ], [ %.0129158, %thread-pre-split ], [ %.0129, %86 ], [ %.0129157, %88 ]
  %110 = load i8, ptr %6, align 1
  switch i8 %110, label %111 [
    i8 7, label %114
    i8 4, label %114
  ]

111:                                              ; preds = %.thread160
  %112 = call zeroext i16 @SwapBytes16(i16 noundef zeroext -256) #3
  store i16 %112, ptr %11, align 2, !tbaa !41
  %113 = call ptr @DhcpAppendOption(ptr noundef %.1, i8 noundef zeroext 57, i16 noundef zeroext 2, ptr noundef nonnull %11) #3
  br label %114

114:                                              ; preds = %.thread160, %.thread160, %111
  %.2 = phi ptr [ %113, %111 ], [ %.1, %.thread160 ], [ %.1, %.thread160 ]
  br i1 %.not, label %125, label %115

115:                                              ; preds = %114
  %116 = call i64 @AsciiStrLen(ptr noundef nonnull %4) #3
  %117 = trunc i64 %116 to i32
  %118 = icmp ult i32 %117, 255
  br i1 %118, label %119, label %122

119:                                              ; preds = %115
  %120 = call i64 @AsciiStrLen(ptr noundef nonnull %4) #3
  %121 = trunc i64 %120 to i16
  br label %122

122:                                              ; preds = %115, %119
  %123 = phi i16 [ %121, %119 ], [ 255, %115 ]
  %124 = call ptr @DhcpAppendOption(ptr noundef %.2, i8 noundef zeroext 56, i16 noundef zeroext %123, ptr noundef nonnull %4) #3
  br label %125

125:                                              ; preds = %122, %114
  %.3 = phi ptr [ %124, %122 ], [ %.2, %114 ]
  %126 = load i32, ptr %12, align 8, !tbaa !8
  %.not152 = icmp eq i32 %126, 0
  br i1 %.not152, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %125
  %127 = getelementptr inbounds i8, ptr %0, i64 296
  %128 = load i32, ptr %127, align 8, !tbaa !42
  %.not172 = icmp eq i32 %128, 0
  br i1 %.not172, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %129 = getelementptr inbounds i8, ptr %0, i64 304
  br label %130

130:                                              ; preds = %.lr.ph, %146
  %131 = phi i32 [ %128, %.lr.ph ], [ %147, %146 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %146 ]
  %.4169 = phi ptr [ %.3, %.lr.ph ], [ %.5, %146 ]
  %132 = load i8, ptr %6, align 1
  switch i8 %132, label %._crit_edge174 [
    i8 7, label %133
    i8 4, label %133
  ]

._crit_edge174:                                   ; preds = %130
  %.pre175 = load ptr, ptr %129, align 8, !tbaa !43
  %.phi.trans.insert176 = getelementptr inbounds ptr, ptr %.pre175, i64 %indvars.iv
  %.pre177 = load ptr, ptr %.phi.trans.insert176, align 8, !tbaa !44
  %.pre178 = load i8, ptr %.pre177, align 1, !tbaa !45
  br label %138

133:                                              ; preds = %130, %130
  %134 = load ptr, ptr %129, align 8, !tbaa !43
  %135 = getelementptr inbounds ptr, ptr %134, i64 %indvars.iv
  %136 = load ptr, ptr %135, align 8, !tbaa !44
  %137 = load i8, ptr %136, align 1, !tbaa !45
  %.not155 = icmp eq i8 %137, 61
  br i1 %.not155, label %138, label %146

138:                                              ; preds = %._crit_edge174, %133
  %139 = phi i8 [ %.pre178, %._crit_edge174 ], [ 61, %133 ]
  %140 = phi ptr [ %.pre177, %._crit_edge174 ], [ %136, %133 ]
  %141 = getelementptr inbounds i8, ptr %140, i64 1
  %142 = load i8, ptr %141, align 1, !tbaa !47
  %143 = zext i8 %142 to i16
  %144 = getelementptr inbounds i8, ptr %140, i64 2
  %145 = call ptr @DhcpAppendOption(ptr noundef %.4169, i8 noundef zeroext %139, i16 noundef zeroext %143, ptr noundef nonnull %144) #3
  %.pre179 = load i32, ptr %127, align 8, !tbaa !42
  br label %146

146:                                              ; preds = %133, %138
  %147 = phi i32 [ %131, %133 ], [ %.pre179, %138 ]
  %.5 = phi ptr [ %.4169, %133 ], [ %145, %138 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %148 = zext i32 %147 to i64
  %149 = icmp ult i64 %indvars.iv.next, %148
  br i1 %149, label %130, label %.loopexit, !llvm.loop !48

.loopexit:                                        ; preds = %146, %.preheader, %125
  %.6 = phi ptr [ %.3, %125 ], [ %.3, %.preheader ], [ %.5, %146 ]
  %150 = getelementptr inbounds i8, ptr %.6, i64 1
  store i8 -1, ptr %.6, align 1, !tbaa !5
  %151 = ptrtoint ptr %150 to i64
  %152 = ptrtoint ptr %67 to i64
  %153 = sub i64 %151, %152
  %154 = trunc i64 %153 to i32
  %155 = load i32, ptr %24, align 1, !tbaa !22
  %156 = add i32 %155, %154
  store i32 %156, ptr %24, align 1, !tbaa !22
  store ptr null, ptr %7, align 8, !tbaa !44
  %157 = load i8, ptr %6, align 1, !tbaa !5
  switch i8 %157, label %.thread167 [
    i8 1, label %160
    i8 3, label %158
    i8 4, label %159
  ]

158:                                              ; preds = %.loopexit
  br label %160

159:                                              ; preds = %.loopexit
  br label %160

160:                                              ; preds = %.loopexit, %158, %159
  %.sink = phi i32 [ 4, %158 ], [ 7, %159 ], [ 1, %.loopexit ]
  %161 = call i64 @DhcpCallUser(ptr noundef nonnull %0, i32 noundef %.sink, ptr noundef nonnull %21, ptr noundef nonnull %7)
  %162 = icmp slt i64 %161, 0
  br i1 %162, label %163, label %164

163:                                              ; preds = %160
  call void @FreePool(ptr noundef nonnull %21) #3
  br label %213

164:                                              ; preds = %160
  %.pr166 = load ptr, ptr %7, align 8, !tbaa !44
  %.not153 = icmp eq ptr %.pr166, null
  br i1 %.not153, label %.thread167, label %165

165:                                              ; preds = %164
  call void @FreePool(ptr noundef nonnull %21) #3
  %166 = load ptr, ptr %7, align 8, !tbaa !44
  br label %.thread167

.thread167:                                       ; preds = %.loopexit, %165, %164
  %.0134 = phi ptr [ %166, %165 ], [ %21, %164 ], [ %21, %.loopexit ]
  %167 = getelementptr inbounds i8, ptr %0, i64 210
  %168 = getelementptr inbounds i8, ptr %.0134, i64 8
  %169 = getelementptr inbounds i8, ptr %.0134, i64 36
  %170 = getelementptr inbounds i8, ptr %.0134, i64 10
  %171 = load i8, ptr %170, align 1, !tbaa !50
  %172 = zext i8 %171 to i64
  %173 = call ptr @CopyMem(ptr noundef nonnull %167, ptr noundef nonnull %169, i64 noundef %172) #3
  %174 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %168, ptr %174, align 8, !tbaa !51
  %175 = getelementptr inbounds i8, ptr %.0134, i64 4
  %176 = load i32, ptr %175, align 1, !tbaa !22
  store i32 %176, ptr %9, align 8, !tbaa !53
  %177 = call ptr @NetbufFromExt(ptr noundef nonnull %9, i32 noundef 1, i32 noundef 0, i32 noundef 0, ptr noundef nonnull @DhcpReleasePacket, ptr noundef %.0134) #3
  %178 = icmp eq ptr %177, null
  br i1 %178, label %179, label %180

179:                                              ; preds = %.thread167
  call void @FreePool(ptr noundef nonnull %.0134) #3
  br label %213

180:                                              ; preds = %.thread167
  %181 = getelementptr inbounds i8, ptr %0, i64 168
  %182 = load ptr, ptr %181, align 8, !tbaa !35
  %.not154 = icmp eq ptr %182, null
  br i1 %.not154, label %184, label %183

183:                                              ; preds = %180
  call void @FreePool(ptr noundef nonnull %182) #3
  br label %184

184:                                              ; preds = %183, %180
  store ptr %.0134, ptr %181, align 8, !tbaa !35
  call void @DhcpSetTransmitTimer(ptr noundef nonnull %0)
  %185 = getelementptr inbounds i8, ptr %8, i64 20
  store i32 -1, ptr %185, align 4, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !5
  %186 = getelementptr inbounds i8, ptr %8, i64 36
  store i16 67, ptr %186, align 4, !tbaa !54
  %187 = getelementptr inbounds i8, ptr %8, i64 16
  store i16 68, ptr %187, align 4, !tbaa !56
  %188 = getelementptr inbounds i8, ptr %0, i64 152
  %189 = getelementptr inbounds i8, ptr %0, i64 72
  %190 = load i64, ptr %189, align 8, !tbaa !34
  %191 = icmp eq i64 %190, 5
  %192 = load i8, ptr %6, align 1
  %193 = icmp eq i8 %192, 7
  %or.cond14 = select i1 %191, i1 true, i1 %193
  br i1 %or.cond14, label %194, label %199

194:                                              ; preds = %184
  %195 = getelementptr inbounds i8, ptr %0, i64 100
  %196 = load i32, ptr %195, align 4, !tbaa !57
  store i32 %196, ptr %185, align 4, !tbaa !5
  %197 = load i32, ptr %40, align 4, !tbaa !31
  store i32 %197, ptr %8, align 4, !tbaa !5
  %198 = getelementptr inbounds i8, ptr %0, i64 160
  br label %199

199:                                              ; preds = %194, %184
  %.0132.in = phi ptr [ %198, %194 ], [ %188, %184 ]
  %.0132 = load ptr, ptr %.0132.in, align 8, !tbaa !44
  %200 = call zeroext i8 @DebugAssertEnabled() #3
  %201 = icmp eq i8 %200, 0
  %202 = icmp ne ptr %.0132, null
  %or.cond20 = select i1 %201, i1 true, i1 %202
  br i1 %or.cond20, label %204, label %203

203:                                              ; preds = %199
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1405, ptr noundef nonnull @.str.13) #3
  br label %204

204:                                              ; preds = %203, %199
  %205 = getelementptr inbounds i8, ptr %177, i64 8
  %206 = load i64, ptr %205, align 8, !tbaa !58
  %207 = add nsw i64 %206, 1
  store i64 %207, ptr %205, align 8, !tbaa !58
  %208 = call i64 @UdpIoSendDatagram(ptr noundef %.0132, ptr noundef nonnull %177, ptr noundef nonnull %8, ptr noundef null, ptr noundef nonnull @DhcpOnPacketSent, ptr noundef nonnull %0) #3
  %209 = icmp slt i64 %208, 0
  br i1 %209, label %210, label %213

210:                                              ; preds = %204
  %211 = load i64, ptr %205, align 8, !tbaa !58
  %212 = add nsw i64 %211, -1
  store i64 %212, ptr %205, align 8, !tbaa !58
  br label %213

213:                                              ; preds = %204, %19, %210, %179, %163
  %.0131 = phi i64 [ %161, %163 ], [ -9223372036854775799, %179 ], [ -9223372036854775793, %210 ], [ -9223372036854775799, %19 ], [ 0, %204 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret i64 %.0131
}

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

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

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

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #1

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #1

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #1

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

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

declare i64 @AsciiStrLen(ptr noundef) local_unnamed_addr #1

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

declare void @SetElapsedTime(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @DhcpAppendOption(ptr noundef, i8 noundef zeroext, i16 noundef zeroext, ptr noundef) local_unnamed_addr #1

declare ptr @NetbufFromExt(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 312}
!9 = !{!"_DHCP_SERVICE", !10, i64 0, !11, i64 8, !13, i64 24, !12, i64 32, !12, i64 40, !14, i64 48, !13, i64 64, !13, i64 72, !13, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !12, i64 104, !12, i64 112, !12, i64 120, !10, i64 128, !10, i64 132, !10, i64 136, !13, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !15, i64 176, !6, i64 208, !6, i64 209, !6, i64 210, !12, i64 232, !16, i64 240, !10, i64 312, !12, i64 320, !10, i64 328, !10, i64 332, !13, i64 336, !13, i64 344, !10, i64 352}
!10 = !{!"int", !6, i64 0}
!11 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !12, i64 0, !12, i64 8}
!12 = !{!"any pointer", !6, i64 0}
!13 = !{!"long long", !6, i64 0}
!14 = !{!"_LIST_ENTRY", !12, i64 0, !12, i64 8}
!15 = !{!"", !6, i64 0}
!16 = !{!"", !10, i64 0, !12, i64 8, !10, i64 16, !12, i64 24, !15, i64 32, !12, i64 40, !12, i64 48, !10, i64 56, !12, i64 64}
!17 = !{!18, !10, i64 0}
!18 = !{!"", !10, i64 0, !10, i64 4, !19, i64 8}
!19 = !{!"", !20, i64 0, !10, i64 236, !6, i64 240}
!20 = !{!"", !6, i64 0, !6, i64 1, !6, i64 2, !6, i64 3, !10, i64 4, !21, i64 8, !21, i64 10, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !6, i64 28, !6, i64 44, !6, i64 108}
!21 = !{!"short", !6, i64 0}
!22 = !{!18, !10, i64 4}
!23 = !{!20, !6, i64 0}
!24 = !{!9, !6, i64 208}
!25 = !{!20, !6, i64 1}
!26 = !{!9, !6, i64 209}
!27 = !{!20, !6, i64 2}
!28 = !{!9, !10, i64 88}
!29 = !{!20, !10, i64 4}
!30 = !{!20, !21, i64 10}
!31 = !{!9, !10, i64 92}
!32 = !{!10, !10, i64 0}
!33 = !{!20, !21, i64 8}
!34 = !{!9, !13, i64 72}
!35 = !{!9, !12, i64 168}
!36 = !{!18, !21, i64 16}
!37 = !{!9, !12, i64 232}
!38 = !{!18, !10, i64 244}
!39 = !{!40, !10, i64 12}
!40 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 9, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!41 = !{!21, !21, i64 0}
!42 = !{!16, !10, i64 56}
!43 = !{!16, !12, i64 64}
!44 = !{!12, !12, i64 0}
!45 = !{!46, !6, i64 0}
!46 = !{!"", !6, i64 0, !6, i64 1, !6, i64 2}
!47 = !{!46, !6, i64 1}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}
!50 = !{!18, !6, i64 10}
!51 = !{!52, !12, i64 8}
!52 = !{!"", !10, i64 0, !12, i64 8}
!53 = !{!52, !10, i64 0}
!54 = !{!55, !21, i64 36}
!55 = !{!"", !6, i64 0, !21, i64 16, !6, i64 20, !21, i64 36}
!56 = !{!55, !21, i64 16}
!57 = !{!9, !10, i64 100}
!58 = !{!59, !13, i64 8}
!59 = !{!"", !10, i64 0, !13, i64 8, !14, i64 16, !6, i64 32, !12, i64 40, !12, i64 48, !6, i64 56, !12, i64 120, !10, i64 128, !10, i64 132, !6, i64 136}


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