// SetupVarMigrate - decompiled from Platform.efi
__int64 __fastcall SetupVarMigrate(__int64 a1, __int64 a2, __int64 n72)
{
  __int64 Buffer; // rcx
  __int64 v4; // rax
  __int64 v5; // rax

  Buffer = Buffer; /*0x8dce*/
  if ( !*(_BYTE *)(Buffer + 15) ) /*0x8dd5*/
  {
    *(_DWORD *)(Buffer + 16) = *(_DWORD *)(Buffer + 8) + 3; /*0x8de5*/
    v4 = SetupVariableSet(Buffer, a2, n72); /*0x8de8*/
    if ( v4 < 0 ) /*0x8df5*/
    {
      DebugPrint(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v4); /*0x8e03*/
      Assert( /*0x8e1b*/
        (__int64)"e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c",
        473,
        (__int64)"!EFI_ERROR (Status)");
    }
    LODWORD(v5) = IoWrite32((UINTN)&Port__2, *(_QWORD *)Buffer); /*0x8e35*/
    if ( v5 < 0 ) /*0x8e3d*/
    {
      DebugPrint(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v5); /*0x8e4c*/
      Assert( /*0x8e64*/
        (__int64)"e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c",
        484,
        (__int64)"!EFI_ERROR (Status)");
    }
    *(_BYTE *)(Buffer + 15) = 1; /*0x8e70*/
    MigrateOldSetupVar(); /*0x8e74*/
  }
  return 0; /*0x8e7b*/
}
