// CopyMem - decompiled from Platform.efi
void *__cdecl CopyMem(void *DestinationBuffer, const void *SourceBuffer, UINTN Length)
{
void *DestinationBuffer_1; // rax
unsigned __int64 v7; // rbp
DestinationBuffer_1 = DestinationBuffer; /*0x5c6d*/
if ( Length ) /*0x5c73*/
{
v7 = Length - 1; /*0x5c75*/
if ( Length - 1 > ~(unsigned __int64)DestinationBuffer ) /*0x5c7f*/
Assert( /*0x5c94*/
(__int64)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\CopyMemWrapper.c",
56,
(__int64)"(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)DestinationBuffer)");
if ( v7 > ~(unsigned __int64)SourceBuffer ) /*0x5ca2*/
Assert( /*0x5cb7*/
(__int64)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\CopyMemWrapper.c",
57,
(__int64)"(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)SourceBuffer)");
if ( DestinationBuffer == SourceBuffer ) /*0x5cbf*/
return DestinationBuffer; /*0x5cc1*/
else
return CopyMemOverlap((char *)DestinationBuffer, (char *)SourceBuffer, Length); /*0x5ccf*/
}
return DestinationBuffer_1; /*0x5ce3*/
}