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

; 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.SNP_DRIVER = type <{ i32, [4 x i8], %struct.EFI_LOCK, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, ptr, i8, i8, i16, i32, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, %struct.s_pxe_cdb, [6 x i8], ptr, ptr, ptr, %struct.s_pxe_db_get_init_info, i8, ptr, [100 x %struct.MAP_LIST], ptr, i8, [7 x i8] }>
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._EFI_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%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.s_pxe_cdb = type { i16, i16, i16, i16, i64, i64, i16, i16, i16, i16 }
%struct.s_pxe_db_get_init_info = type <{ i32, i32, [4 x i32], i32, i16, i16, i16, i16, i16, i16, i16, i16, i8, i8, i8 }>
%struct.MAP_LIST = type { i64, ptr }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }

@.str.2 = external hidden unnamed_addr constant [157 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeRecvFilterEnable(ptr noundef, i32 noundef, i64 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeRecvFilterDisable(ptr noundef, i32 noundef, i8 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeRecvFilterRead(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @SnpUndi32ReceiveFilters(ptr noundef %0, i32 noundef %1, i32 noundef %2, i8 noundef zeroext %3, i64 noundef %4, ptr noundef %5) #0 {
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i8 %3, ptr %11, align 1, !tbaa !11
  store i64 %4, ptr %12, align 8, !tbaa !12
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %6
  store i64 -9223372036854775806, ptr %7, align 8
  store i32 1, ptr %17, align 4
  br label %161

21:                                               ; preds = %6
  %22 = call zeroext i8 @DebugAssertEnabled()
  %23 = zext i8 %22 to i32
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %35

25:                                               ; preds = %21
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = ptrtoint ptr %26 to i64
  %28 = sub i64 %27, ptrtoint (ptr getelementptr inbounds (%struct.SNP_DRIVER, ptr null, i32 0, i32 3) to i64)
  %29 = inttoptr i64 %28 to ptr
  %30 = getelementptr inbounds %struct.SNP_DRIVER, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !14
  %32 = icmp ne i32 %31, 1935961715
  br i1 %32, label %33, label %35

33:                                               ; preds = %25
  call void @DebugAssert(ptr noundef @.str.2, i64 noundef 405, ptr noundef @.str.3)
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  br label %40

35:                                               ; preds = %25, %21
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = ptrtoint ptr %36 to i64
  %38 = sub i64 %37, ptrtoint (ptr getelementptr inbounds (%struct.SNP_DRIVER, ptr null, i32 0, i32 3) to i64)
  %39 = inttoptr i64 %38 to ptr
  br label %40

40:                                               ; preds = %35, %33
  %41 = phi ptr [ %34, %33 ], [ %39, %35 ]
  store ptr %41, ptr %14, align 8, !tbaa !5
  %42 = load ptr, ptr @gBS, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !23
  %45 = call i64 %44(i64 noundef 8)
  store i64 %45, ptr %16, align 8, !tbaa !12
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.SNP_DRIVER, ptr %46, i32 0, i32 4
  %48 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !26
  switch i32 %49, label %51 [
    i32 2, label %52
    i32 0, label %50
  ]

50:                                               ; preds = %40
  store i64 -9223372036854775789, ptr %15, align 8, !tbaa !12
  br label %155

51:                                               ; preds = %40
  store i64 -9223372036854775801, ptr %15, align 8, !tbaa !12
  br label %155

52:                                               ; preds = %40
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.SNP_DRIVER, ptr %54, i32 0, i32 4
  %56 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %56, align 8, !tbaa !27
  %58 = xor i32 %57, -1
  %59 = and i32 %53, %58
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %70, label %61

61:                                               ; preds = %52
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.SNP_DRIVER, ptr %63, i32 0, i32 4
  %65 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %64, i32 0, i32 6
  %66 = load i32, ptr %65, align 8, !tbaa !27
  %67 = xor i32 %66, -1
  %68 = and i32 %62, %67
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %61, %52
  store i64 -9223372036854775806, ptr %15, align 8, !tbaa !12
  br label %155

71:                                               ; preds = %61
  %72 = load i8, ptr %11, align 1, !tbaa !11
  %73 = icmp ne i8 %72, 0
  br i1 %73, label %74, label %82

74:                                               ; preds = %71
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.SNP_DRIVER, ptr %75, i32 0, i32 4
  %77 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %76, i32 0, i32 6
  %78 = load i32, ptr %77, align 8, !tbaa !27
  %79 = and i32 2, %78
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = or i32 %80, %79
  store i32 %81, ptr %10, align 4, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !12
  store ptr null, ptr %13, align 8, !tbaa !5
  br label %99

82:                                               ; preds = %71
  %83 = load i64, ptr %12, align 8, !tbaa !12
  %84 = icmp ne i64 %83, 0
  br i1 %84, label %85, label %98

85:                                               ; preds = %82
  %86 = load i64, ptr %12, align 8, !tbaa !12
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.SNP_DRIVER, ptr %87, i32 0, i32 4
  %89 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %88, i32 0, i32 8
  %90 = load i32, ptr %89, align 8, !tbaa !28
  %91 = zext i32 %90 to i64
  %92 = icmp ugt i64 %86, %91
  br i1 %92, label %96, label %93

93:                                               ; preds = %85
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = icmp eq ptr %94, null
  br i1 %95, label %96, label %97

96:                                               ; preds = %93, %85
  store i64 -9223372036854775806, ptr %15, align 8, !tbaa !12
  br label %155

97:                                               ; preds = %93
  br label %98

98:                                               ; preds = %97, %82
  br label %99

99:                                               ; preds = %98, %74
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %112

102:                                              ; preds = %99
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %112

105:                                              ; preds = %102
  %106 = load i8, ptr %11, align 1, !tbaa !11
  %107 = icmp ne i8 %106, 0
  br i1 %107, label %112, label %108

108:                                              ; preds = %105
  %109 = load i64, ptr %12, align 8, !tbaa !12
  %110 = icmp eq i64 %109, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %108
  store i64 0, ptr %15, align 8, !tbaa !12
  br label %155

112:                                              ; preds = %108, %105, %102, %99
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = and i32 %113, 2
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %120

116:                                              ; preds = %112
  %117 = load i64, ptr %12, align 8, !tbaa !12
  %118 = icmp eq i64 %117, 0
  br i1 %118, label %119, label %120

119:                                              ; preds = %116
  store i64 -9223372036854775806, ptr %15, align 8, !tbaa !12
  br label %155

120:                                              ; preds = %116, %112
  %121 = load i32, ptr %9, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %126, label %123

123:                                              ; preds = %120
  %124 = load i64, ptr %12, align 8, !tbaa !12
  %125 = icmp ne i64 %124, 0
  br i1 %125, label %126, label %136

126:                                              ; preds = %123, %120
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = load i32, ptr %9, align 4, !tbaa !9
  %129 = load i64, ptr %12, align 8, !tbaa !12
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = call i64 @PxeRecvFilterEnable(ptr noundef %127, i32 noundef %128, i64 noundef %129, ptr noundef %130)
  store i64 %131, ptr %15, align 8, !tbaa !12
  %132 = load i64, ptr %15, align 8, !tbaa !12
  %133 = icmp slt i64 %132, 0
  br i1 %133, label %134, label %135

134:                                              ; preds = %126
  br label %155

135:                                              ; preds = %126
  br label %136

136:                                              ; preds = %135, %123
  %137 = load i32, ptr %10, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %143, label %139

139:                                              ; preds = %136
  %140 = load i8, ptr %11, align 1, !tbaa !11
  %141 = zext i8 %140 to i32
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %152

143:                                              ; preds = %139, %136
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = load i8, ptr %11, align 1, !tbaa !11
  %147 = call i64 @PxeRecvFilterDisable(ptr noundef %144, i32 noundef %145, i8 noundef zeroext %146)
  store i64 %147, ptr %15, align 8, !tbaa !12
  %148 = load i64, ptr %15, align 8, !tbaa !12
  %149 = icmp slt i64 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %143
  br label %155

151:                                              ; preds = %143
  br label %152

152:                                              ; preds = %151, %139
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = call i64 @PxeRecvFilterRead(ptr noundef %153)
  store i64 %154, ptr %15, align 8, !tbaa !12
  br label %155

155:                                              ; preds = %152, %150, %134, %119, %111, %96, %70, %51, %50
  %156 = load ptr, ptr @gBS, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %156, i32 0, i32 2
  %158 = load ptr, ptr %157, align 8, !tbaa !29
  %159 = load i64, ptr %16, align 8, !tbaa !12
  call void %158(i64 noundef %159)
  %160 = load i64, ptr %15, align 8, !tbaa !12
  store i64 %160, ptr %7, align 8
  store i32 1, ptr %17, align 4
  br label %161

161:                                              ; preds = %155, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %162 = load i64, ptr %7, align 8
  ret i64 %162
}

declare zeroext i8 @DebugAssertEnabled() #2

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

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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"", !10, i64 0, !16, i64 8, !17, i64 32, !18, i64 160, !6, i64 816, !6, i64 824, !6, i64 832, !7, i64 840, !20, i64 842, !10, i64 844, !6, i64 848, !6, i64 856, !6, i64 864, !6, i64 872, !6, i64 880, !6, i64 888, !7, i64 896, !7, i64 897, !21, i64 898, !6, i64 936, !6, i64 944, !6, i64 952, !22, i64 960, !6, i64 1008, !7, i64 1016, !6, i64 2616, !7, i64 2624}
!16 = !{!"", !13, i64 0, !13, i64 8, !10, i64 16}
!17 = !{!"_EFI_SIMPLE_NETWORK_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, !6, i64 112, !6, i64 120}
!18 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, 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}
!19 = !{!"", !7, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{!"s_pxe_cdb", !20, i64 0, !20, i64 2, !20, i64 4, !20, i64 6, !13, i64 8, !13, i64 16, !20, i64 24, !20, i64 26, !20, i64 28, !20, i64 30}
!22 = !{!"s_pxe_db_get_init_info", !10, i64 0, !10, i64 4, !7, i64 8, !10, i64 24, !20, i64 28, !20, i64 30, !20, i64 32, !20, i64 34, !20, i64 36, !20, i64 38, !20, i64 40, !20, i64 42, !7, i64 44, !7, i64 45, !7, i64 46}
!23 = !{!24, !6, i64 24}
!24 = !{!"", !25, 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}
!25 = !{!"", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!26 = !{!15, !10, i64 160}
!27 = !{!15, !10, i64 184}
!28 = !{!15, !10, i64 192}
!29 = !{!24, !6, i64 32}


; 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.2 = external hidden unnamed_addr constant [157 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeRecvFilterEnable(ptr noundef, i32 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeRecvFilterDisable(ptr noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @PxeRecvFilterRead(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @SnpUndi32ReceiveFilters(ptr noundef %0, i32 noundef %1, i32 noundef %2, i8 noundef zeroext %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = icmp eq ptr %0, null
  br i1 %7, label %63, label %8

8:                                                ; preds = %6
  %9 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %9, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre77 = add i64 %.pre, -32
  %.pre79 = inttoptr i64 %.pre77 to ptr
  br i1 %.not, label %._crit_edge, label %10

10:                                               ; preds = %8
  %11 = load i32, ptr %.pre79, align 8, !tbaa !5
  %.not61 = icmp eq i32 %11, 1935961715
  br i1 %.not61, label %._crit_edge, label %12

12:                                               ; preds = %10
  tail call void @DebugAssert(ptr noundef nonnull @.str.2, i64 noundef 405, ptr noundef nonnull @.str.3) #2
  br label %._crit_edge

._crit_edge:                                      ; preds = %8, %10, %12
  %13 = phi ptr [ %0, %12 ], [ %.pre79, %10 ], [ %.pre79, %8 ]
  %14 = load ptr, ptr @gBS, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !20
  %17 = tail call i64 %16(i64 noundef 8) #2
  %18 = getelementptr inbounds i8, ptr %13, i64 160
  %19 = load i32, ptr %18, align 8, !tbaa !23
  switch i32 %19, label %20 [
    i32 2, label %21
    i32 0, label %59
  ]

20:                                               ; preds = %._crit_edge
  br label %59

21:                                               ; preds = %._crit_edge
  %22 = getelementptr inbounds i8, ptr %13, i64 184
  %23 = load i32, ptr %22, align 8, !tbaa !24
  %24 = xor i32 %23, -1
  %25 = or i32 %2, %1
  %26 = and i32 %25, %24
  %or.cond67 = icmp eq i32 %26, 0
  br i1 %or.cond67, label %27, label %59

27:                                               ; preds = %21
  %28 = icmp eq i8 %3, 0
  br i1 %28, label %32, label %29

29:                                               ; preds = %27
  %30 = and i32 %23, 2
  %31 = or i32 %30, %2
  br label %.thread

32:                                               ; preds = %27
  %.not64 = icmp eq i64 %4, 0
  br i1 %.not64, label %40, label %33

33:                                               ; preds = %32
  %34 = getelementptr inbounds i8, ptr %13, i64 192
  %35 = load i32, ptr %34, align 8, !tbaa !25
  %36 = zext i32 %35 to i64
  %37 = icmp ult i64 %36, %4
  %38 = icmp eq ptr %5, null
  %or.cond = or i1 %38, %37
  br i1 %or.cond, label %59, label %.thread

.thread:                                          ; preds = %29, %33
  %.055.ph = phi i64 [ %4, %33 ], [ 0, %29 ]
  %.054.ph = phi ptr [ %5, %33 ], [ null, %29 ]
  %.053.ph = phi i32 [ %2, %33 ], [ %31, %29 ]
  %39 = icmp eq i64 %.055.ph, 0
  br label %41

40:                                               ; preds = %32
  %or.cond3 = icmp eq i32 %25, 0
  br i1 %or.cond3, label %59, label %41

41:                                               ; preds = %.thread, %40
  %42 = phi i1 [ %39, %.thread ], [ true, %40 ]
  %.05376 = phi i32 [ %.053.ph, %.thread ], [ %2, %40 ]
  %.05475 = phi ptr [ %.054.ph, %.thread ], [ %5, %40 ]
  %.05574 = phi i64 [ %.055.ph, %.thread ], [ 0, %40 ]
  %43 = and i32 %1, 2
  %44 = icmp ne i32 %43, 0
  %or.cond9 = and i1 %44, %42
  br i1 %or.cond9, label %59, label %45

45:                                               ; preds = %41
  %46 = icmp ne i32 %1, 0
  %47 = icmp ne i64 %.05574, 0
  %or.cond11 = or i1 %46, %47
  br i1 %or.cond11, label %48, label %51

48:                                               ; preds = %45
  %49 = tail call i64 @PxeRecvFilterEnable(ptr noundef nonnull %13, i32 noundef %1, i64 noundef %.05574, ptr noundef %.05475)
  %50 = icmp slt i64 %49, 0
  br i1 %50, label %59, label %51

51:                                               ; preds = %48, %45
  %52 = icmp ne i32 %.05376, 0
  %53 = icmp ne i8 %3, 0
  %or.cond14 = or i1 %53, %52
  br i1 %or.cond14, label %54, label %57

54:                                               ; preds = %51
  %55 = tail call i64 @PxeRecvFilterDisable(ptr noundef nonnull %13, i32 noundef %.05376, i8 noundef zeroext %3)
  %56 = icmp slt i64 %55, 0
  br i1 %56, label %59, label %57

57:                                               ; preds = %54, %51
  %58 = tail call i64 @PxeRecvFilterRead(ptr noundef nonnull %13)
  br label %59

59:                                               ; preds = %41, %40, %33, %21, %._crit_edge, %54, %48, %57, %20
  %.052 = phi i64 [ -9223372036854775801, %20 ], [ %49, %48 ], [ %55, %54 ], [ %58, %57 ], [ -9223372036854775789, %._crit_edge ], [ -9223372036854775806, %21 ], [ -9223372036854775806, %33 ], [ 0, %40 ], [ -9223372036854775806, %41 ]
  %60 = load ptr, ptr @gBS, align 8, !tbaa !19
  %61 = getelementptr inbounds i8, ptr %60, i64 32
  %62 = load ptr, ptr %61, align 8, !tbaa !26
  tail call void %62(i64 noundef %17) #2
  br label %63

63:                                               ; preds = %6, %59
  %.0 = phi i64 [ %.052, %59 ], [ -9223372036854775806, %6 ]
  ret i64 %.0
}

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !12, i64 32, !14, i64 160, !13, i64 816, !13, i64 824, !13, i64 832, !8, i64 840, !16, i64 842, !7, i64 844, !13, i64 848, !13, i64 856, !13, i64 864, !13, i64 872, !13, i64 880, !13, i64 888, !8, i64 896, !8, i64 897, !17, i64 898, !13, i64 936, !13, i64 944, !13, i64 952, !18, i64 960, !13, i64 1008, !8, i64 1016, !13, i64 2616, !8, i64 2624}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 8, !7, i64 16}
!11 = !{!"long long", !8, i64 0}
!12 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !11, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"", !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, !15, i64 552, !15, i64 584, !15, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!15 = !{!"", !8, i64 0}
!16 = !{!"short", !8, i64 0}
!17 = !{!"s_pxe_cdb", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !11, i64 8, !11, i64 16, !16, i64 24, !16, i64 26, !16, i64 28, !16, i64 30}
!18 = !{!"s_pxe_db_get_init_info", !7, i64 0, !7, i64 4, !8, i64 8, !7, i64 24, !16, i64 28, !16, i64 30, !16, i64 32, !16, i64 34, !16, i64 36, !16, i64 38, !16, i64 40, !16, i64 42, !8, i64 44, !8, i64 45, !8, i64 46}
!19 = !{!13, !13, i64 0}
!20 = !{!21, !13, i64 24}
!21 = !{!"", !22, i64 0, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224, !13, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !13, i64 272, !13, i64 280, !13, i64 288, !13, i64 296, !13, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !13, i64 360, !13, i64 368}
!22 = !{!"", !11, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!23 = !{!6, !7, i64 160}
!24 = !{!6, !7, i64 184}
!25 = !{!6, !7, i64 192}
!26 = !{!21, !13, i64 32}


; Effective O3 passes: BDCEPass,ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass