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

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct._IP6_CONFIG_INSTANCE = type { i32, i8, %struct._LIST_ENTRY, i16, %struct.EFI_IP6_CONFIG_INTERFACE_INFO, %struct.EFI_IP6_CONFIG_INTERFACE_ID, i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, [7 x %struct.IP6_CONFIG_DATA_ITEM], %struct.NET_MAP, %struct.NET_MAP, %struct._EFI_IP6_CONFIG_PROTOCOL, ptr, ptr, ptr, ptr, i8, i32, ptr, i32, ptr, i32, %struct._IP6_FORM_CALLBACK_INFO, %struct.IP6_CONFIG_NVDATA }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.EFI_IP6_CONFIG_INTERFACE_ID = type { [8 x i8] }
%struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS = type { i32 }
%struct.IP6_CONFIG_DATA_ITEM = type { ptr, ptr, i64, i8, %struct.NET_MAP, %union.IP6_CONFIG_DATA, i64 }
%union.IP6_CONFIG_DATA = type { ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct._EFI_IP6_CONFIG_PROTOCOL = type { ptr, ptr, ptr, ptr }
%struct._IP6_FORM_CALLBACK_INFO = type { i32, ptr, %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr, ptr }
%struct._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }
%struct.IP6_CONFIG_NVDATA = type { i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, %struct.EFI_IP6_CONFIG_INTERFACE_ID, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32 }
%struct._EFI_DHCP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._IP6_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, i64, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, ptr, %struct.IP6_LINK_RX_TOKEN, %struct.IP6_ASSEMBLE_TABLE, %struct.IP6_MLD_SERVICE_DATA, %struct.EFI_IPv6_ADDRESS, i8, i8, i8, i8, i8, i32, i32, i32, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i8, ptr, i8, i8, i32, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, %struct._IP6_CONFIG_INSTANCE, ptr, i32, i32 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.IP6_LINK_RX_TOKEN = type { i32, ptr, ptr, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%struct.IP6_ASSEMBLE_TABLE = type { [127 x %struct._LIST_ENTRY] }
%struct.IP6_MLD_SERVICE_DATA = type { i64, %struct._LIST_ENTRY }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%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 }
%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 }

@.str = external hidden unnamed_addr constant [135 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gEfiDhcp6ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gBS = external global ptr, align 8
@gEfiDhcp6ProtocolGuid = external global %struct.GUID, align 4
@.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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local i64 @Ip6ConfigDestroyDhcp6(ptr noundef %0) #2 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %8, i32 0, i32 15
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  store ptr %10, ptr %6, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %1
  %12 = call zeroext i8 @DebugAssertEnabled()
  %13 = icmp ne i8 %12, 0
  br i1 %13, label %14, label %19

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

17:                                               ; preds = %14
  call void @DebugAssert(ptr noundef @.str, i64 noundef 2337, ptr noundef @.str.13)
  br label %18

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

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

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._EFI_DHCP6_PROTOCOL, ptr %22, i32 0, i32 7
  %24 = load ptr, ptr %23, align 8, !tbaa !23
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call i64 %24(ptr noundef %25)
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._EFI_DHCP6_PROTOCOL, ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !25
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call i64 %29(ptr noundef %30, ptr noundef null)
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %32, i32 0, i32 15
  store ptr null, ptr %33, align 8, !tbaa !9
  %34 = call zeroext i8 @DebugAssertEnabled()
  %35 = zext i8 %34 to i32
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %47

37:                                               ; preds = %21
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = ptrtoint ptr %38 to i64
  %40 = sub i64 %39, ptrtoint (ptr getelementptr inbounds (%struct._IP6_SERVICE, ptr null, i32 0, i32 39) to i64)
  %41 = inttoptr i64 %40 to ptr
  %42 = getelementptr inbounds %struct._IP6_SERVICE, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !26
  %44 = icmp ne i32 %43, 1396068425
  br i1 %44, label %45, label %47

45:                                               ; preds = %37
  call void @DebugAssert(ptr noundef @.str, i64 noundef 2343, ptr noundef @.str.1)
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  br label %52

47:                                               ; preds = %37, %21
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = ptrtoint ptr %48 to i64
  %50 = sub i64 %49, ptrtoint (ptr getelementptr inbounds (%struct._IP6_SERVICE, ptr null, i32 0, i32 39) to i64)
  %51 = inttoptr i64 %50 to ptr
  br label %52

52:                                               ; preds = %47, %45
  %53 = phi ptr [ %46, %45 ], [ %51, %47 ]
  store ptr %53, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr @gBS, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %54, i32 0, i32 34
  %56 = load ptr, ptr %55, align 8, !tbaa !34
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %57, i32 0, i32 14
  %59 = load ptr, ptr %58, align 8, !tbaa !37
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._IP6_SERVICE, ptr %60, i32 0, i32 31
  %62 = load ptr, ptr %61, align 8, !tbaa !38
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._IP6_SERVICE, ptr %63, i32 0, i32 32
  %65 = load ptr, ptr %64, align 8, !tbaa !39
  %66 = call i64 %56(ptr noundef %59, ptr noundef @gEfiDhcp6ProtocolGuid, ptr noundef %62, ptr noundef %65)
  store i64 %66, ptr %5, align 8, !tbaa !40
  %67 = load i64, ptr %5, align 8, !tbaa !40
  %68 = icmp slt i64 %67, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %52
  %70 = load i64, ptr %5, align 8, !tbaa !40
  store i64 %70, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %85

71:                                               ; preds = %52
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._IP6_SERVICE, ptr %72, i32 0, i32 32
  %74 = load ptr, ptr %73, align 8, !tbaa !39
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._IP6_SERVICE, ptr %75, i32 0, i32 31
  %77 = load ptr, ptr %76, align 8, !tbaa !38
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %78, i32 0, i32 14
  %80 = load ptr, ptr %79, align 8, !tbaa !37
  %81 = call i64 @NetLibDestroyServiceChild(ptr noundef %74, ptr noundef %77, ptr noundef @gEfiDhcp6ServiceBindingProtocolGuid, ptr noundef %80)
  store i64 %81, ptr %5, align 8, !tbaa !40
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %82, i32 0, i32 14
  store ptr null, ptr %83, align 8, !tbaa !37
  %84 = load i64, ptr %5, align 8, !tbaa !40
  store i64 %84, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %85

85:                                               ; preds = %71, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %86 = load i64, ptr %2, align 8
  ret i64 %86
}

declare i64 @NetLibDestroyServiceChild(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 = !{!10, !6, i64 936}
!10 = !{!"_IP6_CONFIG_INSTANCE", !11, i64 0, !7, i64 4, !12, i64 8, !13, i64 24, !14, i64 32, !15, i64 168, !11, i64 176, !16, i64 180, !7, i64 184, !17, i64 800, !17, i64 840, !19, i64 880, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !7, i64 944, !11, i64 948, !6, i64 952, !11, i64 960, !6, i64 968, !11, i64 976, !20, i64 984, !22, i64 1040}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !7, i64 0, !7, i64 64, !11, i64 68, !15, i64 72, !11, i64 104, !6, i64 112, !11, i64 120, !6, i64 128}
!15 = !{!"", !7, i64 0}
!16 = !{!"", !11, i64 0}
!17 = !{!"", !12, i64 0, !12, i64 16, !18, i64 32}
!18 = !{!"long long", !7, i64 0}
!19 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_IP6_FORM_CALLBACK_INFO", !11, i64 0, !6, i64 8, !21, i64 16, !6, i64 40, !6, i64 48}
!21 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"", !11, i64 0, !16, i64 4, !15, i64 8, !12, i64 16, !11, i64 32, !12, i64 40, !11, i64 56, !12, i64 64, !11, i64 80}
!23 = !{!24, !6, i64 56}
!24 = !{!"_EFI_DHCP6_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}
!25 = !{!24, !6, i64 8}
!26 = !{!27, !11, i64 0}
!27 = !{!"_IP6_SERVICE", !11, i64 0, !28, i64 8, !18, i64 24, !18, i64 32, !12, i64 40, !12, i64 56, !6, i64 72, !6, i64 80, !29, i64 88, !15, i64 136, !31, i64 2168, !15, i64 2192, !7, i64 2208, !7, i64 2209, !7, i64 2210, !7, i64 2211, !7, i64 2212, !11, i64 2216, !11, i64 2220, !11, i64 2224, !11, i64 2228, !12, i64 2232, !12, i64 2248, !12, i64 2264, !12, i64 2280, !11, i64 2296, !7, i64 2300, !6, i64 2304, !7, i64 2312, !7, i64 2313, !11, i64 2316, !6, i64 2320, !6, i64 2328, !6, i64 2336, !6, i64 2344, !32, i64 2352, !33, i64 2372, !6, i64 3032, !6, i64 3040, !10, i64 3048, !6, i64 4176, !11, i64 4184, !11, i64 4188}
!28 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!29 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !30, i64 24}
!30 = !{!"", !6, i64 0, !18, i64 8, !7, i64 16}
!31 = !{!"", !18, i64 0, !12, i64 8}
!32 = !{!"", !11, i64 0, !11, i64 4, !13, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!33 = !{!"", !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}
!34 = !{!35, !6, i64 288}
!35 = !{!"", !36, 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}
!36 = !{!"", !18, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!37 = !{!10, !6, i64 928}
!38 = !{!27, !6, i64 2320}
!39 = !{!27, !6, i64 2328}
!40 = !{!18, !18, i64 0}


; 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.GUID = type { i32, i16, i16, [8 x i8] }

@.str = external hidden unnamed_addr constant [135 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gEfiDhcp6ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gBS = external local_unnamed_addr global ptr, align 8
@gEfiDhcp6ProtocolGuid = external global %struct.GUID, align 4
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Ip6ConfigDestroyDhcp6(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 936
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = tail call zeroext i8 @DebugAssertEnabled() #2
  %5 = icmp eq i8 %4, 0
  %6 = icmp ne ptr %3, null
  %or.cond = select i1 %5, i1 true, i1 %6
  br i1 %or.cond, label %8, label %7

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

8:                                                ; preds = %7, %1
  %9 = getelementptr inbounds i8, ptr %3, i64 56
  %10 = load ptr, ptr %9, align 8, !tbaa !22
  %11 = tail call i64 %10(ptr noundef %3) #2
  %12 = getelementptr inbounds i8, ptr %3, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !24
  %14 = tail call i64 %13(ptr noundef %3, ptr noundef null) #2
  store ptr null, ptr %2, align 8, !tbaa !5
  %15 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %15, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre23 = add i64 %.pre, -3048
  %.pre25 = inttoptr i64 %.pre23 to ptr
  br i1 %.not, label %._crit_edge, label %16

16:                                               ; preds = %8
  %17 = load i32, ptr %.pre25, align 8, !tbaa !25
  %.not22 = icmp eq i32 %17, 1396068425
  br i1 %.not22, label %._crit_edge, label %18

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

._crit_edge:                                      ; preds = %8, %16, %18
  %19 = phi ptr [ %0, %18 ], [ %.pre25, %16 ], [ %.pre25, %8 ]
  %20 = load ptr, ptr @gBS, align 8, !tbaa !33
  %21 = getelementptr inbounds i8, ptr %20, i64 288
  %22 = load ptr, ptr %21, align 8, !tbaa !34
  %23 = getelementptr inbounds i8, ptr %0, i64 928
  %24 = load ptr, ptr %23, align 8, !tbaa !37
  %25 = getelementptr inbounds i8, ptr %19, i64 2320
  %26 = load ptr, ptr %25, align 8, !tbaa !38
  %27 = getelementptr inbounds i8, ptr %19, i64 2328
  %28 = load ptr, ptr %27, align 8, !tbaa !39
  %29 = tail call i64 %22(ptr noundef %24, ptr noundef nonnull @gEfiDhcp6ProtocolGuid, ptr noundef %26, ptr noundef %28) #2
  %30 = icmp slt i64 %29, 0
  br i1 %30, label %36, label %31

31:                                               ; preds = %._crit_edge
  %32 = load ptr, ptr %27, align 8, !tbaa !39
  %33 = load ptr, ptr %25, align 8, !tbaa !38
  %34 = load ptr, ptr %23, align 8, !tbaa !37
  %35 = tail call i64 @NetLibDestroyServiceChild(ptr noundef %32, ptr noundef %33, ptr noundef nonnull @gEfiDhcp6ServiceBindingProtocolGuid, ptr noundef %34) #2
  store ptr null, ptr %23, align 8, !tbaa !37
  br label %36

36:                                               ; preds = %._crit_edge, %31
  %.0 = phi i64 [ %35, %31 ], [ %29, %._crit_edge ]
  ret i64 %.0
}

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 936}
!6 = !{!"_IP6_CONFIG_INSTANCE", !7, i64 0, !8, i64 4, !10, i64 8, !12, i64 24, !13, i64 32, !14, i64 168, !7, i64 176, !15, i64 180, !8, i64 184, !16, i64 800, !16, i64 840, !18, i64 880, !11, i64 912, !11, i64 920, !11, i64 928, !11, i64 936, !8, i64 944, !7, i64 948, !11, i64 952, !7, i64 960, !11, i64 968, !7, i64 976, !19, i64 984, !21, i64 1040}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"", !8, i64 0, !8, i64 64, !7, i64 68, !14, i64 72, !7, i64 104, !11, i64 112, !7, i64 120, !11, i64 128}
!14 = !{!"", !8, i64 0}
!15 = !{!"", !7, i64 0}
!16 = !{!"", !10, i64 0, !10, i64 16, !17, i64 32}
!17 = !{!"long long", !8, i64 0}
!18 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!"_IP6_FORM_CALLBACK_INFO", !7, i64 0, !11, i64 8, !20, i64 16, !11, i64 40, !11, i64 48}
!20 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!"", !7, i64 0, !15, i64 4, !14, i64 8, !10, i64 16, !7, i64 32, !10, i64 40, !7, i64 56, !10, i64 64, !7, i64 80}
!22 = !{!23, !11, i64 56}
!23 = !{!"_EFI_DHCP6_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}
!24 = !{!23, !11, i64 8}
!25 = !{!26, !7, i64 0}
!26 = !{!"_IP6_SERVICE", !7, i64 0, !27, i64 8, !17, i64 24, !17, i64 32, !10, i64 40, !10, i64 56, !11, i64 72, !11, i64 80, !28, i64 88, !14, i64 136, !30, i64 2168, !14, i64 2192, !8, i64 2208, !8, i64 2209, !8, i64 2210, !8, i64 2211, !8, i64 2212, !7, i64 2216, !7, i64 2220, !7, i64 2224, !7, i64 2228, !10, i64 2232, !10, i64 2248, !10, i64 2264, !10, i64 2280, !7, i64 2296, !8, i64 2300, !11, i64 2304, !8, i64 2312, !8, i64 2313, !7, i64 2316, !11, i64 2320, !11, i64 2328, !11, i64 2336, !11, i64 2344, !31, i64 2352, !32, i64 2372, !11, i64 3032, !11, i64 3040, !6, i64 3048, !11, i64 4176, !7, i64 4184, !7, i64 4188}
!27 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!28 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !29, i64 24}
!29 = !{!"", !11, i64 0, !17, i64 8, !8, i64 16}
!30 = !{!"", !17, i64 0, !10, i64 8}
!31 = !{!"", !7, i64 0, !7, i64 4, !12, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!32 = !{!"", !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}
!33 = !{!11, !11, i64 0}
!34 = !{!35, !11, i64 288}
!35 = !{!"", !36, 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}
!36 = !{!"", !17, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!37 = !{!6, !11, i64 928}
!38 = !{!26, !11, i64 2320}
!39 = !{!26, !11, i64 2328}


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