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

; 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.EFI_IPv6_ADDRESS = type { [16 x i8] }
%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.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.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_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.EFI_IPv4_ADDRESS = type { [4 x i8] }

@.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
@.str.2 = external hidden unnamed_addr constant [20 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

; 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 @MnpMcastIpToMac(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 i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = 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
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %24, label %18

18:                                               ; preds = %4
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %24, label %21

21:                                               ; preds = %18
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %21, %18, %4
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %195

25:                                               ; preds = %21
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %26, ptr %14, align 8, !tbaa !5
  %27 = load i8, ptr %7, align 1, !tbaa !9
  %28 = zext i8 %27 to i32
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %37

30:                                               ; preds = %25
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %31, i32 0, i32 0
  %33 = getelementptr inbounds [16 x i8], ptr %32, i64 0, i64 0
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = zext i8 %34 to i32
  %36 = icmp eq i32 %35, 255
  br i1 %36, label %37, label %47

37:                                               ; preds = %30, %25
  %38 = load i8, ptr %7, align 1, !tbaa !9
  %39 = icmp ne i8 %38, 0
  br i1 %39, label %48, label %40

40:                                               ; preds = %37
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds [4 x i32], ptr %41, i64 0, i64 0
  %43 = load i32, ptr %42, align 4, !tbaa !10
  %44 = call i32 @SwapBytes32(i32 noundef %43)
  %45 = and i32 %44, -268435456
  %46 = icmp eq i32 %45, -536870912
  br i1 %46, label %48, label %47

47:                                               ; preds = %40, %30
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %195

48:                                               ; preds = %40, %37
  %49 = call zeroext i8 @DebugAssertEnabled()
  %50 = zext i8 %49 to i32
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %62

52:                                               ; preds = %48
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = ptrtoint ptr %53 to i64
  %55 = sub i64 %54, ptrtoint (ptr getelementptr inbounds (%struct.MNP_INSTANCE_DATA, ptr null, i32 0, i32 4) to i64)
  %56 = inttoptr i64 %55 to ptr
  %57 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !12
  %59 = icmp ne i32 %58, 1232105037
  br i1 %59, label %60, label %62

60:                                               ; preds = %52
  call void @DebugAssert(ptr noundef @.str, i64 noundef 253, ptr noundef @.str.1)
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  br label %67

62:                                               ; preds = %52, %48
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = ptrtoint ptr %63 to i64
  %65 = sub i64 %64, ptrtoint (ptr getelementptr inbounds (%struct.MNP_INSTANCE_DATA, ptr null, i32 0, i32 4) to i64)
  %66 = inttoptr i64 %65 to ptr
  br label %67

67:                                               ; preds = %62, %60
  %68 = phi ptr [ %61, %60 ], [ %66, %62 ]
  store ptr %68, ptr %11, align 8, !tbaa !5
  %69 = load ptr, ptr @gBS, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  %72 = call i64 %71(i64 noundef 8)
  store i64 %72, ptr %13, align 8, !tbaa !23
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %73, i32 0, i32 5
  %75 = load i8, ptr %74, align 8, !tbaa !24
  %76 = icmp ne i8 %75, 0
  br i1 %76, label %78, label %77

77:                                               ; preds = %67
  store i64 -9223372036854775789, ptr %10, align 8, !tbaa !23
  br label %189

78:                                               ; preds = %67
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !25
  %82 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !26
  %84 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %84, align 8, !tbaa !29
  store ptr %85, ptr %12, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %78
  %87 = call zeroext i8 @DebugAssertEnabled()
  %88 = icmp ne i8 %87, 0
  br i1 %88, label %89, label %94

89:                                               ; preds = %86
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  call void @DebugAssert(ptr noundef @.str, i64 noundef 264, ptr noundef @.str.2)
  br label %93

93:                                               ; preds = %92, %89
  br label %94

94:                                               ; preds = %93, %86
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = call ptr @ZeroMem(ptr noundef %97, i64 noundef 32)
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %99, i32 0, i32 15
  %101 = load ptr, ptr %100, align 8, !tbaa !33
  %102 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %101, i32 0, i32 14
  %103 = load i8, ptr %102, align 4, !tbaa !35
  %104 = zext i8 %103 to i32
  %105 = icmp eq i32 %104, 1
  br i1 %105, label %106, label %179

106:                                              ; preds = %96
  %107 = load i8, ptr %7, align 1, !tbaa !9
  %108 = icmp ne i8 %107, 0
  br i1 %108, label %143, label %109

109:                                              ; preds = %106
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds [32 x i8], ptr %111, i64 0, i64 0
  store i8 1, ptr %112, align 1, !tbaa !9
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds [32 x i8], ptr %114, i64 0, i64 1
  store i8 0, ptr %115, align 1, !tbaa !9
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds [32 x i8], ptr %117, i64 0, i64 2
  store i8 94, ptr %118, align 1, !tbaa !9
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.EFI_IPv4_ADDRESS, ptr %119, i32 0, i32 0
  %121 = getelementptr inbounds [4 x i8], ptr %120, i64 0, i64 1
  %122 = load i8, ptr %121, align 1, !tbaa !9
  %123 = zext i8 %122 to i32
  %124 = and i32 %123, 127
  %125 = trunc i32 %124 to i8
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %126, i32 0, i32 0
  %128 = getelementptr inbounds [32 x i8], ptr %127, i64 0, i64 3
  store i8 %125, ptr %128, align 1, !tbaa !9
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.EFI_IPv4_ADDRESS, ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds [4 x i8], ptr %130, i64 0, i64 2
  %132 = load i8, ptr %131, align 2, !tbaa !9
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds [32 x i8], ptr %134, i64 0, i64 4
  store i8 %132, ptr %135, align 1, !tbaa !9
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.EFI_IPv4_ADDRESS, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds [4 x i8], ptr %137, i64 0, i64 3
  %139 = load i8, ptr %138, align 1, !tbaa !9
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds [32 x i8], ptr %141, i64 0, i64 5
  store i8 %139, ptr %142, align 1, !tbaa !9
  br label %178

143:                                              ; preds = %106
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds [32 x i8], ptr %145, i64 0, i64 0
  store i8 51, ptr %146, align 1, !tbaa !9
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds [32 x i8], ptr %148, i64 0, i64 1
  store i8 51, ptr %149, align 1, !tbaa !9
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds [16 x i8], ptr %151, i64 0, i64 12
  %153 = load i8, ptr %152, align 1, !tbaa !9
  %154 = load ptr, ptr %9, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %154, i32 0, i32 0
  %156 = getelementptr inbounds [32 x i8], ptr %155, i64 0, i64 2
  store i8 %153, ptr %156, align 1, !tbaa !9
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds [16 x i8], ptr %158, i64 0, i64 13
  %160 = load i8, ptr %159, align 1, !tbaa !9
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds [32 x i8], ptr %162, i64 0, i64 3
  store i8 %160, ptr %163, align 1, !tbaa !9
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds [16 x i8], ptr %165, i64 0, i64 14
  %167 = load i8, ptr %166, align 1, !tbaa !9
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds [32 x i8], ptr %169, i64 0, i64 4
  store i8 %167, ptr %170, align 1, !tbaa !9
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds [16 x i8], ptr %172, i64 0, i64 15
  %174 = load i8, ptr %173, align 1, !tbaa !9
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %175, i32 0, i32 0
  %177 = getelementptr inbounds [32 x i8], ptr %176, i64 0, i64 5
  store i8 %174, ptr %177, align 1, !tbaa !9
  br label %178

178:                                              ; preds = %143, %109
  store i64 0, ptr %10, align 8, !tbaa !23
  br label %188

179:                                              ; preds = %96
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %180, i32 0, i32 9
  %182 = load ptr, ptr %181, align 8, !tbaa !38
  %183 = load ptr, ptr %12, align 8, !tbaa !5
  %184 = load i8, ptr %7, align 1, !tbaa !9
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = call i64 %182(ptr noundef %183, i8 noundef zeroext %184, ptr noundef %185, ptr noundef %186)
  store i64 %187, ptr %10, align 8, !tbaa !23
  br label %188

188:                                              ; preds = %179, %178
  br label %189

189:                                              ; preds = %188, %77
  %190 = load ptr, ptr @gBS, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %190, i32 0, i32 2
  %192 = load ptr, ptr %191, align 8, !tbaa !39
  %193 = load i64, ptr %13, align 8, !tbaa !23
  call void %192(i64 noundef %193)
  %194 = load i64, ptr %10, align 8, !tbaa !23
  store i64 %194, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %195

195:                                              ; preds = %189, %47, %24
  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
  %196 = load i64, ptr %5, align 8
  ret i64 %196
}

declare i32 @SwapBytes32(i32 noundef) #1

declare ptr @ZeroMem(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, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !15, i64 40, !7, i64 104, !7, i64 105, !14, i64 112, !16, i64 128, !14, i64 168, !14, i64 184, !17, i64 200, !18, i64 208, !7, i64 228}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"_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}
!16 = !{!"", !14, i64 0, !14, i64 16, !17, i64 32}
!17 = !{!"long long", !7, i64 0}
!18 = !{!"", !11, i64 0, !11, i64 4, !19, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!19 = !{!"short", !7, i64 0}
!20 = !{!21, !6, i64 24}
!21 = !{!"", !22, 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}
!22 = !{!"", !17, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!23 = !{!17, !17, i64 0}
!24 = !{!13, !7, i64 104}
!25 = !{!13, !6, i64 8}
!26 = !{!27, !6, i64 24}
!27 = !{!"", !11, i64 0, !14, i64 8, !6, i64 24, !6, i64 32, !28, i64 40, !6, i64 56, !14, i64 64, !17, i64 80, !11, i64 88, !19, i64 92, !7, i64 94}
!28 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!29 = !{!30, !6, i64 64}
!30 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !31, i64 24, !17, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !17, i64 88, !14, i64 96, !11, i64 112, !6, i64 120, !32, i64 128, !17, 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}
!31 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"", !11, i64 0, !17, i64 8, !14, i64 16, !14, i64 32, !11, i64 48, !11, i64 52}
!33 = !{!34, !6, i64 120}
!34 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !17, 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}
!35 = !{!36, !7, i64 648}
!36 = !{!"", !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, !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 = !{!34, !6, i64 72}
!39 = !{!21, !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
@.str.2 = external hidden unnamed_addr constant [20 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

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpMcastIpToMac(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = icmp eq ptr %0, null
  %6 = icmp eq ptr %2, null
  %or.cond = or i1 %5, %6
  %7 = icmp eq ptr %3, null
  %or.cond3 = or i1 %or.cond, %7
  br i1 %or.cond3, label %82, label %8

8:                                                ; preds = %4
  %.not = icmp eq i8 %1, 0
  br i1 %.not, label %12, label %9

9:                                                ; preds = %8
  %10 = load i8, ptr %2, align 1, !tbaa !5
  %11 = icmp eq i8 %10, -1
  br i1 %11, label %17, label %82

12:                                               ; preds = %8
  %13 = load i32, ptr %2, align 4, !tbaa !8
  %14 = tail call i32 @SwapBytes32(i32 noundef %13) #2
  %15 = and i32 %14, -268435456
  %16 = icmp eq i32 %15, -536870912
  br i1 %16, label %17, label %82

17:                                               ; preds = %9, %12
  %18 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not53 = icmp eq i8 %18, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre56 = add i64 %.pre, -40
  %.pre58 = inttoptr i64 %.pre56 to ptr
  br i1 %.not53, label %._crit_edge, label %19

19:                                               ; preds = %17
  %20 = load i32, ptr %.pre58, align 8, !tbaa !10
  %.not54 = icmp eq i32 %20, 1232105037
  br i1 %.not54, label %._crit_edge, label %21

21:                                               ; preds = %19
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 253, ptr noundef nonnull @.str.1) #2
  br label %._crit_edge

._crit_edge:                                      ; preds = %17, %19, %21
  %22 = phi ptr [ %0, %21 ], [ %.pre58, %19 ], [ %.pre58, %17 ]
  %23 = load ptr, ptr @gBS, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !20
  %26 = tail call i64 %25(i64 noundef 8) #2
  %27 = getelementptr inbounds i8, ptr %22, i64 104
  %28 = load i8, ptr %27, align 8, !tbaa !23
  %.not55 = icmp eq i8 %28, 0
  br i1 %.not55, label %78, label %29

29:                                               ; preds = %._crit_edge
  %30 = getelementptr inbounds i8, ptr %22, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !24
  %32 = getelementptr inbounds i8, ptr %31, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !25
  %34 = getelementptr inbounds i8, ptr %33, i64 64
  %35 = load ptr, ptr %34, align 8, !tbaa !28
  %36 = tail call zeroext i8 @DebugAssertEnabled() #2
  %37 = icmp eq i8 %36, 0
  %38 = icmp ne ptr %35, null
  %or.cond5 = select i1 %37, i1 true, i1 %38
  br i1 %or.cond5, label %40, label %39

39:                                               ; preds = %29
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 264, ptr noundef nonnull @.str.2) #2
  br label %40

40:                                               ; preds = %39, %29
  %41 = tail call ptr @ZeroMem(ptr noundef nonnull %3, i64 noundef 32) #2
  %42 = getelementptr inbounds i8, ptr %35, i64 120
  %43 = load ptr, ptr %42, align 8, !tbaa !32
  %44 = getelementptr inbounds i8, ptr %43, i64 648
  %45 = load i8, ptr %44, align 4, !tbaa !34
  %46 = icmp eq i8 %45, 1
  br i1 %46, label %47, label %74

47:                                               ; preds = %40
  %48 = getelementptr inbounds i8, ptr %3, i64 1
  br i1 %.not, label %49, label %61

49:                                               ; preds = %47
  store i8 1, ptr %3, align 1, !tbaa !5
  store i8 0, ptr %48, align 1, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %3, i64 2
  store i8 94, ptr %50, align 1, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %2, i64 1
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %53 = and i8 %52, 127
  %54 = getelementptr inbounds i8, ptr %3, i64 3
  store i8 %53, ptr %54, align 1, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %2, i64 2
  %56 = load i8, ptr %55, align 2, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %3, i64 4
  store i8 %56, ptr %57, align 1, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %2, i64 3
  %59 = load i8, ptr %58, align 1, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %3, i64 5
  store i8 %59, ptr %60, align 1, !tbaa !5
  br label %78

61:                                               ; preds = %47
  store i8 51, ptr %3, align 1, !tbaa !5
  store i8 51, ptr %48, align 1, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %2, i64 12
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %3, i64 2
  store i8 %63, ptr %64, align 1, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %2, i64 13
  %66 = load i8, ptr %65, align 1, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %3, i64 3
  store i8 %66, ptr %67, align 1, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %2, i64 14
  %69 = load i8, ptr %68, align 1, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %3, i64 4
  store i8 %69, ptr %70, align 1, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %2, i64 15
  %72 = load i8, ptr %71, align 1, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %3, i64 5
  store i8 %72, ptr %73, align 1, !tbaa !5
  br label %78

74:                                               ; preds = %40
  %75 = getelementptr inbounds i8, ptr %35, i64 72
  %76 = load ptr, ptr %75, align 8, !tbaa !37
  %77 = tail call i64 %76(ptr noundef nonnull %35, i8 noundef zeroext %1, ptr noundef nonnull %2, ptr noundef nonnull %3) #2
  br label %78

78:                                               ; preds = %49, %61, %._crit_edge, %74
  %.048 = phi i64 [ %77, %74 ], [ -9223372036854775789, %._crit_edge ], [ 0, %61 ], [ 0, %49 ]
  %79 = load ptr, ptr @gBS, align 8, !tbaa !19
  %80 = getelementptr inbounds i8, ptr %79, i64 32
  %81 = load ptr, ptr %80, align 8, !tbaa !38
  tail call void %81(i64 noundef %26) #2
  br label %82

82:                                               ; preds = %9, %12, %4, %78
  %.0 = phi i64 [ %.048, %78 ], [ -9223372036854775806, %4 ], [ -9223372036854775806, %12 ], [ -9223372036854775806, %9 ]
  ret i64 %.0
}

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #0

declare ptr @ZeroMem(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, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !9, i64 0}
!11 = !{!"", !9, i64 0, !12, i64 8, !12, i64 16, !13, i64 24, !14, i64 40, !6, i64 104, !6, i64 105, !13, i64 112, !15, i64 128, !13, i64 168, !13, i64 184, !16, i64 200, !17, i64 208, !6, i64 228}
!12 = !{!"any pointer", !6, i64 0}
!13 = !{!"_LIST_ENTRY", !12, i64 0, !12, i64 8}
!14 = !{!"_EFI_MANAGED_NETWORK_PROTOCOL", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56}
!15 = !{!"", !13, i64 0, !13, i64 16, !16, i64 32}
!16 = !{!"long long", !6, i64 0}
!17 = !{!"", !9, i64 0, !9, i64 4, !18, i64 8, !6, i64 10, !6, i64 11, !6, i64 12, !6, i64 13, !6, i64 14, !6, i64 15, !6, i64 16}
!18 = !{!"short", !6, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !12, i64 24}
!21 = !{!"", !22, i64 0, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !12, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !12, i64 360, !12, i64 368}
!22 = !{!"", !16, i64 0, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
!23 = !{!11, !6, i64 104}
!24 = !{!11, !12, i64 8}
!25 = !{!26, !12, i64 24}
!26 = !{!"", !9, i64 0, !13, i64 8, !12, i64 24, !12, i64 32, !27, i64 40, !12, i64 56, !13, i64 64, !16, i64 80, !9, i64 88, !18, i64 92, !6, i64 94}
!27 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !12, i64 0, !12, i64 8}
!28 = !{!29, !12, i64 64}
!29 = !{!"", !9, i64 0, !12, i64 8, !12, i64 16, !30, i64 24, !16, i64 48, !12, i64 56, !12, i64 64, !13, i64 72, !16, i64 88, !13, i64 96, !9, i64 112, !12, i64 120, !31, i64 128, !16, i64 184, !12, i64 192, !6, i64 200, !12, i64 208, !12, i64 216, !9, i64 224, !9, i64 228, !9, i64 232, !9, i64 236, !9, i64 240, !9, i64 244, !12, i64 248, !12, i64 256}
!30 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !12, i64 0, !12, i64 8, !12, i64 16}
!31 = !{!"", !9, i64 0, !16, i64 8, !13, i64 16, !13, i64 32, !9, i64 48, !9, i64 52}
!32 = !{!33, !12, i64 120}
!33 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !16, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120}
!34 = !{!35, !6, i64 648}
!35 = !{!"", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !9, i64 32, !9, i64 36, !6, i64 40, !36, i64 552, !36, i64 584, !36, i64 616, !6, i64 648, !6, i64 649, !6, i64 650, !6, i64 651, !6, i64 652}
!36 = !{!"", !6, i64 0}
!37 = !{!33, !12, i64 72}
!38 = !{!21, !12, i64 32}


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