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

; 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_MAC_ADDRESS = type { [32 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] }
%struct._LIST_ENTRY = type { ptr, ptr }
%union.NET_IP_HEAD = type { ptr }
%struct.NET_BLOCK_OP = type { ptr, ptr, ptr, ptr, i32 }
%struct.IP4_LINK_TX_TOKEN = type { i32, %struct._LIST_ENTRY, ptr, ptr, ptr, ptr, ptr, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA = type { ptr, ptr, i16, i32, i16, i16, [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA] }
%struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA = type { i32, ptr }
%struct._IP4_INTERFACE = type { i32, %struct._LIST_ENTRY, i64, i32, i32, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i32, %struct._LIST_ENTRY, 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 }

@mZeroMacAddress = external dso_local global %struct.EFI_MAC_ADDRESS, align 1
@gBS = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @Ip4WrapLinkTxToken(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = 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 ptr %3, ptr %10, align 8, !tbaa !5
  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 4, ptr %16) #3
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.NET_BUF, ptr %18, i32 0, i32 8
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = sub i32 %20, 1
  %22 = zext i32 %21 to i64
  %23 = mul i64 %22, 16
  %24 = add i64 200, %23
  %25 = call ptr @AllocatePool(i64 noundef %24)
  store ptr %25, ptr %14, align 8, !tbaa !5
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %5
  store ptr null, ptr %6, align 8
  store i32 1, ptr %17, align 4
  br label %109

29:                                               ; preds = %5
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %30, i32 0, i32 0
  store i32 1413894217, ptr %31, align 8, !tbaa !14
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %32, i32 0, i32 1
  %34 = call ptr @InitializeListHead(ptr noundef %33)
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %36, i32 0, i32 2
  store ptr %35, ptr %37, align 8, !tbaa !20
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %39, i32 0, i32 3
  store ptr %38, ptr %40, align 8, !tbaa !21
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load ptr, ptr %14, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %42, i32 0, i32 4
  store ptr %41, ptr %43, align 8, !tbaa !22
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %45, i32 0, i32 5
  store ptr %44, ptr %46, align 8, !tbaa !23
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %48, i32 0, i32 6
  store ptr %47, ptr %49, align 8, !tbaa !24
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %50, i32 0, i32 7
  %52 = call ptr @CopyMem(ptr noundef %51, ptr noundef @mZeroMacAddress, i64 noundef 32)
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %53, i32 0, i32 8
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._IP4_INTERFACE, ptr %55, i32 0, i32 16
  %57 = call ptr @CopyMem(ptr noundef %54, ptr noundef %56, i64 noundef 32)
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %58, i32 0, i32 9
  store ptr %59, ptr %12, align 8, !tbaa !5
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %60, i32 0, i32 1
  store i64 -9223372036854775802, ptr %61, align 8, !tbaa !25
  %62 = load ptr, ptr @gBS, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %62, i32 0, i32 8
  %64 = load ptr, ptr %63, align 8, !tbaa !26
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %66, i32 0, i32 0
  %68 = call i64 %64(i32 noundef 512, i64 noundef 16, ptr noundef @Ip4OnFrameSent, ptr noundef %65, ptr noundef %67)
  store i64 %68, ptr %15, align 8, !tbaa !29
  %69 = load i64, ptr %15, align 8, !tbaa !29
  %70 = icmp slt i64 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %29
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  call void @FreePool(ptr noundef %72)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %17, align 4
  br label %109

73:                                               ; preds = %29
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %74, i32 0, i32 10
  store ptr %75, ptr %13, align 8, !tbaa !5
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %77, i32 0, i32 2
  store ptr %76, ptr %78, align 8, !tbaa !30
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %79, i32 0, i32 7
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %81, i32 0, i32 0
  store ptr %80, ptr %82, align 8, !tbaa !31
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.IP4_LINK_TX_TOKEN, ptr %83, i32 0, i32 8
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %85, i32 0, i32 1
  store ptr %84, ptr %86, align 8, !tbaa !32
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %87, i32 0, i32 2
  store i16 2048, ptr %88, align 8, !tbaa !33
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.NET_BUF, ptr %89, i32 0, i32 9
  %91 = load i32, ptr %90, align 4, !tbaa !34
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %92, i32 0, i32 3
  store i32 %91, ptr %93, align 4, !tbaa !35
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %94, i32 0, i32 4
  store i16 0, ptr %95, align 8, !tbaa !36
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.NET_BUF, ptr %96, i32 0, i32 8
  %98 = load i32, ptr %97, align 8, !tbaa !9
  store i32 %98, ptr %16, align 4, !tbaa !37
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %100, i32 0, i32 6
  %102 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %101, i64 0, i64 0
  %103 = call i64 @NetbufBuildExt(ptr noundef %99, ptr noundef %102, ptr noundef %16)
  %104 = load i32, ptr %16, align 4, !tbaa !37
  %105 = trunc i32 %104 to i16
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %106, i32 0, i32 5
  store i16 %105, ptr %107, align 2, !tbaa !38
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %108, ptr %6, align 8
  store i32 1, ptr %17, align 4
  br label %109

109:                                              ; preds = %73, %71, %28
  call void @llvm.lifetime.end.p0(i64 4, 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
  %110 = load ptr, ptr %6, align 8
  ret ptr %110
}

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

declare ptr @AllocatePool(i64 noundef) #2

declare ptr @InitializeListHead(ptr noundef) #2

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

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

declare void @FreePool(ptr noundef) #2

declare i64 @NetbufBuildExt(ptr noundef, ptr 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

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 128}
!10 = !{!"", !11, i64 0, !12, i64 8, !13, i64 16, !7, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !11, i64 128, !11, i64 132, !7, i64 136}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!15, !11, i64 0}
!15 = !{!"", !11, i64 0, !13, i64 8, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !16, i64 64, !16, i64 96, !17, i64 128, !18, i64 152}
!16 = !{!"", !7, i64 0}
!17 = !{!"", !6, i64 0, !12, i64 8, !7, i64 16}
!18 = !{!"", !6, i64 0, !6, i64 8, !19, i64 16, !11, i64 20, !19, i64 24, !19, i64 26, !7, i64 32}
!19 = !{!"short", !7, i64 0}
!20 = !{!15, !6, i64 24}
!21 = !{!15, !6, i64 32}
!22 = !{!15, !6, i64 40}
!23 = !{!15, !6, i64 48}
!24 = !{!15, !6, i64 56}
!25 = !{!17, !12, i64 8}
!26 = !{!27, !6, i64 80}
!27 = !{!"", !28, 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}
!28 = !{!"", !12, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!29 = !{!12, !12, i64 0}
!30 = !{!7, !7, i64 0}
!31 = !{!18, !6, i64 0}
!32 = !{!18, !6, i64 8}
!33 = !{!18, !19, i64 16}
!34 = !{!10, !11, i64 132}
!35 = !{!18, !11, i64 20}
!36 = !{!18, !19, i64 24}
!37 = !{!11, !11, i64 0}
!38 = !{!18, !19, i64 26}


; 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_MAC_ADDRESS = type { [32 x i8] }

@mZeroMacAddress = external dso_local global %struct.EFI_MAC_ADDRESS, align 1
@gBS = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @Ip4WrapLinkTxToken(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %7 = getelementptr inbounds i8, ptr %2, i64 128
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = add i32 %8, -1
  %10 = zext i32 %9 to i64
  %11 = shl nuw nsw i64 %10, 4
  %12 = add nuw nsw i64 %11, 200
  %13 = tail call ptr @AllocatePool(i64 noundef %12) #3
  %14 = icmp eq ptr %13, null
  br i1 %14, label %51, label %15

15:                                               ; preds = %5
  store i32 1413894217, ptr %13, align 8, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %13, i64 8
  %17 = tail call ptr @InitializeListHead(ptr noundef nonnull %16) #3
  %18 = getelementptr inbounds i8, ptr %13, i64 24
  store ptr %0, ptr %18, align 8, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %13, i64 32
  store ptr %1, ptr %19, align 8, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %13, i64 40
  store ptr %3, ptr %20, align 8, !tbaa !21
  %21 = getelementptr inbounds i8, ptr %13, i64 48
  store ptr %2, ptr %21, align 8, !tbaa !22
  %22 = getelementptr inbounds i8, ptr %13, i64 56
  store ptr %4, ptr %22, align 8, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %13, i64 64
  %24 = tail call ptr @CopyMem(ptr noundef nonnull %23, ptr noundef nonnull @mZeroMacAddress, i64 noundef 32) #3
  %25 = getelementptr inbounds i8, ptr %13, i64 96
  %26 = getelementptr inbounds i8, ptr %0, i64 136
  %27 = tail call ptr @CopyMem(ptr noundef nonnull %25, ptr noundef nonnull %26, i64 noundef 32) #3
  %28 = getelementptr inbounds i8, ptr %13, i64 128
  %29 = getelementptr inbounds i8, ptr %13, i64 136
  store i64 -9223372036854775802, ptr %29, align 8, !tbaa !24
  %30 = load ptr, ptr @gBS, align 8, !tbaa !25
  %31 = getelementptr inbounds i8, ptr %30, i64 80
  %32 = load ptr, ptr %31, align 8, !tbaa !26
  %33 = tail call i64 %32(i32 noundef 512, i64 noundef 16, ptr noundef nonnull @Ip4OnFrameSent, ptr noundef nonnull %13, ptr noundef nonnull %28) #3
  %34 = icmp slt i64 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %15
  tail call void @FreePool(ptr noundef nonnull %13) #3
  br label %51

36:                                               ; preds = %15
  %37 = getelementptr inbounds i8, ptr %13, i64 152
  %38 = getelementptr inbounds i8, ptr %13, i64 144
  store ptr %37, ptr %38, align 8, !tbaa !29
  store ptr %23, ptr %37, align 8, !tbaa !30
  %39 = getelementptr inbounds i8, ptr %13, i64 160
  store ptr %25, ptr %39, align 8, !tbaa !31
  %40 = getelementptr inbounds i8, ptr %13, i64 168
  store i16 2048, ptr %40, align 8, !tbaa !32
  %41 = getelementptr inbounds i8, ptr %2, i64 132
  %42 = load i32, ptr %41, align 4, !tbaa !33
  %43 = getelementptr inbounds i8, ptr %13, i64 172
  store i32 %42, ptr %43, align 4, !tbaa !34
  %44 = getelementptr inbounds i8, ptr %13, i64 176
  store i16 0, ptr %44, align 8, !tbaa !35
  %45 = load i32, ptr %7, align 8, !tbaa !5
  store i32 %45, ptr %6, align 4, !tbaa !36
  %46 = getelementptr inbounds i8, ptr %13, i64 184
  %47 = call i64 @NetbufBuildExt(ptr noundef nonnull %2, ptr noundef nonnull %46, ptr noundef nonnull %6) #3
  %48 = load i32, ptr %6, align 4, !tbaa !36
  %49 = trunc i32 %48 to i16
  %50 = getelementptr inbounds i8, ptr %13, i64 178
  store i16 %49, ptr %50, align 2, !tbaa !37
  br label %51

51:                                               ; preds = %5, %36, %35
  %.0 = phi ptr [ null, %35 ], [ %13, %36 ], [ null, %5 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  ret ptr %.0
}

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

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #2

declare ptr @InitializeListHead(ptr noundef) local_unnamed_addr #2

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare i64 @NetbufBuildExt(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 128}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !8, i64 32, !12, i64 40, !12, i64 48, !8, i64 56, !12, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !12, i64 0, !12, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"", !7, i64 0, !11, i64 8, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !15, i64 64, !15, i64 96, !16, i64 128, !17, i64 152}
!15 = !{!"", !8, i64 0}
!16 = !{!"", !12, i64 0, !10, i64 8, !8, i64 16}
!17 = !{!"", !12, i64 0, !12, i64 8, !18, i64 16, !7, i64 20, !18, i64 24, !18, i64 26, !8, i64 32}
!18 = !{!"short", !8, i64 0}
!19 = !{!14, !12, i64 24}
!20 = !{!14, !12, i64 32}
!21 = !{!14, !12, i64 40}
!22 = !{!14, !12, i64 48}
!23 = !{!14, !12, i64 56}
!24 = !{!16, !10, i64 8}
!25 = !{!12, !12, i64 0}
!26 = !{!27, !12, i64 80}
!27 = !{!"", !28, i64 0, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !12, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !12, i64 360, !12, i64 368}
!28 = !{!"", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!29 = !{!8, !8, i64 0}
!30 = !{!17, !12, i64 0}
!31 = !{!17, !12, i64 8}
!32 = !{!17, !18, i64 16}
!33 = !{!6, !7, i64 132}
!34 = !{!17, !7, i64 20}
!35 = !{!17, !18, i64 24}
!36 = !{!7, !7, i64 0}
!37 = !{!17, !18, i64 26}


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