int DirtyWarmResetExecute()
{
  int result; // eax
  int v1; // eax
  int v2; // esi
  int v3; // eax
  int *v4; // eax
  int *v5; // esi
  int v6; // ecx
  int v7; // eax
  int v8; // esi
  int v9; // eax
  _DWORD v10[2]; // [esp+0h] [ebp-10h] BYREF
  char v11[8]; // [esp+8h] [ebp-8h] BYREF

  result = sub_FFD8D59A(); /*0xffd8301c*/
  if ( (_BYTE)result )
  {
    DebugPrint(0x80000000, (int)"\
DirtyWarmResetExecute() - Start\
"); /*0xffd83037*/
    v1 = sub_FFD85F37(); /*0xffd8303c*/
    v2 = sub_FFD8D921(v1); /*0xffd83048*/
    if ( GetPciEndpointInfo(v2, 2u, (unsigned __int16 *)v11) )
    {
      *(_DWORD *)(v2 + 24) = *(_DWORD *)(v2 + 24) & 0xFF0000FF | 0x20200; /*0xffd83083*/
      v3 = sub_FFD8CBBA(2u, 0, 0); /*0xffd83086*/
      sub_FFD8CCD3(v3, 0); /*0xffd83090*/
    }
    else
    {
      DebugPrint(0x80000000, (int)"ERROR: DirtyWarmReset: can't get end point device available...\
");
    }
    v4 = (int *)sub_FFD8CC10(); /*0xffd83099*/
    v5 = v4; /*0xffd8309e*/
    v6 = *v4; /*0xffd830a8*/
    if ( (*v4 & 0x2000000) != 0 && v6 != -1 ) /*0xffd830b5*/
      *v4 = v6 | 0x4000000; /*0xffd830b9*/
    DebugPrint(64, (int)"DWR: Sending DirtyWarmReset Notification ...\
");
    InstallPpi(&unk_FFD93FB4); /*0xffd830cc*/
    DebugPrint(64, (int)"DWR: DirtyWarmReset Notification completed\
");
    if ( (*v5 & 0x2000000) != 0 && *v5 != -1 )
    {
      DebugPrint(64, (int)"\
DWR: Stalling in DWR flow to allow error collection.\
");
      while ( (*v5 & 0x4000000) != 0 ) /*0xffd83100*/
        ; /*0xffd830fc*/
    }
    v7 = sub_FFD8AD54(); /*0xffd83102*/
    v8 = (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, _DWORD *))(*(_DWORD *)v7 + 32))(v7, &unk_FFD97FAC, 0, 0, v10); /*0xffd8311c*/
    if ( v8 < 0 )
    {
      DebugPrint(0x80000000, (int)"\
DWR: ERROR: Can't get reset PPI\
");
      DebugPrint(0x80000000, (int)"\
ASSERT_EFI_ERROR (Status = %r)\
", v8); /*0xffd83142*/
      v9 = GetReportStatusCodePpi(); /*0xffd8314a*/
      if ( v9 ) /*0xffd83151*/
        (*(void (__cdecl **)(const char *, int, const char *))(v9 + 4))( /*0xffd83162*/
          "e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c",
          1104,
          "!EFI_ERROR (Status)");
    }
    else
    {
      (*(void (__cdecl **)(_DWORD, int))v10[0])(v10[0], 5); /*0xffd8312a*/
    }
    DebugPrint(0x80000000, (int)"\
DWR: Waiting for reset.\
");
    v10[1] = 0; /*0xffd83175*/
    while ( 1 ) /*0xffd83179*/
      ; /*0xffd83179*/
  }
  return result; /*0xffd83182*/
}
