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

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

%union.EFI_IP_ADDRESS = type { [4 x i32] }
%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_UDP6_SESSION_DATA = type { %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.EFI_UDP4_SESSION_DATA = type { %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i16 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }

@.str = external hidden unnamed_addr constant [140 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 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

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

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

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) #1

declare i32 @SwapBytes32(i32 noundef) #1

declare ptr @ZeroMem(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @PxeBcCheckByIpFilter(ptr noundef %0, ptr noundef %1, i16 noundef zeroext %2) #2 {
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca %union.EFI_IP_ADDRESS, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i16 %2, ptr %7, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %11 = load i16, ptr %7, align 2, !tbaa !9
  %12 = zext i16 %11 to i32
  %13 = and i32 %12, 16
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  store i8 1, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %148

16:                                               ; preds = %3
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %17, i32 0, i32 27
  %19 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_IP_FILTER, ptr %18, i32 0, i32 0
  %20 = load i8, ptr %19, align 4, !tbaa !11
  %21 = zext i8 %20 to i32
  %22 = and i32 %21, 4
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %16
  store i8 1, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %148

25:                                               ; preds = %16
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %26, i32 0, i32 3
  %28 = load i8, ptr %27, align 1, !tbaa !17
  %29 = icmp ne i8 %28, 0
  br i1 %29, label %30, label %35

30:                                               ; preds = %25
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.EFI_UDP6_SESSION_DATA, ptr %31, i32 0, i32 2
  %33 = call ptr @CopyMem(ptr noundef %8, ptr noundef %32, i64 noundef 16)
  %34 = call ptr @Ip6Swap128(ptr noundef %8)
  br label %43

35:                                               ; preds = %25
  %36 = call ptr @ZeroMem(ptr noundef %8, i64 noundef 16)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.EFI_UDP4_SESSION_DATA, ptr %37, i32 0, i32 2
  %39 = call ptr @CopyMem(ptr noundef %8, ptr noundef %38, i64 noundef 4)
  %40 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %41 = load i32, ptr %40, align 4, !tbaa !18
  %42 = call i32 @SwapBytes32(i32 noundef %41)
  br label %43

43:                                               ; preds = %35, %30
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %44, i32 0, i32 27
  %46 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_IP_FILTER, ptr %45, i32 0, i32 0
  %47 = load i8, ptr %46, align 4, !tbaa !11
  %48 = zext i8 %47 to i32
  %49 = and i32 %48, 8
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %61

51:                                               ; preds = %43
  %52 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %53 = load i32, ptr %52, align 4, !tbaa !19
  %54 = and i32 %53, -268435456
  %55 = icmp eq i32 %54, -536870912
  br i1 %55, label %60, label %56

56:                                               ; preds = %51
  %57 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %58 = load i32, ptr %57, align 4, !tbaa !19
  %59 = icmp eq i32 %58, 255
  br i1 %59, label %60, label %61

60:                                               ; preds = %56, %51
  store i8 1, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %148

61:                                               ; preds = %56, %43
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %62, i32 0, i32 27
  %64 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_IP_FILTER, ptr %63, i32 0, i32 0
  %65 = load i8, ptr %64, align 4, !tbaa !11
  %66 = zext i8 %65 to i32
  %67 = and i32 %66, 2
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %87

69:                                               ; preds = %61
  %70 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %71 = load i32, ptr %70, align 4, !tbaa !19
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %73, label %87

73:                                               ; preds = %69
  br label %74

74:                                               ; preds = %73
  %75 = call zeroext i8 @DebugAssertEnabled()
  %76 = icmp ne i8 %75, 0
  br i1 %76, label %77, label %84

77:                                               ; preds = %74
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %78, i32 0, i32 3
  %80 = load i8, ptr %79, align 1, !tbaa !17
  %81 = icmp ne i8 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %77
  call void @DebugAssert(ptr noundef @.str, i64 noundef 862, ptr noundef @.str.3)
  br label %83

83:                                               ; preds = %82, %77
  br label %84

84:                                               ; preds = %83, %74
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85
  store i8 1, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %148

87:                                               ; preds = %69, %61
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %88, i32 0, i32 27
  %90 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_IP_FILTER, ptr %89, i32 0, i32 0
  %91 = load i8, ptr %90, align 4, !tbaa !11
  %92 = zext i8 %91 to i32
  %93 = and i32 %92, 1
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %106

95:                                               ; preds = %87
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %96, i32 0, i32 19
  %98 = call i64 @CompareMem(ptr noundef %97, ptr noundef %8, i64 noundef 4)
  %99 = icmp eq i64 %98, 0
  br i1 %99, label %105, label %100

100:                                              ; preds = %95
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %101, i32 0, i32 19
  %103 = call i64 @CompareMem(ptr noundef %102, ptr noundef %8, i64 noundef 16)
  %104 = icmp eq i64 %103, 0
  br i1 %104, label %105, label %106

105:                                              ; preds = %100, %95
  store i8 1, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %148

106:                                              ; preds = %100, %87
  store i64 0, ptr %9, align 8, !tbaa !20
  br label %107

107:                                              ; preds = %144, %106
  %108 = load i64, ptr %9, align 8, !tbaa !20
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %109, i32 0, i32 27
  %111 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_IP_FILTER, ptr %110, i32 0, i32 1
  %112 = load i8, ptr %111, align 1, !tbaa !22
  %113 = zext i8 %112 to i64
  %114 = icmp ult i64 %108, %113
  br i1 %114, label %115, label %147

115:                                              ; preds = %107
  br label %116

116:                                              ; preds = %115
  %117 = call zeroext i8 @DebugAssertEnabled()
  %118 = icmp ne i8 %117, 0
  br i1 %118, label %119, label %124

119:                                              ; preds = %116
  %120 = load i64, ptr %9, align 8, !tbaa !20
  %121 = icmp ult i64 %120, 8
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  call void @DebugAssert(ptr noundef @.str, i64 noundef 876, ptr noundef @.str.5)
  br label %123

123:                                              ; preds = %122, %119
  br label %124

124:                                              ; preds = %123, %116
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %127, i32 0, i32 27
  %129 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_IP_FILTER, ptr %128, i32 0, i32 3
  %130 = load i64, ptr %9, align 8, !tbaa !20
  %131 = getelementptr inbounds [8 x %union.EFI_IP_ADDRESS], ptr %129, i64 0, i64 %130
  %132 = call i64 @CompareMem(ptr noundef %131, ptr noundef %8, i64 noundef 4)
  %133 = icmp eq i64 %132, 0
  br i1 %133, label %142, label %134

134:                                              ; preds = %126
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_MODE, ptr %135, i32 0, i32 27
  %137 = getelementptr inbounds %struct.EFI_PXE_BASE_CODE_IP_FILTER, ptr %136, i32 0, i32 3
  %138 = load i64, ptr %9, align 8, !tbaa !20
  %139 = getelementptr inbounds [8 x %union.EFI_IP_ADDRESS], ptr %137, i64 0, i64 %138
  %140 = call i64 @CompareMem(ptr noundef %139, ptr noundef %8, i64 noundef 16)
  %141 = icmp eq i64 %140, 0
  br i1 %141, label %142, label %143

142:                                              ; preds = %134, %126
  store i8 1, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %148

143:                                              ; preds = %134
  br label %144

144:                                              ; preds = %143
  %145 = load i64, ptr %9, align 8, !tbaa !20
  %146 = add i64 %145, 1
  store i64 %146, ptr %9, align 8, !tbaa !20
  br label %107, !llvm.loop !23

147:                                              ; preds = %107
  store i8 0, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %148

148:                                              ; preds = %147, %142, %105, %86, %60, %24, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #3
  %149 = load i8, ptr %4, align 1
  ret i8 %149
}

declare ptr @Ip6Swap128(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, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !7, i64 8884}
!12 = !{!"", !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, !13, i64 8884, !14, i64 9016, !7, i64 9020, !14, i64 9404, !7, i64 9408, !15, i64 9792, !16, i64 10296}
!13 = !{!"", !7, i64 0, !7, i64 1, !10, i64 2, !7, i64 4}
!14 = !{!"int", !7, i64 0}
!15 = !{!"", !7, i64 0, !7, i64 1, !10, i64 2, !7, i64 4, !7, i64 8}
!16 = !{!"", !7, i64 0, !7, i64 1}
!17 = !{!12, !7, i64 3}
!18 = !{!14, !14, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long long", !7, i64 0}
!22 = !{!12, !7, i64 8885}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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

%union.EFI_IP_ADDRESS = type { [4 x i32] }

@.str = external hidden unnamed_addr constant [140 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 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

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

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #1

declare ptr @ZeroMem(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local zeroext range(i8 0, 2) i8 @PxeBcCheckByIpFilter(ptr noundef %0, ptr noundef %1, i16 noundef zeroext %2) local_unnamed_addr #2 {
  %4 = alloca %union.EFI_IP_ADDRESS, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %5 = and i16 %2, 16
  %6 = icmp eq i16 %5, 0
  br i1 %6, label %.loopexit, label %7

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 8884
  %9 = load i8, ptr %8, align 4, !tbaa !5
  %10 = and i8 %9, 4
  %.not = icmp eq i8 %10, 0
  br i1 %.not, label %11, label %.loopexit

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %0, i64 3
  %13 = load i8, ptr %12, align 1, !tbaa !14
  %.not27 = icmp eq i8 %13, 0
  br i1 %.not27, label %18, label %14

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %1, i64 18
  %16 = call ptr @CopyMem(ptr noundef nonnull %4, ptr noundef nonnull %15, i64 noundef 16) #3
  %17 = call ptr @Ip6Swap128(ptr noundef nonnull %4) #3
  br label %24

18:                                               ; preds = %11
  %19 = call ptr @ZeroMem(ptr noundef nonnull %4, i64 noundef 16) #3
  %20 = getelementptr inbounds i8, ptr %1, i64 6
  %21 = call ptr @CopyMem(ptr noundef nonnull %4, ptr noundef nonnull %20, i64 noundef 4) #3
  %22 = load i32, ptr %4, align 4, !tbaa !15
  %23 = call i32 @SwapBytes32(i32 noundef %22) #3
  br label %24

24:                                               ; preds = %18, %14
  %25 = load i8, ptr %8, align 4, !tbaa !5
  %26 = and i8 %25, 8
  %.not28 = icmp eq i8 %26, 0
  %.pre = load i32, ptr %4, align 4
  br i1 %.not28, label %31, label %27

27:                                               ; preds = %24
  %28 = and i32 %.pre, -268435456
  %29 = icmp eq i32 %28, -536870912
  %30 = icmp eq i32 %.pre, 255
  %or.cond = or i1 %30, %29
  br i1 %or.cond, label %.loopexit, label %31

31:                                               ; preds = %27, %24
  %32 = zext i8 %25 to i32
  %33 = and i32 %32, 2
  %34 = icmp ne i32 %33, 0
  %35 = icmp eq i32 %.pre, -1
  %or.cond5 = select i1 %34, i1 %35, i1 false
  br i1 %or.cond5, label %36, label %41

36:                                               ; preds = %31
  %37 = call zeroext i8 @DebugAssertEnabled() #3
  %.not30 = icmp eq i8 %37, 0
  br i1 %.not30, label %.loopexit, label %38

38:                                               ; preds = %36
  %39 = load i8, ptr %12, align 1, !tbaa !14
  %.not31 = icmp eq i8 %39, 0
  br i1 %.not31, label %.loopexit, label %40

40:                                               ; preds = %38
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 862, ptr noundef nonnull @.str.3) #3
  br label %.loopexit

41:                                               ; preds = %31
  %42 = and i32 %32, 1
  %.not29 = icmp eq i32 %42, 0
  br i1 %.not29, label %50, label %43

43:                                               ; preds = %41
  %44 = getelementptr inbounds i8, ptr %0, i64 20
  %45 = call i64 @CompareMem(ptr noundef nonnull %44, ptr noundef nonnull %4, i64 noundef 4) #3
  %46 = icmp eq i64 %45, 0
  br i1 %46, label %.loopexit, label %47

47:                                               ; preds = %43
  %48 = call i64 @CompareMem(ptr noundef nonnull %44, ptr noundef nonnull %4, i64 noundef 16) #3
  %49 = icmp eq i64 %48, 0
  br i1 %49, label %.loopexit, label %50

50:                                               ; preds = %47, %41
  %51 = getelementptr inbounds i8, ptr %0, i64 8885
  %52 = load i8, ptr %51, align 1, !tbaa !16
  %.not37 = icmp eq i8 %52, 0
  br i1 %.not37, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %50
  %53 = getelementptr inbounds i8, ptr %0, i64 8888
  br label %59

54:                                               ; preds = %68
  %55 = add nuw nsw i64 %.032, 1
  %56 = load i8, ptr %51, align 1, !tbaa !16
  %57 = zext i8 %56 to i64
  %58 = icmp ult i64 %55, %57
  br i1 %58, label %59, label %.loopexit, !llvm.loop !17

59:                                               ; preds = %.lr.ph, %54
  %.032 = phi i64 [ 0, %.lr.ph ], [ %55, %54 ]
  %60 = call zeroext i8 @DebugAssertEnabled() #3
  %61 = icmp eq i8 %60, 0
  %62 = icmp ult i64 %.032, 8
  %or.cond7 = or i1 %62, %61
  br i1 %or.cond7, label %64, label %63

63:                                               ; preds = %59
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 876, ptr noundef nonnull @.str.5) #3
  br label %64

64:                                               ; preds = %63, %59
  %65 = getelementptr inbounds [8 x %union.EFI_IP_ADDRESS], ptr %53, i64 0, i64 %.032
  %66 = call i64 @CompareMem(ptr noundef nonnull %65, ptr noundef nonnull %4, i64 noundef 4) #3
  %67 = icmp eq i64 %66, 0
  br i1 %67, label %.loopexit, label %68

68:                                               ; preds = %64
  %69 = call i64 @CompareMem(ptr noundef nonnull %65, ptr noundef nonnull %4, i64 noundef 16) #3
  %70 = icmp eq i64 %69, 0
  br i1 %70, label %.loopexit, label %54

.loopexit:                                        ; preds = %68, %64, %54, %50, %43, %47, %36, %40, %38, %27, %7, %3
  %.026 = phi i8 [ 1, %3 ], [ 1, %7 ], [ 1, %27 ], [ 1, %38 ], [ 1, %40 ], [ 1, %36 ], [ 1, %47 ], [ 1, %43 ], [ 0, %50 ], [ 1, %68 ], [ 1, %64 ], [ 0, %54 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  ret i8 %.026
}

declare ptr @Ip6Swap128(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 8884}
!6 = !{!"", !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, !9, i64 8884, !11, i64 9016, !7, i64 9020, !11, i64 9404, !7, i64 9408, !12, i64 9792, !13, i64 10296}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"", !7, i64 0, !7, i64 1, !10, i64 2, !7, i64 4}
!10 = !{!"short", !7, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !7, i64 0, !7, i64 1, !10, i64 2, !7, i64 4, !7, i64 8}
!13 = !{!"", !7, i64 0, !7, i64 1}
!14 = !{!6, !7, i64 3}
!15 = !{!11, !11, i64 0}
!16 = !{!6, !7, i64 8885}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass