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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._EFI_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }
%struct.GUID = type { i32, i16, i16, [8 x i8] }
%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_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_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.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32 }
%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] }

@gDhcp4DriverBinding = external dso_local global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8
@gBS = external global ptr, align 8
@.str = external hidden unnamed_addr constant [155 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@gEfiUdp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiDhcp4ProtocolGuid = external global %struct.GUID, align 4

; Function Attrs: nounwind uwtable
define dso_local i64 @Dhcp4ServiceBindingCreateChild(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 ptr, align 8
  %11 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %17, label %14

14:                                               ; preds = %2
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %14, %2
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %108

18:                                               ; preds = %14
  %19 = call ptr @AllocatePool(i64 noundef 216)
  store ptr %19, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %18
  store i64 -9223372036854775799, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %108

23:                                               ; preds = %18
  %24 = call zeroext i8 @DebugAssertEnabled()
  %25 = zext i8 %24 to i32
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %37

27:                                               ; preds = %23
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = ptrtoint ptr %28 to i64
  %30 = sub i64 %29, ptrtoint (ptr getelementptr inbounds (%struct._DHCP_SERVICE, ptr null, i32 0, i32 1) to i64)
  %31 = inttoptr i64 %30 to ptr
  %32 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !9
  %34 = icmp ne i32 %33, 1346586692
  br i1 %34, label %35, label %37

35:                                               ; preds = %27
  call void @DebugAssert(ptr noundef @.str, i64 noundef 562, ptr noundef @.str.2)
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  br label %42

37:                                               ; preds = %27, %23
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = ptrtoint ptr %38 to i64
  %40 = sub i64 %39, ptrtoint (ptr getelementptr inbounds (%struct._DHCP_SERVICE, ptr null, i32 0, i32 1) to i64)
  %41 = inttoptr i64 %40 to ptr
  br label %42

42:                                               ; preds = %37, %35
  %43 = phi ptr [ %36, %35 ], [ %41, %37 ]
  store ptr %43, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  call void @DhcpInitProtocol(ptr noundef %44, ptr noundef %45)
  %46 = load ptr, ptr @gBS, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %46, i32 0, i32 39
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %50, i32 0, i32 1
  %52 = call i64 (ptr, ...) %48(ptr noundef %49, ptr noundef @gEfiDhcp4ProtocolGuid, ptr noundef %51, ptr noundef null)
  store i64 %52, ptr %8, align 8, !tbaa !20
  %53 = load i64, ptr %8, align 8, !tbaa !20
  %54 = icmp slt i64 %53, 0
  br i1 %54, label %55, label %58

55:                                               ; preds = %42
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  call void @FreePool(ptr noundef %56)
  %57 = load i64, ptr %8, align 8, !tbaa !20
  store i64 %57, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %108

58:                                               ; preds = %42
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %61, i32 0, i32 3
  store ptr %60, ptr %62, align 8, !tbaa !21
  %63 = load ptr, ptr @gBS, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %63, i32 0, i32 33
  %65 = load ptr, ptr %64, align 8, !tbaa !26
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %66, i32 0, i32 20
  %68 = load ptr, ptr %67, align 8, !tbaa !27
  %69 = getelementptr inbounds %struct._UDP_IO, ptr %68, i32 0, i32 6
  %70 = load ptr, ptr %69, align 8, !tbaa !28
  %71 = load ptr, ptr getelementptr inbounds (%struct._EFI_DRIVER_BINDING_PROTOCOL, ptr @gDhcp4DriverBinding, i32 0, i32 5), align 8, !tbaa !31
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %72, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !21
  %75 = call i64 %65(ptr noundef %70, ptr noundef @gEfiUdp4ProtocolGuid, ptr noundef %10, ptr noundef %71, ptr noundef %74, i32 noundef 8)
  store i64 %75, ptr %8, align 8, !tbaa !20
  %76 = load i64, ptr %8, align 8, !tbaa !20
  %77 = icmp slt i64 %76, 0
  br i1 %77, label %78, label %90

78:                                               ; preds = %58
  %79 = load ptr, ptr @gBS, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %79, i32 0, i32 40
  %81 = load ptr, ptr %80, align 8, !tbaa !33
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %82, i32 0, i32 3
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %85, i32 0, i32 1
  %87 = call i64 (ptr, ...) %81(ptr noundef %84, ptr noundef @gEfiDhcp4ProtocolGuid, ptr noundef %86, ptr noundef null)
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  call void @FreePool(ptr noundef %88)
  %89 = load i64, ptr %8, align 8, !tbaa !20
  store i64 %89, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %108

90:                                               ; preds = %58
  %91 = load ptr, ptr @gBS, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !34
  %94 = call i64 %93(i64 noundef 8)
  store i64 %94, ptr %9, align 8, !tbaa !20
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %95, i32 0, i32 5
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._DHCP_PROTOCOL, ptr %97, i32 0, i32 2
  %99 = call ptr @InsertTailList(ptr noundef %96, ptr noundef %98)
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._DHCP_SERVICE, ptr %100, i32 0, i32 6
  %102 = load i64, ptr %101, align 8, !tbaa !35
  %103 = add i64 %102, 1
  store i64 %103, ptr %101, align 8, !tbaa !35
  %104 = load ptr, ptr @gBS, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !36
  %107 = load i64, ptr %9, align 8, !tbaa !20
  call void %106(i64 noundef %107)
  store i64 0, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %108

108:                                              ; preds = %90, %78, %55, %22, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  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
  %109 = load i64, ptr %3, align 8
  ret i64 %109
}

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

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

declare void @FreePool(ptr noundef) #2

declare zeroext i8 @DebugAssertEnabled() #2

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

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

declare ptr @AllocatePool(i64 noundef) #2

declare ptr @InsertTailList(ptr noundef, 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_SERVICE", !11, i64 0, !12, i64 8, !13, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !13, i64 64, !13, i64 72, !13, 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, !13, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !15, i64 176, !7, i64 208, !7, i64 209, !7, i64 210, !6, i64 232, !16, i64 240, !11, i64 312, !6, i64 320, !11, i64 328, !11, i64 332, !13, i64 336, !13, i64 344, !11, i64 352}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !7, i64 0}
!16 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !15, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64}
!17 = !{!18, !6, i64 328}
!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 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !6, i64 96}
!22 = !{!"_DHCP_PROTOCOL", !11, i64 0, !23, i64 8, !14, 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, !24, i64 156, !25, i64 160}
!23 = !{!"_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}
!24 = !{!"short", !7, i64 0}
!25 = !{!"", !11, i64 0, !13, i64 8, !14, i64 16, !14, i64 32, !11, i64 48, !11, i64 52}
!26 = !{!18, !6, i64 280}
!27 = !{!10, !6, i64 152}
!28 = !{!29, !6, i64 56}
!29 = !{!"_UDP_IO", !11, i64 0, !14, i64 8, !13, i64 24, !7, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !30, i64 64, !14, i64 720, !6, i64 736, !7, i64 744, !7, i64 752}
!30 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !15, i64 552, !15, i64 584, !15, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!31 = !{!32, !6, i64 40}
!32 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !6, i64 32, !6, i64 40}
!33 = !{!18, !6, i64 336}
!34 = !{!18, !6, i64 24}
!35 = !{!10, !13, i64 64}
!36 = !{!18, !6, i64 32}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._EFI_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }
%struct.GUID = type { i32, i16, i16, [8 x i8] }

@gDhcp4DriverBinding = external dso_local local_unnamed_addr global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8
@gBS = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [155 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@gEfiUdp4ProtocolGuid = external global %struct.GUID, align 4
@gEfiDhcp4ProtocolGuid = external global %struct.GUID, align 4

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @Dhcp4ServiceBindingCreateChild(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %1, null
  %or.cond = or i1 %4, %5
  br i1 %or.cond, label %54, label %6

6:                                                ; preds = %2
  %7 = tail call ptr @AllocatePool(i64 noundef 216) #3
  %8 = icmp eq ptr %7, null
  br i1 %8, label %54, label %9

9:                                                ; preds = %6
  %10 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %10, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre33 = add i64 %.pre, -8
  %.pre35 = inttoptr i64 %.pre33 to ptr
  br i1 %.not, label %._crit_edge, label %11

11:                                               ; preds = %9
  %12 = load i32, ptr %.pre35, align 8, !tbaa !5
  %.not32 = icmp eq i32 %12, 1346586692
  br i1 %.not32, label %._crit_edge, label %13

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

._crit_edge:                                      ; preds = %9, %11, %13
  %14 = phi ptr [ %0, %13 ], [ %.pre35, %11 ], [ %.pre35, %9 ]
  tail call void @DhcpInitProtocol(ptr noundef %14, ptr noundef nonnull %7)
  %15 = load ptr, ptr @gBS, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %15, i64 328
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %7, i64 8
  %19 = tail call i64 (ptr, ...) %17(ptr noundef nonnull %1, ptr noundef nonnull @gEfiDhcp4ProtocolGuid, ptr noundef nonnull %18, ptr noundef null) #3
  %20 = icmp slt i64 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %._crit_edge
  tail call void @FreePool(ptr noundef nonnull %7) #3
  br label %54

22:                                               ; preds = %._crit_edge
  %23 = load ptr, ptr %1, align 8, !tbaa !16
  %24 = getelementptr inbounds i8, ptr %7, i64 96
  store ptr %23, ptr %24, align 8, !tbaa !20
  %25 = load ptr, ptr @gBS, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %25, i64 280
  %27 = load ptr, ptr %26, align 8, !tbaa !25
  %28 = getelementptr inbounds i8, ptr %14, i64 152
  %29 = load ptr, ptr %28, align 8, !tbaa !26
  %30 = getelementptr inbounds i8, ptr %29, i64 56
  %31 = load ptr, ptr %30, align 8, !tbaa !27
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @gDhcp4DriverBinding, i64 40), align 8, !tbaa !30
  %33 = call i64 %27(ptr noundef %31, ptr noundef nonnull @gEfiUdp4ProtocolGuid, ptr noundef nonnull %3, ptr noundef %32, ptr noundef %23, i32 noundef 8) #3
  %34 = icmp slt i64 %33, 0
  %35 = load ptr, ptr @gBS, align 8, !tbaa !16
  br i1 %34, label %36, label %41

36:                                               ; preds = %22
  %37 = getelementptr inbounds i8, ptr %35, i64 336
  %38 = load ptr, ptr %37, align 8, !tbaa !32
  %39 = load ptr, ptr %24, align 8, !tbaa !20
  %40 = call i64 (ptr, ...) %38(ptr noundef %39, ptr noundef nonnull @gEfiDhcp4ProtocolGuid, ptr noundef nonnull %18, ptr noundef null) #3
  call void @FreePool(ptr noundef nonnull %7) #3
  br label %54

41:                                               ; preds = %22
  %42 = getelementptr inbounds i8, ptr %35, i64 24
  %43 = load ptr, ptr %42, align 8, !tbaa !33
  %44 = call i64 %43(i64 noundef 8) #3
  %45 = getelementptr inbounds i8, ptr %14, i64 48
  %46 = getelementptr inbounds i8, ptr %7, i64 80
  %47 = call ptr @InsertTailList(ptr noundef nonnull %45, ptr noundef nonnull %46) #3
  %48 = getelementptr inbounds i8, ptr %14, i64 64
  %49 = load i64, ptr %48, align 8, !tbaa !34
  %50 = add i64 %49, 1
  store i64 %50, ptr %48, align 8, !tbaa !34
  %51 = load ptr, ptr @gBS, align 8, !tbaa !16
  %52 = getelementptr inbounds i8, ptr %51, i64 32
  %53 = load ptr, ptr %52, align 8, !tbaa !35
  call void %53(i64 noundef %44) #3
  br label %54

54:                                               ; preds = %6, %2, %41, %36, %21
  %.0 = phi i64 [ %19, %21 ], [ %33, %36 ], [ 0, %41 ], [ -9223372036854775806, %2 ], [ -9223372036854775799, %6 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i64 %.0
}

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

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

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #2

declare ptr @InsertTailList(ptr noundef, ptr noundef) local_unnamed_addr #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 = { mustprogress 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, !7, i64 0}
!6 = !{!"_DHCP_SERVICE", !7, i64 0, !10, i64 8, !12, i64 24, !11, i64 32, !11, i64 40, !13, i64 48, !12, i64 64, !12, i64 72, !12, 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, !12, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !14, i64 176, !8, i64 208, !8, i64 209, !8, i64 210, !11, i64 232, !15, i64 240, !7, i64 312, !11, i64 320, !7, i64 328, !7, i64 332, !12, i64 336, !12, i64 344, !7, i64 352}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!14 = !{!"", !8, i64 0}
!15 = !{!"", !7, i64 0, !11, i64 8, !7, i64 16, !11, i64 24, !14, i64 32, !11, i64 40, !11, i64 48, !7, i64 56, !11, i64 64}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !11, i64 328}
!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 = !{!"", !12, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!20 = !{!21, !11, i64 96}
!21 = !{!"_DHCP_PROTOCOL", !7, i64 0, !22, i64 8, !13, 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, !23, i64 156, !24, i64 160}
!22 = !{!"_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}
!23 = !{!"short", !8, i64 0}
!24 = !{!"", !7, i64 0, !12, i64 8, !13, i64 16, !13, i64 32, !7, i64 48, !7, i64 52}
!25 = !{!18, !11, i64 280}
!26 = !{!6, !11, i64 152}
!27 = !{!28, !11, i64 56}
!28 = !{!"_UDP_IO", !7, i64 0, !13, i64 8, !12, i64 24, !8, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !29, i64 64, !13, i64 720, !11, i64 736, !8, i64 744, !8, i64 752}
!29 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !14, i64 552, !14, i64 584, !14, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!30 = !{!31, !11, i64 40}
!31 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !7, i64 24, !11, i64 32, !11, i64 40}
!32 = !{!18, !11, i64 336}
!33 = !{!18, !11, i64 24}
!34 = !{!6, !12, i64 64}
!35 = !{!18, !11, i64 32}


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