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

; 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.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 }
%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_CONTROL_BLOCK = type { %struct._LIST_ENTRY, ptr }
%struct.MNP_GROUP_ADDRESS = type { %struct._LIST_ENTRY, %struct.EFI_MAC_ADDRESS, i64 }

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

; 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

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

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

19:                                               ; preds = %3
  %20 = load i8, ptr %6, align 1, !tbaa !9
  %21 = zext i8 %20 to i32
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %27

23:                                               ; preds = %19
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23, %3
  store i64 -9223372036854775806, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %168

27:                                               ; preds = %23, %19
  %28 = call zeroext i8 @DebugAssertEnabled()
  %29 = zext i8 %28 to i32
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %41

31:                                               ; preds = %27
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = ptrtoint ptr %32 to i64
  %34 = sub i64 %33, ptrtoint (ptr getelementptr inbounds (%struct.MNP_INSTANCE_DATA, ptr null, i32 0, i32 4) to i64)
  %35 = inttoptr i64 %34 to ptr
  %36 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !10
  %38 = icmp ne i32 %37, 1232105037
  br i1 %38, label %39, label %41

39:                                               ; preds = %31
  call void @DebugAssert(ptr noundef @.str, i64 noundef 373, ptr noundef @.str.1)
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  br label %46

41:                                               ; preds = %31, %27
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = ptrtoint ptr %42 to i64
  %44 = sub i64 %43, ptrtoint (ptr getelementptr inbounds (%struct.MNP_INSTANCE_DATA, ptr null, i32 0, i32 4) to i64)
  %45 = inttoptr i64 %44 to ptr
  br label %46

46:                                               ; preds = %41, %39
  %47 = phi ptr [ %40, %39 ], [ %45, %41 ]
  store ptr %47, ptr %8, align 8, !tbaa !5
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !19
  %51 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !20
  %53 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %52, i32 0, i32 6
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %54, i32 0, i32 15
  %56 = load ptr, ptr %55, align 8, !tbaa !27
  store ptr %56, ptr %9, align 8, !tbaa !5
  %57 = load ptr, ptr @gBS, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %57, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !29
  %60 = call i64 %59(i64 noundef 8)
  store i64 %60, ptr %14, align 8, !tbaa !32
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %61, i32 0, i32 5
  %63 = load i8, ptr %62, align 8, !tbaa !33
  %64 = icmp ne i8 %63, 0
  br i1 %64, label %66, label %65

65:                                               ; preds = %46
  store i64 -9223372036854775789, ptr %15, align 8, !tbaa !32
  br label %162

66:                                               ; preds = %46
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %67, i32 0, i32 12
  %69 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %68, i32 0, i32 4
  %70 = load i8, ptr %69, align 1, !tbaa !34
  %71 = icmp ne i8 %70, 0
  br i1 %71, label %72, label %91

72:                                               ; preds = %66
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %92

75:                                               ; preds = %72
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load i8, ptr %76, align 1, !tbaa !9
  %78 = zext i8 %77 to i32
  %79 = and i32 %78, 1
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %91

81:                                               ; preds = %75
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %83, i32 0, i32 12
  %85 = load ptr, ptr %9, 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 !35
  %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 = %81, %75, %66
  store i64 -9223372036854775806, ptr %15, align 8, !tbaa !32
  br label %162

92:                                               ; preds = %81, %72
  store i64 0, ptr %15, align 8, !tbaa !32
  store i8 0, ptr %13, align 1, !tbaa !9
  store ptr null, ptr %10, align 8, !tbaa !5
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %149

95:                                               ; preds = %92
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %96, i32 0, i32 7
  %98 = getelementptr inbounds %struct._LIST_ENTRY, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !38
  store ptr %99, ptr %12, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %124, %95
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %102, i32 0, i32 7
  %104 = icmp ne ptr %101, %103
  br i1 %104, label %105, label %128

105:                                              ; preds = %100
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = ptrtoint ptr %106 to i64
  %108 = sub i64 %107, 0
  %109 = inttoptr i64 %108 to ptr
  store ptr %109, ptr %10, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.MNP_GROUP_CONTROL_BLOCK, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !39
  store ptr %112, ptr %11, align 8, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.MNP_GROUP_ADDRESS, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !35
  %119 = zext i32 %118 to i64
  %120 = call i64 @CompareMem(ptr noundef %113, ptr noundef %115, i64 noundef %119)
  %121 = icmp eq i64 0, %120
  br i1 %121, label %122, label %123

122:                                              ; preds = %105
  store i8 1, ptr %13, align 1, !tbaa !9
  br label %128

123:                                              ; preds = %105
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._LIST_ENTRY, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !41
  store ptr %127, ptr %12, align 8, !tbaa !5
  br label %100, !llvm.loop !42

128:                                              ; preds = %122, %100
  %129 = load i8, ptr %6, align 1, !tbaa !9
  %130 = zext i8 %129 to i32
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %137

132:                                              ; preds = %128
  %133 = load i8, ptr %13, align 1, !tbaa !9
  %134 = zext i8 %133 to i32
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %137

136:                                              ; preds = %132
  store i64 -9223372036854775788, ptr %15, align 8, !tbaa !32
  br label %137

137:                                              ; preds = %136, %132, %128
  %138 = load i8, ptr %6, align 1, !tbaa !9
  %139 = icmp ne i8 %138, 0
  br i1 %139, label %144, label %140

140:                                              ; preds = %137
  %141 = load i8, ptr %13, align 1, !tbaa !9
  %142 = icmp ne i8 %141, 0
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  store i64 -9223372036854775794, ptr %15, align 8, !tbaa !32
  br label %144

144:                                              ; preds = %143, %140, %137
  %145 = load i64, ptr %15, align 8, !tbaa !32
  %146 = icmp slt i64 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %144
  br label %162

148:                                              ; preds = %144
  br label %156

149:                                              ; preds = %92
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %150, i32 0, i32 7
  %152 = call zeroext i8 @IsListEmpty(ptr noundef %151)
  %153 = icmp ne i8 %152, 0
  br i1 %153, label %154, label %155

154:                                              ; preds = %149
  br label %162

155:                                              ; preds = %149
  br label %156

156:                                              ; preds = %155, %148
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = load i8, ptr %6, align 1, !tbaa !9
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  %161 = call i64 @MnpGroupOp(ptr noundef %157, i8 noundef zeroext %158, ptr noundef %159, ptr noundef %160)
  store i64 %161, ptr %15, align 8, !tbaa !32
  br label %162

162:                                              ; preds = %156, %154, %147, %91, %65
  %163 = load ptr, ptr @gBS, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %163, i32 0, i32 2
  %165 = load ptr, ptr %164, align 8, !tbaa !44
  %166 = load i64, ptr %14, align 8, !tbaa !32
  call void %165(i64 noundef %166)
  %167 = load i64, ptr %15, align 8, !tbaa !32
  store i64 %167, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %168

168:                                              ; preds = %162, %26
  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 1, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %169 = load i64, ptr %4, align 8
  ret i64 %169
}

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

declare zeroext i8 @IsListEmpty(ptr noundef) #1

declare i64 @MnpGroupOp(ptr noundef, i8 noundef zeroext, ptr noundef, 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 = !{!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 = !{!30, !6, i64 24}
!30 = !{!"", !31, 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}
!31 = !{!"", !16, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!32 = !{!16, !16, i64 0}
!33 = !{!11, !7, i64 104}
!34 = !{!11, !7, i64 219}
!35 = !{!36, !12, i64 4}
!36 = !{!"", !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, !37, i64 552, !37, i64 584, !37, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!37 = !{!"", !7, i64 0}
!38 = !{!11, !6, i64 112}
!39 = !{!40, !6, i64 16}
!40 = !{!"", !13, i64 0, !6, i64 16}
!41 = !{!13, !6, i64 0}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{!30, !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 = external hidden unnamed_addr constant [149 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

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

5:                                                ; preds = %3
  %6 = icmp ne i8 %1, 0
  %7 = icmp eq ptr %2, null
  %or.cond = and i1 %6, %7
  br i1 %or.cond, label %60, label %8

8:                                                ; preds = %5
  %9 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %9, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre67 = add i64 %.pre, -40
  %.pre69 = inttoptr i64 %.pre67 to ptr
  br i1 %.not, label %._crit_edge66, label %10

10:                                               ; preds = %8
  %11 = load i32, ptr %.pre69, align 8, !tbaa !5
  %.not51 = icmp eq i32 %11, 1232105037
  br i1 %.not51, label %._crit_edge66, label %12

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

._crit_edge66:                                    ; preds = %8, %10, %12
  %13 = phi ptr [ %0, %12 ], [ %.pre69, %10 ], [ %.pre69, %8 ]
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %17, i64 64
  %19 = load ptr, ptr %18, align 8, !tbaa !21
  %20 = getelementptr inbounds i8, ptr %19, i64 120
  %21 = load ptr, ptr %20, align 8, !tbaa !25
  %22 = load ptr, ptr @gBS, align 8, !tbaa !27
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !28
  %25 = tail call i64 %24(i64 noundef 8) #2
  %26 = getelementptr inbounds i8, ptr %13, i64 104
  %27 = load i8, ptr %26, align 8, !tbaa !31
  %.not52 = icmp eq i8 %27, 0
  br i1 %.not52, label %56, label %28

28:                                               ; preds = %._crit_edge66
  %29 = getelementptr inbounds i8, ptr %13, i64 219
  %30 = load i8, ptr %29, align 1, !tbaa !32
  %.not53 = icmp eq i8 %30, 0
  br i1 %.not53, label %56, label %31

31:                                               ; preds = %28
  br i1 %7, label %.critedge, label %32

32:                                               ; preds = %31
  %33 = load i8, ptr %2, align 1, !tbaa !33
  %34 = and i8 %33, 1
  %.not55 = icmp eq i8 %34, 0
  br i1 %.not55, label %56, label %35

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %21, i64 584
  %37 = getelementptr inbounds i8, ptr %21, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !34
  %39 = zext i32 %38 to i64
  %40 = tail call i64 @CompareMem(ptr noundef nonnull %2, ptr noundef nonnull %36, i64 noundef %39) #2
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %56, label %42

42:                                               ; preds = %35
  %43 = getelementptr inbounds i8, ptr %13, i64 112
  %.04458 = load ptr, ptr %43, align 8, !tbaa !37
  %.not5759.not = icmp eq ptr %.04458, %43
  br i1 %.not5759.not, label %._crit_edge.thr_comm, label %.lr.ph

44:                                               ; preds = %.lr.ph
  %.044 = load ptr, ptr %.04460, align 8, !tbaa !37
  %.not57.not = icmp eq ptr %.044, %43
  br i1 %.not57.not, label %._crit_edge.thr_comm, label %.lr.ph, !llvm.loop !38

.lr.ph:                                           ; preds = %42, %44
  %.04460 = phi ptr [ %.044, %44 ], [ %.04458, %42 ]
  %45 = getelementptr inbounds i8, ptr %.04460, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !40
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = load i32, ptr %37, align 4, !tbaa !34
  %49 = zext i32 %48 to i64
  %50 = tail call i64 @CompareMem(ptr noundef nonnull %2, ptr noundef nonnull %47, i64 noundef %49) #2
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %._crit_edge, label %44, !llvm.loop !38

._crit_edge.thr_comm:                             ; preds = %44, %42
  %.146.ph = phi ptr [ null, %42 ], [ %.04460, %44 ]
  br i1 %6, label %54, label %56

._crit_edge:                                      ; preds = %.lr.ph
  %spec.select = select i1 %6, i64 -9223372036854775788, i64 0
  br i1 %6, label %56, label %54

.critedge:                                        ; preds = %31
  %52 = getelementptr inbounds i8, ptr %13, i64 112
  %53 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %52) #2
  %.not56 = icmp eq i8 %53, 0
  br i1 %.not56, label %54, label %56

54:                                               ; preds = %._crit_edge.thr_comm, %.critedge, %._crit_edge
  %.247 = phi ptr [ %.04460, %._crit_edge ], [ null, %.critedge ], [ %.146.ph, %._crit_edge.thr_comm ]
  %55 = tail call i64 @MnpGroupOp(ptr noundef %13, i8 noundef zeroext %1, ptr noundef %2, ptr noundef %.247) #2
  br label %56

56:                                               ; preds = %._crit_edge.thr_comm, %28, %32, %35, %._crit_edge66, %.critedge, %._crit_edge, %54
  %.2 = phi i64 [ %spec.select, %._crit_edge ], [ %55, %54 ], [ 0, %.critedge ], [ -9223372036854775789, %._crit_edge66 ], [ -9223372036854775806, %35 ], [ -9223372036854775806, %32 ], [ -9223372036854775806, %28 ], [ -9223372036854775794, %._crit_edge.thr_comm ]
  %57 = load ptr, ptr @gBS, align 8, !tbaa !27
  %58 = getelementptr inbounds i8, ptr %57, i64 32
  %59 = load ptr, ptr %58, align 8, !tbaa !42
  tail call void %59(i64 noundef %25) #2
  br label %60

60:                                               ; preds = %3, %5, %56
  %.042 = phi i64 [ %.2, %56 ], [ -9223372036854775806, %5 ], [ -9223372036854775806, %3 ]
  ret i64 %.042
}

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

declare zeroext i8 @IsListEmpty(ptr noundef) local_unnamed_addr #0

declare i64 @MnpGroupOp(ptr noundef, i8 noundef zeroext, ptr noundef, ptr 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 = !{!10, !10, i64 0}
!28 = !{!29, !10, i64 24}
!29 = !{!"", !30, i64 0, !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, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!30 = !{!"", !14, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!31 = !{!6, !8, i64 104}
!32 = !{!6, !8, i64 219}
!33 = !{!8, !8, i64 0}
!34 = !{!35, !7, i64 4}
!35 = !{!"", !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, !36, i64 552, !36, i64 584, !36, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!36 = !{!"", !8, i64 0}
!37 = !{!11, !10, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!41, !10, i64 16}
!41 = !{!"", !11, i64 0, !10, i64 16}
!42 = !{!29, !10, i64 32}


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