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

; 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._UDP4_INSTANCE_DATA_ = type { i32, %struct._LIST_ENTRY, ptr, %struct._EFI_UDP4_PROTOCOL, %struct.EFI_UDP4_CONFIG_DATA, ptr, i8, i8, %struct.NET_MAP, %struct.NET_MAP, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i16, i64, ptr, i8 }
%struct._EFI_UDP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_UDP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, i8, i32, i32, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i16 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct._UDP4_RXDATA_WRAP_ = type { %struct._LIST_ENTRY, ptr, i32, %struct.EFI_UDP4_RECEIVE_DATA }
%struct.EFI_UDP4_RECEIVE_DATA = type { %struct.EFI_TIME, ptr, %struct.EFI_UDP4_SESSION_DATA, i32, i32, [1 x %struct.EFI_UDP4_FRAGMENT_DATA] }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, i8, i8 }
%struct.EFI_UDP4_SESSION_DATA = type { %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i16 }
%struct.EFI_UDP4_FRAGMENT_DATA = type { i32, ptr }
%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 }
%struct.NET_VECTOR = type { i32, i64, ptr, ptr, i32, i32, i32, [1 x %struct.NET_BLOCK] }
%struct.NET_BLOCK = type { i32, ptr }
%struct.EFI_UDP4_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%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 }

@gBS = external global ptr, align 8

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

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

declare zeroext i8 @IsListEmpty(ptr noundef) #1

declare void @NetbufFree(ptr noundef) #1

declare ptr @InsertTailList(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @Udp4InstanceDeliverDgram(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct._UDP4_INSTANCE_DATA_, ptr %9, i32 0, i32 11
  %11 = call zeroext i8 @IsListEmpty(ptr noundef %10)
  %12 = icmp ne i8 %11, 0
  br i1 %12, label %107, label %13

13:                                               ; preds = %1
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._UDP4_INSTANCE_DATA_, ptr %14, i32 0, i32 9
  %16 = call zeroext i8 @NetMapIsEmpty(ptr noundef %15)
  %17 = icmp ne i8 %16, 0
  br i1 %17, label %107, label %18

18:                                               ; preds = %13
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._UDP4_INSTANCE_DATA_, ptr %19, i32 0, i32 11
  %21 = getelementptr inbounds %struct._LIST_ENTRY, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = ptrtoint ptr %22 to i64
  %24 = sub i64 %23, 0
  %25 = inttoptr i64 %24 to ptr
  store ptr %25, ptr %3, align 8, !tbaa !5
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !19
  %29 = getelementptr inbounds %struct.NET_BUF, ptr %28, i32 0, i32 1
  %30 = load i64, ptr %29, align 8, !tbaa !24
  %31 = icmp sgt i64 %30, 1
  br i1 %31, label %41, label %32

32:                                               ; preds = %18
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !19
  %36 = getelementptr inbounds %struct.NET_BUF, ptr %35, i32 0, i32 7
  %37 = load ptr, ptr %36, align 8, !tbaa !26
  %38 = getelementptr inbounds %struct.NET_VECTOR, ptr %37, i32 0, i32 1
  %39 = load i64, ptr %38, align 8, !tbaa !27
  %40 = icmp sgt i64 %39, 1
  br i1 %40, label %41, label %56

41:                                               ; preds = %32, %18
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  %45 = call ptr @NetbufDuplicate(ptr noundef %44, ptr noundef null, i32 noundef 0)
  store ptr %45, ptr %5, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %49

48:                                               ; preds = %41
  store i32 1, ptr %8, align 4
  br label %108

49:                                               ; preds = %41
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  call void @NetbufFree(ptr noundef %52)
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %54, i32 0, i32 1
  store ptr %53, ptr %55, align 8, !tbaa !19
  br label %56

56:                                               ; preds = %49, %32
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._UDP4_INSTANCE_DATA_, ptr %57, i32 0, i32 11
  %59 = call ptr @NetListRemoveHead(ptr noundef %58)
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._UDP4_INSTANCE_DATA_, ptr %60, i32 0, i32 9
  %62 = call ptr @NetMapRemoveHead(ptr noundef %61, ptr noundef null)
  store ptr %62, ptr %4, align 8, !tbaa !5
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %63, i32 0, i32 3
  store ptr %64, ptr %6, align 8, !tbaa !5
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !19
  %68 = getelementptr inbounds %struct.NET_BUF, ptr %67, i32 0, i32 8
  %69 = load i32, ptr %68, align 8, !tbaa !29
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.EFI_UDP4_RECEIVE_DATA, ptr %70, i32 0, i32 4
  store i32 %69, ptr %71, align 8, !tbaa !30
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !19
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.EFI_UDP4_RECEIVE_DATA, ptr %75, i32 0, i32 5
  %77 = getelementptr inbounds [1 x %struct.EFI_UDP4_FRAGMENT_DATA], ptr %76, i64 0, i64 0
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.EFI_UDP4_RECEIVE_DATA, ptr %78, i32 0, i32 4
  %80 = call i64 @NetbufBuildExt(ptr noundef %74, ptr noundef %77, ptr noundef %79)
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.EFI_UDP4_COMPLETION_TOKEN, ptr %81, i32 0, i32 1
  store i64 0, ptr %82, align 8, !tbaa !31
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_UDP4_COMPLETION_TOKEN, ptr %85, i32 0, i32 2
  store ptr %84, ptr %86, align 8, !tbaa !33
  %87 = load ptr, ptr @gBS, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %87, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !34
  %90 = call i64 %89(i64 noundef 16)
  store i64 %90, ptr %7, align 8, !tbaa !37
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._UDP4_INSTANCE_DATA_, ptr %91, i32 0, i32 12
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._UDP4_RXDATA_WRAP_, ptr %93, i32 0, i32 0
  %95 = call ptr @InsertTailList(ptr noundef %92, ptr noundef %94)
  %96 = load ptr, ptr @gBS, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !38
  %99 = load i64, ptr %7, align 8, !tbaa !37
  call void %98(i64 noundef %99)
  %100 = load ptr, ptr @gBS, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %100, i32 0, i32 11
  %102 = load ptr, ptr %101, align 8, !tbaa !39
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.EFI_UDP4_COMPLETION_TOKEN, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !40
  %106 = call i64 %102(ptr noundef %105)
  br label %107

107:                                              ; preds = %56, %13, %1
  store i32 0, ptr %8, align 4
  br label %108

108:                                              ; preds = %107, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  %109 = load i32, ptr %8, align 4
  switch i32 %109, label %111 [
    i32 0, label %110
    i32 1, label %110
  ]

110:                                              ; preds = %108, %108
  ret void

111:                                              ; preds = %108
  unreachable
}

declare zeroext i8 @NetMapIsEmpty(ptr noundef) #1

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

declare ptr @NetListRemoveHead(ptr noundef) #1

declare ptr @NetMapRemoveHead(ptr noundef, ptr noundef) #1

declare i64 @NetbufBuildExt(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 272}
!10 = !{!"_UDP4_INSTANCE_DATA_", !11, i64 0, !12, i64 8, !6, i64 24, !13, i64 32, !14, i64 96, !6, i64 136, !7, i64 144, !7, i64 145, !17, i64 152, !17, i64 192, !17, i64 232, !12, i64 272, !12, i64 288, !16, i64 304, !18, i64 312, !6, i64 320, !7, i64 328}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"_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}
!14 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !11, i64 8, !11, i64 12, !7, i64 16, !15, i64 17, !15, i64 21, !16, i64 26, !15, i64 28, !16, i64 32}
!15 = !{!"", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!"", !12, i64 0, !12, i64 16, !18, i64 32}
!18 = !{!"long long", !7, i64 0}
!19 = !{!20, !6, i64 16}
!20 = !{!"_UDP4_RXDATA_WRAP_", !12, i64 0, !6, i64 16, !11, i64 24, !21, i64 32}
!21 = !{!"", !22, i64 0, !6, i64 16, !23, i64 24, !11, i64 36, !11, i64 40, !7, i64 48}
!22 = !{!"", !16, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !11, i64 8, !16, i64 12, !7, i64 14, !7, i64 15}
!23 = !{!"", !15, i64 0, !16, i64 4, !15, i64 6, !16, i64 10}
!24 = !{!25, !18, i64 8}
!25 = !{!"", !11, i64 0, !18, i64 8, !12, 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}
!26 = !{!25, !6, i64 120}
!27 = !{!28, !18, i64 8}
!28 = !{!"", !11, i64 0, !18, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !7, i64 48}
!29 = !{!25, !11, i64 128}
!30 = !{!21, !11, i64 40}
!31 = !{!32, !18, i64 8}
!32 = !{!"", !6, i64 0, !18, i64 8, !7, i64 16}
!33 = !{!7, !7, i64 0}
!34 = !{!35, !6, i64 24}
!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 = !{!18, !18, i64 0}
!38 = !{!35, !6, i64 32}
!39 = !{!35, !6, i64 104}
!40 = !{!32, !6, 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"

@gBS = external local_unnamed_addr global ptr, align 8

declare zeroext i8 @IsListEmpty(ptr noundef) local_unnamed_addr #0

declare void @NetbufFree(ptr noundef) local_unnamed_addr #0

declare ptr @InsertTailList(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @Udp4InstanceDeliverDgram(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 272
  %3 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %2) #2
  %.not = icmp eq i8 %3, 0
  br i1 %.not, label %4, label %51

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 192
  %6 = tail call zeroext i8 @NetMapIsEmpty(ptr noundef nonnull %5) #2
  %.not24 = icmp eq i8 %6, 0
  br i1 %.not24, label %7, label %51

7:                                                ; preds = %4
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %10, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !23
  %13 = icmp sgt i64 %12, 1
  br i1 %13, label %20, label %14

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %10, i64 120
  %16 = load ptr, ptr %15, align 8, !tbaa !25
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !26
  %19 = icmp sgt i64 %18, 1
  br i1 %19, label %20, label %25

20:                                               ; preds = %14, %7
  %21 = tail call ptr @NetbufDuplicate(ptr noundef nonnull %10, ptr noundef null, i32 noundef 0) #2
  %22 = icmp eq ptr %21, null
  br i1 %22, label %51, label %23

23:                                               ; preds = %20
  %24 = load ptr, ptr %9, align 8, !tbaa !18
  tail call void @NetbufFree(ptr noundef %24) #2
  store ptr %21, ptr %9, align 8, !tbaa !18
  br label %25

25:                                               ; preds = %23, %14
  %26 = tail call ptr @NetListRemoveHead(ptr noundef nonnull %2) #2
  %27 = tail call ptr @NetMapRemoveHead(ptr noundef nonnull %5, ptr noundef null) #2
  %28 = getelementptr inbounds i8, ptr %8, i64 32
  %29 = load ptr, ptr %9, align 8, !tbaa !18
  %30 = getelementptr inbounds i8, ptr %29, i64 128
  %31 = load i32, ptr %30, align 8, !tbaa !28
  %32 = getelementptr inbounds i8, ptr %8, i64 72
  store i32 %31, ptr %32, align 8, !tbaa !29
  %33 = getelementptr inbounds i8, ptr %8, i64 80
  %34 = tail call i64 @NetbufBuildExt(ptr noundef %29, ptr noundef nonnull %33, ptr noundef nonnull %32) #2
  %35 = getelementptr inbounds i8, ptr %27, i64 8
  store i64 0, ptr %35, align 8, !tbaa !30
  %36 = getelementptr inbounds i8, ptr %27, i64 16
  store ptr %28, ptr %36, align 8, !tbaa !32
  %37 = load ptr, ptr @gBS, align 8, !tbaa !33
  %38 = getelementptr inbounds i8, ptr %37, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !34
  %40 = tail call i64 %39(i64 noundef 16) #2
  %41 = getelementptr inbounds i8, ptr %0, i64 288
  %42 = tail call ptr @InsertTailList(ptr noundef nonnull %41, ptr noundef nonnull %8) #2
  %43 = load ptr, ptr @gBS, align 8, !tbaa !33
  %44 = getelementptr inbounds i8, ptr %43, i64 32
  %45 = load ptr, ptr %44, align 8, !tbaa !37
  tail call void %45(i64 noundef %40) #2
  %46 = load ptr, ptr @gBS, align 8, !tbaa !33
  %47 = getelementptr inbounds i8, ptr %46, i64 104
  %48 = load ptr, ptr %47, align 8, !tbaa !38
  %49 = load ptr, ptr %27, align 8, !tbaa !39
  %50 = tail call i64 %48(ptr noundef %49) #2
  br label %51

51:                                               ; preds = %1, %4, %25, %20
  ret void
}

declare zeroext i8 @NetMapIsEmpty(ptr noundef) local_unnamed_addr #0

declare ptr @NetbufDuplicate(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @NetListRemoveHead(ptr noundef) local_unnamed_addr #0

declare ptr @NetMapRemoveHead(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i64 @NetbufBuildExt(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 272}
!6 = !{!"_UDP4_INSTANCE_DATA_", !7, i64 0, !10, i64 8, !11, i64 24, !12, i64 32, !13, i64 96, !11, i64 136, !8, i64 144, !8, i64 145, !16, i64 152, !16, i64 192, !16, i64 232, !10, i64 272, !10, i64 288, !15, i64 304, !17, i64 312, !11, i64 320, !8, i64 328}
!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 = !{!"_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}
!13 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !7, i64 8, !7, i64 12, !8, i64 16, !14, i64 17, !14, i64 21, !15, i64 26, !14, i64 28, !15, i64 32}
!14 = !{!"", !8, i64 0}
!15 = !{!"short", !8, i64 0}
!16 = !{!"", !10, i64 0, !10, i64 16, !17, i64 32}
!17 = !{!"long long", !8, i64 0}
!18 = !{!19, !11, i64 16}
!19 = !{!"_UDP4_RXDATA_WRAP_", !10, i64 0, !11, i64 16, !7, i64 24, !20, i64 32}
!20 = !{!"", !21, i64 0, !11, i64 16, !22, i64 24, !7, i64 36, !7, i64 40, !8, i64 48}
!21 = !{!"", !15, i64 0, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !7, i64 8, !15, i64 12, !8, i64 14, !8, i64 15}
!22 = !{!"", !14, i64 0, !15, i64 4, !14, i64 6, !15, i64 10}
!23 = !{!24, !17, i64 8}
!24 = !{!"", !7, i64 0, !17, i64 8, !10, i64 16, !8, i64 32, !11, i64 40, !11, i64 48, !8, i64 56, !11, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!25 = !{!24, !11, i64 120}
!26 = !{!27, !17, i64 8}
!27 = !{!"", !7, i64 0, !17, i64 8, !11, i64 16, !11, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !8, i64 48}
!28 = !{!24, !7, i64 128}
!29 = !{!20, !7, i64 40}
!30 = !{!31, !17, i64 8}
!31 = !{!"", !11, i64 0, !17, i64 8, !8, i64 16}
!32 = !{!8, !8, i64 0}
!33 = !{!11, !11, i64 0}
!34 = !{!35, !11, i64 24}
!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 = !{!35, !11, i64 32}
!38 = !{!35, !11, i64 104}
!39 = !{!31, !11, i64 0}


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