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

; 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.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%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 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct._UDP_IO = type { i32, %struct._LIST_ENTRY, i64, i8, ptr, ptr, ptr, %struct.EFI_SIMPLE_NETWORK_MODE, %struct._LIST_ENTRY, ptr, %union.anon, %union.anon.0 }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%union.anon = type { ptr }
%union.anon.0 = type { %struct.EFI_UDP6_CONFIG_DATA }
%struct.EFI_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._EFI_UDP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [153 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiDhcp4Start(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %2
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %112

14:                                               ; preds = %2
  %15 = call zeroext i8 @DebugAssertEnabled()
  %16 = zext i8 %15 to i32
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %28

18:                                               ; preds = %14
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = ptrtoint ptr %19 to i64
  %21 = sub i64 %20, ptrtoint (ptr getelementptr inbounds (%struct._DHCP_PROTOCOL, ptr null, i32 0, i32 1) to i64)
  %22 = inttoptr i64 %21 to ptr
  %23 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = icmp ne i32 %24, 1885562980
  br i1 %25, label %26, label %28

26:                                               ; preds = %18
  call void @DebugAssert(ptr noundef @.str, i64 noundef 795, ptr noundef @.str.1)
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  br label %33

28:                                               ; preds = %18, %14
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = ptrtoint ptr %29 to i64
  %31 = sub i64 %30, ptrtoint (ptr getelementptr inbounds (%struct._DHCP_PROTOCOL, ptr null, i32 0, i32 1) to i64)
  %32 = inttoptr i64 %31 to ptr
  br label %33

33:                                               ; preds = %28, %26
  %34 = phi ptr [ %27, %26 ], [ %32, %28 ]
  store ptr %34, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = icmp ne i32 %37, 1885562980
  br i1 %38, label %39, label %40

39:                                               ; preds = %33
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %112

40:                                               ; preds = %33
  %41 = load ptr, ptr @gBS, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = call i64 %43(i64 noundef 8)
  store i64 %44, ptr %9, align 8, !tbaa !20
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %45, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  store ptr %47, ptr %7, align 8, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %48, i32 0, i32 7
  %50 = load i64, ptr %49, align 8, !tbaa !22
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %40
  store i64 -9223372036854775789, ptr %8, align 8, !tbaa !20
  br label %106

53:                                               ; preds = %40
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %54, i32 0, i32 7
  %56 = load i64, ptr %55, align 8, !tbaa !22
  %57 = icmp ne i64 %56, 1
  br i1 %57, label %58, label %64

58:                                               ; preds = %53
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %59, i32 0, i32 7
  %61 = load i64, ptr %60, align 8, !tbaa !22
  %62 = icmp ne i64 %61, 7
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  store i64 -9223372036854775788, ptr %8, align 8, !tbaa !20
  br label %106

64:                                               ; preds = %58, %53
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %65, i32 0, i32 8
  store i64 -9223372036854775788, ptr %66, align 8, !tbaa !27
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = call i64 @DhcpInitRequest(ptr noundef %67)
  store i64 %68, ptr %8, align 8, !tbaa !20
  %69 = icmp slt i64 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %64
  br label %106

71:                                               ; preds = %64
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %73, i32 0, i32 6
  store ptr %72, ptr %74, align 8, !tbaa !28
  %75 = load ptr, ptr @gBS, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !29
  %78 = load i64, ptr %9, align 8, !tbaa !20
  call void %77(i64 noundef %78)
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %105

81:                                               ; preds = %71
  br label %82

82:                                               ; preds = %87, %81
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %83, i32 0, i32 8
  %85 = load i64, ptr %84, align 8, !tbaa !27
  %86 = icmp eq i64 %85, -9223372036854775788
  br i1 %86, label %87, label %101

87:                                               ; preds = %82
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %88, i32 0, i32 20
  %90 = load ptr, ptr %89, align 8, !tbaa !30
  %91 = getelementptr inbounds %struct._UDP_IO, ptr %90, i32 0, i32 10
  %92 = load ptr, ptr %91, align 8, !tbaa !31
  %93 = getelementptr inbounds %struct._EFI_UDP4_PROTOCOL, ptr %92, i32 0, i32 7
  %94 = load ptr, ptr %93, align 8, !tbaa !32
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %95, i32 0, i32 20
  %97 = load ptr, ptr %96, align 8, !tbaa !30
  %98 = getelementptr inbounds %struct._UDP_IO, ptr %97, i32 0, i32 10
  %99 = load ptr, ptr %98, align 8, !tbaa !31
  %100 = call i64 %94(ptr noundef %99)
  br label %82, !llvm.loop !34

101:                                              ; preds = %82
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %102, i32 0, i32 8
  %104 = load i64, ptr %103, align 8, !tbaa !27
  store i64 %104, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %112

105:                                              ; preds = %71
  store i64 0, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %112

106:                                              ; preds = %70, %63, %52
  %107 = load ptr, ptr @gBS, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %107, i32 0, i32 2
  %109 = load ptr, ptr %108, align 8, !tbaa !29
  %110 = load i64, ptr %9, align 8, !tbaa !20
  call void %109(i64 noundef %110)
  %111 = load i64, ptr %8, align 8, !tbaa !20
  store i64 %111, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %112

112:                                              ; preds = %106, %105, %101, %39, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %113 = load i64, ptr %3, align 8
  ret i64 %113
}

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

declare zeroext i8 @DebugAssertEnabled() #2

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

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

declare i64 @DhcpInitRequest(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_DHCP_PROTOCOL", !11, i64 0, !12, i64 8, !13, i64 80, !6, i64 96, !6, i64 104, !7, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !11, i64 152, !14, i64 156, !15, i64 160}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_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}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!"short", !7, i64 0}
!15 = !{!"", !11, i64 0, !16, i64 8, !13, i64 16, !13, i64 32, !11, i64 48, !11, i64 52}
!16 = !{!"long long", !7, i64 0}
!17 = !{!18, !6, i64 24}
!18 = !{!"", !19, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!19 = !{!"", !16, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!20 = !{!16, !16, i64 0}
!21 = !{!10, !6, i64 104}
!22 = !{!23, !16, i64 72}
!23 = !{!"_DHCP_SERVICE", !11, i64 0, !24, i64 8, !16, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !16, i64 64, !16, i64 72, !16, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !6, i64 104, !6, i64 112, !6, i64 120, !11, i64 128, !11, i64 132, !11, i64 136, !16, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !25, i64 176, !7, i64 208, !7, i64 209, !7, i64 210, !6, i64 232, !26, i64 240, !11, i64 312, !6, i64 320, !11, i64 328, !11, i64 332, !16, i64 336, !16, i64 344, !11, i64 352}
!24 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!25 = !{!"", !7, i64 0}
!26 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !25, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64}
!27 = !{!23, !16, i64 80}
!28 = !{!10, !6, i64 120}
!29 = !{!18, !6, i64 32}
!30 = !{!23, !6, i64 152}
!31 = !{!7, !7, i64 0}
!32 = !{!33, !6, i64 56}
!33 = !{!"_EFI_UDP4_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}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


; 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.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiDhcp4Start(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %.loopexit, label %4

4:                                                ; preds = %2
  %5 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %5, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre30 = add i64 %.pre, -8
  %.pre32 = inttoptr i64 %.pre30 to ptr
  br i1 %.not, label %._crit_edge, label %6

6:                                                ; preds = %4
  %7 = load i32, ptr %.pre32, align 8, !tbaa !5
  %.not26 = icmp eq i32 %7, 1885562980
  br i1 %.not26, label %.thread, label %8

8:                                                ; preds = %6
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 795, ptr noundef nonnull @.str.1) #2
  br label %._crit_edge

._crit_edge:                                      ; preds = %4, %8
  %.ph = phi ptr [ %0, %8 ], [ %.pre32, %4 ]
  %.pr = load i32, ptr %.ph, align 8, !tbaa !5
  %.not27 = icmp eq i32 %.pr, 1885562980
  br i1 %.not27, label %.thread, label %.loopexit

.thread:                                          ; preds = %6, %._crit_edge
  %9 = phi ptr [ %.ph, %._crit_edge ], [ %.pre32, %6 ]
  %10 = load ptr, ptr @gBS, align 8, !tbaa !16
  %11 = getelementptr inbounds i8, ptr %10, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !17
  %13 = tail call i64 %12(i64 noundef 8) #2
  %14 = getelementptr inbounds i8, ptr %9, i64 104
  %15 = load ptr, ptr %14, align 8, !tbaa !20
  %16 = getelementptr inbounds i8, ptr %15, i64 72
  %17 = load i64, ptr %16, align 8, !tbaa !21
  switch i64 %17, label %18 [
    i64 0, label %41
    i64 1, label %19
    i64 7, label %19
  ]

18:                                               ; preds = %.thread
  br label %41

19:                                               ; preds = %.thread, %.thread
  %20 = getelementptr inbounds i8, ptr %15, i64 80
  store i64 -9223372036854775788, ptr %20, align 8, !tbaa !26
  %21 = tail call i64 @DhcpInitRequest(ptr noundef nonnull %15) #2
  %22 = icmp slt i64 %21, 0
  br i1 %22, label %41, label %23

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %9, i64 120
  store ptr %1, ptr %24, align 8, !tbaa !27
  %25 = load ptr, ptr @gBS, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %25, i64 32
  %27 = load ptr, ptr %26, align 8, !tbaa !28
  tail call void %27(i64 noundef %13) #2
  %28 = icmp eq ptr %1, null
  br i1 %28, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %23
  %29 = load i64, ptr %20, align 8, !tbaa !26
  %30 = icmp eq i64 %29, -9223372036854775788
  br i1 %30, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %15, i64 152
  br label %32

32:                                               ; preds = %.lr.ph, %32
  %33 = load ptr, ptr %31, align 8, !tbaa !29
  %34 = getelementptr inbounds i8, ptr %33, i64 744
  %35 = load ptr, ptr %34, align 8, !tbaa !30
  %36 = getelementptr inbounds i8, ptr %35, i64 56
  %37 = load ptr, ptr %36, align 8, !tbaa !31
  %38 = tail call i64 %37(ptr noundef %35) #2
  %39 = load i64, ptr %20, align 8, !tbaa !26
  %40 = icmp eq i64 %39, -9223372036854775788
  br i1 %40, label %32, label %.loopexit, !llvm.loop !33

41:                                               ; preds = %.thread, %19, %18
  %.021 = phi i64 [ -9223372036854775788, %18 ], [ %21, %19 ], [ -9223372036854775789, %.thread ]
  %42 = load ptr, ptr @gBS, align 8, !tbaa !16
  %43 = getelementptr inbounds i8, ptr %42, i64 32
  %44 = load ptr, ptr %43, align 8, !tbaa !28
  tail call void %44(i64 noundef %13) #2
  br label %.loopexit

.loopexit:                                        ; preds = %32, %.preheader, %23, %._crit_edge, %2, %41
  %.0 = phi i64 [ %.021, %41 ], [ -9223372036854775806, %2 ], [ -9223372036854775806, %._crit_edge ], [ 0, %23 ], [ %29, %.preheader ], [ %39, %32 ]
  ret i64 %.0
}

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

declare i64 @DhcpInitRequest(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!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 = !{!11, !11, i64 0}
!17 = !{!18, !11, i64 24}
!18 = !{!"", !19, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368}
!19 = !{!"", !15, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!20 = !{!6, !11, i64 104}
!21 = !{!22, !15, i64 72}
!22 = !{!"_DHCP_SERVICE", !7, i64 0, !23, i64 8, !15, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !15, i64 64, !15, i64 72, !15, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !11, i64 104, !11, i64 112, !11, i64 120, !7, i64 128, !7, i64 132, !7, i64 136, !15, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !24, i64 176, !8, i64 208, !8, i64 209, !8, i64 210, !11, i64 232, !25, i64 240, !7, i64 312, !11, i64 320, !7, i64 328, !7, i64 332, !15, i64 336, !15, i64 344, !7, i64 352}
!23 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!24 = !{!"", !8, i64 0}
!25 = !{!"", !7, i64 0, !11, i64 8, !7, i64 16, !11, i64 24, !24, i64 32, !11, i64 40, !11, i64 48, !7, i64 56, !11, i64 64}
!26 = !{!22, !15, i64 80}
!27 = !{!6, !11, i64 120}
!28 = !{!18, !11, i64 32}
!29 = !{!22, !11, i64 152}
!30 = !{!8, !8, i64 0}
!31 = !{!32, !11, i64 56}
!32 = !{!"_EFI_UDP4_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}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


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