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

; 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_INSTANCE_DATA = type { i32, ptr, ptr, %struct._LIST_ENTRY, %struct._EFI_MANAGED_NETWORK_PROTOCOL, i8, i8, %struct._LIST_ENTRY, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, i8 }
%struct._EFI_MANAGED_NETWORK_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%struct.MNP_SERVICE_DATA = type { i32, %struct._LIST_ENTRY, ptr, ptr, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, %struct._LIST_ENTRY, i64, i32, i16, i8 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%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.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.MNP_GROUP_ADDRESS = type { %struct._LIST_ENTRY, %struct.EFI_MAC_ADDRESS, i64 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [24 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 @AllocatePool(i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @MnpConfigReceiveFilters(ptr noundef) #2

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

20:                                               ; preds = %4
  %21 = call zeroext i8 @DebugAssertEnabled()
  %22 = icmp ne i8 %21, 0
  br i1 %22, label %23, label %33

23:                                               ; preds = %20
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !10
  %30 = icmp eq i32 %29, 1232105037
  br i1 %30, label %32, label %31

31:                                               ; preds = %26, %23
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1654, ptr noundef @.str.25)
  br label %32

32:                                               ; preds = %31, %26
  br label %33

33:                                               ; preds = %32, %20
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %38, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  store ptr %40, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %41, i32 0, i32 6
  %43 = load ptr, ptr %42, align 8, !tbaa !23
  %44 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %43, i32 0, i32 15
  %45 = load ptr, ptr %44, align 8, !tbaa !27
  store ptr %45, ptr %14, align 8, !tbaa !5
  %46 = load i8, ptr %7, align 1, !tbaa !9
  %47 = icmp ne i8 %46, 0
  br i1 %47, label %48, label %115

48:                                               ; preds = %35
  store ptr null, ptr %13, align 8, !tbaa !5
  store i8 0, ptr %17, align 1, !tbaa !9
  %49 = call ptr @AllocatePool(i64 noundef 24)
  store ptr %49, ptr %15, align 8, !tbaa !5
  %50 = load ptr, ptr %15, align 8, !tbaa !5
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %67

52:                                               ; preds = %48
  br label %53

53:                                               ; preds = %52
  %54 = call zeroext i8 @DebugPrintEnabled()
  %55 = icmp ne i8 %54, 0
  br i1 %55, label %56, label %64

56:                                               ; preds = %53
  br label %57

57:                                               ; preds = %56
  %58 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %59 = icmp ne i8 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.33)
  br label %61

61:                                               ; preds = %60, %57
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63, %53
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  store i64 -9223372036854775799, ptr %5, align 8
  store i32 1, ptr %19, align 4
  br label %169

67:                                               ; preds = %48
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %68, i32 0, i32 9
  %70 = getelementptr inbounds %struct._LIST_ENTRY, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !29
  store ptr %71, ptr %11, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %93, %67
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %74, i32 0, i32 9
  %76 = icmp ne ptr %73, %75
  br i1 %76, label %77, label %97

77:                                               ; preds = %72
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = ptrtoint ptr %78 to i64
  %80 = sub i64 %79, 0
  %81 = inttoptr i64 %80 to ptr
  store ptr %81, ptr %13, align 8, !tbaa !5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.MNP_GROUP_ADDRESS, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !30
  %88 = zext i32 %87 to i64
  %89 = call i64 @CompareMem(ptr noundef %82, ptr noundef %84, i64 noundef %88)
  %90 = icmp eq i64 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %77
  store i8 1, ptr %17, align 1, !tbaa !9
  br label %97

92:                                               ; preds = %77
  br label %93

93:                                               ; preds = %92
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._LIST_ENTRY, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !33
  store ptr %96, ptr %11, align 8, !tbaa !5
  br label %72, !llvm.loop !34

97:                                               ; preds = %91, %72
  %98 = load i8, ptr %17, align 1, !tbaa !9
  %99 = icmp ne i8 %98, 0
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store ptr null, ptr %13, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %100, %97
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load ptr, ptr %15, align 8, !tbaa !5
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !30
  %109 = call i64 @MnpGroupOpAddCtrlBlk(ptr noundef %102, ptr noundef %103, ptr noundef %104, ptr noundef %105, i32 noundef %108)
  store i64 %109, ptr %16, align 8, !tbaa !36
  %110 = load i64, ptr %16, align 8, !tbaa !36
  %111 = icmp slt i64 %110, 0
  br i1 %111, label %112, label %114

112:                                              ; preds = %101
  %113 = load i64, ptr %16, align 8, !tbaa !36
  store i64 %113, ptr %5, align 8
  store i32 1, ptr %19, align 4
  br label %169

114:                                              ; preds = %101
  store i8 1, ptr %18, align 1, !tbaa !9
  br label %161

115:                                              ; preds = %35
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %118, label %133

118:                                              ; preds = %115
  br label %119

119:                                              ; preds = %118
  %120 = call zeroext i8 @DebugAssertEnabled()
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %122, label %127

122:                                              ; preds = %119
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = icmp ne ptr %123, null
  br i1 %124, label %126, label %125

125:                                              ; preds = %122
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1708, ptr noundef @.str.34)
  br label %126

126:                                              ; preds = %125, %122
  br label %127

127:                                              ; preds = %126, %119
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = call zeroext i8 @MnpGroupOpDelCtrlBlk(ptr noundef %130, ptr noundef %131)
  store i8 %132, ptr %18, align 1, !tbaa !9
  br label %160

133:                                              ; preds = %115
  store i8 0, ptr %18, align 1, !tbaa !9
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %134, i32 0, i32 7
  %136 = getelementptr inbounds %struct._LIST_ENTRY, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !37
  store ptr %137, ptr %11, align 8, !tbaa !5
  %138 = load ptr, ptr %11, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._LIST_ENTRY, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !33
  store ptr %140, ptr %12, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %154, %133
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %143, i32 0, i32 7
  %145 = icmp ne ptr %142, %144
  br i1 %145, label %146, label %159

146:                                              ; preds = %141
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = ptrtoint ptr %147 to i64
  %149 = sub i64 %148, 0
  %150 = inttoptr i64 %149 to ptr
  store ptr %150, ptr %15, align 8, !tbaa !5
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = call zeroext i8 @MnpGroupOpDelCtrlBlk(ptr noundef %151, ptr noundef %152)
  store i8 %153, ptr %18, align 1, !tbaa !9
  br label %154

154:                                              ; preds = %146
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %155, ptr %11, align 8, !tbaa !5
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._LIST_ENTRY, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !33
  store ptr %158, ptr %12, align 8, !tbaa !5
  br label %141, !llvm.loop !38

159:                                              ; preds = %141
  br label %160

160:                                              ; preds = %159, %129
  br label %161

161:                                              ; preds = %160, %114
  store i64 0, ptr %16, align 8, !tbaa !36
  %162 = load i8, ptr %18, align 1, !tbaa !9
  %163 = icmp ne i8 %162, 0
  br i1 %163, label %164, label %167

164:                                              ; preds = %161
  %165 = load ptr, ptr %10, align 8, !tbaa !5
  %166 = call i64 @MnpConfigReceiveFilters(ptr noundef %165)
  store i64 %166, ptr %16, align 8, !tbaa !36
  br label %167

167:                                              ; preds = %164, %161
  %168 = load i64, ptr %16, align 8, !tbaa !36
  store i64 %168, ptr %5, align 8
  store i32 1, ptr %19, align 4
  br label %169

169:                                              ; preds = %167, %112, %66
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %170 = load i64, ptr %5, align 8
  ret i64 %170
}

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @MnpGroupOpDelCtrlBlk(ptr noundef, ptr noundef) #2

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 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 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !14, i64 40, !7, i64 104, !7, i64 105, !13, i64 112, !15, i64 128, !13, i64 168, !13, i64 184, !16, i64 200, !17, i64 208, !7, i64 228}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!"_EFI_MANAGED_NETWORK_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}
!15 = !{!"", !13, i64 0, !13, i64 16, !16, i64 32}
!16 = !{!"long long", !7, i64 0}
!17 = !{!"", !12, i64 0, !12, i64 4, !18, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!11, !6, i64 8}
!20 = !{!21, !6, i64 24}
!21 = !{!"", !12, i64 0, !13, i64 8, !6, i64 24, !6, i64 32, !22, i64 40, !6, i64 56, !13, i64 64, !16, i64 80, !12, i64 88, !18, i64 92, !7, i64 94}
!22 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!23 = !{!24, !6, i64 64}
!24 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !25, i64 24, !16, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !16, i64 88, !13, i64 96, !12, i64 112, !6, i64 120, !26, i64 128, !16, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236, !12, i64 240, !12, i64 244, !6, i64 248, !6, i64 256}
!25 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"", !12, i64 0, !16, i64 8, !13, i64 16, !13, i64 32, !12, i64 48, !12, i64 52}
!27 = !{!28, !6, i64 120}
!28 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !16, 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}
!29 = !{!24, !6, i64 96}
!30 = !{!31, !12, i64 4}
!31 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !7, i64 40, !32, i64 552, !32, i64 584, !32, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!32 = !{!"", !7, i64 0}
!33 = !{!13, !6, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!16, !16, i64 0}
!37 = !{!11, !6, i64 112}
!38 = distinct !{!38, !35}


; 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 [151 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [24 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 @AllocatePool(i64 noundef) local_unnamed_addr #0

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

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

6:                                                ; preds = %4
  %.not50 = icmp eq ptr %0, null
  br i1 %.not50, label %10, label %7

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

10:                                               ; preds = %7, %6
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1654, ptr noundef nonnull @.str.25) #2
  br label %11

11:                                               ; preds = %7, %10, %4
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %13, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %15, i64 64
  %17 = load ptr, ptr %16, align 8, !tbaa !21
  %18 = getelementptr inbounds i8, ptr %17, i64 120
  %19 = load ptr, ptr %18, align 8, !tbaa !25
  %.not51 = icmp eq i8 %1, 0
  br i1 %.not51, label %42, label %20

20:                                               ; preds = %11
  %21 = tail call ptr @AllocatePool(i64 noundef 24) #2
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %28

23:                                               ; preds = %20
  %24 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not57 = icmp eq i8 %24, 0
  br i1 %.not57, label %.loopexit.thread, label %25

25:                                               ; preds = %23
  %26 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #2
  %.not58 = icmp eq i8 %26, 0
  br i1 %.not58, label %.loopexit.thread, label %27

27:                                               ; preds = %25
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.33) #2
  br label %.loopexit.thread

28:                                               ; preds = %20
  %29 = getelementptr inbounds i8, ptr %15, i64 96
  %30 = getelementptr inbounds i8, ptr %19, i64 4
  br label %31

31:                                               ; preds = %32, %28
  %.045.in = phi ptr [ %29, %28 ], [ %.045, %32 ]
  %.045 = load ptr, ptr %.045.in, align 8, !tbaa !27
  %.not54 = icmp eq ptr %.045, %29
  br i1 %.not54, label %38, label %32

32:                                               ; preds = %31
  %33 = getelementptr inbounds i8, ptr %.045, i64 16
  %34 = load i32, ptr %30, align 4, !tbaa !28
  %35 = zext i32 %34 to i64
  %36 = tail call i64 @CompareMem(ptr noundef %2, ptr noundef nonnull %33, i64 noundef %35) #2
  %37 = icmp eq i64 %36, 0
  br i1 %37, label %38, label %31, !llvm.loop !31

38:                                               ; preds = %32, %31
  %spec.select = phi ptr [ null, %31 ], [ %.045, %32 ]
  %39 = load i32, ptr %30, align 4, !tbaa !28
  %40 = tail call i64 @MnpGroupOpAddCtrlBlk(ptr noundef %0, ptr noundef nonnull %21, ptr noundef %spec.select, ptr noundef %2, i32 noundef %39)
  %41 = icmp slt i64 %40, 0
  br i1 %41, label %.loopexit.thread, label %.thread

42:                                               ; preds = %11
  %.not52 = icmp eq ptr %2, null
  br i1 %.not52, label %50, label %43

43:                                               ; preds = %42
  %44 = tail call zeroext i8 @DebugAssertEnabled() #2
  %45 = icmp eq i8 %44, 0
  %46 = icmp ne ptr %3, null
  %or.cond = or i1 %46, %45
  br i1 %or.cond, label %48, label %47

47:                                               ; preds = %43
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1708, ptr noundef nonnull @.str.34) #2
  br label %48

48:                                               ; preds = %47, %43
  %49 = tail call zeroext i8 @MnpGroupOpDelCtrlBlk(ptr noundef nonnull %0, ptr noundef %3)
  br label %.loopexit

50:                                               ; preds = %42
  %51 = getelementptr inbounds i8, ptr %0, i64 112
  %52 = load ptr, ptr %51, align 8, !tbaa !33
  %.not5361 = icmp eq ptr %52, %51
  br i1 %.not5361, label %.loopexit.thread, label %.lr.ph

.lr.ph:                                           ; preds = %50, %.lr.ph
  %.14662 = phi ptr [ %.044, %.lr.ph ], [ %52, %50 ]
  %.044 = load ptr, ptr %.14662, align 8, !tbaa !27
  %53 = tail call zeroext i8 @MnpGroupOpDelCtrlBlk(ptr noundef %0, ptr noundef nonnull %.14662)
  %.not53 = icmp eq ptr %.044, %51
  br i1 %.not53, label %.loopexit, label %.lr.ph, !llvm.loop !34

.loopexit:                                        ; preds = %.lr.ph, %48
  %.1 = phi i8 [ %49, %48 ], [ %53, %.lr.ph ]
  %.not56 = icmp eq i8 %.1, 0
  br i1 %.not56, label %.loopexit.thread, label %.thread

.thread:                                          ; preds = %38, %.loopexit
  %54 = tail call i64 @MnpConfigReceiveFilters(ptr noundef %15)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %50, %.loopexit, %.thread, %38, %23, %27, %25
  %.041 = phi i64 [ -9223372036854775799, %25 ], [ -9223372036854775799, %27 ], [ -9223372036854775799, %23 ], [ %40, %38 ], [ %54, %.thread ], [ 0, %.loopexit ], [ 0, %50 ]
  ret i64 %.041
}

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @MnpGroupOpDelCtrlBlk(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) 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 40, !8, i64 104, !8, i64 105, !11, i64 112, !13, i64 128, !11, i64 168, !11, i64 184, !14, i64 200, !15, i64 208, !8, i64 228}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!12 = !{!"_EFI_MANAGED_NETWORK_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}
!13 = !{!"", !11, i64 0, !11, i64 16, !14, i64 32}
!14 = !{!"long long", !8, i64 0}
!15 = !{!"", !7, i64 0, !7, i64 4, !16, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!16 = !{!"short", !8, i64 0}
!17 = !{!6, !10, i64 8}
!18 = !{!19, !10, i64 24}
!19 = !{!"", !7, i64 0, !11, i64 8, !10, i64 24, !10, i64 32, !20, i64 40, !10, i64 56, !11, i64 64, !14, i64 80, !7, i64 88, !16, i64 92, !8, i64 94}
!20 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !10, i64 0, !10, i64 8}
!21 = !{!22, !10, i64 64}
!22 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !23, i64 24, !14, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !14, i64 88, !11, i64 96, !7, i64 112, !10, i64 120, !24, i64 128, !14, 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}
!23 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16}
!24 = !{!"", !7, i64 0, !14, i64 8, !11, i64 16, !11, i64 32, !7, i64 48, !7, i64 52}
!25 = !{!26, !10, i64 120}
!26 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !14, 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}
!27 = !{!11, !10, i64 0}
!28 = !{!29, !7, i64 4}
!29 = !{!"", !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, !30, i64 552, !30, i64 584, !30, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!30 = !{!"", !8, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!6, !10, i64 112}
!34 = distinct !{!34, !32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass