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

; 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._PXEBC_PRIVATE_DATA = type { i32, ptr, ptr, %struct._PXEBC_PRIVATE_PROTOCOL, 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_PXE_BASE_CODE_PROTOCOL, %struct._EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL, ptr, ptr, %struct.EFI_PXE_BASE_CODE_MODE, i32, i32, i32, i64, %struct.EFI_UDP4_CONFIG_DATA, %struct.EFI_UDP6_CONFIG_DATA, %struct.EFI_IP4_CONFIG_DATA, %struct.EFI_IP6_CONFIG_DATA, ptr, ptr, %struct.EFI_IP4_COMPLETION_TOKEN, %struct.EFI_IP6_COMPLETION_TOKEN, i8, i8, i8, i8, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, i16, i32, i32, i32, ptr, i64, i64, %union.PXEBC_DHCP_PACKET_CACHE, %union.PXEBC_DHCP_PACKET_CACHE, %union.PXEBC_DHCP_PACKET_CACHE, ptr, %struct.EFI_DHCP4_PACKET, i32, i32, [16 x %union.PXEBC_DHCP_PACKET_CACHE], i32, [8 x i32], [8 x [16 x i32]] }
%struct._PXEBC_PRIVATE_PROTOCOL = type { i64 }
%struct._EFI_PXE_BASE_CODE_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL = type { i64, ptr }
%struct.EFI_PXE_BASE_CODE_MODE = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %union.EFI_PXE_BASE_CODE_PACKET, %struct.EFI_PXE_BASE_CODE_IP_FILTER, i32, [8 x %struct.EFI_PXE_BASE_CODE_ARP_ENTRY], i32, [8 x %struct.EFI_PXE_BASE_CODE_ROUTE_ENTRY], %struct.EFI_PXE_BASE_CODE_ICMP_ERROR, %struct.EFI_PXE_BASE_CODE_TFTP_ERROR }
%union.EFI_PXE_BASE_CODE_PACKET = type { %struct.EFI_PXE_BASE_CODE_DHCPV6_PACKET, [444 x i8] }
%struct.EFI_PXE_BASE_CODE_DHCPV6_PACKET = type { i32, [1024 x i8] }
%struct.EFI_PXE_BASE_CODE_IP_FILTER = type { i8, i8, i16, [8 x %union.EFI_IP_ADDRESS] }
%struct.EFI_PXE_BASE_CODE_ARP_ENTRY = type { %union.EFI_IP_ADDRESS, %struct.EFI_MAC_ADDRESS }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.EFI_PXE_BASE_CODE_ROUTE_ENTRY = type { %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS }
%struct.EFI_PXE_BASE_CODE_ICMP_ERROR = type { i8, i8, i16, %union.anon, [494 x i8] }
%union.anon = type { i32 }
%struct.EFI_PXE_BASE_CODE_TFTP_ERROR = type { i8, [127 x i8] }
%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.EFI_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.EFI_IP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, i8, i8, i8, i32, i32 }
%struct.EFI_IP6_CONFIG_DATA = type { i8, i8, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS, i8, i8, i32, i32, i32 }
%struct.EFI_IP4_COMPLETION_TOKEN = type { ptr, i64, %union.anon.0 }
%union.anon.0 = type { ptr }
%struct.EFI_IP6_COMPLETION_TOKEN = type { ptr, i64, %union.anon.1 }
%union.anon.1 = type { ptr }
%union.EFI_IP_ADDRESS = type { [4 x i32] }
%union.PXEBC_DHCP_PACKET_CACHE = type { %struct.PXEBC_DHCP4_PACKET_CACHE }
%struct.PXEBC_DHCP4_PACKET_CACHE = type { %union.PXEBC_DHCP4_PACKET, i32, [7 x ptr], %struct.PXEBC_VENDOR_OPTION }
%union.PXEBC_DHCP4_PACKET = type { [1472 x i8] }
%struct.PXEBC_VENDOR_OPTION = type { [8 x i32], %struct.EFI_IPv4_ADDRESS, i16, i16, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, i16, i16, i16, ptr, i8, ptr, i8, ptr, i8, ptr, i8 }
%struct.EFI_DHCP4_PACKET = type <{ i32, i32, %struct.anon.2 }>
%struct.anon.2 = type <{ %struct.EFI_DHCP4_HEADER, i32, [1 x i8] }>
%struct.EFI_DHCP4_HEADER = type { i8, i8, i8, i8, i32, i16, i16, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, [16 x i8], [64 x i8], [128 x i8] }
%struct._EFI_IP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._EFI_IP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [140 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeBcFlushStationIp(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  br label %9

9:                                                ; preds = %3
  %10 = call zeroext i8 @DebugAssertEnabled()
  %11 = icmp ne i8 %10, 0
  br i1 %11, label %12, label %17

12:                                               ; preds = %9
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  call void @DebugAssert(ptr noundef @.str, i64 noundef 40, ptr noundef @.str.1)
  br label %16

16:                                               ; preds = %15, %12
  br label %17

17:                                               ; preds = %16, %9
  br label %18

18:                                               ; preds = %17
  br label %19

19:                                               ; preds = %18
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %20, i32 0, i32 31
  %22 = getelementptr inbounds %struct._EFI_PXE_BASE_CODE_PROTOCOL, ptr %21, i32 0, i32 13
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %7, align 8, !tbaa !5
  store i64 0, ptr %8, align 8, !tbaa !30
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %24, i32 0, i32 3
  %26 = load i8, ptr %25, align 1, !tbaa !31
  %27 = icmp ne i8 %26, 0
  br i1 %27, label %28, label %85

28:                                               ; preds = %19
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %29, i32 0, i32 41
  %31 = getelementptr inbounds %struct.EFI_UDP6_CONFIG_DATA, ptr %30, i32 0, i32 7
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = call ptr @CopyMem(ptr noundef %31, ptr noundef %32, i64 noundef 16)
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %34, i32 0, i32 43
  %36 = getelementptr inbounds %struct.EFI_IP6_CONFIG_DATA, ptr %35, i32 0, i32 5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call ptr @CopyMem(ptr noundef %36, ptr noundef %37, i64 noundef 16)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %39, i32 0, i32 24
  %41 = load ptr, ptr %40, align 8, !tbaa !32
  %42 = getelementptr inbounds %struct._EFI_IP6_PROTOCOL, ptr %41, i32 0, i32 7
  %43 = load ptr, ptr %42, align 8, !tbaa !33
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %44, i32 0, i32 24
  %46 = load ptr, ptr %45, align 8, !tbaa !32
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %47, i32 0, i32 47
  %49 = call i64 %43(ptr noundef %46, ptr noundef %48)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %50, i32 0, i32 24
  %52 = load ptr, ptr %51, align 8, !tbaa !32
  %53 = getelementptr inbounds %struct._EFI_IP6_PROTOCOL, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !35
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %55, i32 0, i32 24
  %57 = load ptr, ptr %56, align 8, !tbaa !32
  %58 = call i64 %54(ptr noundef %57, ptr noundef null)
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %59, i32 0, i32 24
  %61 = load ptr, ptr %60, align 8, !tbaa !32
  %62 = getelementptr inbounds %struct._EFI_IP6_PROTOCOL, ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !35
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %64, i32 0, i32 24
  %66 = load ptr, ptr %65, align 8, !tbaa !32
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %67, i32 0, i32 43
  %69 = call i64 %63(ptr noundef %66, ptr noundef %68)
  store i64 %69, ptr %8, align 8, !tbaa !30
  %70 = load i64, ptr %8, align 8, !tbaa !30
  %71 = icmp slt i64 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %28
  br label %164

73:                                               ; preds = %28
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %74, i32 0, i32 24
  %76 = load ptr, ptr %75, align 8, !tbaa !32
  %77 = getelementptr inbounds %struct._EFI_IP6_PROTOCOL, ptr %76, i32 0, i32 6
  %78 = load ptr, ptr %77, align 8, !tbaa !36
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %79, i32 0, i32 24
  %81 = load ptr, ptr %80, align 8, !tbaa !32
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %82, i32 0, i32 47
  %84 = call i64 %78(ptr noundef %81, ptr noundef %83)
  store i64 %84, ptr %8, align 8, !tbaa !30
  br label %163

85:                                               ; preds = %19
  br label %86

86:                                               ; preds = %85
  %87 = call zeroext i8 @DebugAssertEnabled()
  %88 = icmp ne i8 %87, 0
  br i1 %88, label %89, label %94

89:                                               ; preds = %86
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  call void @DebugAssert(ptr noundef @.str, i64 noundef 63, ptr noundef @.str.2)
  br label %93

93:                                               ; preds = %92, %89
  br label %94

94:                                               ; preds = %93, %86
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %97, i32 0, i32 40
  %99 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %98, i32 0, i32 10
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = call ptr @CopyMem(ptr noundef %99, ptr noundef %100, i64 noundef 4)
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %102, i32 0, i32 40
  %104 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %103, i32 0, i32 11
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call ptr @CopyMem(ptr noundef %104, ptr noundef %105, i64 noundef 4)
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %107, i32 0, i32 42
  %109 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %108, i32 0, i32 6
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = call ptr @CopyMem(ptr noundef %109, ptr noundef %110, i64 noundef 4)
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %112, i32 0, i32 42
  %114 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %113, i32 0, i32 7
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = call ptr @CopyMem(ptr noundef %114, ptr noundef %115, i64 noundef 4)
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %117, i32 0, i32 14
  %119 = load ptr, ptr %118, align 8, !tbaa !37
  %120 = getelementptr inbounds %struct._EFI_IP4_PROTOCOL, ptr %119, i32 0, i32 6
  %121 = load ptr, ptr %120, align 8, !tbaa !38
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %122, i32 0, i32 14
  %124 = load ptr, ptr %123, align 8, !tbaa !37
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %125, i32 0, i32 46
  %127 = call i64 %121(ptr noundef %124, ptr noundef %126)
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %128, i32 0, i32 14
  %130 = load ptr, ptr %129, align 8, !tbaa !37
  %131 = getelementptr inbounds %struct._EFI_IP4_PROTOCOL, ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !40
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %133, i32 0, i32 14
  %135 = load ptr, ptr %134, align 8, !tbaa !37
  %136 = call i64 %132(ptr noundef %135, ptr noundef null)
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %137, i32 0, i32 14
  %139 = load ptr, ptr %138, align 8, !tbaa !37
  %140 = getelementptr inbounds %struct._EFI_IP4_PROTOCOL, ptr %139, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !40
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %142, i32 0, i32 14
  %144 = load ptr, ptr %143, align 8, !tbaa !37
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %145, i32 0, i32 42
  %147 = call i64 %141(ptr noundef %144, ptr noundef %146)
  store i64 %147, ptr %8, align 8, !tbaa !30
  %148 = load i64, ptr %8, align 8, !tbaa !30
  %149 = icmp slt i64 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %96
  br label %164

151:                                              ; preds = %96
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %152, i32 0, i32 14
  %154 = load ptr, ptr %153, align 8, !tbaa !37
  %155 = getelementptr inbounds %struct._EFI_IP4_PROTOCOL, ptr %154, i32 0, i32 5
  %156 = load ptr, ptr %155, align 8, !tbaa !41
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %157, i32 0, i32 14
  %159 = load ptr, ptr %158, align 8, !tbaa !37
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct._PXEBC_PRIVATE_DATA, ptr %160, i32 0, i32 46
  %162 = call i64 %156(ptr noundef %159, ptr noundef %161)
  store i64 %162, ptr %8, align 8, !tbaa !30
  br label %163

163:                                              ; preds = %151, %73
  br label %164

164:                                              ; preds = %163, %150, %72
  %165 = load i64, ptr %8, align 8, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret i64 %165
}

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

declare zeroext i8 @DebugAssertEnabled() #2

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #2

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 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, !6, i64 352}
!10 = !{!"_PXEBC_PRIVATE_DATA", !11, i64 0, !6, i64 8, !6, i64 16, !12, 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, !14, i64 248, !15, i64 360, !6, i64 376, !6, i64 384, !16, i64 392, !11, i64 10816, !11, i64 10820, !11, i64 10824, !13, i64 10832, !21, i64 10840, !23, i64 10876, !24, i64 10928, !25, i64 10956, !6, i64 11008, !6, i64 11016, !26, i64 11024, !26, i64 11048, !7, i64 11072, !7, i64 11073, !7, i64 11074, !7, i64 11075, !7, i64 11076, !7, i64 11092, !7, i64 11108, !7, i64 11124, !18, i64 11140, !11, i64 11144, !11, i64 11148, !11, i64 11152, !6, i64 11160, !13, i64 11168, !13, i64 11176, !7, i64 11184, !7, i64 12848, !7, i64 14512, !6, i64 16176, !27, i64 16184, !11, i64 16436, !11, i64 16440, !7, i64 16448, !11, i64 43072, !7, i64 43076, !7, i64 43108}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_PXEBC_PRIVATE_PROTOCOL", !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_EFI_PXE_BASE_CODE_PROTOCOL", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104}
!15 = !{!"_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL", !13, i64 0, !6, i64 8}
!16 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 20, !7, i64 36, !7, i64 52, !7, i64 1524, !7, i64 2996, !7, i64 4468, !7, i64 5940, !7, i64 7412, !17, i64 8884, !11, i64 9016, !7, i64 9020, !11, i64 9404, !7, i64 9408, !19, i64 9792, !20, i64 10296}
!17 = !{!"", !7, i64 0, !7, i64 1, !18, i64 2, !7, i64 4}
!18 = !{!"short", !7, i64 0}
!19 = !{!"", !7, i64 0, !7, i64 1, !18, i64 2, !7, i64 4, !7, i64 8}
!20 = !{!"", !7, i64 0, !7, i64 1}
!21 = !{!"", !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, !22, i64 17, !22, i64 21, !18, i64 26, !22, i64 28, !18, i64 32}
!22 = !{!"", !7, i64 0}
!23 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !11, i64 8, !11, i64 12, !22, i64 16, !18, i64 32, !22, i64 34, !18, i64 50}
!24 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !22, i64 6, !22, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !11, i64 20, !11, i64 24}
!25 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !22, i64 4, !22, i64 20, !7, i64 36, !7, i64 37, !11, i64 40, !11, i64 44, !11, i64 48}
!26 = !{!"", !6, i64 0, !13, i64 8, !7, i64 16}
!27 = !{!"", !11, i64 0, !11, i64 4, !28, i64 8}
!28 = !{!"", !29, i64 0, !11, i64 236, !7, i64 240}
!29 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !11, i64 4, !18, i64 8, !18, i64 10, !22, i64 12, !22, i64 16, !22, i64 20, !22, i64 24, !7, i64 28, !7, i64 44, !7, i64 108}
!30 = !{!13, !13, i64 0}
!31 = !{!16, !7, i64 3}
!32 = !{!10, !6, i64 192}
!33 = !{!34, !6, i64 56}
!34 = !{!"_EFI_IP6_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!35 = !{!34, !6, i64 8}
!36 = !{!34, !6, i64 48}
!37 = !{!10, !6, i64 112}
!38 = !{!39, !6, i64 48}
!39 = !{!"_EFI_IP4_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}
!40 = !{!39, !6, i64 8}
!41 = !{!39, !6, i64 40}


; 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"

@.str = external hidden unnamed_addr constant [140 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @PxeBcFlushStationIp(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = tail call zeroext i8 @DebugAssertEnabled() #2
  %5 = icmp eq i8 %4, 0
  %6 = icmp ne ptr %1, null
  %or.cond = or i1 %6, %5
  br i1 %or.cond, label %8, label %7

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

8:                                                ; preds = %7, %3
  %9 = getelementptr inbounds i8, ptr %0, i64 352
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 3
  %12 = load i8, ptr %11, align 1, !tbaa !29
  %.not = icmp eq i8 %12, 0
  br i1 %.not, label %34, label %13

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %0, i64 10892
  %15 = tail call ptr @CopyMem(ptr noundef nonnull %14, ptr noundef %1, i64 noundef 16) #2
  %16 = getelementptr inbounds i8, ptr %0, i64 10956
  %17 = getelementptr inbounds i8, ptr %0, i64 10976
  %18 = tail call ptr @CopyMem(ptr noundef nonnull %17, ptr noundef %1, i64 noundef 16) #2
  %19 = getelementptr inbounds i8, ptr %0, i64 192
  %20 = load ptr, ptr %19, align 8, !tbaa !30
  %21 = getelementptr inbounds i8, ptr %20, i64 56
  %22 = load ptr, ptr %21, align 8, !tbaa !31
  %23 = getelementptr inbounds i8, ptr %0, i64 11048
  %24 = tail call i64 %22(ptr noundef %20, ptr noundef nonnull %23) #2
  %25 = load ptr, ptr %19, align 8, !tbaa !30
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !33
  %28 = tail call i64 %27(ptr noundef %25, ptr noundef null) #2
  %29 = load ptr, ptr %19, align 8, !tbaa !30
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !33
  %32 = tail call i64 %31(ptr noundef %29, ptr noundef nonnull %16) #2
  %33 = icmp slt i64 %32, 0
  br i1 %33, label %68, label %.sink.split

34:                                               ; preds = %8
  %35 = tail call zeroext i8 @DebugAssertEnabled() #2
  %36 = icmp eq i8 %35, 0
  %37 = icmp ne ptr %2, null
  %or.cond3 = or i1 %37, %36
  br i1 %or.cond3, label %39, label %38

38:                                               ; preds = %34
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 63, ptr noundef nonnull @.str.2) #2
  br label %39

39:                                               ; preds = %38, %34
  %40 = getelementptr inbounds i8, ptr %0, i64 10857
  %41 = tail call ptr @CopyMem(ptr noundef nonnull %40, ptr noundef %1, i64 noundef 4) #2
  %42 = getelementptr inbounds i8, ptr %0, i64 10861
  %43 = tail call ptr @CopyMem(ptr noundef nonnull %42, ptr noundef %2, i64 noundef 4) #2
  %44 = getelementptr inbounds i8, ptr %0, i64 10928
  %45 = getelementptr inbounds i8, ptr %0, i64 10934
  %46 = tail call ptr @CopyMem(ptr noundef nonnull %45, ptr noundef %1, i64 noundef 4) #2
  %47 = getelementptr inbounds i8, ptr %0, i64 10938
  %48 = tail call ptr @CopyMem(ptr noundef nonnull %47, ptr noundef %2, i64 noundef 4) #2
  %49 = getelementptr inbounds i8, ptr %0, i64 112
  %50 = load ptr, ptr %49, align 8, !tbaa !34
  %51 = getelementptr inbounds i8, ptr %50, i64 48
  %52 = load ptr, ptr %51, align 8, !tbaa !35
  %53 = getelementptr inbounds i8, ptr %0, i64 11024
  %54 = tail call i64 %52(ptr noundef %50, ptr noundef nonnull %53) #2
  %55 = load ptr, ptr %49, align 8, !tbaa !34
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !37
  %58 = tail call i64 %57(ptr noundef %55, ptr noundef null) #2
  %59 = load ptr, ptr %49, align 8, !tbaa !34
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = load ptr, ptr %60, align 8, !tbaa !37
  %62 = tail call i64 %61(ptr noundef %59, ptr noundef nonnull %44) #2
  %63 = icmp slt i64 %62, 0
  br i1 %63, label %68, label %.sink.split

.sink.split:                                      ; preds = %39, %13
  %.sink50 = phi ptr [ %19, %13 ], [ %49, %39 ]
  %.sink49 = phi i64 [ 48, %13 ], [ 40, %39 ]
  %.sink45 = phi ptr [ %23, %13 ], [ %53, %39 ]
  %64 = load ptr, ptr %.sink50, align 8, !tbaa !38
  %65 = getelementptr inbounds i8, ptr %64, i64 %.sink49
  %66 = load ptr, ptr %65, align 8, !tbaa !38
  %67 = tail call i64 %66(ptr noundef %64, ptr noundef nonnull %.sink45) #2
  br label %68

68:                                               ; preds = %.sink.split, %39, %13
  %.0 = phi i64 [ %32, %13 ], [ %62, %39 ], [ %67, %.sink.split ]
  ret i64 %.0
}

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #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 = { "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, !10, i64 352}
!6 = !{!"_PXEBC_PRIVATE_DATA", !7, i64 0, !10, i64 8, !10, i64 16, !11, 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, !13, i64 248, !14, i64 360, !10, i64 376, !10, i64 384, !15, i64 392, !7, i64 10816, !7, i64 10820, !7, i64 10824, !12, i64 10832, !20, i64 10840, !22, i64 10876, !23, i64 10928, !24, i64 10956, !10, i64 11008, !10, i64 11016, !25, i64 11024, !25, i64 11048, !8, i64 11072, !8, i64 11073, !8, i64 11074, !8, i64 11075, !8, i64 11076, !8, i64 11092, !8, i64 11108, !8, i64 11124, !17, i64 11140, !7, i64 11144, !7, i64 11148, !7, i64 11152, !10, i64 11160, !12, i64 11168, !12, i64 11176, !8, i64 11184, !8, i64 12848, !8, i64 14512, !10, i64 16176, !26, i64 16184, !7, i64 16436, !7, i64 16440, !8, i64 16448, !7, i64 43072, !8, i64 43076, !8, i64 43108}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_PXEBC_PRIVATE_PROTOCOL", !12, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_EFI_PXE_BASE_CODE_PROTOCOL", !12, i64 0, !10, i64 8, !10, i64 16, !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}
!14 = !{!"_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL", !12, i64 0, !10, i64 8}
!15 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !8, i64 9, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !8, i64 18, !8, i64 20, !8, i64 36, !8, i64 52, !8, i64 1524, !8, i64 2996, !8, i64 4468, !8, i64 5940, !8, i64 7412, !16, i64 8884, !7, i64 9016, !8, i64 9020, !7, i64 9404, !8, i64 9408, !18, i64 9792, !19, i64 10296}
!16 = !{!"", !8, i64 0, !8, i64 1, !17, i64 2, !8, i64 4}
!17 = !{!"short", !8, i64 0}
!18 = !{!"", !8, i64 0, !8, i64 1, !17, i64 2, !8, i64 4, !8, i64 8}
!19 = !{!"", !8, i64 0, !8, i64 1}
!20 = !{!"", !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, !21, i64 17, !21, i64 21, !17, i64 26, !21, i64 28, !17, i64 32}
!21 = !{!"", !8, i64 0}
!22 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !7, i64 8, !7, i64 12, !21, i64 16, !17, i64 32, !21, i64 34, !17, i64 50}
!23 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !21, i64 6, !21, i64 10, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !7, i64 20, !7, i64 24}
!24 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !21, i64 4, !21, i64 20, !8, i64 36, !8, i64 37, !7, i64 40, !7, i64 44, !7, i64 48}
!25 = !{!"", !10, i64 0, !12, i64 8, !8, i64 16}
!26 = !{!"", !7, i64 0, !7, i64 4, !27, i64 8}
!27 = !{!"", !28, i64 0, !7, i64 236, !8, i64 240}
!28 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !7, i64 4, !17, i64 8, !17, i64 10, !21, i64 12, !21, i64 16, !21, i64 20, !21, i64 24, !8, i64 28, !8, i64 44, !8, i64 108}
!29 = !{!15, !8, i64 3}
!30 = !{!6, !10, i64 192}
!31 = !{!32, !10, i64 56}
!32 = !{!"_EFI_IP6_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!33 = !{!32, !10, i64 8}
!34 = !{!6, !10, i64 112}
!35 = !{!36, !10, i64 48}
!36 = !{!"_EFI_IP4_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!37 = !{!36, !10, i64 8}
!38 = !{!10, !10, i64 0}


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