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

; 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.IP6_ICMP_ERROR_HEAD = type { %struct.IP6_ICMP_HEAD, i32, %struct._EFI_IP6_HEADER }
%struct.IP6_ICMP_HEAD = type { i8, i8, i16 }
%struct._EFI_IP6_HEADER = type { i16, i16, i16, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.IP6_ROUTE_ENTRY = type { %struct._LIST_ENTRY, i64, i32, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS }
%struct._LIST_ENTRY = type { 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_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_MAC_ADDRESS = type { [32 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.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%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._IP6_ROUTE_TABLE = type { i64, i32, [129 x %struct._LIST_ENTRY], %struct.IP6_ROUTE_CACHE }
%struct.IP6_ROUTE_CACHE = type { [31 x %struct._LIST_ENTRY], [31 x i8] }

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

declare void @NetbufFree(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 @Ip6ProcessPacketTooBig(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.IP6_ICMP_ERROR_HEAD, align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  %14 = call i32 @NetbufCopy(ptr noundef %13, i32 noundef 0, i32 noundef 48, ptr noundef %8)
  %15 = getelementptr inbounds %struct.IP6_ICMP_ERROR_HEAD, ptr %8, i32 0, i32 1
  %16 = load i32, ptr %15, align 1, !tbaa !9
  %17 = call i32 @SwapBytes32(i32 noundef %16)
  store i32 %17, ptr %9, align 4, !tbaa !16
  %18 = getelementptr inbounds %struct.IP6_ICMP_ERROR_HEAD, ptr %8, i32 0, i32 2
  %19 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %18, i32 0, i32 6
  store ptr %19, ptr %11, align 8, !tbaa !5
  %20 = load i32, ptr %9, align 4, !tbaa !16
  %21 = icmp ult i32 %20, 1280
  br i1 %21, label %22, label %72

22:                                               ; preds = %3
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %23, i32 0, i32 0
  %25 = getelementptr inbounds [16 x i8], ptr %24, i64 0, i64 0
  %26 = load i8, ptr %25, align 1, !tbaa !17
  %27 = zext i8 %26 to i32
  %28 = icmp eq i32 %27, 255
  br i1 %28, label %29, label %53

29:                                               ; preds = %22
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = call ptr @Ip6CreateRouteEntry(ptr noundef %30, i8 noundef zeroext -128, ptr noundef null)
  store ptr %31, ptr %10, align 8, !tbaa !5
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %36

34:                                               ; preds = %29
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %35)
  store i64 -9223372036854775799, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %74

36:                                               ; preds = %29
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.IP6_ROUTE_ENTRY, ptr %37, i32 0, i32 2
  store i32 17, ptr %38, align 8, !tbaa !18
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._IP6_SERVICE, ptr %39, i32 0, i32 7
  %41 = load ptr, ptr %40, align 8, !tbaa !22
  %42 = getelementptr inbounds %struct._IP6_ROUTE_TABLE, ptr %41, i32 0, i32 2
  %43 = getelementptr inbounds [129 x %struct._LIST_ENTRY], ptr %42, i64 0, i64 128
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.IP6_ROUTE_ENTRY, ptr %44, i32 0, i32 0
  %46 = call ptr @InsertHeadList(ptr noundef %43, ptr noundef %45)
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._IP6_SERVICE, ptr %47, i32 0, i32 7
  %49 = load ptr, ptr %48, align 8, !tbaa !22
  %50 = getelementptr inbounds %struct._IP6_ROUTE_TABLE, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 8, !tbaa !38
  %52 = add i32 %51, 1
  store i32 %52, ptr %50, align 8, !tbaa !38
  br label %71

53:                                               ; preds = %22
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._IP6_SERVICE, ptr %54, i32 0, i32 7
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = call ptr @Ip6FindRouteEntry(ptr noundef %56, ptr noundef %57, ptr noundef null)
  store ptr %58, ptr %10, align 8, !tbaa !5
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %63

61:                                               ; preds = %53
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %62)
  store i64 -9223372036854775794, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %74

63:                                               ; preds = %53
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.IP6_ROUTE_ENTRY, ptr %64, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !18
  %67 = or i32 %66, 16
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.IP6_ROUTE_ENTRY, ptr %68, i32 0, i32 2
  store i32 %67, ptr %69, align 8, !tbaa !18
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  call void @Ip6FreeRouteEntry(ptr noundef %70)
  br label %71

71:                                               ; preds = %63, %36
  br label %72

72:                                               ; preds = %71, %3
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %73)
  store i64 0, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %74

74:                                               ; preds = %72, %61, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #3
  %75 = load i64, ptr %4, align 8
  ret i64 %75
}

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

declare i32 @SwapBytes32(i32 noundef) #1

declare ptr @Ip6CreateRouteEntry(ptr noundef, i8 noundef zeroext, ptr noundef) #1

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

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

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


; 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.IP6_ICMP_ERROR_HEAD = type { %struct.IP6_ICMP_HEAD, i32, %struct._EFI_IP6_HEADER }
%struct.IP6_ICMP_HEAD = type { i8, i8, i16 }
%struct._EFI_IP6_HEADER = type { i16, i16, i16, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }

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

declare void @NetbufFree(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress 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 range(i64 -9223372036854775799, 1) i64 @Ip6ProcessPacketTooBig(ptr nocapture noundef readonly %0, ptr nocapture noundef readnone %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.IP6_ICMP_ERROR_HEAD, align 1
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #3
  %5 = call i32 @NetbufCopy(ptr noundef %2, i32 noundef 0, i32 noundef 48, ptr noundef nonnull %4) #3
  %6 = getelementptr inbounds i8, ptr %4, i64 4
  %7 = load i32, ptr %6, align 1, !tbaa !5
  %8 = call i32 @SwapBytes32(i32 noundef %7) #3
  %9 = getelementptr inbounds i8, ptr %4, i64 32
  %10 = icmp ult i32 %8, 1280
  br i1 %10, label %11, label %36

11:                                               ; preds = %3
  %12 = load i8, ptr %9, align 1, !tbaa !14
  %13 = icmp eq i8 %12, -1
  br i1 %13, label %14, label %27

14:                                               ; preds = %11
  %15 = call ptr @Ip6CreateRouteEntry(ptr noundef nonnull %9, i8 noundef zeroext -128, ptr noundef null) #3
  %16 = icmp eq ptr %15, null
  br i1 %16, label %36, label %17

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %15, i64 24
  store i32 17, ptr %18, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %0, i64 80
  %20 = load ptr, ptr %19, align 8, !tbaa !20
  %21 = getelementptr inbounds i8, ptr %20, i64 2064
  %22 = call ptr @InsertHeadList(ptr noundef nonnull %21, ptr noundef nonnull %15) #3
  %23 = load ptr, ptr %19, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !36
  %26 = add i32 %25, 1
  store i32 %26, ptr %24, align 8, !tbaa !36
  br label %36

27:                                               ; preds = %11
  %28 = getelementptr inbounds i8, ptr %0, i64 80
  %29 = load ptr, ptr %28, align 8, !tbaa !20
  %30 = call ptr @Ip6FindRouteEntry(ptr noundef %29, ptr noundef nonnull %9, ptr noundef null) #3
  %31 = icmp eq ptr %30, null
  br i1 %31, label %36, label %32

32:                                               ; preds = %27
  %33 = getelementptr inbounds i8, ptr %30, i64 24
  %34 = load i32, ptr %33, align 8, !tbaa !15
  %35 = or i32 %34, 16
  store i32 %35, ptr %33, align 8, !tbaa !15
  call void @Ip6FreeRouteEntry(ptr noundef nonnull %30) #3
  br label %36

36:                                               ; preds = %3, %32, %17, %27, %14
  %.0 = phi i64 [ -9223372036854775799, %14 ], [ -9223372036854775794, %27 ], [ 0, %17 ], [ 0, %32 ], [ 0, %3 ]
  call void @NetbufFree(ptr noundef %2) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #3
  ret i64 %.0
}

declare i32 @NetbufCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #1

declare ptr @Ip6CreateRouteEntry(ptr noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #1

declare ptr @InsertHeadList(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @Ip6FindRouteEntry(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @Ip6FreeRouteEntry(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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, !11, i64 4}
!6 = !{!"", !7, i64 0, !11, i64 4, !12, i64 8}
!7 = !{!"", !8, i64 0, !8, i64 1, !10, i64 2}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_EFI_IP6_HEADER", !8, i64 0, !8, i64 0, !8, i64 1, !8, i64 1, !10, i64 2, !10, i64 4, !8, i64 6, !8, i64 7, !13, i64 8, !13, i64 24}
!13 = !{!"", !8, i64 0}
!14 = !{!8, !8, i64 0}
!15 = !{!16, !11, i64 24}
!16 = !{!"", !17, i64 0, !19, i64 16, !11, i64 24, !8, i64 28, !13, i64 29, !13, i64 45}
!17 = !{!"_LIST_ENTRY", !18, i64 0, !18, i64 8}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"long long", !8, i64 0}
!20 = !{!21, !18, i64 80}
!21 = !{!"_IP6_SERVICE", !11, i64 0, !22, i64 8, !19, i64 24, !19, i64 32, !17, i64 40, !17, i64 56, !18, i64 72, !18, i64 80, !23, i64 88, !13, i64 136, !25, i64 2168, !13, i64 2192, !8, i64 2208, !8, i64 2209, !8, i64 2210, !8, i64 2211, !8, i64 2212, !11, i64 2216, !11, i64 2220, !11, i64 2224, !11, i64 2228, !17, i64 2232, !17, i64 2248, !17, i64 2264, !17, i64 2280, !11, i64 2296, !8, i64 2300, !18, i64 2304, !8, i64 2312, !8, i64 2313, !11, i64 2316, !18, i64 2320, !18, i64 2328, !18, i64 2336, !18, i64 2344, !26, i64 2352, !27, i64 2372, !18, i64 3032, !18, i64 3040, !28, i64 3048, !18, i64 4176, !11, i64 4184, !11, i64 4188}
!22 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !18, i64 0, !18, i64 8}
!23 = !{!"", !11, i64 0, !18, i64 8, !18, i64 16, !24, i64 24}
!24 = !{!"", !18, i64 0, !19, i64 8, !8, i64 16}
!25 = !{!"", !19, i64 0, !17, i64 8}
!26 = !{!"", !11, i64 0, !11, i64 4, !10, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!27 = !{!"", !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, !8, i64 40, !13, i64 552, !13, i64 584, !13, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!28 = !{!"_IP6_CONFIG_INSTANCE", !11, i64 0, !8, i64 4, !17, i64 8, !10, i64 24, !29, i64 32, !13, i64 168, !11, i64 176, !30, i64 180, !8, i64 184, !31, i64 800, !31, i64 840, !32, i64 880, !18, i64 912, !18, i64 920, !18, i64 928, !18, i64 936, !8, i64 944, !11, i64 948, !18, i64 952, !11, i64 960, !18, i64 968, !11, i64 976, !33, i64 984, !35, i64 1040}
!29 = !{!"", !8, i64 0, !8, i64 64, !11, i64 68, !13, i64 72, !11, i64 104, !18, i64 112, !11, i64 120, !18, i64 128}
!30 = !{!"", !11, i64 0}
!31 = !{!"", !17, i64 0, !17, i64 16, !19, i64 32}
!32 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!33 = !{!"_IP6_FORM_CALLBACK_INFO", !11, i64 0, !18, i64 8, !34, i64 16, !18, i64 40, !18, i64 48}
!34 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !18, i64 0, !18, i64 8, !18, i64 16}
!35 = !{!"", !11, i64 0, !30, i64 4, !13, i64 8, !17, i64 16, !11, i64 32, !17, i64 40, !11, i64 56, !17, i64 64, !11, i64 80}
!36 = !{!37, !11, i64 8}
!37 = !{!"_IP6_ROUTE_TABLE", !19, i64 0, !11, i64 8, !8, i64 16, !38, i64 2080}
!38 = !{!"", !8, i64 0, !8, i64 496}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass