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

; 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.NET_FRAGMENT = type { i32, 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_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_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._LIST_ENTRY = type { ptr, ptr }
%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.EFI_MANAGED_NETWORK_RECEIVE_DATA = type { %struct.EFI_TIME, ptr, i32, i32, i32, i32, i8, i8, i8, i16, ptr, ptr, ptr, ptr }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, 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 [127 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [107 x i8], align 1
@gBS = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [109 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
declare dso_local void @Ip6RecycleFrame(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @Ip6OnFrameReceivedDpc(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 %struct.NET_FRAGMENT, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = 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 16, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %11, ptr %5, align 8, !tbaa !5
  br label %12

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

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

18:                                               ; preds = %15
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = icmp eq i32 %21, 1379291209
  br i1 %22, label %24, label %23

23:                                               ; preds = %18, %15
  call void @DebugAssert(ptr noundef @.str, i64 noundef 487, ptr noundef @.str.9)
  br label %24

24:                                               ; preds = %23, %18
  br label %25

25:                                               ; preds = %24, %12
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %28, i32 0, i32 2
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  store ptr %30, ptr %9, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %27
  %32 = call zeroext i8 @DebugAssertEnabled()
  %33 = icmp ne i8 %32, 0
  br i1 %33, label %34, label %44

34:                                               ; preds = %31
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %42

37:                                               ; preds = %34
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._IP6_SERVICE, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !15
  %41 = icmp eq i32 %40, 1396068425
  br i1 %41, label %43, label %42

42:                                               ; preds = %37, %34
  call void @DebugAssert(ptr noundef @.str, i64 noundef 494, ptr noundef @.str.3)
  br label %43

43:                                               ; preds = %42, %37
  br label %44

44:                                               ; preds = %43, %31
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %47, i32 0, i32 3
  store ptr %48, ptr %3, align 8, !tbaa !5
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !32
  store ptr %51, ptr %4, align 8, !tbaa !5
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %52, i32 0, i32 1
  %54 = load i64, ptr %53, align 8, !tbaa !33
  %55 = icmp slt i64 %54, 0
  br i1 %55, label %59, label %56

56:                                               ; preds = %46
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %69

59:                                               ; preds = %56, %46
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %60, i32 0, i32 1
  %62 = load ptr, ptr %61, align 8, !tbaa !34
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %63, i32 0, i32 1
  %65 = load i64, ptr %64, align 8, !tbaa !33
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !14
  call void %62(ptr noundef null, i64 noundef %65, i32 noundef 0, ptr noundef %68)
  store i32 1, ptr %10, align 4
  br label %133

69:                                               ; preds = %56
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %70, i32 0, i32 5
  %72 = load i32, ptr %71, align 4, !tbaa !35
  %73 = getelementptr inbounds %struct.NET_FRAGMENT, ptr %6, i32 0, i32 0
  store i32 %72, ptr %73, align 8, !tbaa !38
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %74, i32 0, i32 13
  %76 = load ptr, ptr %75, align 8, !tbaa !40
  %77 = getelementptr inbounds %struct.NET_FRAGMENT, ptr %6, i32 0, i32 1
  store ptr %76, ptr %77, align 8, !tbaa !41
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %78, i32 0, i32 3
  %80 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !32
  %82 = call ptr @NetbufFromExt(ptr noundef %6, i32 noundef 1, i32 noundef 120, i32 noundef 0, ptr noundef @Ip6RecycleFrame, ptr noundef %81)
  store ptr %82, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %99

85:                                               ; preds = %69
  %86 = load ptr, ptr @gBS, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %86, i32 0, i32 11
  %88 = load ptr, ptr %87, align 8, !tbaa !42
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !45
  %92 = call i64 %88(ptr noundef %91)
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !34
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !14
  call void %95(ptr noundef null, i64 noundef -9223372036854775799, i32 noundef 0, ptr noundef %98)
  store i32 1, ptr %10, align 4
  br label %133

99:                                               ; preds = %69
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %100, i32 0, i32 6
  %102 = load i8, ptr %101, align 8, !tbaa !46
  %103 = zext i8 %102 to i32
  %104 = icmp ne i32 %103, 0
  %105 = zext i1 %104 to i64
  %106 = select i1 %104, i32 1, i32 0
  store i32 %106, ptr %8, align 4, !tbaa !47
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %107, i32 0, i32 7
  %109 = load i8, ptr %108, align 1, !tbaa !48
  %110 = zext i8 %109 to i32
  %111 = icmp ne i32 %110, 0
  %112 = zext i1 %111 to i64
  %113 = select i1 %111, i32 2, i32 0
  %114 = load i32, ptr %8, align 4, !tbaa !47
  %115 = or i32 %114, %113
  store i32 %115, ptr %8, align 4, !tbaa !47
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %116, i32 0, i32 8
  %118 = load i8, ptr %117, align 2, !tbaa !49
  %119 = zext i8 %118 to i32
  %120 = icmp ne i32 %119, 0
  %121 = zext i1 %120 to i64
  %122 = select i1 %120, i32 4, i32 0
  %123 = load i32, ptr %8, align 4, !tbaa !47
  %124 = or i32 %123, %122
  store i32 %124, ptr %8, align 4, !tbaa !47
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !34
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load i32, ptr %8, align 4, !tbaa !47
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %131, align 8, !tbaa !14
  call void %127(ptr noundef %128, i64 noundef 0, i32 noundef %129, ptr noundef %132)
  store i32 0, ptr %10, align 4
  br label %133

133:                                              ; preds = %99, %85, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 16, 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
  %134 = load i32, ptr %10, align 4
  switch i32 %134, label %136 [
    i32 0, label %135
    i32 1, label %135
  ]

135:                                              ; preds = %133, %133
  ret void

136:                                              ; preds = %133
  unreachable
}

declare ptr @NetbufFromExt(ptr noundef, i32 noundef, i32 noundef, i32 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, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !6, i64 0, !13, i64 8, !7, i64 16}
!13 = !{!"long long", !7, i64 0}
!14 = !{!10, !6, i64 16}
!15 = !{!16, !11, i64 0}
!16 = !{!"_IP6_SERVICE", !11, i64 0, !17, i64 8, !13, i64 24, !13, i64 32, !18, i64 40, !18, i64 56, !6, i64 72, !6, i64 80, !10, i64 88, !19, i64 136, !20, i64 2168, !19, 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, !18, i64 2232, !18, i64 2248, !18, i64 2264, !18, 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, !21, i64 2352, !23, i64 2372, !6, i64 3032, !6, i64 3040, !24, i64 3048, !6, i64 4176, !11, i64 4184, !11, i64 4188}
!17 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!18 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!19 = !{!"", !7, i64 0}
!20 = !{!"", !13, i64 0, !18, i64 8}
!21 = !{!"", !11, i64 0, !11, i64 4, !22, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!22 = !{!"short", !7, i64 0}
!23 = !{!"", !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, !19, i64 552, !19, i64 584, !19, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!24 = !{!"_IP6_CONFIG_INSTANCE", !11, i64 0, !7, i64 4, !18, i64 8, !22, i64 24, !25, i64 32, !19, i64 168, !11, i64 176, !26, i64 180, !7, i64 184, !27, i64 800, !27, i64 840, !28, 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, !29, i64 984, !31, i64 1040}
!25 = !{!"", !7, i64 0, !7, i64 64, !11, i64 68, !19, i64 72, !11, i64 104, !6, i64 112, !11, i64 120, !6, i64 128}
!26 = !{!"", !11, i64 0}
!27 = !{!"", !18, i64 0, !18, i64 16, !13, i64 32}
!28 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_IP6_FORM_CALLBACK_INFO", !11, i64 0, !6, i64 8, !30, i64 16, !6, i64 40, !6, i64 48}
!30 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"", !11, i64 0, !26, i64 4, !19, i64 8, !18, i64 16, !11, i64 32, !18, i64 40, !11, i64 56, !18, i64 64, !11, i64 80}
!32 = !{!7, !7, i64 0}
!33 = !{!12, !13, i64 8}
!34 = !{!10, !6, i64 8}
!35 = !{!36, !11, i64 36}
!36 = !{!"", !37, i64 0, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !22, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!37 = !{!"", !22, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !11, i64 8, !22, i64 12, !7, i64 14, !7, i64 15}
!38 = !{!39, !11, i64 0}
!39 = !{!"", !11, i64 0, !6, i64 8}
!40 = !{!36, !6, i64 72}
!41 = !{!39, !6, i64 8}
!42 = !{!43, !6, i64 104}
!43 = !{!"", !44, 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}
!44 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!45 = !{!36, !6, i64 16}
!46 = !{!36, !7, i64 40}
!47 = !{!11, !11, i64 0}
!48 = !{!36, !7, i64 41}
!49 = !{!36, !7, i64 42}


; 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.NET_FRAGMENT = type { i32, ptr }

@.str = external hidden unnamed_addr constant [127 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [107 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [109 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

declare void @DebugAssert(ptr noundef, i64 noundef, 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
declare dso_local void @Ip6RecycleFrame(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @Ip6OnFrameReceivedDpc(ptr noundef readonly %0) local_unnamed_addr #2 {
  %2 = alloca %struct.NET_FRAGMENT, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #3
  %3 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %3, 0
  br i1 %.not, label %9, label %4

4:                                                ; preds = %1
  %.not32 = icmp eq ptr %0, null
  br i1 %.not32, label %8, label %5

5:                                                ; preds = %4
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 1379291209
  br i1 %7, label %9, label %8

8:                                                ; preds = %5, %4
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 487, ptr noundef nonnull @.str.9) #3
  br label %9

9:                                                ; preds = %5, %8, %1
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not33 = icmp eq i8 %12, 0
  br i1 %.not33, label %18, label %13

13:                                               ; preds = %9
  %.not34 = icmp eq ptr %11, null
  br i1 %.not34, label %17, label %14

14:                                               ; preds = %13
  %15 = load i32, ptr %11, align 8, !tbaa !14
  %16 = icmp eq i32 %15, 1396068425
  br i1 %16, label %18, label %17

17:                                               ; preds = %14, %13
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 494, ptr noundef nonnull @.str.3) #3
  br label %18

18:                                               ; preds = %14, %17, %9
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  %20 = load ptr, ptr %19, align 8, !tbaa !31
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %22 = load i64, ptr %21, align 8, !tbaa !32
  %23 = icmp slt i64 %22, 0
  %24 = icmp eq ptr %20, null
  %or.cond = select i1 %23, i1 true, i1 %24
  br i1 %or.cond, label %25, label %29

25:                                               ; preds = %18
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !33
  %28 = load ptr, ptr %10, align 8, !tbaa !13
  tail call void %27(ptr noundef null, i64 noundef %22, i32 noundef 0, ptr noundef %28) #3
  br label %62

29:                                               ; preds = %18
  %30 = getelementptr inbounds i8, ptr %20, i64 36
  %31 = load i32, ptr %30, align 4, !tbaa !34
  store i32 %31, ptr %2, align 8, !tbaa !37
  %32 = getelementptr inbounds i8, ptr %20, i64 72
  %33 = load ptr, ptr %32, align 8, !tbaa !39
  %34 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %33, ptr %34, align 8, !tbaa !40
  %35 = call ptr @NetbufFromExt(ptr noundef nonnull %2, i32 noundef 1, i32 noundef 120, i32 noundef 0, ptr noundef nonnull @Ip6RecycleFrame, ptr noundef nonnull %20) #3
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %47

37:                                               ; preds = %29
  %38 = load ptr, ptr @gBS, align 8, !tbaa !41
  %39 = getelementptr inbounds i8, ptr %38, i64 104
  %40 = load ptr, ptr %39, align 8, !tbaa !42
  %41 = getelementptr inbounds i8, ptr %20, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !45
  %43 = call i64 %40(ptr noundef %42) #3
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !33
  %46 = load ptr, ptr %10, align 8, !tbaa !13
  call void %45(ptr noundef null, i64 noundef -9223372036854775799, i32 noundef 0, ptr noundef %46) #3
  br label %62

47:                                               ; preds = %29
  %48 = getelementptr inbounds i8, ptr %20, i64 40
  %49 = load i8, ptr %48, align 8, !tbaa !46
  %.not35 = icmp ne i8 %49, 0
  %50 = zext i1 %.not35 to i32
  %51 = getelementptr inbounds i8, ptr %20, i64 41
  %52 = load i8, ptr %51, align 1, !tbaa !47
  %.not36 = icmp eq i8 %52, 0
  %53 = select i1 %.not36, i32 0, i32 2
  %54 = or disjoint i32 %53, %50
  %55 = getelementptr inbounds i8, ptr %20, i64 42
  %56 = load i8, ptr %55, align 2, !tbaa !48
  %.not37 = icmp eq i8 %56, 0
  %57 = select i1 %.not37, i32 0, i32 4
  %58 = or disjoint i32 %54, %57
  %59 = getelementptr inbounds i8, ptr %0, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !33
  %61 = load ptr, ptr %10, align 8, !tbaa !13
  call void %60(ptr noundef nonnull %35, i64 noundef 0, i32 noundef %58, ptr noundef %61) #3
  br label %62

62:                                               ; preds = %47, %37, %25
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #3
  ret void
}

declare ptr @NetbufFromExt(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !10, i64 0, !12, i64 8, !8, i64 16}
!12 = !{!"long long", !8, i64 0}
!13 = !{!6, !10, i64 16}
!14 = !{!15, !7, i64 0}
!15 = !{!"_IP6_SERVICE", !7, i64 0, !16, i64 8, !12, i64 24, !12, i64 32, !17, i64 40, !17, i64 56, !10, i64 72, !10, i64 80, !6, i64 88, !18, i64 136, !19, i64 2168, !18, 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, !17, i64 2232, !17, i64 2248, !17, i64 2264, !17, i64 2280, !7, i64 2296, !8, i64 2300, !10, i64 2304, !8, i64 2312, !8, i64 2313, !7, i64 2316, !10, i64 2320, !10, i64 2328, !10, i64 2336, !10, i64 2344, !20, i64 2352, !22, i64 2372, !10, i64 3032, !10, i64 3040, !23, i64 3048, !10, i64 4176, !7, i64 4184, !7, i64 4188}
!16 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !10, i64 0, !10, i64 8}
!17 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!18 = !{!"", !8, i64 0}
!19 = !{!"", !12, i64 0, !17, i64 8}
!20 = !{!"", !7, i64 0, !7, i64 4, !21, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!21 = !{!"short", !8, i64 0}
!22 = !{!"", !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, !18, i64 552, !18, i64 584, !18, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!23 = !{!"_IP6_CONFIG_INSTANCE", !7, i64 0, !8, i64 4, !17, i64 8, !21, i64 24, !24, i64 32, !18, i64 168, !7, i64 176, !25, i64 180, !8, i64 184, !26, i64 800, !26, i64 840, !27, i64 880, !10, i64 912, !10, i64 920, !10, i64 928, !10, i64 936, !8, i64 944, !7, i64 948, !10, i64 952, !7, i64 960, !10, i64 968, !7, i64 976, !28, i64 984, !30, i64 1040}
!24 = !{!"", !8, i64 0, !8, i64 64, !7, i64 68, !18, i64 72, !7, i64 104, !10, i64 112, !7, i64 120, !10, i64 128}
!25 = !{!"", !7, i64 0}
!26 = !{!"", !17, i64 0, !17, i64 16, !12, i64 32}
!27 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!28 = !{!"_IP6_FORM_CALLBACK_INFO", !7, i64 0, !10, i64 8, !29, i64 16, !10, i64 40, !10, i64 48}
!29 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16}
!30 = !{!"", !7, i64 0, !25, i64 4, !18, i64 8, !17, i64 16, !7, i64 32, !17, i64 40, !7, i64 56, !17, i64 64, !7, i64 80}
!31 = !{!8, !8, i64 0}
!32 = !{!11, !12, i64 8}
!33 = !{!6, !10, i64 8}
!34 = !{!35, !7, i64 36}
!35 = !{!"", !36, i64 0, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !8, i64 41, !8, i64 42, !21, i64 44, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!36 = !{!"", !21, i64 0, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !7, i64 8, !21, i64 12, !8, i64 14, !8, i64 15}
!37 = !{!38, !7, i64 0}
!38 = !{!"", !7, i64 0, !10, i64 8}
!39 = !{!35, !10, i64 72}
!40 = !{!38, !10, i64 8}
!41 = !{!10, !10, i64 0}
!42 = !{!43, !10, i64 104}
!43 = !{!"", !44, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!44 = !{!"", !12, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!45 = !{!35, !10, i64 16}
!46 = !{!35, !8, i64 40}
!47 = !{!35, !8, i64 41}
!48 = !{!35, !8, i64 42}


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