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

; 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.MNP_DEVICE_DATA = type { i32, ptr, ptr, %struct._EFI_VLAN_CONFIG_PROTOCOL, i64, ptr, ptr, %struct._LIST_ENTRY, i64, %struct._LIST_ENTRY, i32, ptr, %struct.NET_BUF_QUEUE, i64, ptr, i8, ptr, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct._EFI_VLAN_CONFIG_PROTOCOL = type { ptr, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, 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.MNP_GROUP_ADDRESS = type { %struct._LIST_ENTRY, %struct.EFI_MAC_ADDRESS, i64 }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [58 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 zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

declare void @DebugPrint(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

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

declare ptr @AllocatePool(i64 noundef) #1

declare void @FreePool(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpConfigReceiveFilters(ptr noundef %0) #2 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  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 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  br label %16

16:                                               ; preds = %1
  %17 = call zeroext i8 @DebugAssertEnabled()
  %18 = icmp ne i8 %17, 0
  br i1 %18, label %19, label %29

19:                                               ; preds = %16
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %27

22:                                               ; preds = %19
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = icmp eq i32 %25, 1148218957
  br i1 %26, label %28, label %27

27:                                               ; preds = %22, %19
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1370, ptr noundef @.str.1)
  br label %28

28:                                               ; preds = %27, %22
  br label %29

29:                                               ; preds = %28, %16
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %32, i32 0, i32 6
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  store ptr %34, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !17
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %35, i32 0, i32 15
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %38 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %37, i32 0, i32 6
  %39 = load i32, ptr %38, align 4, !tbaa !20
  store i32 %39, ptr %9, align 4, !tbaa !17
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %40, i32 0, i32 18
  %42 = load i32, ptr %41, align 8, !tbaa !23
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %47

44:                                               ; preds = %31
  %45 = load i32, ptr %8, align 4, !tbaa !17
  %46 = or i32 %45, 1
  store i32 %46, ptr %8, align 4, !tbaa !17
  br label %47

47:                                               ; preds = %44, %31
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %48, i32 0, i32 19
  %50 = load i32, ptr %49, align 4, !tbaa !24
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %55

52:                                               ; preds = %47
  %53 = load i32, ptr %8, align 4, !tbaa !17
  %54 = or i32 %53, 4
  store i32 %54, ptr %8, align 4, !tbaa !17
  br label %55

55:                                               ; preds = %52, %47
  store ptr null, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !17
  store i8 1, ptr %10, align 1, !tbaa !25
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %56, i32 0, i32 20
  %58 = load i32, ptr %57, align 8, !tbaa !26
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %159

60:                                               ; preds = %55
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %61, i32 0, i32 10
  %63 = load i32, ptr %62, align 8, !tbaa !27
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %159

65:                                               ; preds = %60
  store i8 0, ptr %10, align 1, !tbaa !25
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %66, i32 0, i32 10
  %68 = load i32, ptr %67, align 8, !tbaa !27
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %69, i32 0, i32 15
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %71, i32 0, i32 8
  %73 = load i32, ptr %72, align 4, !tbaa !28
  %74 = icmp ule i32 %68, %73
  br i1 %74, label %75, label %143

75:                                               ; preds = %65
  %76 = load i32, ptr %8, align 4, !tbaa !17
  %77 = or i32 %76, 2
  store i32 %77, ptr %8, align 4, !tbaa !17
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %78, i32 0, i32 10
  %80 = load i32, ptr %79, align 8, !tbaa !27
  store i32 %80, ptr %7, align 4, !tbaa !17
  %81 = load i32, ptr %7, align 4, !tbaa !17
  %82 = zext i32 %81 to i64
  %83 = mul i64 32, %82
  %84 = call ptr @AllocatePool(i64 noundef %83)
  store ptr %84, ptr %6, align 8, !tbaa !5
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = icmp eq ptr %85, null
  br i1 %86, label %87, label %102

87:                                               ; preds = %75
  br label %88

88:                                               ; preds = %87
  %89 = call zeroext i8 @DebugPrintEnabled()
  %90 = icmp ne i8 %89, 0
  br i1 %90, label %91, label %99

91:                                               ; preds = %88
  br label %92

92:                                               ; preds = %91
  %93 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %94 = icmp ne i8 %93, 0
  br i1 %94, label %95, label %96

95:                                               ; preds = %92
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.27)
  br label %96

96:                                               ; preds = %95, %92
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98, %88
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  store i64 -9223372036854775799, ptr %2, align 8
  store i32 1, ptr %14, align 4
  br label %216

102:                                              ; preds = %75
  store i32 0, ptr %12, align 4, !tbaa !17
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %103, i32 0, i32 9
  %105 = getelementptr inbounds %struct._LIST_ENTRY, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !29
  store ptr %106, ptr %11, align 8, !tbaa !5
  br label %107

107:                                              ; preds = %138, %102
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %109, i32 0, i32 9
  %111 = icmp ne ptr %108, %110
  br i1 %111, label %112, label %142

112:                                              ; preds = %107
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = ptrtoint ptr %113 to i64
  %115 = sub i64 %114, 0
  %116 = inttoptr i64 %115 to ptr
  store ptr %116, ptr %13, align 8, !tbaa !5
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load i32, ptr %12, align 4, !tbaa !17
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %117, i64 %119
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.MNP_GROUP_ADDRESS, ptr %121, i32 0, i32 1
  %123 = call ptr @CopyMem(ptr noundef %120, ptr noundef %122, i64 noundef 32)
  %124 = load i32, ptr %12, align 4, !tbaa !17
  %125 = add i32 %124, 1
  store i32 %125, ptr %12, align 4, !tbaa !17
  br label %126

126:                                              ; preds = %112
  %127 = call zeroext i8 @DebugAssertEnabled()
  %128 = icmp ne i8 %127, 0
  br i1 %128, label %129, label %135

129:                                              ; preds = %126
  %130 = load i32, ptr %12, align 4, !tbaa !17
  %131 = load i32, ptr %7, align 4, !tbaa !17
  %132 = icmp ule i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1435, ptr noundef @.str.28)
  br label %134

134:                                              ; preds = %133, %129
  br label %135

135:                                              ; preds = %134, %126
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._LIST_ENTRY, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !30
  store ptr %141, ptr %11, align 8, !tbaa !5
  br label %107, !llvm.loop !31

142:                                              ; preds = %107
  br label %158

143:                                              ; preds = %65
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %144, i32 0, i32 15
  %146 = load ptr, ptr %145, align 8, !tbaa !18
  %147 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %146, i32 0, i32 6
  %148 = load i32, ptr %147, align 4, !tbaa !20
  %149 = and i32 %148, 16
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %154

151:                                              ; preds = %143
  %152 = load i32, ptr %8, align 4, !tbaa !17
  %153 = or i32 %152, 16
  store i32 %153, ptr %8, align 4, !tbaa !17
  br label %157

154:                                              ; preds = %143
  %155 = load i32, ptr %8, align 4, !tbaa !17
  %156 = or i32 %155, 8
  store i32 %156, ptr %8, align 4, !tbaa !17
  br label %157

157:                                              ; preds = %154, %151
  br label %158

158:                                              ; preds = %157, %142
  br label %159

159:                                              ; preds = %158, %60, %55
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %160, i32 0, i32 21
  %162 = load i32, ptr %161, align 4, !tbaa !33
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %167

164:                                              ; preds = %159
  %165 = load i32, ptr %8, align 4, !tbaa !17
  %166 = or i32 %165, 8
  store i32 %166, ptr %8, align 4, !tbaa !17
  br label %167

167:                                              ; preds = %164, %159
  %168 = load i32, ptr %8, align 4, !tbaa !17
  %169 = load i32, ptr %9, align 4, !tbaa !17
  %170 = xor i32 %169, %168
  store i32 %170, ptr %9, align 4, !tbaa !17
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %171, i32 0, i32 6
  %173 = load ptr, ptr %172, align 8, !tbaa !34
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = load i32, ptr %8, align 4, !tbaa !17
  %176 = load i32, ptr %9, align 4, !tbaa !17
  %177 = load i8, ptr %10, align 1, !tbaa !25
  %178 = load i32, ptr %7, align 4, !tbaa !17
  %179 = zext i32 %178 to i64
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = call i64 %173(ptr noundef %174, i32 noundef %175, i32 noundef %176, i8 noundef zeroext %177, i64 noundef %179, ptr noundef %180)
  store i64 %181, ptr %4, align 8, !tbaa !35
  br label %182

182:                                              ; preds = %167
  %183 = call zeroext i8 @DebugCodeEnabled()
  %184 = icmp ne i8 %183, 0
  br i1 %184, label %185, label %207

185:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %186 = load i64, ptr %4, align 8, !tbaa !35
  %187 = icmp slt i64 %186, 0
  br i1 %187, label %188, label %204

188:                                              ; preds = %185
  br label %189

189:                                              ; preds = %188
  %190 = call zeroext i8 @DebugPrintEnabled()
  %191 = icmp ne i8 %190, 0
  br i1 %191, label %192, label %201

192:                                              ; preds = %189
  br label %193

193:                                              ; preds = %192
  %194 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %195 = icmp ne i8 %194, 0
  br i1 %195, label %196, label %198

196:                                              ; preds = %193
  %197 = load i64, ptr %4, align 8, !tbaa !35
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.29, i64 noundef %197)
  br label %198

198:                                              ; preds = %196, %193
  br label %199

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  br label %201

201:                                              ; preds = %200, %189
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203, %185
  store i8 0, ptr %15, align 1, !tbaa !25
  %205 = load i8, ptr %15, align 1, !tbaa !25
  %206 = add i8 %205, 1
  store i8 %206, ptr %15, align 1, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  br label %207

207:                                              ; preds = %204, %182
  br label %208

208:                                              ; preds = %207
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %214

212:                                              ; preds = %209
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %213)
  br label %214

214:                                              ; preds = %212, %209
  %215 = load i64, ptr %4, align 8, !tbaa !35
  store i64 %215, ptr %2, align 8
  store i32 1, ptr %14, align 4
  br label %216

216:                                              ; preds = %214, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  %217 = load i64, ptr %2, align 8
  ret i64 %217
}

declare zeroext i8 @DebugCodeEnabled() #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, !13, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !13, i64 88, !14, i64 96, !11, i64 112, !6, i64 120, !15, i64 128, !13, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !6, i64 248, !6, i64 256}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !11, i64 0, !13, i64 8, !14, i64 16, !14, i64 32, !11, i64 48, !11, i64 52}
!16 = !{!10, !6, i64 64}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !6, i64 120}
!19 = !{!"_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}
!20 = !{!21, !11, i64 24}
!21 = !{!"", !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, !22, i64 552, !22, i64 584, !22, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!22 = !{!"", !7, i64 0}
!23 = !{!10, !11, i64 224}
!24 = !{!10, !11, i64 228}
!25 = !{!7, !7, i64 0}
!26 = !{!10, !11, i64 232}
!27 = !{!10, !11, i64 112}
!28 = !{!21, !11, i64 32}
!29 = !{!10, !6, i64 96}
!30 = !{!14, !6, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!10, !11, i64 236}
!34 = !{!19, !6, i64 48}
!35 = !{!13, !13, i64 0}


; 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.EFI_MAC_ADDRESS = type { [32 x i8] }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [58 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #0

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) local_unnamed_addr #0

declare void @DebugPrint(i64 noundef, ptr noundef, ...) local_unnamed_addr #0

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #0

declare void @FreePool(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpConfigReceiveFilters(ptr noundef readonly %0) local_unnamed_addr #1 {
  %2 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %2, 0
  br i1 %.not, label %8, label %3

3:                                                ; preds = %1
  %.not57 = icmp eq ptr %0, null
  br i1 %.not57, label %7, label %4

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

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

8:                                                ; preds = %4, %7, %1
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  %10 = load ptr, ptr %9, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %10, i64 120
  %12 = load ptr, ptr %11, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %12, i64 24
  %14 = load i32, ptr %13, align 4, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %0, i64 224
  %16 = load i32, ptr %15, align 8, !tbaa !21
  %.not58 = icmp ne i32 %16, 0
  %spec.select = zext i1 %.not58 to i32
  %17 = getelementptr inbounds i8, ptr %0, i64 228
  %18 = load i32, ptr %17, align 4, !tbaa !22
  %.not59 = icmp eq i32 %18, 0
  %19 = or disjoint i32 %spec.select, 4
  %.1 = select i1 %.not59, i32 %spec.select, i32 %19
  %20 = getelementptr inbounds i8, ptr %0, i64 232
  %21 = load i32, ptr %20, align 8, !tbaa !23
  %.not60 = icmp eq i32 %21, 0
  br i1 %.not60, label %.loopexit, label %22

22:                                               ; preds = %8
  %23 = getelementptr inbounds i8, ptr %0, i64 112
  %24 = load i32, ptr %23, align 8, !tbaa !24
  %.not61 = icmp eq i32 %24, 0
  br i1 %.not61, label %.loopexit, label %25

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %12, i64 32
  %27 = load i32, ptr %26, align 4, !tbaa !25
  %.not62 = icmp ugt i32 %24, %27
  br i1 %.not62, label %49, label %28

28:                                               ; preds = %25
  %29 = or disjoint i32 %.1, 2
  %30 = zext i32 %24 to i64
  %31 = shl nuw nsw i64 %30, 5
  %32 = tail call ptr @AllocatePool(i64 noundef %31) #2
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %39

34:                                               ; preds = %28
  %35 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not72 = icmp eq i8 %35, 0
  br i1 %.not72, label %72, label %36

36:                                               ; preds = %34
  %37 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #2
  %.not73 = icmp eq i8 %37, 0
  br i1 %.not73, label %72, label %38

38:                                               ; preds = %36
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.27) #2
  br label %72

39:                                               ; preds = %28
  %40 = getelementptr inbounds i8, ptr %0, i64 96
  %.04976 = load ptr, ptr %40, align 8, !tbaa !26
  %.not6477 = icmp eq ptr %.04976, %40
  br i1 %.not6477, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %39, %48
  %.04979 = phi ptr [ %.049, %48 ], [ %.04976, %39 ]
  %.04878 = phi i32 [ %45, %48 ], [ 0, %39 ]
  %41 = zext i32 %.04878 to i64
  %42 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %32, i64 %41
  %43 = getelementptr inbounds i8, ptr %.04979, i64 16
  %44 = tail call ptr @CopyMem(ptr noundef nonnull %42, ptr noundef nonnull %43, i64 noundef 32) #2
  %45 = add i32 %.04878, 1
  %46 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not70 = icmp ne i8 %46, 0
  %.not71 = icmp ugt i32 %45, %24
  %or.cond = and i1 %.not70, %.not71
  br i1 %or.cond, label %47, label %48

47:                                               ; preds = %.lr.ph
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1435, ptr noundef nonnull @.str.28) #2
  br label %48

48:                                               ; preds = %.lr.ph, %47
  %.049 = load ptr, ptr %.04979, align 8, !tbaa !26
  %.not64 = icmp eq ptr %.049, %40
  br i1 %.not64, label %.loopexit, label %.lr.ph, !llvm.loop !27

49:                                               ; preds = %25
  %50 = and i32 %14, 16
  %.not63 = icmp eq i32 %50, 0
  br i1 %.not63, label %53, label %51

51:                                               ; preds = %49
  %52 = or disjoint i32 %.1, 16
  br label %.loopexit

53:                                               ; preds = %49
  %54 = or disjoint i32 %.1, 8
  br label %.loopexit

.loopexit:                                        ; preds = %48, %39, %53, %51, %22, %8
  %.052 = phi i32 [ 0, %51 ], [ 0, %53 ], [ 0, %22 ], [ 0, %8 ], [ %24, %39 ], [ %24, %48 ]
  %.2 = phi i32 [ %52, %51 ], [ %54, %53 ], [ %.1, %22 ], [ %.1, %8 ], [ %29, %39 ], [ %29, %48 ]
  %.050 = phi i8 [ 0, %51 ], [ 0, %53 ], [ 1, %22 ], [ 1, %8 ], [ 0, %39 ], [ 0, %48 ]
  %.047 = phi ptr [ null, %51 ], [ null, %53 ], [ null, %22 ], [ null, %8 ], [ %32, %39 ], [ %32, %48 ]
  %55 = getelementptr inbounds i8, ptr %0, i64 236
  %56 = load i32, ptr %55, align 4, !tbaa !29
  %.not65 = icmp eq i32 %56, 0
  %57 = or i32 %.2, 8
  %spec.select74 = select i1 %.not65, i32 %.2, i32 %57
  %58 = xor i32 %spec.select74, %14
  %59 = getelementptr inbounds i8, ptr %10, i64 48
  %60 = load ptr, ptr %59, align 8, !tbaa !30
  %61 = zext i32 %.052 to i64
  %62 = tail call i64 %60(ptr noundef %10, i32 noundef %spec.select74, i32 noundef %58, i8 noundef zeroext %.050, i64 noundef %61, ptr noundef %.047) #2
  %63 = tail call zeroext i8 @DebugCodeEnabled() #2
  %.not66 = icmp ne i8 %63, 0
  %64 = icmp slt i64 %62, 0
  %or.cond75 = select i1 %.not66, i1 %64, i1 false
  br i1 %or.cond75, label %65, label %70

65:                                               ; preds = %.loopexit
  %66 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not67 = icmp eq i8 %66, 0
  br i1 %.not67, label %70, label %67

67:                                               ; preds = %65
  %68 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #2
  %.not68 = icmp eq i8 %68, 0
  br i1 %.not68, label %70, label %69

69:                                               ; preds = %67
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.29, i64 noundef %62) #2
  br label %70

70:                                               ; preds = %67, %69, %65, %.loopexit
  %.not69 = icmp eq ptr %.047, null
  br i1 %.not69, label %72, label %71

71:                                               ; preds = %70
  tail call void @FreePool(ptr noundef nonnull %.047) #2
  br label %72

72:                                               ; preds = %70, %71, %34, %38, %36
  %.0 = phi i64 [ -9223372036854775799, %36 ], [ -9223372036854775799, %38 ], [ -9223372036854775799, %34 ], [ %62, %71 ], [ %62, %70 ]
  ret i64 %.0
}

declare zeroext i8 @DebugCodeEnabled() local_unnamed_addr #0

attributes #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 = { 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 #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, !10, i64 16, !11, i64 24, !12, i64 48, !10, i64 56, !10, i64 64, !13, i64 72, !12, i64 88, !13, i64 96, !7, i64 112, !10, i64 120, !14, i64 128, !12, i64 184, !10, i64 192, !8, i64 200, !10, i64 208, !10, i64 216, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !10, i64 248, !10, i64 256}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!14 = !{!"", !7, i64 0, !12, i64 8, !13, i64 16, !13, i64 32, !7, i64 48, !7, i64 52}
!15 = !{!6, !10, i64 64}
!16 = !{!17, !10, i64 120}
!17 = !{!"_EFI_SIMPLE_NETWORK_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, !10, i64 112, !10, i64 120}
!18 = !{!19, !7, i64 24}
!19 = !{!"", !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, !20, i64 552, !20, i64 584, !20, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!20 = !{!"", !8, i64 0}
!21 = !{!6, !7, i64 224}
!22 = !{!6, !7, i64 228}
!23 = !{!6, !7, i64 232}
!24 = !{!6, !7, i64 112}
!25 = !{!19, !7, i64 32}
!26 = !{!13, !10, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!6, !7, i64 236}
!30 = !{!17, !10, i64 48}


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