Newer
Older
AMI-Aptio-BIOS-Reversed / UncoreInitPeim / UncoreInitPeim_part1.c
@Ajax Dong Ajax Dong 2 days ago 707 KB Init
// UncoreInitPeim - Part: Indices 1-500
// Generated from original UncoreInitPeim.c
// Total functions in this part: 22514

#include "UncoreInitPeim.h"

#include "UncoreInitPeim.h"

// UncoreInitPeim - Regenerated from IDA
// Total functions: 2560

// Function: memset_wrapper @ 0xffc1e864 (0x15 bytes)
// Index: 1/2560

void *__cdecl memset_wrapper(void *buf, unsigned int count, char value)
{
  memset(buf, value, count); /*0xffc1e871*/
  return buf; /*0xffc1e877*/
}

// Function: MemCopy @ 0xffc1e8a4 (0x3f bytes)
// Index: 2/2560

char *__cdecl MemCopy(char *dst, char *src, unsigned int count)
{
  unsigned int RemainingCount; // edx
  char *DstEnd; // edi
  char *SrcEnd; // esi

  RemainingCount = count; /*0xffc1e8ae*/
  if ( src < dst && &src[count - 1] >= dst ) /*0xffc1e8bc*/
  {
    SrcEnd = &src[count - 1]; /*0xffc1e8d0*/
    DstEnd = &dst[count - 1]; /*0xffc1e8d2*/
  }
  else
  {
    RemainingCount = count & 3; /*0xffc1e8c0*/
    qmemcpy(dst, src, 4 * (count >> 2)); /*0xffc1e8c9*/
    SrcEnd = &src[4 * (count >> 2)]; /*0xffc1e8c9*/
    DstEnd = &dst[4 * (count >> 2)]; /*0xffc1e8c9*/
  }
  qmemcpy(DstEnd, SrcEnd, RemainingCount); /*0xffc1e8d9*/
  return dst; /*0xffc1e8e0*/
}

// Function: memset_struct_array @ 0xffc1e8e4 (0x1f bytes)
// Index: 3/2560

int __cdecl memset_struct_array(int a1, int a2, int a3, int a4)
{
  do /*0xffc1e8fd*/
  {
    *(_DWORD *)(a1 + 8 * a2 - 8) = a3; /*0xffc1e8f5*/
    *(_DWORD *)(a1 + 8 * a2-- - 4) = a4; /*0xffc1e8f9*/
  }
  while ( a2 ); /*0xffc1e8fd*/
  return a1; /*0xffc1e901*/
}

// Function: memset32_wrapper @ 0xffc1e904 (0x15 bytes)
// Index: 4/2560

void *__cdecl memset32_wrapper(void *buf, unsigned int count, int value)
{
  memset32(buf, value, count); /*0xffc1e911*/
  return buf; /*0xffc1e917*/
}

// Function: _ModuleEntryPoint @ 0xffc1e919 (0x4c bytes)
// Index: 5/2560

EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
  UncoreInitAutoGenAssert(); /*0xffc1e951*/
  return UncoreInitEntry(ImageHandle, SystemTable); /*0xffc1e963*/
}

// Function: GetDebugService @ 0xffc1e965 (0x2b bytes)
// Index: 6/2560

int GetDebugService()
{
  int Guid; // [esp+0h] [ebp-8h] BYREF
  int p_this; // [esp+4h] [ebp-4h] BYREF

  if ( AutoGenFuncFDA9((int)&unk_FFD514C4, 0, (int)&Guid, (int)&p_this) >= 0 ) /*0xffc1e983*/
    return p_this; /*0xffc1e989*/
  else
    return 0; /*0xffc1e985*/
}

// Function: DebugPrintDispatcher @ 0xffc1e990 (0x46 bytes)
// Index: 7/2560

int DebugPrintDispatcher(int ErrorLevel, const char *Format, ...)
{
  int PrintFunc_1; // eax
  int (__cdecl **PrintFunc)(int, const char *, char *); // esi
  unsigned __int8 DebugLevel; // al
  va_list va; // [esp+10h] [ebp+Ch] BYREF

  va_start(va, Format);
  PrintFunc_1 = GetDebugService(); /*0xffc1e991*/
  PrintFunc = (int (__cdecl **)(int, const char *, char *))PrintFunc_1; /*0xffc1e996*/
  if ( PrintFunc_1 ) /*0xffc1e99a*/
  {
    DebugLevel = AutoGenFunc82D7(); /*0xffc1e99c*/
    if ( !DebugLevel || DebugLevel == 0xFF ) /*0xffc1e9a7*/
    {
      PrintFunc_1 = 0; /*0xffc1e9bb*/
    }
    else if ( DebugLevel == 1 ) /*0xffc1e9ab*/
    {
      PrintFunc_1 = -2147483644; /*0xffc1e9ad*/
    }
    else
    {
      PrintFunc_1 = -2147483578; /*0xffc1e9b4*/
    }
    if ( (PrintFunc_1 & ErrorLevel) != 0 ) /*0xffc1e9c3*/
      return (*PrintFunc)(ErrorLevel, Format, (char *)va); /*0xffc1e9cf*/
  }
  return PrintFunc_1; /*0xffc1e9d4*/
}

// Function: DebugPrintEx @ 0xffc1e9d6 (0x3d bytes)
// Index: 8/2560

char __cdecl DebugPrintEx(int ErrorLevel, int Format, int Args)
{
  int Service; // eax

  Service = GetDebugService(); /*0xffc1e9da*/
  if ( Service ) /*0xffc1e9e1*/
  {
    (*(void (__cdecl **)(int, int, int))(Service + 4))(ErrorLevel, Format, Args); /*0xffc1e9ec*/
    LOBYTE(Service) = 15; /*0xffc1e9ef*/
  }
  return Service; /*0xffc1ea11*/
}

// Function: ProcessLibraryEntryPoint @ 0xffc1ea13 (0x8 bytes)
// Index: 9/2560

char ProcessLibraryEntryPoint()
{
  return 1; /*0xffc1ea1a*/
}

// Function: DebugEnabled @ 0xffc1ea1b (0xa bytes)
// Index: 10/2560

char DebugEnabled()
{
  return 1; /*0xffc1ea24*/
}

// Function: DebugAssertCheck @ 0xffc1ea25 (0xd bytes)
// Index: 11/2560

bool __cdecl DebugAssertCheck(int a1)
{
  return a1 != 0; /*0xffc1ea31*/
}

// Function: BaseLibConstructor @ 0xffc1ea32 (0x13f bytes)
// Index: 12/2560

int BaseLibConstructor()
{
  int v0; // edx
  int v1; // eax

  if ( (AutoGenFunc830F(1024068) & 0x80) != 0x80 ) /*0xffc1eb44*/
  {
    LOWORD(v0) = 1280; /*0xffc1eb4d*/
    AutoGenFunc8341(1024064, v0); /*0xffc1eb58*/
    v1 = AutoGenFunc8303(); /*0xffc1eb5d*/
    *(_BYTE *)(v1 + 1024068) |= 0x80u; /*0xffc1eb67*/
  }
  return 0; /*0xffc1eb6b*/
}

// Function: AutoGenFuncEB71 @ 0xffc1eb71 (0x1d bytes)
// Index: 13/2560

unsigned int AutoGenFuncEB71(unsigned int _r_n, unsigned int n0xF4240, unsigned __int8 *n10, ...)
{
  va_list va; // [esp+10h] [ebp+10h] BYREF

  va_start(va, n10);
  return UsraRegisterFilter(_r_n, n0xF4240, 0, n10, (int)va); /*0xffc1eb8d*/
}

// Function: AutoGenFuncEB8E @ 0xffc1eb8e (0x34 bytes)
// Index: 14/2560

_BYTE *__fastcall AutoGenFuncEB8E(_BYTE *a1, unsigned int a2, int i, __int16 a4, int a5)
{
  int j; // esi

  for ( j = 0; j < i; ++j ) /*0xffc1eb9a*/
  {
    if ( (unsigned int)a1 >= a2 ) /*0xffc1eba1*/
      break; /*0xffc1eba1*/
    *a1 = a4; /*0xffc1eba7*/
    if ( a5 != 1 ) /*0xffc1eba9*/
      a1[1] = HIBYTE(a4); /*0xffc1ebb0*/
    a1 += a5; /*0xffc1ebb3*/
  }
  return a1; /*0xffc1ebbc*/
}

// Function: AutoGenFuncEBC2 @ 0xffc1ebc2 (0x6f bytes)
// Index: 15/2560

_BYTE *__fastcall AutoGenFuncEBC2(_BYTE *_r_n, unsigned int n16, int a3, unsigned int a4)
{
  _BYTE *_r_n_1; // esi
  int v6; // eax
  int v7; // edx
  unsigned __int64 v8; // rtt
  unsigned int v10; // [esp-4h] [ebp-1Ch]
  int v11; // [esp+Ch] [ebp-Ch] BYREF
  int *v12; // [esp+10h] [ebp-8h]
  unsigned int n16_1; // [esp+14h] [ebp-4h]

  _r_n_1 = _r_n; /*0xffc1ebc9*/
  v12 = &v11; /*0xffc1ebd1*/
  n16_1 = n16; /*0xffc1ebd4*/
  *_r_n = 0; /*0xffc1ebd7*/
  do /*0xffc1ec1a*/
  {
    if ( !n16 ) /*0xffc1ebe5*/
      DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\DivU64x32Remainder.c", 47, (int)"Divisor != 0"); /*0xffc1ebf3*/
    v10 = a4 / n16_1; /*0xffc1ec05*/
    LODWORD(v8) = a3; /*0xffc1ec09*/
    HIDWORD(v8) = a4 % n16_1; /*0xffc1ec09*/
    v6 = v8 / n16_1; /*0xffc1ec09*/
    v7 = v8 % n16_1; /*0xffc1ec09*/
    if ( v12 ) /*0xffc1ec0e*/
      *v12 = v7; /*0xffc1ec10*/
    ++_r_n_1; /*0xffc1ec16*/
    a3 = v6; /*0xffc1ec17*/
    a4 = v10; /*0xffc1ec1c*/
    *_r_n_1 = byte_FFD4F704[v11]; /*0xffc1ec25*/
  }
  while ( v10 | v6 ); /*0xffc1ec1a*/
  return _r_n_1; /*0xffc1ec29*/
}

// Function: UsraRegisterFilter @ 0xffc1ec31 (0xd5e bytes)
// Index: 16/2560

unsigned int __fastcall UsraRegisterFilter(
        _BYTE *_r_n,
        unsigned int n0xF4240,
        __int16 a3,
        unsigned __int8 *n10,
        int va)
{
  int _r_n_9; // ebx
  int n2_1; // edx
  _BYTE *_r_n_2; // ecx
  unsigned int v10; // eax
  _BYTE *_r_n_4; // edi
  unsigned __int8 *n10_1; // esi
  int v13; // ecx
  int n10_3; // eax
  unsigned __int8 *n10_2; // edx
  unsigned int v16; // ecx
  const char *_r_n_6; // edi
  int n2_3; // eax
  unsigned __int8 *n10_4; // edi
  int v20; // edx
  unsigned int n13_1; // ecx
  int v22; // edi
  int v23; // edx
  unsigned __int8 *n10_5; // edx
  unsigned int v25; // ecx
  unsigned int v26; // ecx
  unsigned int v27; // ecx
  unsigned int v28; // ecx
  unsigned int v29; // ecx
  unsigned int v30; // ecx
  int v31; // ecx
  int v32; // eax
  int v33; // ecx
  int v34; // eax
  unsigned __int8 *v35; // eax
  int v36; // edi
  int v37; // esi
  unsigned __int16 v38; // ax
  unsigned int v39; // ecx
  unsigned int v40; // ecx
  unsign... [26625 chars total]

// Function: AutoGenFuncF98F @ 0xffc1f98f (0x1f bytes)
// Index: 17/2560

unsigned int AutoGenFuncF98F(_BYTE *_r_n, unsigned int n38, __int16 a3, char *%02d_%02d_%04d__%02d:%02d, ...)
{
  va_list va; // [esp+18h] [ebp+18h] BYREF

  va_start(va, %02d_%02d_%04d__%02d:%02d);
  return UsraRegisterFilter((unsigned int)_r_n, n38, a3, (unsigned __int8 *)%02d_%02d_%04d__%02d:%02d, (int)va); /*0xffc1f9ac*/
}

// Function: PcieAddressInit @ 0xffc1f9ae (0x194 bytes)
// Index: 18/2560

int __cdecl PcieAddressInit(
        unsigned __int8 *SocketSegGroup,
        unsigned __int8 *SocketBusStart,
        unsigned __int8 *SocketBusNum,
        unsigned int *SocketLimit,
        unsigned int *SocketBase,
        unsigned __int8 SocketCount)
{
  unsigned int v7; // [esp+4h] [ebp-14h]
  int v8; // [esp+10h] [ebp-8h]
  unsigned __int8 i; // [esp+17h] [ebp-1h]
  unsigned __int8 j; // [esp+17h] [ebp-1h]
  unsigned __int8 k; // [esp+17h] [ebp-1h]

  v7 = 16 * SocketCount + 16; /*0xffc1f9bf*/
  v8 = AutoGenFuncFE3E((void *)6); /*0xffc1f9ca*/
  if ( ProcessLibraryEntryPoint() && v7 >= AutoGenFuncFE4D((void *)6) ) /*0xffc1f9e4*/
    DebugPrintEx( /*0xffc1f9f5*/
      (int)"e:\\hs\\PurleySktPkg\\Library\\PcieAddressLib\\PcieAddressLib.c",
      151,
      (int)"MmcfgTableSize < LibPcdGetSize(6U)");
  for ( i = 0; i < 0x20u; ++i ) /*0xffc1fa0e*/
    *(_BYTE *)(v8 + i) = byte_FFD638AC[i]; /*0xffc1fa36*/
  if ( SocketCount > 1u ) /*0xffc1fa42*/
  {
    for ( j = 0; j < 16 * (unsigned int)SocketCount - 16; ++j ) /*0xffc1fa62*/
      *(_BYTE *)(v8 + 32 + j) = byte_FFD638CC[j]; /*0xffc1fa8f*/
  }
  *(_DWORD *)(v8 + 4) = v7; /*0xffc1fa9a*/
  for ( k = 0; k < (int)SocketCount; ++k ) /*0xffc1fa9d*/
  {
    *(_BYTE *)(v8 + 16 * k + 26) = SocketBusStart[k]; /*0xffc1facf*/
    *(_BYTE *)(v8 + 16 * k + 27) = SocketSegGroup[k]; /*0xffc1fae7*/
    *(_WORD *)(v8 + 16 * k + 24) = SocketBusNum[k]; /*0xffc1fb01*/
    *(_DWORD *)(v8 + 16 * k + 20) = SocketLimit[k]; /*0xffc1fb1a*/
    *(_DWORD *)(v8 + 16 * k + 16) = SocketBase[k]; /*0xffc1fb32*/
  }
  return 0; /*0xffc1fb3d*/
}

// Function: AutoGenFuncFB42 @ 0xffc1fb42 (0x9b bytes)
// Index: 19/2560

int __cdecl AutoGenFuncFB42(_DWORD *a1, int n8)
{
  int v3; // [esp+Ch] [ebp-4h]

  v3 = AutoGenFuncFE3E((void *)6); /*0xffc1fb72*/
  a1[1] = 16 * n8 + 16; /*0xffc1fb7b*/
  if ( !a1[4] && !a1[5] ) /*0xffc1fb97*/
  {
    *(_DWORD *)(v3 + 16) = AutoGenFuncFE36(a1); /*0xffc1fbbc*/
    *(_DWORD *)(v3 + 20) = 0; /*0xffc1fbd3*/
  }
  return 0; /*0xffc1fbd9*/
}

// Function: AutoGenFuncFBDD @ 0xffc1fbdd (0x17e bytes)
// Index: 20/2560

int __cdecl AutoGenFuncFBDD(int a1)
{
  int n5; // ecx
  int v2; // eax
  void *n5_2; // [esp-4h] [ebp-1Ch]
  int n5_1; // [esp+Ch] [ebp-Ch]
  int v6; // [esp+10h] [ebp-8h]
  int v7; // [esp+14h] [ebp-4h]

  if ( *(_DWORD *)(a1 + 12) ) /*0xffc1fbf2*/
  {
    v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4 * (unsigned __int16)*(_DWORD *)(a1 + 4) + 255544); /*0xffc1fce8*/
    n5 = (unsigned __int16)*(_DWORD *)(a1 + 4); /*0xffc1fcf7*/
    v7 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4 * n5 + 255560); /*0xffc1fd04*/
  }
  else
  {
    n5_1 = AutoGenFuncFE3E((void *)6); /*0xffc1fc05*/
    if ( *(_DWORD *)(n5_1 + 4) ) /*0xffc1fc0b*/
    {
      v6 = *(_DWORD *)(n5_1 + 16 * (unsigned __int16)*(_DWORD *)(a1 + 4) + 20); /*0xffc1fc26*/
      n5 = n5_1; /*0xffc1fc37*/
      v7 = *(_DWORD *)(n5_1 + 16 * (unsigned __int16)*(_DWORD *)(a1 + 4) + 16); /*0xffc1fc3e*/
    }
    else
    {
      AutoGenFuncFB42(byte_FFD638AC, 8); /*0xffc1fc51*/
      n5 = (int)n5_2; /*0xffc1fc57*/
      v6 = dword_FFD638C0[4 * (unsigned __int16)*(_DWORD *)(a1 + 4)]; /*0xffc1fc6c*/
      v7 = dword_FFD638BC[4 * (unsigned __int16)*(_DWORD *)(a1 + 4)]; /*0xffc1fc83*/
      if ( !v7 && !v6 ) /*0xffc1fc90*/
      {
        v2 = AutoGenFuncFE36(n5_2); /*0xffc1fcaa*/
        n5 = 5; /*0xffc1fcaf*/
        v7 = v2; /*0xffc1fcbd*/
        v6 = 0; /*0xffc1fcca*/
      }
    }
  }
  if ( !v7 && !v6 ) /*0xffc1fd11*/
    return AutoGenFuncFE36((void *)n5); /*0xffc1fd3e*/
  return v7; /*0xffc1fd57*/
}

// Function: AutoGenFuncFD5B @ 0xffc1fd5b (0x4e bytes)
// Index: 21/2560

int AutoGenFuncFD5B()
{
  int v0; // esi
  _BYTE v2[2]; // [esp+4h] [ebp-8h] BYREF
  int v3; // [esp+6h] [ebp-6h]

  AutoGenFuncDD(v2); /*0xffc1fd64*/
  v0 = *(_DWORD *)(v3 - 4); /*0xffc1fd73*/
  if ( !v0 ) /*0xffc1fd7a*/
    DebugPrintEx( /*0xffc1fd88*/
      (int)"e:\\hs\\MdePkg\\Library\\PeiServicesTablePointerLibIdt\\PeiServicesTablePointer.c",
      48,
      (int)"PeiServices != ((void *) 0)");
  return v0; /*0xffc1fd92*/
}

// Function: AutoGenFuncFDA9 @ 0xffc1fda9 (0x1f bytes)
// Index: 22/2560

int __cdecl AutoGenFuncFDA9(int a1, int a2, int p_Guid, int p_this)
{
  int v4; // eax

  v4 = AutoGenFuncFD5B(); /*0xffc1fda9*/
  return (*(int (__cdecl **)(int, int, int, int, int))(*(_DWORD *)v4 + 32))(v4, a1, a2, p_Guid, p_this); /*0xffc1fdc7*/
}

// Function: AutoGenFuncFDC8 @ 0xffc1fdc8 (0x6b bytes)
// Index: 23/2560

int __thiscall AutoGenFuncFDC8(void *this)
{
  int v1; // ecx
  int p_this; // [esp+0h] [ebp-4h] BYREF

  p_this = (int)this; /*0xffc1fdcb*/
  v1 = AutoGenFuncFDA9((int)&unk_FFD514B4, 0, 0, (int)&p_this); /*0xffc1fdde*/
  if ( v1 < 0 ) /*0xffc1fdee*/
  {
    DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v1); /*0xffc1fe0b*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\PeiPcdLib\\PeiPcdLib.c", 49, (int)"!EFI_ERROR (Status)"); /*0xffc1fe1f*/
  }
  return p_this; /*0xffc1fe2c*/
}

// Function: AutoGenFuncFE36 @ 0xffc1fe36 (0x8 bytes)
// Index: 24/2560

int __thiscall AutoGenFuncFE36(void *this)
{
  int (**v1)(void); // eax

  v1 = (int (**)(void))AutoGenFuncFDC8(this); /*0xffc1fe36*/
  return v1[4]();
}

// Function: AutoGenFuncFE3E @ 0xffc1fe3e (0xf bytes)
// Index: 25/2560

int __thiscall AutoGenFuncFE3E(void *n6)
{
  int (__cdecl **v2)(void *); // eax

  v2 = (int (__cdecl **)(void *))AutoGenFuncFDC8(n6); /*0xffc1fe41*/
  return v2[5](n6); /*0xffc1fe4b*/
}

// Function: AutoGenFuncFE4D @ 0xffc1fe4d (0xf bytes)
// Index: 26/2560

int __thiscall AutoGenFuncFE4D(void *n6)
{
  int (__cdecl **v2)(void *); // eax

  v2 = (int (__cdecl **)(void *))AutoGenFuncFDC8(n6); /*0xffc1fe50*/
  return v2[7](n6); /*0xffc1fe5a*/
}

// Function: AutoGenFuncFE5C @ 0xffc1fe5c (0x1f bytes)
// Index: 27/2560

__int64 __cdecl AutoGenFuncFE5C(int n5, __int64 a2)
{
  void *v2; // ecx
  int v3; // eax

  v3 = AutoGenFuncFDC8(v2); /*0xffc1fe5f*/
  (*(void (__cdecl **)(int, _DWORD, _DWORD))(v3 + 72))(n5, a2, HIDWORD(a2)); /*0xffc1fe6d*/
  return a2; /*0xffc1fe79*/
}

// Function: AutoGenFuncFE7B @ 0xffc1fe7b (0x8 bytes)
// Index: 28/2560

int __thiscall AutoGenFuncFE7B(void *this)
{
  int (**v1)(void); // eax

  v1 = (int (**)(void))AutoGenFuncFDC8(this); /*0xffc1fe7b*/
  return v1[17]();
}

// Function: AutoGenFuncFE83 @ 0xffc1fe83 (0x44 bytes)
// Index: 29/2560

unsigned __int64 __cdecl AutoGenFuncFE83(unsigned __int64 a1)
{
  unsigned int n0x40; // ecx
  unsigned __int64 v2; // rax
  char n0x40_1; // [esp+0h] [ebp-4h]

  n0x40_1 = n0x40; /*0xffc1fe8e*/
  if ( n0x40 >= 0x40 ) /*0xffc1fe96*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\RShiftU64.c", 39, (int)"Count < 64"); /*0xffc1fea4*/
  v2 = HIDWORD(a1); /*0xffc1feb1*/
  if ( (n0x40_1 & 0x20) == 0 ) /*0xffc1feb7*/
    v2 = a1; /*0xffc1febb*/
  return v2 >> (n0x40_1 & 0x1F); /*0xffc1fec3*/
}

// Function: AutoGenFuncFEC7 @ 0xffc1fec7 (0x3f bytes)
// Index: 30/2560

__int64 __cdecl AutoGenFuncFEC7(__int64 a1, unsigned int n0x40)
{
  __int64 v2; // rax

  if ( n0x40 >= 0x40 ) /*0xffc1fed7*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\LShiftU64.c", 39, (int)"Count < 64"); /*0xffc1fee5*/
  LODWORD(v2) = 0; /*0xffc1fef0*/
  HIDWORD(v2) = a1; /*0xffc1fef2*/
  if ( (n0x40 & 0x20) == 0 ) /*0xffc1fef8*/
    v2 = a1; /*0xffc1fefa*/
  return v2 << (n0x40 & 0x1F); /*0xffc1ff04*/
}

// Function: AutoGenFuncFF06 @ 0xffc1ff06 (0x2d bytes)
// Index: 31/2560

int __cdecl AutoGenFuncFF06(int _EAX, _DWORD *a2, _DWORD *a3, _DWORD *a4, _DWORD *a5)
{
  _EAX = _EAX; /*0xffc1ff0a*/
  __asm { cpuid } /*0xffc1ff0d*/
  if ( a2 ) /*0xffc1ff13*/
    *a2 = _EAX; /*0xffc1ff15*/
  if ( a3 ) /*0xffc1ff1a*/
    *a3 = _EBX; /*0xffc1ff1c*/
  if ( a4 ) /*0xffc1ff22*/
    *a4 = _ECX; /*0xffc1ff24*/
  if ( a5 ) /*0xffc1ff29*/
    *a5 = _EDX; /*0xffc1ff2b*/
  return _EAX; /*0xffc1ff30*/
}

// Function: AutoGenFuncFF33 @ 0xffc1ff33 (0x76 bytes)
// Index: 32/2560

unsigned __int64 __cdecl AutoGenFuncFF33(__int64 a1, unsigned int n0x40, unsigned int n0x40a)
{
  __int64 v3; // rax

  if ( n0x40a >= 0x40 ) /*0xffc1ff4a*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\BitField.c", 731, (int)"EndBit < 64"); /*0xffc1ff57*/
  if ( n0x40 > n0x40a ) /*0xffc1ff6e*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\BitField.c", 732, (int)"StartBit <= EndBit"); /*0xffc1ff7b*/
  v3 = AutoGenFuncFEC7(-2, n0x40a); /*0xffc1ff8a*/
  return AutoGenFuncFE83(a1 & ~v3); /*0xffc1ffa5*/
}

// Function: AutoGenFuncFFA9 @ 0xffc1ffa9 (0x29 bytes)
// Index: 33/2560

__int16 __thiscall AutoGenFuncFFA9(void *this)
{
  if ( !this ) /*0xffc1ffb7*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\Unaligned.c", 38, (int)"Buffer != ((void *) 0)"); /*0xffc1ffc5*/
  return *(_WORD *)this; /*0xffc1ffd0*/
}

// Function: AutoGenFuncFFD2 @ 0xffc1ffd2 (0x2b bytes)
// Index: 34/2560

int __thiscall AutoGenFuncFFD2(void *this)
{
  if ( !this ) /*0xffc1ffe0*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\Unaligned.c", 141, (int)"Buffer != ((void *) 0)"); /*0xffc1fff1*/
  return *(_DWORD *)this; /*0xffc1fffb*/
}

// Function: AutoGenFuncFFFD @ 0xffc1fffd (0x2e bytes)
// Index: 35/2560

__int64 __thiscall AutoGenFuncFFFD(void *this)
{
  if ( !this ) /*0xffc2000b*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\Unaligned.c", 192, (int)"Buffer != ((void *) 0)"); /*0xffc2001c*/
  return *(_QWORD *)this; /*0xffc20029*/
}

// Function: AutoGenFunc2B @ 0xffc2002b (0x36 bytes)
// Index: 36/2560

int __cdecl AutoGenFunc2B(int a1, int a2)
{
  _DWORD *v2; // ecx
  _DWORD *v3; // esi

  v3 = v2; /*0xffc20033*/
  if ( !v2 ) /*0xffc20039*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\Unaligned.c", 219, (int)"Buffer != ((void *) 0)"); /*0xffc2004a*/
  *v3 = a1; /*0xffc2005a*/
  v3[1] = a2; /*0xffc2005c*/
  return a1; /*0xffc2005f*/
}

// Function: AutoGenFunc61 @ 0xffc20061 (0x55 bytes)
// Index: 37/2560

unsigned int __fastcall AutoGenFunc61(unsigned __int8 *n10, int n1000001)
{
  unsigned int result; // eax

  if ( ((unsigned __int8)n10 & 1) != 0 ) /*0xffc20073*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\SafeString.c", 128, (int)"((UINTN) String & 0x00000001) == 0"); /*0xffc20084*/
  if ( !n10 || !n1000001 ) /*0xffc20092*/
    return 0; /*0xffc200b1*/
  result = 0; /*0xffc20096*/
  if ( *(_WORD *)n10 ) /*0xffc20098*/
  {
    while ( result < n1000001 - 1 ) /*0xffc200a2*/
    {
      ++result; /*0xffc200a4*/
      if ( !*(_WORD *)&n10[2 * result] ) /*0xffc200a5*/
        return result; /*0xffc200a9*/
    }
    return n1000001; /*0xffc200ad*/
  }
  return result; /*0xffc200b3*/
}

// Function: AutoGenFuncB6 @ 0xffc200b6 (0x27 bytes)
// Index: 38/2560

unsigned int __fastcall AutoGenFuncB6(unsigned __int8 *n10, int n1000001)
{
  unsigned int result; // eax

  if ( !n10 || !n1000001 ) /*0xffc200bd*/
    return 0; /*0xffc200d9*/
  result = 0; /*0xffc200bf*/
  if ( *n10 ) /*0xffc200c1*/
  {
    while ( result < n1000001 - 1 ) /*0xffc200ca*/
    {
      if ( !n10[++result] ) /*0xffc200cd*/
        return result; /*0xffc200d1*/
    }
    return n1000001; /*0xffc200d5*/
  }
  return result; /*0xffc200d3*/
}

// Function: AutoGenFuncDD @ 0xffc200dd (0x2d bytes)
// Index: 39/2560

void *__thiscall AutoGenFuncDD(void *this)
{
  void *this_1; // eax

  if ( !this ) /*0xffc200ec*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\X86ReadIdtr.c", 37, (int)"Idtr != ((void *) 0)"); /*0xffc200fa*/
  this_1 = this; /*0xffc20102*/
  __sidt(this); /*0xffc20105*/
  return this_1; /*0xffc20109*/
}

// Function: AutoGenFunc127 @ 0xffc20127 (0x6c bytes)
// Index: 40/2560

unsigned int __thiscall AutoGenFunc127(_BYTE *this)
{
  _BYTE *this_1; // esi
  unsigned int i; // edi

  this_1 = this; /*0xffc20131*/
  if ( !this ) /*0xffc2013c*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1082, (int)"String != ((void *) 0)"); /*0xffc20149*/
  for ( i = 0; *this_1; ++i ) /*0xffc20153*/
  {
    if ( i >= 0xF4240 ) /*0xffc2016c*/
      DebugPrintEx( /*0xffc20179*/
        (int)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c",
        1090,
        (int)"Length < _gPcd_FixedAtBuild_PcdMaximumAsciiStringLength");
    ++this_1; /*0xffc20186*/
  }
  return i; /*0xffc2018f*/
}

// Function: AutoGenFunc193 @ 0xffc20193 (0x5d bytes)
// Index: 41/2560

int __cdecl AutoGenFunc193(int buf, unsigned int count)
{
  if ( !count ) /*0xffc2019a*/
    return buf; /*0xffc2019c*/
  if ( !buf ) /*0xffc201b4*/
    DebugPrintEx( /*0xffc201be*/
      (int)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\ZeroMemWrapper.c",
      53,
      (int)"Buffer != ((void *) 0)");
  if ( count > -buf ) /*0xffc201d7*/
    DebugPrintEx( /*0xffc201e1*/
      (int)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\ZeroMemWrapper.c",
      54,
      (int)"Length <= (0xFFFFFFFF - (UINTN)Buffer + 1)");
  memset((void *)buf, 0, count); /*0xffc1e89b*/
  return buf; /*0xffc2019f*/
}

// Function: AutoGenFunc1F0 @ 0xffc201f0 (0x82 bytes)
// Index: 42/2560

char *__cdecl AutoGenFunc1F0(char *dst, char *src, unsigned int count)
{
  if ( !count ) /*0xffc201f9*/
    return dst; /*0xffc201fb*/
  if ( count - 1 > ~(unsigned int)dst ) /*0xffc2021e*/
    DebugPrintEx( /*0xffc20228*/
      (int)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\CopyMemWrapper.c",
      56,
      (int)"(Length - 1) <= (0xFFFFFFFF - (UINTN)DestinationBuffer)");
  if ( count - 1 > ~(unsigned int)src ) /*0xffc20245*/
    DebugPrintEx( /*0xffc2024f*/
      (int)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\CopyMemWrapper.c",
      57,
      (int)"(Length - 1) <= (0xFFFFFFFF - (UINTN)SourceBuffer)");
  if ( dst == src ) /*0xffc2025a*/
    return dst; /*0xffc2025c*/
  else
    return MemCopy(dst, src, count); /*0xffc20265*/
}

// Function: AutoGenFunc272 @ 0xffc20272 (0x30 bytes)
// Index: 43/2560

int __fastcall AutoGenFunc272(int a1, int a2)
{
  __int64 v4; // rax
  __int64 v5; // rax

  v4 = AutoGenFuncFFFD((void *)a2); /*0xffc2027a*/
  AutoGenFunc2B(v4, SHIDWORD(v4)); /*0xffc20283*/
  v5 = AutoGenFuncFFFD((void *)(a2 + 8)); /*0xffc2028b*/
  AutoGenFunc2B(v5, SHIDWORD(v5)); /*0xffc20295*/
  return a1; /*0xffc2029f*/
}

// Function: AutoGenFunc2A2 @ 0xffc202a2 (0x5f bytes)
// Index: 44/2560

bool __fastcall AutoGenFunc2A2(int a1, int a2)
{
  __int64 v4; // rax
  int v5; // ebp
  __int64 v6; // rax
  int v7; // edi
  __int64 v8; // kr00_8
  __int64 v9; // rax
  int v11; // [esp+10h] [ebp-Ch]
  int v12; // [esp+14h] [ebp-8h]

  v4 = AutoGenFuncFFFD((void *)a1); /*0xffc202ad*/
  v12 = HIDWORD(v4); /*0xffc202b4*/
  v5 = v4; /*0xffc202b8*/
  v6 = AutoGenFuncFFFD((void *)a2); /*0xffc202ba*/
  v11 = HIDWORD(v6); /*0xffc202c2*/
  v7 = v6; /*0xffc202c6*/
  v8 = AutoGenFuncFFFD((void *)(a1 + 8)); /*0xffc202d4*/
  v9 = AutoGenFuncFFFD((void *)(a2 + 8)); /*0xffc202d6*/
  return v5 == v7 && v12 == v11 && v8 == v9; /*0xffc202f9*/
}

// Function: AutoGenFunc301 @ 0xffc20301 (0x46 bytes)
// Index: 45/2560

int __fastcall AutoGenFunc301(int a1, _DWORD *a2, _DWORD *a3)
{
  int v3; // ecx

  if ( a1 ) /*0xffc20304*/
  {
    v3 = a1 - 1; /*0xffc20306*/
    if ( v3 ) /*0xffc20309*/
    {
      if ( v3 == 1 ) /*0xffc2030e*/
        *a3 = *a2; /*0xffc20328*/
      else
        *(_QWORD *)a3 = AutoGenFunc95F(a2); /*0xffc2031b*/
    }
    else
    {
      *(_WORD *)a3 = AutoGenFunc8E7(a2); /*0xffc20337*/
    }
  }
  else
  {
    *(_BYTE *)a3 = *(_BYTE *)a2; /*0xffc20342*/
  }
  return 0; /*0xffc20346*/
}

// Function: AutoGenFunc347 @ 0xffc20347 (0x3e bytes)
// Index: 46/2560

int __fastcall AutoGenFunc347(int a1, _DWORD *a2, __int16 *a3)
{
  int v3; // ecx

  if ( a1 ) /*0xffc2034e*/
  {
    v3 = a1 - 1; /*0xffc20350*/
    if ( v3 ) /*0xffc20353*/
    {
      if ( v3 == 1 ) /*0xffc20358*/
        *a2 = *(_DWORD *)a3; /*0xffc2036c*/
      else
        AutoGenFunc990(a2, *(_DWORD *)a3, *((_DWORD *)a3 + 1)); /*0xffc20360*/
    }
    else
    {
      AutoGenFunc919(a2, *a3); /*0xffc20375*/
    }
  }
  else
  {
    *(_BYTE *)a2 = *(_BYTE *)a3; /*0xffc20380*/
  }
  return 0; /*0xffc20384*/
}

// Function: AutoGenFunc385 @ 0xffc20385 (0x3f bytes)
// Index: 47/2560

int __cdecl AutoGenFunc385(int a1)
{
  funcs_FFC20399[*(unsigned __int8 *)(a1 + 8)](0, 0, a1, (int)&a1); /*0xffc20399*/
  return a1; /*0xffc203c1*/
}

// Function: AutoGenFunc3C4 @ 0xffc203c4 (0x17 bytes)
// Index: 48/2560

int __cdecl AutoGenFunc3C4(int a1, int a2)
{
  return funcs_FFC203D1[*(unsigned __int8 *)(a1 + 8)](a1, a2); /*0xffc203da*/
}

// Function: AutoGenFunc3DB @ 0xffc203db (0x17 bytes)
// Index: 49/2560

int __cdecl AutoGenFunc3DB(int a1, int a2)
{
  return ((_DWORD (__cdecl *)(int, int))funcs_FFC203E8[*(unsigned __int8 *)(a1 + 8)])(a1, a2); /*0xffc203f1*/
}

// Function: AutoGenFunc3F2 @ 0xffc203f2 (0x5 bytes)
// Index: 50/2560

// attributes: thunk
void __cdecl AutoGenFunc3F2(int a1, int a2, int a3, int a4)
{
  JUMPOUT(0xFFD161A8); /*0xffd161a8*/
}

// Function: AutoGenFunc3F7 @ 0xffc203f7 (0x66 bytes)
// Index: 51/2560

int __cdecl AutoGenFunc3F7(int a1, _DWORD *a2)
{
  _DWORD *v3; // [esp+8h] [ebp-4h] BYREF

  v3 = 0; /*0xffc20409*/
  IioTailX_FFD161A8(0, 0, a1, &v3); /*0xffc2040c*/
  if ( AutoGenFunc85C7(a2) ) /*0xffc20419*/
    AutoGenFunc301((*(_DWORD *)(a1 + 8) >> 8) & 0xF, v3, a2); /*0xffc20434*/
  return 0; /*0xffc20455*/
}

// Function: AutoGenFunc45D @ 0xffc2045d (0x6d bytes)
// Index: 52/2560

int __cdecl AutoGenFunc45D(int a1, __int16 *a2)
{
  _DWORD *v3; // [esp+4h] [ebp-4h] BYREF

  v3 = 0; /*0xffc20472*/
  IioTailX_FFD161A8(0, 0, a1, &v3); /*0xffc20476*/
  if ( AutoGenFunc864D(a2) ) /*0xffc20484*/
    AutoGenFunc347((*(_DWORD *)(a1 + 8) >> 8) & 0xF, v3, a2); /*0xffc204a0*/
  return 0; /*0xffc204c5*/
}

// Function: AutoGenFunc4CA @ 0xffc204ca (0x1e bytes)
// Index: 53/2560

int *__cdecl AutoGenFunc4CA(int a1, int a2, _DWORD *a3, int *a4)
{
  int v4; // ecx

  v4 = AutoGenFuncFBDD((int)a3) + (*a3 & 0xFFFFFFF); /*0xffc204de*/
  *a4 = v4; /*0xffc204e5*/
  return a4; /*0xffc204e4*/
}

// Function: AutoGenFunc4E8 @ 0xffc204e8 (0x50 bytes)
// Index: 54/2560

int __cdecl AutoGenFunc4E8(_DWORD *a1, _DWORD *a2)
{
  _DWORD *v3; // [esp+4h] [ebp-4h] BYREF

  AutoGenFunc4CA(0, 0, a1, (int *)&v3); /*0xffc204f9*/
  AutoGenFunc301((a1[2] >> 8) & 0xF, v3, a2); /*0xffc2050d*/
  return 0; /*0xffc20533*/
}

// Function: AutoGenFunc538 @ 0xffc20538 (0xb7 bytes)
// Index: 55/2560

unsigned int __usercall AutoGenFunc538@<eax>(unsigned int n0xC@<edx>, __int64 a2, int a3, int a4)
{
  int v5; // edi
  unsigned int n0x40; // esi
  bool v7; // cc
  int n4; // eax
  unsigned __int64 v9; // rax
  __int64 v10; // rax

  if ( !a4 || n0xC >= 0xC ) /*0xffc20552*/
    return -2147483646; /*0xffc2054a*/
  if ( n0xC - 4 > 3 ) /*0xffc2055a*/
    v5 = a3; /*0xffc20561*/
  else
    v5 = 1; /*0xffc2055e*/
  n0x40 = n0xC & 3; /*0xffc20564*/
  if ( (a2 & ((unsigned __int8)byte_FFD4FBBC[n0x40] - 1)) != 0 ) /*0xffc20578*/
    return -2147483645; /*0xffc20578*/
  if ( !v5 ) /*0xffc20583*/
  {
    if ( !HIDWORD(a2) ) /*0xffc20588*/
    {
      v7 = 1; /*0xffc2058a*/
      goto LABEL_12; /*0xffc2058a*/
    }
    return -2147483645; /*0xffc2057f*/
  }
  v9 = AutoGenFuncFE83(0xFFFFFFFF); /*0xffc205a5*/
  if ( v9 < (unsigned int)(v5 - 1) ) /*0xffc205b7*/
    return -2147483645; /*0xffc205b7*/
  v10 = AutoGenFuncFEC7(v9 - (unsigned int)v5 + 1, n0x40); /*0xffc205c7*/
  if ( HIDWORD(a2) < HIDWORD(v10) ) /*0xffc205d2*/
    goto LABEL_13; /*0xffc205d2*/
  if ( HIDWORD(a2) > HIDWORD(v10) ) /*0xffc205d4*/
    return -2147483645; /*0xffc205d4*/
  v7 = (unsigned int)a2 <= (unsigned int)v10; /*0xffc205d6*/
LABEL_12:
  if ( !v7 ) /*0xffc2058e*/
    return -2147483645; /*0xffc2058e*/
LABEL_13:
  LOBYTE(n4) = byte_FFD4FBBC[n0x40]; /*0xffc20590*/
  if ( (unsigned __int8)n4 <= 4u ) /*0xffc20598*/
    n4 = (unsigned __int8)n4; /*0xffc205db*/
  else
    n4 = 4; /*0xffc2059c*/
  return (a4 & (n4 - 1)) != 0 ? 0x80000003 : 0;
}

// Function: AutoGenFunc5EF @ 0xffc205ef (0xb4 bytes)
// Index: 56/2560

int __cdecl AutoGenFunc5EF(int a1, int a2)
{
  int v2; // esi
  _DWORD *v3; // edi
  _DWORD *v4; // esi
  int result; // eax
  int v6; // eax
  unsigned __int8 v7; // dl
  int v8; // [esp-18h] [ebp-30h]
  int v9; // [esp+Ch] [ebp-Ch]
  unsigned int v10; // [esp+10h] [ebp-8h] BYREF
  int v11; // [esp+14h] [ebp-4h]

  v2 = *(unsigned __int16 *)(a1 + 6); /*0xffc20603*/
  v9 = v2; /*0xffc2060c*/
  AutoGenFunc4CA(0, 0, (_DWORD *)a1, (int *)&v10); /*0xffc20610*/
  v3 = (_DWORD *)a2; /*0xffc20615*/
  v8 = v2; /*0xffc2061c*/
  v4 = (_DWORD *)v10; /*0xffc2061d*/
  result = AutoGenFunc538((*(_DWORD *)(a1 + 8) >> 8) & 0xF, v10, v8, a2); /*0xffc2062a*/
  if ( result >= 0 ) /*0xffc20634*/
  {
    v6 = (*(_DWORD *)(a1 + 8) >> 8) & 0xF; /*0xffc2063c*/
    v7 = byte_FFD4FBC8[v6]; /*0xffc2064a*/
    if ( v9 ) /*0xffc20650*/
    {
      v10 = (unsigned __int8)byte_FFD4FBBC[v6]; /*0xffc20655*/
      v11 = v7; /*0xffc2065c*/
      do /*0xffc20698*/
      {
        AutoGenFunc301((*(_DWORD *)(a1 + 8) >> 8) & 3, v4, v3); /*0xffc2066c*/
        v4 = (_DWORD *)((char *)v4 + v10); /*0xffc2068b*/
        v3 = (_DWORD *)((char *)v3 + v11); /*0xffc2068f*/
        --v9; /*0xffc20693*/
      }
      while ( v9 ); /*0xffc20698*/
    }
    return 0; /*0xffc2069a*/
  }
  return result; /*0xffc2069c*/
}

// Function: AutoGenFunc6A3 @ 0xffc206a3 (0x56 bytes)
// Index: 57/2560

int __cdecl AutoGenFunc6A3(_DWORD *a1, __int16 *a2)
{
  _DWORD *v3; // [esp+4h] [ebp-4h] BYREF

  AutoGenFunc4CA(0, 0, a1, (int *)&v3); /*0xffc206b8*/
  AutoGenFunc347((a1[2] >> 8) & 0xF, v3, a2); /*0xffc206cd*/
  return 0; /*0xffc206f4*/
}

// Function: AutoGenFunc6F9 @ 0xffc206f9 (0xb4 bytes)
// Index: 58/2560

int __cdecl AutoGenFunc6F9(int a1, int a2)
{
  int v2; // esi
  __int16 *v3; // edi
  _DWORD *v4; // esi
  int result; // eax
  int v6; // eax
  unsigned __int8 v7; // dl
  int v8; // [esp-18h] [ebp-30h]
  int v9; // [esp+Ch] [ebp-Ch]
  unsigned int v10; // [esp+10h] [ebp-8h] BYREF
  int v11; // [esp+14h] [ebp-4h]

  v2 = *(unsigned __int16 *)(a1 + 6); /*0xffc2070d*/
  v9 = v2; /*0xffc20716*/
  AutoGenFunc4CA(0, 0, (_DWORD *)a1, (int *)&v10); /*0xffc2071a*/
  v3 = (__int16 *)a2; /*0xffc2071f*/
  v8 = v2; /*0xffc20726*/
  v4 = (_DWORD *)v10; /*0xffc20727*/
  result = AutoGenFunc538((*(_DWORD *)(a1 + 8) >> 8) & 0xF, v10, v8, a2); /*0xffc20734*/
  if ( result >= 0 ) /*0xffc2073e*/
  {
    v6 = (*(_DWORD *)(a1 + 8) >> 8) & 0xF; /*0xffc20746*/
    v7 = byte_FFD4FBC8[v6]; /*0xffc20754*/
    if ( v9 ) /*0xffc2075a*/
    {
      v10 = (unsigned __int8)byte_FFD4FBBC[v6]; /*0xffc2075f*/
      v11 = v7; /*0xffc20766*/
      do /*0xffc207a2*/
      {
        AutoGenFunc347((*(_DWORD *)(a1 + 8) >> 8) & 3, v4, v3); /*0xffc20776*/
        v4 = (_DWORD *)((char *)v4 + v10); /*0xffc20795*/
        v3 = (__int16 *)((char *)v3 + v11); /*0xffc20799*/
        --v9; /*0xffc2079d*/
      }
      while ( v9 ); /*0xffc207a2*/
    }
    return 0; /*0xffc207a4*/
  }
  return result; /*0xffc207a6*/
}

// Function: AutoGenFunc7AD @ 0xffc207ad (0x50 bytes)
// Index: 59/2560

unsigned int __cdecl AutoGenFunc7AD(unsigned __int8 n6, unsigned __int8 a2, char n7, _BYTE *a4)
{
  unsigned int i_1; // edi
  _BYTE *v5; // ecx
  unsigned int i_2; // eax
  unsigned int i; // edx

  i_2 = AutoGenFunc127(a4); /*0xffc207b5*/
  i_1 = i_2; /*0xffc207bf*/
  v5 = (_BYTE *)(2 * (a2 + 80 * n6) + 753664); /*0xffc207cb*/
  __outbyte(0x3D4u, 0xAu); /*0xffc207d9*/
  LOBYTE(i_2) = 32; /*0xffc207db*/
  __outbyte(0x3D5u, 0x20u); /*0xffc207dd*/
  for ( i = 0; i < i_1; *(v5 - 1) = n7 ) /*0xffc207e2*/
  {
    LOBYTE(i_2) = a4[i++]; /*0xffc207e9*/
    *v5 = i_2; /*0xffc207ed*/
    v5 += 2; /*0xffc207ef*/
  }
  return i_2; /*0xffc207fa*/
}

// Function: AutoGenFunc7FD @ 0xffc207fd (0x7 bytes)
// Index: 60/2560

unsigned __int8 __cdecl AutoGenFunc7FD(unsigned __int16 a1)
{
  return __inbyte(a1); /*0xffc20803*/
}

// Function: AutoGenFunc804 @ 0xffc20804 (0xb bytes)
// Index: 61/2560

unsigned __int8 __cdecl AutoGenFunc804(unsigned __int16 a1, unsigned __int8 a2)
{
  unsigned __int8 result; // al

  result = a2; /*0xffc20809*/
  __outbyte(a1, a2); /*0xffc2080d*/
  return result; /*0xffc2080e*/
}

// Function: AutoGenFunc80F @ 0xffc2080f (0x32 bytes)
// Index: 62/2560

int __cdecl AutoGenFunc80F(unsigned __int16 n0xCFC)
{
  int result; // eax

  if ( (n0xCFC & 1) != 0 ) /*0xffc2081d*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 133, (int)"(Port & 1) == 0"); /*0xffc2082e*/
  LOWORD(result) = __inword(n0xCFC); /*0xffc2083b*/
  return (unsigned __int16)result; /*0xffc20840*/
}

// Function: AutoGenFunc841 @ 0xffc20841 (0x34 bytes)
// Index: 63/2560

unsigned __int16 __cdecl AutoGenFunc841(unsigned __int16 n0xCF8, unsigned __int16 a2)
{
  unsigned __int16 result; // ax

  if ( (n0xCF8 & 1) != 0 ) /*0xffc2084f*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 163, (int)"(Port & 1) == 0"); /*0xffc20860*/
  result = a2; /*0xffc2086d*/
  __outword(n0xCF8, a2); /*0xffc20872*/
  return result; /*0xffc20874*/
}

// Function: AutoGenFunc875 @ 0xffc20875 (0x2e bytes)
// Index: 64/2560

unsigned __int32 __cdecl AutoGenFunc875(unsigned __int16 n0xCFC)
{
  if ( (n0xCFC & 3) != 0 ) /*0xffc20883*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 193, (int)"(Port & 3) == 0"); /*0xffc20894*/
  return __indword(n0xCFC); /*0xffc208a2*/
}

// Function: AutoGenFunc8A3 @ 0xffc208a3 (0x32 bytes)
// Index: 65/2560

unsigned int __cdecl AutoGenFunc8A3(unsigned __int16 n0xCF8, unsigned int a2)
{
  unsigned int result; // eax

  if ( (n0xCF8 & 3) != 0 ) /*0xffc208b1*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 223, (int)"(Port & 3) == 0"); /*0xffc208c2*/
  result = a2; /*0xffc208cf*/
  __outdword(n0xCF8, a2); /*0xffc208d3*/
  return result; /*0xffc208d4*/
}

// Function: AutoGenFunc8D5 @ 0xffc208d5 (0x7 bytes)
// Index: 66/2560

char __cdecl AutoGenFunc8D5(int a1)
{
  return *(_BYTE *)a1; /*0xffc208db*/
}

// Function: AutoGenFunc8DC @ 0xffc208dc (0xb bytes)
// Index: 67/2560

char __cdecl AutoGenFunc8DC(_BYTE *a1, char a2)
{
  *a1 = a2; /*0xffc208e4*/
  return a2; /*0xffc208e6*/
}

// Function: AutoGenFunc8E7 @ 0xffc208e7 (0x32 bytes)
// Index: 68/2560

int __cdecl AutoGenFunc8E7(unsigned __int16 *a1)
{
  if ( ((unsigned __int8)a1 & 1) != 0 ) /*0xffc208f8*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLib.c", 151, (int)"(Address & 1) == 0"); /*0xffc20909*/
  return *a1; /*0xffc20917*/
}

// Function: AutoGenFunc919 @ 0xffc20919 (0x34 bytes)
// Index: 69/2560

__int16 __cdecl AutoGenFunc919(_WORD *a1, __int16 a2)
{
  if ( ((unsigned __int8)a1 & 1) != 0 ) /*0xffc2092a*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLib.c", 183, (int)"(Address & 1) == 0"); /*0xffc2093b*/
  *a1 = a2; /*0xffc20948*/
  return a2; /*0xffc2094b*/
}

// Function: AutoGenFunc94D @ 0xffc2094d (0x7 bytes)
// Index: 70/2560

int __cdecl AutoGenFunc94D(int a1)
{
  return *(_DWORD *)a1; /*0xffc20953*/
}

// Function: AutoGenFunc954 @ 0xffc20954 (0xb bytes)
// Index: 71/2560

int __cdecl AutoGenFunc954(_DWORD *a1, int a2)
{
  *a1 = a2; /*0xffc2095c*/
  return a2; /*0xffc2095e*/
}

// Function: AutoGenFunc95F @ 0xffc2095f (0x31 bytes)
// Index: 72/2560

__int64 __cdecl AutoGenFunc95F(int a1)
{
  if ( (a1 & 7) != 0 ) /*0xffc20970*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLib.c", 284, (int)"(Address & 7) == 0"); /*0xffc20981*/
  return *(_QWORD *)a1; /*0xffc2098e*/
}

// Function: AutoGenFunc990 @ 0xffc20990 (0x39 bytes)
// Index: 73/2560

int __cdecl AutoGenFunc990(_DWORD *a1, int a2, int a3)
{
  if ( ((unsigned __int8)a1 & 7) != 0 ) /*0xffc209a1*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLib.c", 314, (int)"(Address & 7) == 0"); /*0xffc209b2*/
  *a1 = a2; /*0xffc209c2*/
  a1[1] = a3; /*0xffc209c4*/
  return a2; /*0xffc209c7*/
}

// Function: AutoGenFunc9C9 @ 0xffc209c9 (0x89 bytes)
// Index: 74/2560

int AutoGenFunc9C9()
{
  int v0; // eax
  int v1; // eax
  int v3; // [esp+4h] [ebp-4h] BYREF

  v0 = AutoGenFuncFD5B(); /*0xffc209ce*/
  v1 = (*(int (__cdecl **)(int, int *))(*(_DWORD *)v0 + 48))(v0, &v3); /*0xffc209da*/
  if ( v1 < 0 ) /*0xffc209f3*/
  {
    DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v1); /*0xffc20a11*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\PeiHobLib\\HobLib.c", 50, (int)"!EFI_ERROR (Status)"); /*0xffc20a21*/
  }
  if ( !v3 ) /*0xffc20a38*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\PeiHobLib\\HobLib.c", 51, (int)"HobList != ((void *) 0)"); /*0xffc20a42*/
  return v3; /*0xffc20a4d*/
}

// Function: AutoGenFuncA52 @ 0xffc20a52 (0x47 bytes)
// Index: 75/2560

_WORD *__fastcall AutoGenFuncA52(int a1, _WORD *a2)
{
  _WORD *v2; // esi

  v2 = a2; /*0xffc20a5a*/
  if ( !a2 ) /*0xffc20a60*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\PeiHobLib\\HobLib.c", 82, (int)"HobStart != ((void *) 0)"); /*0xffc20a6e*/
  while ( 1 ) /*0xffc20a89*/
  {
    if ( *v2 == 0xFFFF ) /*0xffc20a8f*/
      return 0; /*0xffc20a94*/
    if ( *v2 == 4 ) /*0xffc20a81*/
      break; /*0xffc20a81*/
    v2 = (_WORD *)((char *)v2 + (unsigned __int16)v2[1]); /*0xffc20a87*/
  }
  return v2; /*0xffc20a93*/
}

// Function: AutoGenFuncA99 @ 0xffc20a99 (0x34 bytes)
// Index: 76/2560

_WORD *__cdecl AutoGenFuncA99(int a1, _WORD *a2)
{
  int v2; // ecx
  _WORD *v4; // eax
  _WORD *v5; // esi

  while ( 1 ) /*0xffc20abb*/
  {
    v4 = AutoGenFuncA52(v2, a2); /*0xffc20abb*/
    v5 = v4; /*0xffc20ac0*/
    if ( !v4 || AutoGenFunc2A2(a1, (int)(v4 + 4)) ) /*0xffc20aac*/
      break; /*0xffc20aac*/
    a2 = (_WORD *)((char *)v5 + (unsigned __int16)v5[1]); /*0xffc20ab9*/
  }
  return v5; /*0xffc20ac8*/
}

// Function: AutoGenFuncACD @ 0xffc20acd (0x12 bytes)
// Index: 77/2560

_WORD *__cdecl AutoGenFuncACD(int a1)
{
  _WORD *v1; // eax

  v1 = (_WORD *)AutoGenFunc9C9(); /*0xffc20acd*/
  return AutoGenFuncA99(a1, v1); /*0xffc20ade*/
}

// Function: AutoGenFuncADF @ 0xffc20adf (0x56 bytes)
// Index: 78/2560

int __fastcall AutoGenFuncADF(int a1, int a2)
{
  int v3; // eax
  int result; // eax
  int v5; // [esp+4h] [ebp-4h] BYREF

  v3 = AutoGenFuncFD5B(); /*0xffc20ae6*/
  if ( (*(int (__cdecl **)(int, int, int, int *))(*(_DWORD *)v3 + 52))(v3, 4, a2, &v5) >= 0 ) /*0xffc20afe*/
  {
    result = v5; /*0xffc20b07*/
  }
  else
  {
    result = 0; /*0xffc20b00*/
    v5 = 0; /*0xffc20b02*/
  }
  if ( !result ) /*0xffc20b15*/
  {
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\PeiHobLib\\HobLib.c", 250, (int)"Hob != ((void *) 0)"); /*0xffc20b26*/
    return v5; /*0xffc20b2b*/
  }
  return result; /*0xffc20afb*/
}

// Function: AutoGenFuncB35 @ 0xffc20b35 (0xac bytes)
// Index: 79/2560

char *__cdecl AutoGenFuncB35(int a1, char *src, unsigned int n0xFFE0)
{
  int v3; // ecx
  int v4; // eax
  int v5; // edi
  char *dst; // edi

  if ( !src && n0xFFE0 ) /*0xffc20b53*/
    DebugPrintEx( /*0xffc20b60*/
      (int)"e:\\hs\\MdePkg\\Library\\PeiHobLib\\HobLib.c",
      466,
      (int)"Data != ((void *) 0) || DataLength == 0");
  if ( !a1 ) /*0xffc20b75*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\PeiHobLib\\HobLib.c", 416, (int)"Guid != ((void *) 0)"); /*0xffc20b82*/
  if ( n0xFFE0 > 0xFFE0 ) /*0xffc20b99*/
    DebugPrintEx( /*0xffc20ba6*/
      (int)"e:\\hs\\MdePkg\\Library\\PeiHobLib\\HobLib.c",
      421,
      (int)"DataLength <= (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE))");
  v4 = AutoGenFuncADF(v3, n0xFFE0 + 24); /*0xffc20bb1*/
  v5 = v4; /*0xffc20bb6*/
  if ( v4 && (AutoGenFunc272(v4 + 8, a1), (dst = (char *)(v5 + 24)) != 0) ) /*0xffc20bca*/
    return AutoGenFunc1F0(dst, src, n0xFFE0); /*0xffc20bd1*/
  else
    return 0; /*0xffc20bdb*/
}

// Function: AutoGenFuncBE1 @ 0xffc20be1 (0x23 bytes)
// Index: 80/2560

void (__cdecl *__cdecl AutoGenFuncBE1(int __return_address))(int)
{
  void (__cdecl *result)(int); // eax
  char v2; // bl

  result = (void (__cdecl *)(int))dword_FFD63AB8; /*0xffc20be1*/
  v2 = 0; /*0xffc20be7*/
  while ( result ) /*0xffc20c00*/
  {
    result(__return_address); /*0xffc20bef*/
    result = *(void (__cdecl **)(int))(4 * (unsigned __int8)++v2 - 2737480); /*0xffc20bf7*/
  }
  return result; /*0xffc20c02*/
}

// Function: AutoGenFuncC04 @ 0xffc20c04 (0x37 bytes)
// Index: 81/2560

void (__cdecl *__cdecl AutoGenFuncC04(int a1, int a2, int a3, int a4, int a5, int a6))(int, int, int, int, int, int)
{
  void (__cdecl *result)(int, int, int, int, int, int); // eax
  char v7; // bl

  result = (void (__cdecl *)(int, int, int, int, int, int))dword_FFD63AB4[0]; /*0xffc20c07*/
  v7 = 0; /*0xffc20c0d*/
  while ( result ) /*0xffc20c36*/
  {
    result(a1, a2, a3, a4, a5, a6); /*0xffc20c23*/
    result = (void (__cdecl *)(int, int, int, int, int, int))dword_FFD63AB4[(unsigned __int8)++v7]; /*0xffc20c2d*/
  }
  return result; /*0xffc20c38*/
}

// Function: AutoGenFuncC3B @ 0xffc20c3b (0x28 bytes)
// Index: 82/2560

void (__cdecl *__cdecl AutoGenFuncC3B(int __return_address, int n6))(int, int)
{
  void (__cdecl *result)(int, int); // eax
  char v3; // bl

  result = (void (__cdecl *)(int, int))dword_FFD63ABC[0]; /*0xffc20c3b*/
  v3 = 0; /*0xffc20c41*/
  while ( result ) /*0xffc20c5f*/
  {
    result(__return_address, n6); /*0xffc20c4d*/
    result = (void (__cdecl *)(int, int))dword_FFD63ABC[(unsigned __int8)++v3]; /*0xffc20c56*/
  }
  return result; /*0xffc20c61*/
}

// Function: AutoGenFuncC63 @ 0xffc20c63 (0x54 bytes)
// Index: 83/2560

char AutoGenFuncC63()
{
  int v1; // [esp+4h] [ebp-4h] BYREF

  v1 = 0; /*0xffc20c67*/
  AutoGenFunc8B6B(&v1); /*0xffc20c6f*/
  if ( v1 ) /*0xffc20c82*/
  {
    if ( (*(_DWORD *)(v1 + 300) & 0x8000) != 0 ) /*0xffc20caa*/
      return 1; /*0xffc20cae*/
  }
  else
  {
    DebugPrintEx( /*0xffc20c93*/
      (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchPmcLib\\PchPmcLib.c",
      162,
      (int)"PchPwrmBase != 0");
  }
  return 0; /*0xffc20cb2*/
}

// Function: AutoGenFuncCB7 @ 0xffc20cb7 (0xb4 bytes)
// Index: 84/2560

char __thiscall AutoGenFuncCB7(_BYTE *this)
{
  unsigned int v2; // eax
  _DWORD *v3; // ecx
  _DWORD *v5; // [esp+4h] [ebp-4h] BYREF

  if ( AutoGenFunc8B6B(&v5) >= 0 ) /*0xffc20cc8*/
  {
    v5[42] |= 0x200u; /*0xffc20cfd*/
    LOBYTE(v2) = *(this + 4); /*0xffc20d03*/
    if ( (_BYTE)v2 ) /*0xffc20d08*/
    {
      if ( (_BYTE)v2 != 1 ) /*0xffc20d37*/
        return v2; /*0xffc20d37*/
      v5[50] &= 0xFFFFF9FF; /*0xffc20d47*/
      v3 = v5; /*0xffc20d4d*/
      v2 = v5[60] & 0x3FFFFFFF | 0x80000000; /*0xffc20d5b*/
    }
    else
    {
      v5[50] = v5[50] & 0xFFFFF9FF | 0x200; /*0xffc20d1a*/
      v3 = v5; /*0xffc20d20*/
      v2 = v5[60] & 0x3FFFFFFF | 0x40000000; /*0xffc20d2e*/
    }
    v3[60] = v2; /*0xffc20d60*/
    return v2; /*0xffc20d60*/
  }
  LOBYTE(v2) = DebugPrintEx( /*0xffc20ce3*/
                 (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchAdrLib\\PchAdrLib.c",
                 49,
                 (int)"((BOOLEAN)(0==1))");
  return v2; /*0xffc20d66*/
}

// Function: AutoGenFuncD6B @ 0xffc20d6b (0x125 bytes)
// Index: 85/2560

char __fastcall AutoGenFuncD6B(_BYTE *a1, int n3)
{
  int v3; // ebx
  int v4; // eax
  char v5; // al
  bool v6; // al
  int v7; // edx
  char v8; // al
  bool v9; // al
  unsigned int this; // [esp+8h] [ebp-8h] BYREF
  int n3_1; // [esp+Ch] [ebp-4h]

  n3_1 = n3; /*0xffc20d74*/
  v3 = -1; /*0xffc20d7a*/
  if ( AutoGenFunc8B6B(&this) >= 0 )
  {
    if ( (n3_1 & 3) == 1 )
    {
      v5 = a1[5]; /*0xffc20dba*/
      if ( v5 ) /*0xffc20dbf*/
        v6 = v5 == 1; /*0xffc20dc3*/
      else
        v6 = 0; /*0xffc20dc8*/
      v7 = v6 ? 0x10000000 : 0;
      v3 = v6 ? -1 : -268435457;
    }
    else if ( (n3_1 & 1) != 0 && (n3_1 & 2) != 0 )
    {
      v8 = a1[5]; /*0xffc20df8*/
      if ( v8 ) /*0xffc20dfd*/
        v9 = v8 == 1; /*0xffc20e01*/
      else
        v9 = 1; /*0xffc20e06*/
      v3 = v9 ? -1 : -268435457;
      v7 = v9 ? 0x10000000 : 0;
      if ( a1[6] == 1 ) /*0xffc20e2a*/
        v7 |= 0x1000u; /*0xffc20e2c*/
      else
        v3 &= ~0x1000u; /*0xffc20e34*/
      if ( a1[7] == 1 ) /*0xffc20e3d*/
        v7 |= 0x2000u; /*0xffc20e3f*/
      else
        v3 &= ~0x2000u; /*0xffc20e47*/
      if ( a1[8] == 1 ) /*0xffc20e50*/
        v7 |= 0x200u; /*0xffc20e52*/
      else
        v3 &= ~0x200u; /*0xffc20e5a*/
      if ( a1[9] == 1 ) /*0xffc20e63*/
        v7 |= 0x4000u; /*0xffc20e65*/
      else
        v3 &= ~0x4000u; /*0xffc20e6d*/
    }
    else
    {
      v7 = 0; /*0xffc20e75*/
    }
    v4 = v7 | v3 & *(_DWORD *)(this + 240); /*0xffc20e82*/
    *(_DWORD *)(this + 240) = v4; /*0xffc20e84*/
  }
  else
  {
    LOBYTE(v4) = DebugPrintEx( /*0xffc20d9f*/
                   (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchAdrLib\\PchAdrLib.c",
                   111,
                   (int)"((BOOLEAN)(0==1))");
  }
  return v4; /*0xffc20e8a*/
}

// Function: AutoGenFuncE90 @ 0xffc20e90 (0x18d bytes)
// Index: 86/2560

unsigned int __fastcall AutoGenFuncE90(_BYTE *a1, unsigned int n0x190)
{
  unsigned __int8 n2; // bl
  unsigned __int8 n2_1; // bh
  int v6; // eax
  int v7; // esi
  unsigned int result; // eax

  if ( !a1[1] ) /*0xffc20ea8*/
    DebugPrintEx( /*0xffc20eb9*/
      (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchAdrLib\\PchAdrLib.c",
      193,
      (int)"PchAdrConfig->AdrTimerEn != 0");
  if ( n0x190 > 0x190 ) /*0xffc20ece*/
  {
    switch ( n0x190 ) /*0xffc20f06*/
    {
      case 0x258u: /*0xffc20f06*/
        n2 = 0; /*0xffc20f76*/
        break;
      case 0x4B0u: /*0xffc20f06*/
        n2 = 1; /*0xffc20f72*/
        break;
      case 0x960u: /*0xffc20f06*/
        n2 = 2; /*0xffc20f6e*/
LABEL_15:
        n2_1 = n2; /*0xffc20efc*/
        goto LABEL_26; /*0xffc20efe*/
      case 0x2580u: /*0xffc20f06*/
        n2 = 2; /*0xffc20f68*/
        n2_1 = 9; /*0xffc20f6a*/
        goto LABEL_26; /*0xffc20f6c*/
      default:
        goto LABEL_20; /*0xffc20f1e*/
    }
    n2_1 = 2; /*0xffc20f78*/
    goto LABEL_26; /*0xffc20f78*/
  }
  switch ( n0x190 ) /*0xffc20ed0*/
  {
    case 0x190u: /*0xffc20ed0*/
      n2 = 1; /*0xffc20efa*/
      goto LABEL_15; /*0xffc20efa*/
    case 0u: /*0xffc20ed0*/
      n2 = 3; /*0xffc20ef1*/
      goto LABEL_13; /*0xffc20ef1*/
    case 0x19u: /*0xffc20ed0*/
      n2 = 0; /*0xffc20eed*/
      goto LABEL_13; /*0xffc20eef*/
    case 0x32u: /*0xffc20ed0*/
      n2 = 1; /*0xffc20ee9*/
      goto LABEL_13; /*0xffc20eeb*/
  }
  if ( n0x190 != 100 )
  {
LABEL_20:
    DebugPrintDispatcher(0x80000000, "PCH ADR config: ERROR: unsupported ADR timer value (%d)\n", n0x190);
    n2_1 = 0; /*0xffc20f4a*/
    n2 = 2; /*0xffc20f4c*/
    DebugPrintEx( /*0xffc20f5e*/
      (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchAdrLib\\PchAdrLib.c",
      236,
      (int)"((BOOLEAN)(0==1))");
    goto LABEL_26; /*0xffc20f66*/
  }
  n2 = 2; /*0xffc20ee5*/
LABEL_13:
  n2_1 = 0; /*0xffc20ef3*/
LABEL_26:
  if ( a1[2] != 4 && a1[3] != 99 ) /*0xffc20f87*/
  {
    n2 = a1[2]; /*0xffc20f89*/
    n2_1 = a1[3]; /*0xffc20f8b*/
  }
  v6 = AutoGenFunc8C1A(0, 17, 0); /*0xffc20f93*/
  v7 = v6; /*0xffc20f98*/
  if ( (*(_DWORD *)(v6 + 384) & 0x10000000) != 0 || a1[1] != 2 )
  {
    *(_DWORD *)(v6 + 384) = *(_DWORD *)(v6 + 384) & 0x3FFFFFFF | (n2 << 30); /*0xffc20ff9*/
    result = *(_DWORD *)(v6 + 384) & 0xF0FFFFFF; /*0xffc21008*/
    *(_DWORD *)(v7 + 384) = result | (n2_1 << 24); /*0xffc21012*/
  }
  else
  {
    DebugPrintDispatcher(2, "PCH ADR config: WARNING! ADR timer HELD OFF INDEFINITELY! FOR DEBUG PURPOSES ONLY!\n");
    result = *(_DWORD *)(v7 + 384) | 0x20000000; /*0xffc20fd9*/
    *(_DWORD *)(v7 + 384) = result; /*0xffc20fde*/
  }
  return result; /*0xffc21018*/
}

// Function: AutoGenFunc101D @ 0xffc2101d (0x40 bytes)
// Index: 87/2560

char __cdecl AutoGenFunc101D(char n6, unsigned int n100, int n3)
{
  _BYTE *v3; // ecx
  char result; // al
  _BYTE *v5; // [esp+0h] [ebp-4h] BYREF

  v5 = v3; /*0xffc21020*/
  result = AutoGenFunc109D(&v5); /*0xffc21024*/
  if ( (n6 & 1) != 0 ) /*0xffc2102d*/
    result = AutoGenFuncCB7(v5); /*0xffc21032*/
  if ( (n6 & 2) != 0 ) /*0xffc2103b*/
    result = AutoGenFuncD6B(v5, n3); /*0xffc21043*/
  if ( (n6 & 4) != 0 ) /*0xffc2104c*/
    return AutoGenFuncE90(v5, n100); /*0xffc21054*/
  return result; /*0xffc2105b*/
}

// Function: AutoGenFunc105D @ 0xffc2105d (0x40 bytes)
// Index: 88/2560

char __thiscall AutoGenFunc105D(_DWORD *this)
{
  char this_2; // al
  _DWORD *this_1; // [esp+0h] [ebp-4h] BYREF

  this_1 = this; /*0xffc21060*/
  if ( AutoGenFunc8B6B((unsigned int *)&this_1) < 0 ) /*0xffc2106b*/
    return DebugPrintEx( /*0xffc21085*/
             (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchAdrLib\\PchAdrLib.c",
             417,
             (int)"((BOOLEAN)(0==1))");
  this_2 = (char)this_1; /*0xffc2108f*/
  this_1[7] = 0x10000; /*0xffc21092*/
  return this_2; /*0xffc2109b*/
}

// Function: AutoGenFunc109D @ 0xffc2109d (0x71 bytes)
// Index: 89/2560

int __thiscall AutoGenFunc109D(_DWORD *this)
{
  int v2; // ecx
  int result; // eax
  int p_this; // [esp+4h] [ebp-4h] BYREF

  v2 = AutoGenFuncFDA9((int)&unk_FFD51524, 0, 0, (int)&p_this); /*0xffc210b6*/
  if ( v2 < 0 ) /*0xffc210c6*/
  {
    DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v2); /*0xffc210e3*/
    DebugPrintEx( /*0xffc210f7*/
      (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchAdrLib\\PeiPchAdrConfig.c",
      48,
      (int)"!EFI_ERROR (Status)");
  }
  result = p_this + 6938; /*0xffc21102*/
  *this = p_this + 6938; /*0xffc21107*/
  return result; /*0xffc21109*/
}

// Function: AutoGenFunc110E @ 0xffc2110e (0x1b bytes)
// Index: 90/2560

int __cdecl AutoGenFunc110E(int a1, unsigned __int8 a2, int a3)
{
  return 20 * (a3 + (a2 << 7)) + a1 + 214133; /*0xffc21128*/
}

// Function: AutoGenFunc1129 @ 0xffc21129 (0x11 bytes)
// Index: 91/2560

int __cdecl AutoGenFunc1129(unsigned __int8 *__return_address, char n6)
{
  return *(_DWORD *)&__return_address[4 * (unsigned __int8)n6 + 229493]; /*0xffc21139*/
}

// Function: AutoGenFunc113A @ 0xffc2113a (0x11 bytes)
// Index: 92/2560

char __cdecl AutoGenFunc113A(int __return_address, unsigned __int8 n6)
{
  return *(_BYTE *)(n6 + __return_address + 231398); /*0xffc2114a*/
}

// Function: AutoGenFunc114B @ 0xffc2114b (0x3c bytes)
// Index: 93/2560

int __cdecl AutoGenFunc114B(int __return_address, unsigned __int8 n4)
{
  int result; // eax

  if ( !*(_BYTE *)(n4 + __return_address + 214129) ) /*0xffc21156*/
  {
    AutoGenFunc1187(__return_address); /*0xffc21162*/
    result = memset_save_flags((void *)(__return_address + 229662), 0, 0x6C0u); /*0xffc21175*/
    ++*(_BYTE *)(n4 + __return_address + 214129); /*0xffc2117d*/
  }
  return result; /*0xffc21184*/
}

// Function: AutoGenFunc1187 @ 0xffc21187 (0x8a bytes)
// Index: 94/2560

int __thiscall AutoGenFunc1187(int this)
{
  memset_save_flags((void *)(this + 214133), 0, 0x3C00u); /*0xffc2119a*/
  memset_save_flags((void *)(this + 229493), 0, 0x18u); /*0xffc211a9*/
  memset_save_flags((void *)(this + 229517), 0, 0x18u); /*0xffc211b8*/
  memset_save_flags((void *)(this + 229542), 0, 0x78u); /*0xffc211c7*/
  memset_save_flags((void *)(this + 231398), 0, 6u); /*0xffc211d6*/
  memset_save_flags((void *)(this + 229541), 0, 1u); /*0xffc211e5*/
  memset_save_flags((void *)(this + 231390), 0, 8u); /*0xffc211f7*/
  return memset_save_flags((void *)(this + 231404), 0, 1u); /*0xffc2120e*/
}

// Function: AutoGenFunc1211 @ 0xffc21211 (0x79 bytes)
// Index: 95/2560

char __fastcall AutoGenFunc1211(int a1, int a2, _BYTE *a3)
{
  unsigned __int8 n6; // bl
  char v4; // bh
  int v6; // esi
  int v8; // [esp+10h] [ebp-8h]
  int v9; // [esp+14h] [ebp-4h]

  n6 = 0; /*0xffc21216*/
  v9 = a2; /*0xffc21218*/
  v4 = 0; /*0xffc21221*/
  LOBYTE(v8) = 0; /*0xffc21225*/
  v6 = 0; /*0xffc21229*/
  do /*0xffc2127f*/
  {
    if ( ((unsigned __int8)(1 << v6) & *a3) != 0 && *(_DWORD *)(a1 + 4 * (v6 + 6 * (unsigned __int8)a2) + 10042) ) /*0xffc2123e*/
    {
      DebugPrint( /*0xffc2125f*/
        a1,
        3,
        a2,
        v8,
        255,
        255,
        255,
        255,
        "Skipping Advanced Memtest on channel %d due to Faulty Part log\n",
        v6);
      a2 = v9; /*0xffc2126a*/
      *a3 &= ~(1 << v6); /*0xffc21271*/
      v4 = 1; /*0xffc21273*/
    }
    ++n6; /*0xffc21275*/
    ++v6; /*0xffc21277*/
    LOBYTE(v8) = n6; /*0xffc21278*/
  }
  while ( n6 < 6u ); /*0xffc2127f*/
  return v4; /*0xffc21281*/
}

// Function: AutoGenFunc128A @ 0xffc2128a (0x45 bytes)
// Index: 96/2560

char __fastcall AutoGenFunc128A(int a1, char a2, unsigned int n0xA)
{
  char v3; // bl

  if ( !n0xA ) /*0xffc21290*/
    return 1; /*0xffc21292*/
  if ( !a2 || !*(_BYTE *)(a1 + 238) || n0xA >= 0xA ) /*0xffc212a8*/
    return 0; /*0xffc212c9*/
  v3 = 1; /*0xffc212b4*/
  DebugPrint(a1, 3, 255, 255, 255, 255, 255, 255, "\nPPR repair done so retry MemTest!\n"); /*0xffc212bf*/
  return v3; /*0xffc212cd*/
}

// Function: MemTestScramTest @ 0xffc212cf (0x47b bytes)
// Index: 97/2560

int __fastcall MemTestScramTest(
        unsigned __int8 *__return_address,
        int n6a,
        unsigned __int8 n63,
        int n10,
        int n4,
        int a6,
        unsigned int SocketInfo)
{
  int n10_1; // ebx
  int v9; // edi
  int n6a_1; // edx
  int n63_1; // ebp
  __int64 v13; // rax
  int v14; // eax
  int v15; // edx
  char i; // al
  int n6a_2; // edx
  int n4_1; // edx
  int v19; // ecx
  int v20; // eax
  int v21; // ecx
  int n4_2; // edx
  int v23; // ecx
  int v24; // eax
  int n4_3; // edx
  int v26; // ecx
  int v27; // eax
  int v28; // ecx
  int n4_4; // edx
  int v30; // ecx
  int v31; // eax
  char v32; // [esp+1Bh] [ebp-141h] BYREF
  _WORD v33[2]; // [esp+1Ch] [ebp-140h] BYREF
  int n6aa; // [esp+20h] [ebp-13Ch]
  __int64 v35; // [esp+24h] [ebp-138h] BYREF
  __int64 v36; // [esp+2Ch] [ebp-130h] BYREF
  unsigned int n0xA; // [esp+34h] [ebp-128h]
  int n10_2; // [esp+38h] [ebp-124h]
  unsigned __int8 buf[16]; // [esp+3Ch] [ebp-120h] BYREF
  char v40[16]; // [esp+4Ch] [ebp-110h] BYREF
  int v41; // [esp+5Ch] [ebp-100h] BYREF
  int v42; // [esp+60h] [ebp-FCh]
  int v43; // [esp+DCh] [ebp-80h] BYREF
  int v44; // [esp+E0h] [ebp-7Ch]

  n10_1 = n10; /*0xffc212d6*/
  n6aa = n6a; /*0xffc212e4*/
  v36 = 0; /*0xffc212ea*/
  v9 = 0; /*0xffc212ee*/
  v35 = 0; /*0xffc212f4*/
  n10_2 = (unsigned __int8)n10; /*0xffc21305*/
  DebugPrint( /*0xffc21317*/
    (int)__return_address,
    3,
    n6a,
    255,
    255,
    255,
    255,
    255,
    "MemTestScram TestType %d Starts\n",
    (unsigned __int8)n10);
  if ( (_BYTE)n10_1 == 10 || (_BYTE)n10_1 == 19 ) /*0xffc21327*/
  {
    LOBYTE(n6a_1) = n6aa; /*0xffc21329*/
    if ( AutoGenFunc1211((int)__return_address, n6a_1, &n63) ) /*0xffc21337*/
      return 1; /*0xffc21343*/
  }
  n63_1 = n63; /*0xffc21349*/
  LOBYTE(n6a_1) = n6aa; /*0xffc21355*/
  AutoGenFunc6866(__return_address, n6a_1, n63, n10_1, 0, v40); /*0xffc21360*/
  v13 = RmtFunc6D8A(0x55AA55AA55AA55AALL, SocketInfo >> 7); /*0xffc21377*/
  v14 = RmtFunc6FAC(v13, (SocketInfo >> 1) & 0x3F); /*0xffc21390*/
  if ( (SocketInfo & 1) != 0 ) /*0xffc213a0*/
  {
    v15 = ~v15; /*0xffc213a2*/
    v14 = ~v14; /*0xffc213a4*/
  }
  v41 = v14; /*0xffc213a6*/
  v43 = ~v14; /*0xffc213ae*/
  v42 = v15; /*0xffc213b9*/
  v44 = ~v15; /*0xffc213c2*/
  memset_save_flags(buf, 0, 0x10u); /*0xffc213c9*/
  *(_WORD *)buf = 0; /*0xffc213d3*/
  v33[0] = 0; /*0xffc213d8*/
  DebugPrint( /*0xffc21406*/
    (int)__return_address,
    2,
    255,
    255,
    255,
    255,
    255,
    255,
    "patternQW[0] = 0x%08x%08x, inverseQW[0] = 0x%08x%08x\n",
    v42,
    v41,
    v44,
    v43);
  v32 = 1; /*0xffc2140e*/
  n0xA = 0; /*0xffc21419*/
  for ( i = AutoGenFunc128A((int)__return_address, 1, 0); i; i = AutoGenFunc128A((int)__return_address, v32, n0xA) ) /*0xffc2141e*/
  {
    ++n0xA; /*0xffc21429*/
    KtiFunc4541((int)__return_address, 0xB9u, 1u, 0); /*0xffc21438*/
    KtiFuncF4E(&v36); /*0xffc21442*/
    LOBYTE(n4_1) = n6aa; /*0xffc2144a*/
    v9 = AutoGenFunc4E74(__return_address, n4_1, n63_1, n10_1, 0, 1, v19, v33, &v41, buf, 1, 1, 0); /*0xffc21472*/
    KtiFuncF4E(&v35); /*0xffc21479*/
    v20 = KtiFuncF75((int)__return_address, v36, SHIDWORD(v36), v35, SHIDWORD(v35), 0x3E8u); /*0xffc21496*/
    DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step1 latency = %d ms\n", v20); /*0xffc214af*/
    if ( !v9 ) /*0xffc214b9*/
    {
      v9 = AutoGenFunc6F36((int)__return_address, n6aa, v21, n10_1); /*0xffc214cc*/
      if ( !v9 ) /*0xffc214d2*/
      {
        KtiFunc4541((int)__return_address, 0xB9u, 2u, 0); /*0xffc214e1*/
        KtiFuncF4E(&v36); /*0xffc214eb*/
        LOBYTE(n4_2) = n6aa; /*0xffc214f3*/
        v9 = AutoGenFunc4E74( /*0xffc2151c*/
               __return_address,
               n4_2,
               n63_1,
               n10_1,
               (unsigned __int8 *)2,
               1,
               v23,
               v33,
               &v41,
               buf,
               1,
               1,
               0);
        KtiFuncF4E(&v35); /*0xffc21523*/
        v24 = KtiFuncF75((int)__return_address, v36, SHIDWORD(v36), v35, SHIDWORD(v35), 0x3E8u); /*0xffc21540*/
        DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step2 latency = %d ms\n", v24); /*0xffc21559*/
      }
    }
    if ( (_BYTE)n10_1 == 19 ) /*0xffc21564*/
    {
      if ( v9 ) /*0xffc2156c*/
        goto LABEL_20; /*0xffc2156c*/
      KtiFunc4541((int)__return_address, 0xB9u, 3u, 0); /*0xffc2157b*/
      KtiFuncF4E(&v36); /*0xffc21585*/
      LOBYTE(n4_3) = n6aa; /*0xffc2158d*/
      v9 = AutoGenFunc4E74(__return_address, n4_3, n63_1, 19, 0, 1, v26, v33, &v43, buf, 1, 1, 0); /*0xffc215b9*/
      KtiFuncF4E(&v35); /*0xffc215c0*/
      v27 = KtiFuncF75((int)__return_address, v36, SHIDWORD(v36), v35, SHIDWORD(v35), 0x3E8u); /*0xffc215dd*/
      DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step3 latency = %d ms\n", v27); /*0xffc215f6*/
      if ( v9 || (v9 = AutoGenFunc6F36((int)__return_address, n6aa, v28, 19)) != 0 ) /*0xffc2161a*/
      {
LABEL_20:
        DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "MemTest Failed!\n"); /*0xffc216ef*/
        break; /*0xffc21702*/
      }
      KtiFunc4541((int)__return_address, 0xB9u, 4u, 0); /*0xffc21629*/
      KtiFuncF4E(&v36); /*0xffc21633*/
      LOBYTE(n4_4) = n6aa; /*0xffc2163b*/
      v9 = AutoGenFunc4E74(__return_address, n4_4, n63_1, 19, (unsigned __int8 *)2, 1, v30, v33, &v43, buf, 1, 1, 0); /*0xffc21668*/
      KtiFuncF4E(&v35); /*0xffc2166f*/
      v31 = KtiFuncF75((int)__return_address, v36, SHIDWORD(v36), v35, SHIDWORD(v35), 0x3E8u); /*0xffc2168c*/
      DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step4 latency = %d ms\n", v31); /*0xffc216a5*/
    }
    if ( v9 ) /*0xffc216af*/
      goto LABEL_20; /*0xffc216af*/
    KtiFunc4541((int)__return_address, 0xB9u, 5u, 0); /*0xffc216ba*/
    AutoGenFunc5973(__return_address, n6aa, n63_1, n10_1, 2u, &v32); /*0xffc216cd*/
  }
  LOBYTE(n6a_2) = n6aa; /*0xffc2170a*/
  AutoGenFunc6866(__return_address, n6a_2, n63_1, n10_1, 1, v40); /*0xffc21719*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nMemTestScram TestType %d Ends\n", n10_2); /*0xffc21735*/
  return v9; /*0xffc2173f*/
}

// Function: AutoGenFunc174A @ 0xffc2174a (0xd3 bytes)
// Index: 98/2560

int __cdecl AutoGenFunc174A(unsigned __int8 *__return_address, int n4, int a3)
{
  int v3; // edx
  int v4; // ecx
  int v5; // esi
  _WORD v7[2]; // [esp+10h] [ebp-94h] BYREF
  unsigned __int8 buf[16]; // [esp+14h] [ebp-90h] BYREF
  int v9; // [esp+24h] [ebp-80h] BYREF
  int v10; // [esp+28h] [ebp-7Ch]

  DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, "MemInitOpt Starts\n"); /*0xffc21774*/
  v10 = 0; /*0xffc21783*/
  v9 = 0; /*0xffc21787*/
  memset_save_flags(buf, 0, 0x10u); /*0xffc2178b*/
  v7[0] = 0; /*0xffc21794*/
  DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "patternQW[0] = 0x%08x%08x\n", v10, v9); /*0xffc217ab*/
  KtiFunc4541((int)__return_address, 0xB9u, 1u, 0); /*0xffc217be*/
  LOBYTE(v3) = n4; /*0xffc217c6*/
  v5 = AutoGenFunc4E74(__return_address, v3, a3, 9, 0, 1, v4, v7, &v9, buf, 1, 1, 0); /*0xffc21803*/
  DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, "MemInitOpt Ends\n"); /*0xffc21808*/
  return v5; /*0xffc21812*/
}

// Function: AutoGenFunc181D @ 0xffc2181d (0x772 bytes)
// Index: 99/2560

int __fastcall AutoGenFunc181D(
        unsigned __int8 *__return_address,
        int a2,
        unsigned __int8 n63,
        int n16,
        unsigned __int8 n8,
        char a6,
        char a7)
{
  int n8_1; // ebp
  int v8; // edi
  char v9; // bl
  int v11; // edx
  int n6a; // edx
  unsigned __int8 n8_3; // bl
  int n16843009; // ebp
  int n16843009_1; // edx
  unsigned int n8_4; // ecx
  unsigned int n8_6; // eax
  unsigned int v18; // ebx
  int v19; // edx
  unsigned int v20; // eax
  int v21; // ebx
  int n4; // edx
  int v23; // ecx
  int v24; // eax
  int v25; // ecx
  int n4_1; // edx
  int v27; // eax
  int v28; // eax
  int v29; // ecx
  int n4_2; // edx
  int v31; // eax
  int v32; // eax
  int n4_3; // edx
  int v34; // ecx
  int v35; // eax
  int v36; // ecx
  int n4_4; // edx
  int v38; // ecx
  int v39; // eax
  int v40; // ecx
  int n4_5; // edx
  int v42; // eax
  bool v43; // zf
  unsigned int n8_5; // ebp
  _WORD v46[3]; // [esp+18h] [ebp-164h] BYREF
  int n0x2... [14380 chars total]

// Function: AutoGenFn_FFC21F8F @ 0xffc21f8f (0x794 bytes)
// Index: 100/2560

// positive sp value has been detected, the output may be wrong!
int __fastcall AutoGenFn_FFC21F8F(unsigned __int8 *__return_address, int a2)
{
  int v3; // edi
  int v5; // edx
  int n63; // ebp
  int n6a; // edx
  unsigned int n8; // eax
  int v9; // edx
  char i; // al
  int n6a_1; // edx
  int n4; // edx
  int v13; // ecx
  int v14; // eax
  int v15; // ecx
  int n4_1; // edx
  int v17; // eax
  int v18; // ecx
  int n4_2; // edx
  int v20; // ecx
  int v21; // eax
  int n4_3; // edx
  int v23; // ecx
  int v24; // eax
  int n4_4; // edx
  int v26; // ecx
  int v27; // eax
  int v28; // ecx
  int n4_5; // edx
  int v30; // ecx
  int v31; // eax
  int n4_6; // edx
  int v33; // ecx
  int v34; // eax
  int n4_7; // edx
  int v36; // eax
  int v37; // ecx
  int n4_8; // edx
  int v39; // ecx
  int v40; // eax
  int v42; // [esp+4h] [ebp-154h] BYREF
  __int64 v43; // [esp+8h] [ebp-150h] BYREF
  __int64 v44; // [esp+10h] [ebp-148h] BYREF
  unsigned int n8_1; // [esp+18h] [ebp-140h]
  ch... [10724 chars total]

// Function: AutoGenFn_FFC22723 @ 0xffc22723 (0x391 bytes)
// Index: 101/2560

// positive sp value has been detected, the output may be wrong!
int __fastcall AutoGenFn_FFC22723(unsigned __int8 *__return_address, char n4)
{
  int v4; // edx
  int n6a_1; // edx
  unsigned int n0x40; // ebp
  int n6a_2; // edx
  int v8; // ecx
  unsigned __int8 i; // bl
  int n4_1; // edx
  int v11; // ecx
  int v12; // eax
  int v13; // ecx
  int n4_2; // edx
  int v15; // ecx
  int v16; // eax
  int v18; // [esp+4h] [ebp-E0h] BYREF
  __int16 v19; // [esp+8h] [ebp-DCh] BYREF
  int v20; // [esp+Ch] [ebp-D8h]
  int v21; // [esp+10h] [ebp-D4h]
  int n63_1; // [esp+14h] [ebp-D0h]
  unsigned int n0xA; // [esp+18h] [ebp-CCh]
  __int64 v24; // [esp+1Ch] [ebp-C8h] BYREF
  __int64 v25; // [esp+24h] [ebp-C0h] BYREF
  int v26; // [esp+2Ch] [ebp-B8h]
  int n6a; // [esp+30h] [ebp-B4h]
  int n63; // [esp+34h] [ebp-B0h] BYREF
  int v29; // [esp+44h] [ebp-A0h] BYREF
  int v30; // [esp+48h] [ebp-9Ch]
  int v31; // [esp+4Ch] [ebp-98h]
  int n6a_3; // [esp+50h] [ebp-94h]
  char v33[16]; // [esp+B4h] [ebp-30h] BYREF
  char v34[4]; // [esp+C4h] [ebp-20h] BYREF
  _BYTE v35[12]; // [esp+C8h] [ebp-1Ch] BYREF

  n63_1 = 0; /*0xffc22749*/
  n0xA = 0; /*0xffc22754*/
  v20 = 0; /*0xffc22758*/
  v21 = 0; /*0xffc2275c*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nMemTestGNDB%d Starts\n", 64); /*0xffc22760*/
  LOBYTE(v4) = n4; /*0xffc2276c*/
  AutoGenFunc1211((int)__return_address, v4, v35); /*0xffc22771*/
  v18 = v35[0]; /*0xffc22788*/
  LOBYTE(n6a_1) = n4; /*0xffc2278c*/
  AutoGenFunc6866(__return_address, n6a_1, v35[0], 6u, 0, v33); /*0xffc22796*/
  n0x40 = 0; /*0xffc2279e*/
  while ( 2 )
  {
    v8 = RmtFunc6EA8(1, n0x40); /*0xffc227a0*/
    n6a = n6a_2; /*0xffc227ac*/
    v26 = v8; /*0xffc227b3*/
    for ( i = 0; i < 4u; ++i )
    {
      switch ( i ) /*0xffc227bf*/
      {
        case 0u: /*0xffc227bf*/
          n6a_3 = n6a_2; /*0xffc22812*/
          v31 = v8; /*0xffc22816*/
          goto LABEL_11; /*0xffc22816*/
        case 1u: /*0xffc227bf*/
          v30 = -1; /*0xffc227fe*/
          v29 = -1; /*0xffc22803*/
          n6a_3 = n6a_2; /*0xffc22808*/
          v31 = v8; /*0xffc2280c*/
          break; /*0xffc22810*/
        case 2u: /*0xffc227bf*/
          n6a_3 = ~n6a_2; /*0xffc227f0*/
          v31 = ~v8; /*0xffc227f8*/
LABEL_11:
          v30 = 0; /*0xffc2281a*/
          v29 = 0; /*0xffc2281f*/
          break; /*0xffc2281f*/
        case 3u: /*0xffc227bf*/
          v30 = -1; /*0xffc227d0*/
          v29 = -1; /*0xffc227d7*/
          n6a_3 = ~n6a_2; /*0xffc227de*/
          v31 = ~v8; /*0xffc227e6*/
          break;
      }
      memset_save_flags(&n63, 0, 0x10u); /*0xffc22824*/
      BYTE1(n63) = 1; /*0xffc22835*/
      v19 = 0; /*0xffc2283a*/
      DebugPrint( /*0xffc2285f*/
        (int)__return_address,
        2,
        255,
        255,
        255,
        255,
        255,
        255,
        "patternQW[0] = 0x%08x%08x, patternQW[1] = 0x%08x%08x\n",
        v30,
        v29,
        n6a_3,
        v31);
      HIBYTE(v18) = 1; /*0xffc22867*/
      n0xA = 0; /*0xffc22872*/
      if ( AutoGenFunc128A((int)__return_address, 1, 0) )
      {
        while ( 1 ) /*0xffc2288a*/
        {
          ++n0xA; /*0xffc2288a*/
          KtiFunc4541((int)__return_address, 0xB9u, 1u, n0x40 + i); /*0xffc22897*/
          KtiFuncF4E(&v25); /*0xffc228a1*/
          LOBYTE(n4_1) = v21; /*0xffc228a9*/
          v20 = AutoGenFunc4E74( /*0xffc228d7*/
                  __return_address,
                  n4_1,
                  n63_1,
                  6,
                  0,
                  1,
                  v11,
                  &v19,
                  &v29,
                  (unsigned __int8 *)&n63,
                  16,
                  2,
                  0);
          KtiFuncF4E(&v24); /*0xffc228e0*/
          v12 = KtiFuncF75((int)__return_address, v25, SHIDWORD(v25), v24, SHIDWORD(v24), 0x3E8u); /*0xffc228fd*/
          DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step1 latency = %d ms\n", v12); /*0xffc22916*/
          if ( v20 ) /*0xffc22923*/
            break; /*0xffc22923*/
          v20 = AutoGenFunc6F36((int)__return_address, v21, v13, 6); /*0xffc22937*/
          if ( v20 ) /*0xffc2293f*/
            break; /*0xffc2293f*/
          KtiFunc4541((int)__return_address, 0xB9u, 2u, n0x40 + i); /*0xffc2294e*/
          KtiFuncF4E(&v25); /*0xffc22958*/
          LOBYTE(n4_2) = v21; /*0xffc22960*/
          v20 = AutoGenFunc4E74( /*0xffc2298e*/
                  __return_address,
                  n4_2,
                  n63_1,
                  6,
                  (unsigned __int8 *)2,
                  1,
                  v15,
                  &v19,
                  &v29,
                  (unsigned __int8 *)&n63,
                  16,
                  2,
                  0);
          KtiFuncF4E(&v24); /*0xffc22997*/
          v16 = KtiFuncF75((int)__return_address, v25, SHIDWORD(v25), v24, SHIDWORD(v24), 0x3E8u); /*0xffc229b4*/
          DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step2 latency = %d ms\n", v16); /*0xffc229cd*/
          if ( v20 ) /*0xffc229da*/
            break; /*0xffc229da*/
          KtiFunc4541((int)__return_address, 0xB9u, 3u, n0x40 + i); /*0xffc229e5*/
          AutoGenFunc5973(__return_address, v21, n63_1, 6, 2u, (_BYTE *)&v18 + 3); /*0xffc229fc*/
          if ( !AutoGenFunc128A((int)__return_address, SHIBYTE(v18), n0xA) ) /*0xffc22a0c*/
            goto LABEL_17; /*0xffc22a16*/
        }
        DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "MemTestGNDB%d: Test Failed!\n", 64);
        goto LABEL_21; /*0xffc22a57*/
      }
LABEL_17:
      v8 = v26; /*0xffc22a21*/
      n6a_2 = n6a; /*0xffc22a27*/
    }
    n0x40 += 64; /*0xffc22a34*/
    if ( n0x40 < 0x40 ) /*0xffc22a3a*/
      continue; /*0xffc22a3a*/
    break;
  }
LABEL_21:
  LOBYTE(n6a_2) = v21; /*0xffc22a5f*/
  AutoGenFunc6866(__return_address, n6a_2, n63_1, 6u, 1, v34); /*0xffc22a75*/
  if ( __return_address[239] ) /*0xffc22a7d*/
    AutoGenFunc1187((int)__return_address); /*0xffc22a88*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nMemTestGNDB%d Ends\n", 64); /*0xffc22a9d*/
  return v24; /*0xffc22aa9*/
}

// Function: AutoGenFn_FFC22AB4 @ 0xffc22ab4 (0x5fc bytes)
// Index: 102/2560

// positive sp value has been detected, the output may be wrong!
int __fastcall AutoGenFn_FFC22AB4(unsigned __int8 *__return_address, int a2)
{
  int v3; // edi
  int v5; // edx
  int n6a; // edx
  int n5; // ebp
  int v8; // eax
  int v9; // ecx
  char i; // al
  int n6a_1; // edx
  int n4; // edx
  int v13; // ecx
  int v14; // eax
  int v15; // ecx
  int n4_1; // edx
  int v17; // eax
  int v18; // ecx
  int n4_2; // edx
  int v20; // eax
  int v21; // ecx
  int n4_3; // edx
  int v23; // eax
  int v24; // ecx
  int n4_4; // edx
  int v26; // eax
  int v27; // ecx
  int n4_5; // edx
  int v29; // ecx
  int v30; // eax
  int v32; // [esp+4h] [ebp-150h] BYREF
  int v33; // [esp+8h] [ebp-14Ch] BYREF
  __int64 v34; // [esp+Ch] [ebp-148h] BYREF
  __int64 v35; // [esp+14h] [ebp-140h] BYREF
  int n63; // [esp+1Ch] [ebp-138h]
  unsigned int n0xA; // [esp+20h] [ebp-134h]
  unsigned __int8 buf[4]; // [esp+24h] [ebp-130h] BYREF
  int v39; // [esp+34h] [ebp-120h] BYREF
  int v40; // [esp+38h] [... [8299 chars total]

// Function: AutoGenFn_FFC230B0 @ 0xffc230b0 (0x487 bytes)
// Index: 103/2560

// positive sp value has been detected, the output may be wrong!
int __fastcall AutoGenFn_FFC230B0(unsigned __int8 *__return_address, char n4)
{
  int v3; // edi
  int v5; // edx
  int n6a; // edx
  int n6a_1; // edx
  unsigned int n8; // ebp
  unsigned int i; // ebx
  int v10; // edx
  unsigned __int16 v11; // ax
  int n4_1; // edx
  int v13; // eax
  int v14; // ecx
  int n4_2; // edx
  int v16; // ecx
  int v17; // eax
  int n4_3; // edx
  int v19; // ecx
  int v20; // eax
  int v21; // ecx
  int n4_4; // edx
  int v23; // eax
  bool v24; // zf
  char v26; // [esp+Bh] [ebp-151h] BYREF
  int v27; // [esp+Ch] [ebp-150h] BYREF
  int v28; // [esp+10h] [ebp-14Ch]
  int n63; // [esp+14h] [ebp-148h]
  __int64 v30; // [esp+18h] [ebp-144h] BYREF
  __int64 v31; // [esp+20h] [ebp-13Ch] BYREF
  char v32[4]; // [esp+28h] [ebp-134h]
  _WORD buf_1[2]; // [esp+2Ch] [ebp-130h] BYREF
  int v34; // [esp+3Ch] [ebp-120h] BYREF
  int buf; // [esp+4Ch] [ebp-110h] BYREF
  int v36; // [esp+50h] [ebp-10Ch]
  int v37; // [esp+CCh] [ebp-90h] BYREF
  int v38; // [esp+D0h] [ebp-8Ch]
  _BYTE v39[28]; // [esp+140h] [ebp-1Ch] BYREF

  v3 = 0; /*0xffc230c3*/
  v28 = 0; /*0xffc230c5*/
  n63 = 0; /*0xffc230c9*/
  v26 = 0; /*0xffc230cf*/
  v27 = 0; /*0xffc230d3*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nMemTestTWR Starts\n"); /*0xffc230e9*/
  LOBYTE(v5) = n4; /*0xffc230f8*/
  AutoGenFunc1211((int)__return_address, v5, v39); /*0xffc230fd*/
  LOBYTE(n6a) = n4; /*0xffc2310a*/
  AutoGenFunc6866(__return_address, n6a, v39[0], 0xBu, 0, (char *)buf_1); /*0xffc2311c*/
  n8 = 0; /*0xffc23124*/
  while ( 2 )
  {
    for ( i = 0; i < 8; ++i )
    {
      if ( i + n8 >= 8 ) /*0xffc2312e*/
        break; /*0xffc2312e*/
      buf = RmtFunc6EA8(0x101010101010101LL, i); /*0xffc23147*/
      v36 = v10; /*0xffc2314d*/
      v37 = ~buf; /*0xffc23151*/
      v38 = ~v10; /*0xffc2315e*/
      memset_save_flags(buf_1, 0, 0x10u); /*0xffc2316a*/
      buf_1[0] = 257; /*0xffc23172*/
      LOWORD(v27) = 256; /*0xffc2317e*/
      DebugPrint( /*0xffc231a9*/
        (int)__return_address,
        2,
        255,
        255,
        255,
        255,
        255,
        255,
        "patternQW[0] = 0x%08x%08x, inverseQW[0] = 0x%08x%08x\n",
        v36,
        buf,
        v38,
        v37);
      *(_DWORD *)v32 = 0; /*0xffc231ae*/
      v26 = 1; /*0xffc231b8*/
      if ( AutoGenFunc128A((int)__return_address, 1, 0) )
      {
        v11 = i + n8; /*0xffc231cf*/
        while ( 1 ) /*0xffc231d2*/
        {
          ++*(_DWORD *)v32; /*0xffc231d2*/
          KtiFunc4541((int)__return_address, 0xB9u, 1u, v11); /*0xffc231df*/
          KtiFuncF4E(&v31); /*0xffc231e9*/
          LOBYTE(n4_1) = v28; /*0xffc231f1*/
          v3 = AutoGenFunc4E74(__return_address, n4_1, n63, 11, 0, 0, 0, &v27, &buf, (unsigned __int8 *)buf_1, 1, 1, 0); /*0xffc2321e*/
          KtiFuncF4E(&v30); /*0xffc23225*/
          v13 = KtiFuncF75((int)__return_address, v31, SHIDWORD(v31), v30, SHIDWORD(v30), 0x3E8u); /*0xffc23242*/
          DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step1 latency = %d ms\n", v13); /*0xffc2325b*/
          if ( v3 ) /*0xffc23265*/
            break; /*0xffc23265*/
          v3 = AutoGenFunc6F36((int)__return_address, v28, v14, 11); /*0xffc23279*/
          if ( v3 ) /*0xffc2327f*/
            break; /*0xffc2327f*/
          KtiFunc4541((int)__return_address, 0xB9u, 2u, i + n8); /*0xffc23291*/
          KtiFuncF4E(&v31); /*0xffc2329b*/
          LOBYTE(n4_2) = v28; /*0xffc232a3*/
          v3 = AutoGenFunc4E74( /*0xffc232d0*/
                 __return_address,
                 n4_2,
                 n63,
                 11,
                 (unsigned __int8 *)2,
                 1,
                 v16,
                 &v27,
                 &buf,
                 (unsigned __int8 *)buf_1,
                 1,
                 1,
                 0);
          KtiFuncF4E(&v30); /*0xffc232d7*/
          v17 = KtiFuncF75((int)__return_address, v31, SHIDWORD(v31), v30, SHIDWORD(v30), 0x3E8u); /*0xffc232f4*/
          DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step2 latency = %d ms\n", v17); /*0xffc2330d*/
          if ( v3 ) /*0xffc23317*/
            break; /*0xffc23317*/
          KtiFunc4541((int)__return_address, 0xB9u, 3u, i + n8); /*0xffc23329*/
          KtiFuncF4E(&v31); /*0xffc23333*/
          LOBYTE(n4_3) = v28; /*0xffc2333b*/
          v3 = AutoGenFunc4E74( /*0xffc2336a*/
                 __return_address,
                 n4_3,
                 n63,
                 11,
                 0,
                 0,
                 v19,
                 &v27,
                 &v37,
                 (unsigned __int8 *)buf_1,
                 1,
                 1,
                 1);
          KtiFuncF4E(&v30); /*0xffc23371*/
          v20 = KtiFuncF75((int)__return_address, v31, SHIDWORD(v31), v30, SHIDWORD(v30), 0x3E8u); /*0xffc2338e*/
          DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step3 latency = %d ms\n", v20); /*0xffc233a7*/
          if ( v3 ) /*0xffc233b1*/
            break; /*0xffc233b1*/
          v3 = AutoGenFunc6F36((int)__return_address, v28, v21, 11); /*0xffc233c5*/
          if ( v3 ) /*0xffc233cb*/
            break; /*0xffc233cb*/
          KtiFunc4541((int)__return_address, 0xB9u, 4u, i + n8); /*0xffc233dd*/
          KtiFuncF4E(&v31); /*0xffc233e7*/
          LOBYTE(n4_4) = v28; /*0xffc233ef*/
          v3 = AutoGenFunc4E74( /*0xffc2341f*/
                 __return_address,
                 n4_4,
                 n63,
                 11,
                 (unsigned __int8 *)2,
                 1,
                 1,
                 &v27,
                 &v37,
                 (unsigned __int8 *)buf_1,
                 1,
                 1,
                 1);
          KtiFuncF4E(&v30); /*0xffc23426*/
          v23 = KtiFuncF75((int)__return_address, v31, SHIDWORD(v31), v30, SHIDWORD(v30), 0x3E8u); /*0xffc23443*/
          DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step4 latency = %d ms\n", v23); /*0xffc2345c*/
          if ( v3 ) /*0xffc23466*/
            break; /*0xffc23466*/
          KtiFunc4541((int)__return_address, 0xB9u, 5u, i + n8); /*0xffc23478*/
          AutoGenFunc5973(__return_address, v28, n63, 11, 2u, &v26); /*0xffc2348f*/
          v24 = AutoGenFunc128A((int)__return_address, v26, *(unsigned int *)v32) == 0; /*0xffc234a6*/
          v11 = i + n8; /*0xffc234a8*/
          if ( v24 ) /*0xffc234ab*/
            goto LABEL_13; /*0xffc234ab*/
        }
        DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "MemTestTWR: Test Failed!\n");
        goto LABEL_15; /*0xffc23535*/
      }
LABEL_13:
      ;
    }
    n8 += 8; /*0xffc234bb*/
    if ( n8 < 8 ) /*0xffc234c1*/
      continue; /*0xffc234c1*/
    break;
  }
LABEL_15:
  LOBYTE(n6a_1) = v28; /*0xffc234cc*/
  AutoGenFunc6866(__return_address, n6a_1, n63, 0xBu, 1, (char *)&v34); /*0xffc234df*/
  if ( __return_address[239] ) /*0xffc234e7*/
    AutoGenFunc1187((int)__return_address); /*0xffc234f2*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nMemTestTWR Ends\n"); /*0xffc23505*/
  return v3; /*0xffc2350f*/
}

// Function: AutoGenFn_FFC23537 @ 0xffc23537 (0x316 bytes)
// Index: 104/2560

// positive sp value has been detected, the output may be wrong!
int __fastcall AutoGenFn_FFC23537(unsigned __int8 *__return_address, char n4)
{
  int v3; // ebp
  int v5; // edx
  int n6a; // edx
  int v7; // ebx
  unsigned int i; // edi
  unsigned int n0xA; // edi
  char j; // al
  int n6a_1; // edx
  int n4_1; // edx
  int v13; // ecx
  int v14; // eax
  int v15; // ecx
  int n4_2; // edx
  int v17; // ecx
  int v18; // eax
  int v20; // [esp-18h] [ebp-E8h]
  int v21; // [esp-14h] [ebp-E4h]
  char v22; // [esp+3h] [ebp-CDh] BYREF
  int v23; // [esp+4h] [ebp-CCh] BYREF
  int v24; // [esp+8h] [ebp-C8h]
  int n63; // [esp+Ch] [ebp-C4h]
  __int64 v26; // [esp+10h] [ebp-C0h] BYREF
  __int64 v27; // [esp+18h] [ebp-B8h] BYREF
  char buf_1[4]; // [esp+20h] [ebp-B0h] BYREF
  int v29; // [esp+30h] [ebp-A0h] BYREF
  _DWORD buf[4]; // [esp+40h] [ebp-90h] BYREF
  _BYTE v31[32]; // [esp+80h] [ebp-50h]
  _BYTE v32[28]; // [esp+B4h] [ebp-1Ch] BYREF

  v3 = 0; /*0xffc2354a*/
  v24 = 0; /*0xffc2354c*/
  n63 = 0; /*0xffc23550*/
  v22 = 0; /*0xffc23556*/
  v23 = 0; /*0xffc2355a*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nMemTestDataRetention Starts\n"); /*0xffc23570*/
  LOBYTE(v5) = n4; /*0xffc2357f*/
  AutoGenFunc1211((int)__return_address, v5, v32); /*0xffc23584*/
  LOBYTE(n6a) = n4; /*0xffc23591*/
  AutoGenFunc6866(__return_address, n6a, v32[0], 0xCu, 0, buf_1); /*0xffc235a3*/
  v7 = 0; /*0xffc235ab*/
  while ( 2 )
  {
    if ( v7 ) /*0xffc235b2*/
      AutoGenFunc8E72((int)buf, byte_FFD6393C, 128); /*0xffc235c3*/
    else
      AutoGenFunc8E72( /*0xffc235d4*/
        (int)buf,
        aUuuuuuuuuuuuuu, // "UUUUUUUUUUUUUUUU"
        128);
    memset_save_flags(buf_1, 0, 0x10u); /*0xffc235e5*/
    LOWORD(v23) = 0; /*0xffc235ed*/
    for ( i = 0; i < 8; ++i ) /*0xffc235f4*/
    {
      v21 = buf[2 * i]; /*0xffc235f6*/
      v20 = buf[2 * i + 1]; /*0xffc235fe*/
      *(_DWORD *)&v31[8 * i + 4] = ~v20; /*0xffc23605*/
      *(_DWORD *)&v31[8 * i] = ~buf[2 * i]; /*0xffc23617*/
      DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "patternQW[%d] = 0x%08x%08x\n", i, v20, v21); /*0xffc2362c*/
    }
    n0xA = 0; /*0xffc2363a*/
    v22 = 1; /*0xffc2363c*/
    for ( j = AutoGenFunc128A((int)__return_address, 1, 0); j; j = AutoGenFunc128A((int)__return_address, v22, n0xA) )
    {
      ++n0xA; /*0xffc2365a*/
      KtiFunc4541((int)__return_address, 0xB9u, 1u, v7); /*0xffc2365b*/
      KtiFuncF4E(&v27); /*0xffc23665*/
      LOBYTE(n4_1) = v24; /*0xffc2366d*/
      v3 = AutoGenFunc4E74(__return_address, n4_1, n63, 12, 0, 1, v13, &v23, buf, (unsigned __int8 *)buf_1, 2, 16, 0); /*0xffc2369b*/
      KtiFuncF4E(&v26); /*0xffc236a2*/
      v14 = KtiFuncF75((int)__return_address, v27, SHIDWORD(v27), v26, SHIDWORD(v26), 0x3E8u); /*0xffc236bf*/
      DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step1 latency = %d ms\n", v14); /*0xffc236d8*/
      if ( v3 ) /*0xffc236e2*/
        goto LABEL_17; /*0xffc236e2*/
      v3 = AutoGenFunc6F36((int)__return_address, v24, v15, 12); /*0xffc236f6*/
      if ( v3
        || (KtiFunc4541((int)__return_address, 0xB9u, 2u, v7),
            KtiFuncF4E(&v27),
            LOBYTE(n4_2) = v24,
            v3 = AutoGenFunc4E74(
                   __return_address,
                   n4_2,
                   n63,
                   12,
                   (unsigned __int8 *)2,
                   1,
                   v17,
                   &v23,
                   buf,
                   (unsigned __int8 *)buf_1,
                   2,
                   16,
                   0),
            KtiFuncF4E(&v26),
            v18 = KtiFuncF75((int)__return_address, v27, SHIDWORD(v27), v26, SHIDWORD(v26), 0x3E8u),
            DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step2 latency = %d ms\n", v18),
            v3) )
      {
LABEL_17:
        DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "MemTestDataRetention: Test Failed!\n");
        goto LABEL_14; /*0xffc2384b*/
      }
      KtiFunc4541((int)__return_address, 0xB9u, 3u, v7); /*0xffc237a0*/
      AutoGenFunc5973(__return_address, v24, n63, 12, 2u, &v22); /*0xffc237b7*/
    }
    if ( (unsigned int)++v7 < 2 ) /*0xffc237d7*/
      continue; /*0xffc237d7*/
    break;
  }
LABEL_14:
  LOBYTE(n6a_1) = v24; /*0xffc237e2*/
  AutoGenFunc6866(__return_address, n6a_1, n63, 0xCu, 1, (char *)&v29); /*0xffc237f5*/
  if ( __return_address[239] ) /*0xffc237fd*/
    AutoGenFunc1187((int)__return_address); /*0xffc23808*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nMemTestDataRetention Ends\n"); /*0xffc2381b*/
  return v3; /*0xffc23825*/
}

// Function: DebugLogPrint_1 @ 0xffc2384d (0x4c9 bytes)
// Index: 105/2560

int __fastcall DebugLogPrint_1(unsigned __int8 *__return_address, int n6a, unsigned __int8 n2, int n16, _BYTE *a5)
{
  unsigned __int8 n4_6; // al
  int v8; // eax
  int v9; // edx
  int n4; // edx
  int v11; // edi
  int v12; // eax
  int n4_1; // edx
  int v14; // eax
  int n4_2; // edx
  int v16; // eax
  int n4_3; // edx
  int v18; // ecx
  int v19; // eax
  int n4_4; // edx
  int v21; // eax
  int n4_5; // edx
  int v23; // eax
  _WORD v25[2]; // [esp+14h] [ebp-12Ch] BYREF
  unsigned __int8 n4_7; // [esp+1Bh] [ebp-125h]
  __int64 v27; // [esp+1Ch] [ebp-124h] BYREF
  __int64 v28; // [esp+24h] [ebp-11Ch] BYREF
  int n63; // [esp+2Ch] [ebp-114h]
  int buf; // [esp+30h] [ebp-110h] BYREF
  int v31; // [esp+40h] [ebp-100h] BYREF
  int v32; // [esp+44h] [ebp-FCh]
  int n253639800_1; // [esp+C0h] [ebp-80h] BYREF
  int n253639800; // [esp+C4h] [ebp-7Ch]

  v28 = 0; /*0xffc2385e*/
  v27 = 0; /*0xffc23868*/
  memset_save_flags(&buf, 0, 0x10u); /*0xffc23875*/
  DebugPrint((int)__return_address, 2, n6a, 255, 255, 255, 255, 255, "Micron Diagnostic RCC Starts\n"); /*0xffc23890*/
  v25[0] = 256; /*0xffc23898*/
  v32 = -253639801; /*0xffc238a9*/
  v31 = -253639801; /*0xffc238ad*/
  n253639800 = 253639800; /*0xffc238c3*/
  n253639800_1 = 253639800; /*0xffc238ca*/
  DebugPrint( /*0xffc238d1*/
    (int)__return_address,
    2,
    255,
    255,
    255,
    255,
    255,
    255,
    "patternQW[0] = 0x%08x%08x, inverseQW[0] = 0x%08x%08x\n",
    -253639801,
    -253639801,
    253639800,
    253639800);
  n4_6 = 0; /*0xffc238e0*/
  LOWORD(buf) = 257; /*0xffc238e2*/
  n4_7 = 0; /*0xffc238e9*/
  while ( 1 ) /*0xffc238fc*/
  {
    v8 = RmtFunc6EA8(0xF0E1C387F0E1C387uLL, 2 * n4_6); /*0xffc238fc*/
    v32 = v9; /*0xffc23904*/
    v31 = v8; /*0xffc23908*/
    n253639800 = ~v9; /*0xffc23910*/
    n253639800_1 = ~v8; /*0xffc23917*/
    KtiFunc4541((int)__return_address, 0xB9u, 1u, 0); /*0xffc23928*/
    KtiFuncF4E(&v28); /*0xffc23932*/
    n63 = n2; /*0xffc23946*/
    LOBYTE(n4) = n6a; /*0xffc2394a*/
    v11 = AutoGenFunc4E74(__return_address, n4, n2, n16, 0, 0, (int)v25, v25, &v31, (unsigned __int8 *)&buf, 1, 1, 1); /*0xffc2396e*/
    KtiFuncF4E(&v27); /*0xffc23975*/
    v12 = KtiFuncF75((int)__return_address, v28, SHIDWORD(v28), v27, SHIDWORD(v27), 0x3E8u); /*0xffc23992*/
    DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step1 latency = %d ms\n", v12); /*0xffc239ab*/
    if ( v11 ) /*0xffc239b5*/
      break; /*0xffc239b5*/
    KtiFunc4541((int)__return_address, 0xB9u, 2u, 0); /*0xffc239c4*/
    KtiFuncF4E(&v28); /*0xffc239ce*/
    LOBYTE(n4_1) = n6a; /*0xffc239dc*/
    v11 = AutoGenFunc4E74( /*0xffc23a00*/
            __return_address,
            n4_1,
            n63,
            n16,
            (unsigned __int8 *)2,
            1,
            1,
            v25,
            &v31,
            (unsigned __int8 *)&buf,
            1,
            1,
            1);
    KtiFuncF4E(&v27); /*0xffc23a07*/
    v14 = KtiFuncF75((int)__return_address, v28, SHIDWORD(v28), v27, SHIDWORD(v27), 0x3E8u); /*0xffc23a24*/
    DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step2 latency = %d ms\n", v14); /*0xffc23a3d*/
    if ( v11 ) /*0xffc23a47*/
      break; /*0xffc23a47*/
    KtiFunc4541((int)__return_address, 0xB9u, 3u, 0); /*0xffc23a56*/
    KtiFuncF4E(&v28); /*0xffc23a60*/
    LOBYTE(n4_2) = n6a; /*0xffc23a6e*/
    v11 = AutoGenFunc4E74( /*0xffc23a92*/
            __return_address,
            n4_2,
            n63,
            n16,
            (unsigned __int8 *)2,
            1,
            1,
            v25,
            &v31,
            (unsigned __int8 *)&buf,
            1,
            1,
            1);
    KtiFuncF4E(&v27); /*0xffc23a99*/
    v16 = KtiFuncF75((int)__return_address, v28, SHIDWORD(v28), v27, SHIDWORD(v27), 0x3E8u); /*0xffc23ab6*/
    DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step3 latency = %d ms\n", v16); /*0xffc23acf*/
    if ( v11 ) /*0xffc23ad9*/
      break; /*0xffc23ad9*/
    KtiFunc4541((int)__return_address, 0xB9u, 4u, 0); /*0xffc23ae8*/
    KtiFuncF4E(&v28); /*0xffc23af2*/
    LOBYTE(n4_3) = n6a; /*0xffc23afe*/
    v11 = AutoGenFunc4E74( /*0xffc23b26*/
            __return_address,
            n4_3,
            n63,
            n16,
            0,
            0,
            v18,
            v25,
            &n253639800_1,
            (unsigned __int8 *)&buf,
            1,
            1,
            1);
    KtiFuncF4E(&v27); /*0xffc23b2d*/
    v19 = KtiFuncF75((int)__return_address, v28, SHIDWORD(v28), v27, SHIDWORD(v27), 0x3E8u); /*0xffc23b4a*/
    DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step4 latency = %d ms\n", v19); /*0xffc23b63*/
    if ( v11 ) /*0xffc23b6d*/
      break; /*0xffc23b6d*/
    KtiFunc4541((int)__return_address, 0xB9u, 5u, 0); /*0xffc23b7c*/
    KtiFuncF4E(&v28); /*0xffc23b86*/
    LOBYTE(n4_4) = n6a; /*0xffc23b94*/
    v11 = AutoGenFunc4E74( /*0xffc23bbb*/
            __return_address,
            n4_4,
            n63,
            n16,
            (unsigned __int8 *)2,
            1,
            1,
            v25,
            &n253639800_1,
            (unsigned __int8 *)&buf,
            1,
            1,
            1);
    KtiFuncF4E(&v27); /*0xffc23bc2*/
    v21 = KtiFuncF75((int)__return_address, v28, SHIDWORD(v28), v27, SHIDWORD(v27), 0x3E8u); /*0xffc23bdf*/
    DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step5 latency = %d ms\n", v21); /*0xffc23bf8*/
    if ( v11 ) /*0xffc23c02*/
      break; /*0xffc23c02*/
    KtiFunc4541((int)__return_address, 0xB9u, 6u, 0); /*0xffc23c11*/
    KtiFuncF4E(&v28); /*0xffc23c1b*/
    LOBYTE(n4_5) = n6a; /*0xffc23c29*/
    v11 = AutoGenFunc4E74( /*0xffc23c50*/
            __return_address,
            n4_5,
            n63,
            n16,
            (unsigned __int8 *)2,
            1,
            1,
            v25,
            &n253639800_1,
            (unsigned __int8 *)&buf,
            1,
            1,
            1);
    KtiFuncF4E(&v27); /*0xffc23c57*/
    v23 = KtiFuncF75((int)__return_address, v28, SHIDWORD(v28), v27, SHIDWORD(v27), 0x3E8u); /*0xffc23c74*/
    DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Step6 latency = %d ms\n", v23); /*0xffc23c8d*/
    if ( v11 ) /*0xffc23c97*/
      break; /*0xffc23c97*/
    KtiFunc4541((int)__return_address, 0xB9u, 7u, 0); /*0xffc23ca2*/
    AutoGenFunc5973(__return_address, n6a, n63, n16, 2u, a5); /*0xffc23cb7*/
    n4_6 = n4_7 + 1; /*0xffc23cc3*/
    n4_7 = n4_6; /*0xffc23cc5*/
    if ( n4_6 >= 4u ) /*0xffc23ccb*/
      goto LABEL_11; /*0xffc23ccb*/
  }
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "RCC MemTest Failed!\n"); /*0xffc23ceb*/
LABEL_11:
  DebugPrint((int)__return_address, 3, n6a, 255, 255, 255, 255, 255, "Micron Diagnostic RCC Ends\n"); /*0xffc23cf3*/
  return v11; /*0xffc23d0b*/
}

// Function: AutoGenFn_FFC23D16 @ 0xffc23d16 (0x172 bytes)
// Index: 106/2560

// positive sp value has been detected, the output may be wrong!
int __fastcall AutoGenFn_FFC23D16(unsigned __int8 *__return_address, int n6a, int n63, int n17)
{
  int n8_2; // edi
  int v7; // edx
  unsigned int n0xA; // ebp
  int n6a_1; // edx
  int n8_1; // eax
  int n6a_2; // edx
  int v12; // eax
  bool v13; // zf
  char v15[7]; // [esp+0h] [ebp-34h] BYREF
  char v16; // [esp+7h] [ebp-2Dh] BYREF
  int v17; // [esp+8h] [ebp-2Ch]
  int v18; // [esp+Ch] [ebp-28h]
  char v19[8]; // [esp+10h] [ebp-24h] BYREF
  int n8_3; // [esp+18h] [ebp-1Ch] BYREF
  int n8; // [esp+1Ch] [ebp-18h]
  int v22; // [esp+27h] [ebp-Dh]
  int n16; // [esp+2Ch] [ebp-8h]

  n8_2 = (unsigned __int8)n8; /*0xffc23d28*/
  DebugPrint((int)__return_address, 3, n6a, 255, 255, 255, 255, 255, "Vendor TestType %d Starts\n", (unsigned __int8)n8); /*0xffc23d41*/
  LOBYTE(v7) = n6a; /*0xffc23d4a*/
  AutoGenFunc1211((int)__return_address, v7, &n8_3); /*0xffc23d4f*/
  n0xA = 0; /*0xffc23d5c*/
  if ( AutoGenFunc128A((int)__return_address, 1, 0) ) /*0xffc23d63*/
  {
    n8_1 = (unsigned __int8)n8_3; /*0xffc23d75*/
    do /*0xffc23d80*/
    {
      LOBYTE(n6a_1) = n6a; /*0xffc23d80*/
      ++n0xA; /*0xffc23d8b*/
      AutoGenFunc6866(__return_address, n6a_1, n8_1, n8, 0, v15); /*0xffc23d8d*/
      v16 = 0; /*0xffc23d94*/
      switch ( n8_2 ) /*0xffc23d9f*/
      {
        case 16: /*0xffc23d9f*/
          v12 = DebugLogPrint_2(__return_address, n6a, BYTE1(v22), n16, &v16, n0xA); /*0xffc23ded*/
          break;
        case 17: /*0xffc23d9f*/
          v12 = IioTailFunc4898(__return_address, n6a, BYTE1(v22), n16, &v16, n0xA); /*0xffc23dd6*/
          break;
        case 18: /*0xffc23d9f*/
          LOBYTE(n6a_2) = n6a; /*0xffc23daf*/
          v12 = DebugLogPrint_1(__return_address, n6a_2, BYTE1(v22), n16, &v16); /*0xffc23dbc*/
          break;
        default:
          goto LABEL_10; /*0xffc23da9*/
      }
      v17 = v12; /*0xffc23df5*/
LABEL_10:
      LOBYTE(n6a_2) = n6a; /*0xffc23df9*/
      AutoGenFunc6866(__return_address, n6a_2, v18, n16, 1, v19); /*0xffc23e0c*/
      if ( n8_3 ) /*0xffc23e19*/
      {
        DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nVendor TestType %d Failed!\n", n8_2); /*0xffc23e7e*/
        break; /*0xffc23e86*/
      }
      v13 = AutoGenFunc128A((int)__return_address, v19[7], n0xA) == 0; /*0xffc23e27*/
      n8_1 = n8; /*0xffc23e29*/
    }
    while ( !v13 ); /*0xffc23d80*/
  }
  if ( __return_address[239] ) /*0xffc23e39*/
    AutoGenFunc1187((int)__return_address); /*0xffc23e44*/
  DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nVendor TestType %d Ends\n", n8_2); /*0xffc23e58*/
  return 0; /*0xffc23e62*/
}

// Function: AutoGenFunc3E88 @ 0xffc23e88 (0x4e bytes)
// Index: 107/2560

int __fastcall AutoGenFunc3E88(int a1, unsigned __int8 a2, int a3, int a4)
{
  int v6; // eax
  _DWORD v8[2]; // [esp+8h] [ebp-8h] BYREF

  KtiFuncF4E(v8); /*0xffc23e97*/
  v6 = KtiFuncF75(a1, a3, a4, v8[0], v8[1], 1); /*0xffc23eab*/
  return DebugPrint(a1, 3, 255, 255, 255, 255, 255, 255, "TestType %d Latency = %d sec\n", a2, v6); /*0xffc23ed0*/
}

// Function: AutoGenFunc3ED6 @ 0xffc23ed6 (0x6c6 bytes)
// Index: 108/2560

// positive sp value has been detected, the output may be wrong!
int __fastcall AutoGenFunc3ED6(int __return_address, int a2)
{
  int n11; // eax
  char n4_4; // bl
  int v6; // eax
  int SocketInfo_5; // eax
  int v8; // ecx
  unsigned int SocketInfo_4; // edx
  unsigned __int8 n6_2; // bh
  _DWORD *buf_2; // eax
  int v12; // ebp
  _BYTE *SocketInfo_6; // edi
  int v14; // eax
  _DWORD *buf_3; // ecx
  int n63_2; // ebp
  int n6a; // edx
  int n6a_1; // edx
  int n6a_2; // edx
  int v20; // edx
  int v21; // edx
  int v22; // edx
  int v23; // edx
  int v24; // edx
  int v25; // edx
  int v26; // edx
  int v27; // edx
  int v28; // edx
  int v29; // edx
  int n6a_5; // edx
  int v31; // eax
  unsigned __int8 n10; // dl
  int n6a_3; // edx
  int v34; // edi
  int n6a_4; // edx
  int n4_6; // ecx
  _BYTE *SocketInfo_2; // ebp
  char *p_buf; // edi
  char n6_3; // bh
  unsigned int SocketInfo_3; // ecx
  unsigned __int8 n4_3; // [esp-1Ch] [ebp-BCh]
  __int64 n4_5; // [esp-4h] [ebp-A4h] ... [13945 chars total]

// Function: AutoGenFunc459C @ 0xffc2459c (0x58 bytes)
// Index: 109/2560

int __cdecl AutoGenFunc459C(int a1)
{
  unsigned int v1; // edx

  DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "AdvMemTestOptions: 0x%08x\n", *(_DWORD *)(a1 + 233));
  v1 = *(_DWORD *)(a1 + 233) & 0xFFF7F8FF; /*0xffc245c8*/
  if ( v1 ) /*0xffc245ce*/
    AutoGenFunc3ED6(a1, v1); /*0xffc245d2*/
  AutoGenFunc3ED6(a1, *(_DWORD *)(a1 + 233) & 0x80000 | 0x400); /*0xffc245eb*/
  return 0; /*0xffc245f2*/
}

// Function: AutoGenFunc45F4 @ 0xffc245f4 (0x22a bytes)
// Index: 110/2560

char __cdecl AutoGenFunc45F4(
        unsigned __int8 *__return_address,
        int n4,
        _BYTE *buf,
        _BYTE *a4,
        _BYTE *a5,
        _BYTE *a6,
        _BYTE *a7,
        int *p_n8,
        char *a9,
        _BYTE *a10,
        char n16)
{
  unsigned __int8 *__return_address_1; // ebp
  unsigned __int8 n6; // bl
  int v13; // esi
  unsigned __int8 i; // al
  unsigned __int8 n8; // al
  int v16; // ecx
  int CpuCount; // eax
  _BYTE *v18; // edi
  _BYTE *v19; // edx
  int n2; // ebp
  int i_1; // [esp+10h] [ebp-18h]
  int v23; // [esp+14h] [ebp-14h]
  unsigned __int8 n6_1; // [esp+14h] [ebp-14h]
  unsigned __int8 v25; // [esp+18h] [ebp-10h]
  int v26; // [esp+1Ch] [ebp-Ch]
  int v27; // [esp+20h] [ebp-8h]
  int SocketInfo; // [esp+24h] [ebp-4h]

  __return_address_1 = __return_address; /*0xffc245fd*/
  n6 = 0; /*0xffc24601*/
  *(_BYTE *)p_n8 = 0; /*0xffc2460b*/
  SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc24614*/
  LOBYTE(v23) = 0; /*0xffc24618*/
  v26 = 0; /*0xffc2461c*/
  do /*0xffc2479a*/
  {
    LOBYTE(i_1) = 0; /*0xffc2462e*/
    v13 = GetCpuCount((int)__return_address_1, n4, v23) + 119; /*0xffc24632*/
    for ( i = 0; i < 2u; LOBYTE(i_1) = i ) /*0xffc24635*/
    {
      if ( !*(_BYTE *)(v13 - 119) ) /*0xffc2463b*/
        goto LABEL_24; /*0xffc2463b*/
      if ( *(_DWORD *)(__return_address_1 + 9405) == 13 && *(_DWORD *)(v13 + 80) && (*(_BYTE *)(v13 + 84) & 4) != 0 ) /*0xffc24653*/
      {
        DebugPrint((int)__return_address_1, 2, n4, v23, i_1, 255, 255, 255, "Excluded from dimm map.\n"); /*0xffc2466e*/
LABEL_23:
        i = i_1; /*0xffc24772*/
        goto LABEL_24; /*0xffc24772*/
      }
      if ( n16 != 18 || *(_WORD *)(v13 + 23) == 11264 ) /*0xffc2468b*/
      {
        v27 = KtiFunc91AF((int)__return_address_1, n4, v23, i_1); /*0xffc246a3*/
        v25 = 0; /*0xffc246ab*/
        if ( *(_BYTE *)(v13 - 100) ) /*0xffc246a7*/
        {
          do /*0xffc2476a*/
          {
            if ( !KtiFunc89E9((int)__return_address_1, n4, v23, i_1, v25, 1) ) /*0xffc246c9*/
            {
              n8 = *(_BYTE *)(242 * n6 + v27 + 3); /*0xffc246e6*/
              if ( n8 > *(_BYTE *)p_n8 ) /*0xffc246f0*/
                *(_BYTE *)p_n8 = n8; /*0xffc246f2*/
              v16 = 6 * n8 + v26; /*0xffc24702*/
              buf[v16] = *(_BYTE *)(v13 + 1); /*0xffc24707*/
              a4[v16] = *(_BYTE *)v13; /*0xffc24710*/
              a5[v16] = *(_BYTE *)(v13 - 2) + *(_BYTE *)(v13 - 3); /*0xffc2471d*/
              __return_address_1 = __return_address; /*0xffc24724*/
              if ( (*(_BYTE *)(v13 - 6) & 4) != 0 && (n6 & 1) != 0 ) /*0xffc24731*/
                --a4[v16]; /*0xffc24733*/
              if ( (*(_BYTE *)(v13 - 6) & 8) != 0 && (n6 & 1) != 0 ) /*0xffc2473f*/
                a4[v16] -= 2; /*0xffc24741*/
              a7[v16] = i_1; /*0xffc2474d*/
              a10[v16] = n6; /*0xffc24754*/
              a6[v16] = *(_BYTE *)(v13 - 12) == 0; /*0xffc2475e*/
            }
            v25 = ++n6; /*0xffc24763*/
          }
          while ( n6 < *(_BYTE *)(v13 - 100) ); /*0xffc2476a*/
          n6 = 0; /*0xffc24770*/
        }
        goto LABEL_23; /*0xffc24770*/
      }
LABEL_24:
      ++i; /*0xffc24776*/
      v13 += 1379; /*0xffc24778*/
    }
    LOBYTE(CpuCount) = v23 + 1; /*0xffc2478e*/
    ++v26; /*0xffc24790*/
    LOBYTE(v23) = CpuCount; /*0xffc24794*/
  }
  while ( (unsigned __int8)CpuCount < 6u ); /*0xffc2479a*/
  if ( a9 ) /*0xffc247a6*/
  {
    *a9 = 0; /*0xffc247ac*/
    v18 = (_BYTE *)(SocketInfo + 6262); /*0xffc247ae*/
    n6_1 = 0; /*0xffc247b4*/
    do /*0xffc24814*/
    {
      CpuCount = GetCpuCount((int)__return_address_1, n4, n6_1); /*0xffc247c1*/
      if ( *v18 == 1 ) /*0xffc247ce*/
      {
        *a9 = 1; /*0xffc247d0*/
      }
      else if ( *v18 == 2 ) /*0xffc247d7*/
      {
        v19 = (_BYTE *)(CpuCount + 124); /*0xffc247db*/
        n2 = 2; /*0xffc247de*/
        do /*0xffc247ff*/
        {
          if ( *(v19 - 124) ) /*0xffc247df*/
          {
            CpuCount = (unsigned __int8)*a9; /*0xffc247e8*/
            if ( CpuCount < (unsigned __int8)*v19 - 1 ) /*0xffc247ee*/
            {
              LOBYTE(CpuCount) = *v19 - 1; /*0xffc247f2*/
              *a9 = CpuCount; /*0xffc247f4*/
            }
          }
          v19 += 1379; /*0xffc247f6*/
          --n2; /*0xffc247fc*/
        }
        while ( n2 ); /*0xffc247ff*/
        __return_address_1 = __return_address; /*0xffc24801*/
      }
      ++n6; /*0xffc24805*/
      v18 += 7688; /*0xffc24807*/
      n6_1 = n6; /*0xffc2480d*/
    }
    while ( n6 < 6u ); /*0xffc24814*/
  }
  return CpuCount; /*0xffc24816*/
}

// Function: AutoGenFunc481E @ 0xffc2481e (0x562 bytes)
// Index: 111/2560

int __fastcall AutoGenFunc481E(
        unsigned __int8 *__return_address,
        int buf,
        int n63,
        int *p_n63,
        int bufa,
        int a6,
        int n8,
        char a8,
        int a9,
        int a10,
        int a11,
        unsigned __int8 n8a,
        char n2,
        char a14,
        unsigned __int8 a15,
        unsigned __int8 a16,
        int a17,
        int a18,
        int a19,
        int a20,
        _BYTE *a21)
{
  int v21; // edx
  int v23; // edi
  int n6; // esi
  int v25; // eax
  unsigned __int8 *__return_address_1; // ebp
  int v27; // ecx
  unsigned __int8 *src_2; // ebx
  unsigned __int8 *src; // edi
  char *dst; // ebp
  int n63a_1; // eax
  int v32; // edx
  int n31; // ecx
  unsigned __int8 n2_4; // al
  bool v35; // cf
  char n2_3; // bl
  int n63a_2; // edi
  _DWORD *bufb_1; // ecx
  char v39; // dl
  int n6_2; // esi
  int n6_3; // edx
  char v42; // bl
  int *v43; // edx
  int v44; // ecx
  int n6_4; // esi
  int v46; // ecx
  int... [10204 chars total]

// Function: AutoGenFunc4D80 @ 0xffc24d80 (0xac bytes)
// Index: 112/2560

int __fastcall AutoGenFunc4D80(
        int __return_address,
        int buf,
        int n63,
        char n16,
        char n2,
        int a6,
        int a7,
        _BYTE *a8,
        _DWORD *a9,
        unsigned __int8 *a10,
        char n0x20,
        int n0x10,
        int a13)
{
  unsigned __int8 n6_1; // bl
  char v16; // di
  int n6; // [esp+10h] [ebp-4h]

  n6_1 = 0; /*0xffc24d84*/
  LOBYTE(n6) = 0; /*0xffc24d8b*/
  v16 = 0; /*0xffc24d8f*/
  do /*0xffc24e1e*/
  {
    if ( ((1 << v16) & n63) != 0 ) /*0xffc24d9c*/
    {
      MailBoxFuncDFD7( /*0xffc24dc8*/
        (unsigned __int8 *)__return_address,
        buf,
        n6,
        0,
        1,
        n16,
        n2,
        (int)a8,
        a9,
        (int)a10,
        n0x20,
        n0x10,
        a13);
      CpgcSktInit( /*0xffc24e0c*/
        (unsigned __int8 *)__return_address,
        buf,
        n6,
        n2,
        a8,
        (int)a9,
        a10,
        n0x20,
        n0x10,
        0,
        a13,
        *(_DWORD *)(__return_address + 231390),
        *(_DWORD *)(__return_address + 231394));
    }
    ++n6_1; /*0xffc24e14*/
    ++v16; /*0xffc24e16*/
    LOBYTE(n6) = n6_1; /*0xffc24e17*/
  }
  while ( n6_1 < 6u ); /*0xffc24e1e*/
  return 0; /*0xffc24e24*/
}

// Function: AutoGenFunc4E2C @ 0xffc24e2c (0x48 bytes)
// Index: 113/2560

char __cdecl AutoGenFunc4E2C(int __return_address, unsigned __int8 buf, int n63, unsigned __int8 n2)
{
  char *v4; // ecx
  int n6; // edx
  char n4; // al

  v4 = (char *)(GetSocketInfo(__return_address, buf) + 2); /*0xffc24e3d*/
  n6 = 6; /*0xffc24e47*/
  if ( n2 <= 1u ) /*0xffc24e48*/
  {
    n4 = 4; /*0xffc24e5f*/
    do /*0xffc24e71*/
    {
      if ( *v4 < 0 ) /*0xffc24e64*/
        n4 = 3; /*0xffc24e66*/
      v4 += 7688; /*0xffc24e68*/
      --n6; /*0xffc24e6e*/
    }
    while ( n6 ); /*0xffc24e71*/
  }
  else
  {
    n4 = 3; /*0xffc24e4a*/
    do /*0xffc24e5c*/
    {
      if ( *v4 < 0 ) /*0xffc24e4f*/
        n4 = 2; /*0xffc24e51*/
      v4 += 7688; /*0xffc24e53*/
      --n6; /*0xffc24e59*/
    }
    while ( n6 ); /*0xffc24e5c*/
  }
  return n4; /*0xffc24e5e*/
}

// Function: AutoGenFunc4E74 @ 0xffc24e74 (0x92a bytes)
// Index: 114/2560

int __fastcall AutoGenFunc4E74(
        unsigned __int8 *__return_address,
        int n4,
        int n63,
        char n16,
        unsigned __int8 *n2,
        char a6,
        int a7,
        _BYTE *a8,
        _DWORD *a9,
        unsigned __int8 *a10,
        char n0x20,
        int n0x10,
        int a13)
{
  int n4_1; // ebx
  unsigned __int8 *__return_address_1; // ebp
  int buf_6; // edx
  int v16; // ecx
  int SocketInfo; // esi
  _BYTE *v18; // edi
  char v19; // al
  int n63_1; // edx
  char v21; // bh
  unsigned __int8 n6; // bl
  _WORD *v23; // ecx
  int v24; // esi
  char v25; // al
  unsigned __int8 v26; // bl
  char *v27; // ebp
  int value; // esi
  unsigned __int8 *n2_1; // edx
  int v30; // ebx
  int v31; // edi
  unsigned __int8 *__return_address_4; // ebx
  unsigned int v33; // ebp
  unsigned int v34; // esi
  int value_2; // ebp
  unsigned __int8 *__return_address_3; // esi
  unsigned int v37; // ebp
  unsigned __int8 n6_1; // al
  unsigned __int8 *buf_10; // eax... [20944 chars total]

// Function: AutoGenFunc579E @ 0xffc2579e (0x1d5 bytes)
// Index: 115/2560

char __fastcall AutoGenFunc579E(_BYTE *__return_address, _BYTE *__return_address_1, int n63, int buf, int a5, char a6)
{
  unsigned __int8 n6_1; // bl
  int v8; // edi
  int v9; // eax
  char v10; // bh
  int CpuCount; // eax
  _DWORD *v12; // edx
  unsigned __int8 v14; // [esp+12h] [ebp-32h]
  int n0x12; // [esp+14h] [ebp-30h]
  int n6; // [esp+18h] [ebp-2Ch]
  _DWORD *v17; // [esp+1Ch] [ebp-28h]
  int v18; // [esp+20h] [ebp-24h]
  unsigned int v20; // [esp+2Ch] [ebp-18h]
  int v21; // [esp+30h] [ebp-14h]
  unsigned __int8 v22; // [esp+34h] [ebp-10h]
  int v23; // [esp+38h] [ebp-Ch]
  unsigned int v24; // [esp+40h] [ebp-4h]

  if ( !__return_address[1043] || !__return_address[237] ) /*0xffc257b8*/
    return 0; /*0xffc2596e*/
  n6_1 = 0; /*0xffc257ca*/
  LOBYTE(n6) = 0; /*0xffc257cc*/
  while ( 1 ) /*0xffc257d9*/
  {
    if ( ((1 << n6_1) & n63) != 0 ) /*0xffc257e2*/
    {
      v8 = 0; /*0xffc257ef*/
      v24 = *(_DWORD *)&__return_address[4 * n6_1 + 229493]; /*0xffc257f1*/
      if ( v24 ) /*0xffc257f7*/
        break; /*0xffc257f7*/
    }
LABEL_15:
    LOBYTE(n6) = ++n6_1; /*0xffc25958*/
    if ( n6_1 >= 6u ) /*0xffc2595f*/
      return 0; /*0xffc2595f*/
  }
LABEL_6:
  v17 = (_DWORD *)AutoGenFunc110E((int)__return_address, n6, v8); /*0xffc257fd*/
  v22 = (*v17 >> 21) & 7; /*0xffc2581c*/
  v20 = (*v17 >> 18) & 0xFFFFFF07; /*0xffc25834*/
  v9 = n6_1 + 6 * (HIBYTE(*v17) & 7); /*0xffc25838*/
  v10 = 0; /*0xffc2583a*/
  LOBYTE(v18) = *(_BYTE *)(v9 + buf); /*0xffc2583f*/
  LOBYTE(v23) = *(_BYTE *)(v9 + a5); /*0xffc2584a*/
  while ( ((*v17 >> 27) & (unsigned __int8)(1 << v10) & 3) == 0 ) /*0xffc25863*/
  {
LABEL_13:
    if ( (unsigned __int8)++v10 >= 2u ) /*0xffc25945*/
    {
      if ( ++v8 >= v24 ) /*0xffc25950*/
        goto LABEL_15; /*0xffc25950*/
      goto LABEL_6; /*0xffc25950*/
    }
  }
  CpuCount = GetCpuCount((int)__return_address, (unsigned __int8)__return_address_1, n6); /*0xffc25882*/
  LOBYTE(n0x12) = 0; /*0xffc25889*/
  v21 = *(_BYTE *)(1379 * (unsigned __int8)v18 + CpuCount + 104) != 0 ? 15 : 255;
  v14 = (*(_BYTE *)(1379 * (unsigned __int8)v18 + CpuCount + 104) == 0) + 1; /*0xffc258c0*/
  v12 = v17; /*0xffc258ca*/
  while ( ((v12[((unsigned __int8)(n0x12 * v14) >> 3) + 2] >> (4 * ((n0x12 * v14) & 7))) & v21) == 0 ) /*0xffc258f7*/
  {
LABEL_12:
    LOBYTE(n0x12) = n0x12 + 1; /*0xffc2592d*/
    if ( (unsigned __int8)n0x12 >= (int)(0x12u / v14) ) /*0xffc2593e*/
      goto LABEL_13; /*0xffc2593e*/
  }
  if ( !RmtFn_FFCD2F72( /*0xffc2591d*/
          __return_address,
          __return_address_1,
          n6,
          v18,
          v23,
          v22,
          n0x12,
          (unsigned __int8)(v20 + (v10 << a6)) >> 2) )
  {
    v12 = v17; /*0xffc25929*/
    goto LABEL_12; /*0xffc25929*/
  }
  return 1; /*0xffc25967*/
}

// Function: AutoGenFunc5973 @ 0xffc25973 (0x310 bytes)
// Index: 116/2560

int __cdecl AutoGenFunc5973(
        unsigned __int8 *__return_address,
        int n4,
        int n63,
        char n16,
        unsigned __int8 n2,
        _BYTE *a6)
{
  unsigned __int8 n6; // cl
  int n63_1; // ebx
  char v8; // cl
  int n6_1; // edi
  unsigned __int8 *v10; // edx
  char v11; // al
  char v12; // al
  _BYTE *__return_address_1; // edx
  int n6a; // edx
  int SocketInfo; // eax
  unsigned __int8 n7_1; // al
  int n63_2; // edi
  char v18; // bl
  char n6_2; // bh
  int __return_address_2; // edx
  int v21; // ecx
  _BYTE *__return_address_4; // edi
  int v23; // ecx
  char v24; // al
  int p_n8[3]; // [esp+11h] [ebp-157h] BYREF
  unsigned __int8 n7; // [esp+21h] [ebp-147h]
  char v28; // [esp+22h] [ebp-146h]
  unsigned __int8 v29; // [esp+23h] [ebp-145h]
  char v30[4]; // [esp+24h] [ebp-144h]
  int v31; // [esp+28h] [ebp-140h]
  unsigned __int8 v32[4]; // [esp+2Ch] [ebp-13Ch]
  _BYTE *v33; // [esp+30h] [ebp-138h]
  unsigned __int8 v34[4]; // [esp+34h] [ebp-134h]
  char v35[4]; // [esp+38h] [ebp-130h] BYREF
  _BYTE *__return_address_3; // [esp+3Ch] [ebp-12Ch]
  _BYTE *v37; // [esp+40h] [ebp-128h]
  unsigned int v38; // [esp+44h] [ebp-124h] BYREF
  char buf_5[16]; // [esp+48h] [ebp-120h] BYREF
  _BYTE v40[32]; // [esp+58h] [ebp-110h] BYREF
  int buf_4[4]; // [esp+78h] [ebp-F0h] BYREF
  _BYTE buf_6[32]; // [esp+88h] [ebp-E0h] BYREF
  _BYTE buf_3[48]; // [esp+A8h] [ebp-C0h] BYREF
  _BYTE buf_2[48]; // [esp+D8h] [ebp-90h] BYREF
  _BYTE buf_1[48]; // [esp+108h] [ebp-60h] BYREF
  _BYTE buf[48]; // [esp+138h] [ebp-30h] BYREF

  memset_save_flags(buf, 0, 0x30u); /*0xffc25991*/
  memset_save_flags(buf_1, 0, 0x30u); /*0xffc259a3*/
  memset_save_flags(buf_2, 0, 0x30u); /*0xffc259b5*/
  memset_save_flags(buf_3, 0, 0x30u); /*0xffc259c7*/
  memset_save_flags(buf_4, 0, 0x30u); /*0xffc259d6*/
  memset_save_flags(buf_5, 0, 0x30u); /*0xffc259e5*/
  n6 = 0; /*0xffc259ed*/
  *a6 = 0; /*0xffc259f2*/
  n63_1 = n63; /*0xffc259f4*/
  do /*0xffc25a05*/
  {
    if ( ((1 << n6) & n63) != 0 ) /*0xffc259fe*/
      break; /*0xffc259fe*/
    ++n6; /*0xffc25a00*/
  }
  while ( n6 < 6u ); /*0xffc25a05*/
  v8 = 0; /*0xffc25a0a*/
  LOBYTE(p_n8[0]) = 0; /*0xffc25a0e*/
  n6_1 = 6; /*0xffc25a13*/
  v10 = __return_address + 229493; /*0xffc25a14*/
  do /*0xffc25a3b*/
  {
    if ( ((1 << v8) & n63) != 0 && *(_DWORD *)v10 ) /*0xffc25a23*/
    {
      v11 = 1; /*0xffc25a28*/
      LOBYTE(p_n8[0]) = 1; /*0xffc25a2a*/
    }
    else
    {
      v11 = p_n8[0]; /*0xffc25a30*/
    }
    ++v8; /*0xffc25a34*/
    v10 += 4; /*0xffc25a35*/
    --n6_1; /*0xffc25a38*/
  }
  while ( n6_1 ); /*0xffc25a3b*/
  if ( v11 ) /*0xffc25a3f*/
  {
    AutoGenFunc45F4(__return_address, n4, buf, buf_1, buf_2, buf_3, buf_4, p_n8, (char *)p_n8 + 2, buf_5, n16); /*0xffc25a83*/
    v12 = AutoGenFunc4E2C((int)__return_address, n4, n63, n2); /*0xffc25a93*/
    LOBYTE(__return_address_1) = n4; /*0xffc25a98*/
    v30[0] = v12; /*0xffc25a9d*/
    BYTE1(p_n8[0]) = AutoGenFunc579E(__return_address, __return_address_1, n63, (int)buf_4, (int)buf_5, v12); /*0xffc25abb*/
    if ( BYTE1(p_n8[0]) ) /*0xffc25ac6*/
    {
      LOBYTE(n6a) = n4; /*0xffc25ac8*/
      AutoGenFunc6866(__return_address, n6a, n63, 0xFFu, 0, v35); /*0xffc25ad6*/
      DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "\nExecute PPR flow to repair row failures\n"); /*0xffc25ae9*/
    }
    if ( n7 >= 8u ) /*0xffc25afb*/
      n7 = 7; /*0xffc25afd*/
    SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc25b06*/
    LOBYTE(v31) = 0; /*0xffc25b11*/
    v37 = (_BYTE *)(SocketInfo + 6262); /*0xffc25b17*/
    do /*0xffc25c53*/
    {
      n7_1 = 0; /*0xffc25b1b*/
      v32[0] = 0; /*0xffc25b1d*/
      do /*0xffc25c3f*/
      {
        n63_2 = n63_1; /*0xffc25b2e*/
        v18 = v31; /*0xffc25b30*/
        n6_2 = 0; /*0xffc25b34*/
        v35[0] = 0; /*0xffc25b36*/
        __return_address_2 = (int)&buf_3[6 * n7_1 + 16]; /*0xffc25b3a*/
        v21 = 0; /*0xffc25b40*/
        __return_address_3 = (_BYTE *)__return_address_2; /*0xffc25b42*/
        *(_DWORD *)v30 = 0; /*0xffc25b46*/
        v33 = v37; /*0xffc25b4a*/
        do /*0xffc25ba1*/
        {
          n63_2 &= ~((*(_BYTE *)(v21 + __return_address_2) == 0) << v21); /*0xffc25b64*/
          if ( ProcCommonFunc24FA((int)__return_address, n4, v35[0], 0) && !*v33 && v18 ) /*0xffc25b81*/
            n63_2 &= ~(1 << v30[0]); /*0xffc25b83*/
          __return_address_2 = (int)__return_address_3; /*0xffc25b86*/
          ++n6_2; /*0xffc25b8a*/
          v21 = *(_DWORD *)v30 + 1; /*0xffc25b8c*/
          v35[0] = n6_2; /*0xffc25b8d*/
          ++*(_DWORD *)v30; /*0xffc25b96*/
          v33 += 7688; /*0xffc25b9a*/
        }
        while ( (unsigned __int8)n6_2 < 6u ); /*0xffc25ba1*/
        n63_1 = n63; /*0xffc25ba3*/
        if ( n63_2 ) /*0xffc25ba8*/
        {
          if ( v28 ) /*0xffc25bb3*/
          {
            LOBYTE(__return_address_2) = n4; /*0xffc25bb8*/
            AutoGenFn_FFC2793D( /*0xffc25bd7*/
              (int)__return_address,
              (_BYTE *)__return_address_2,
              n63_2,
              buf_6,
              v40,
              v32[0],
              v31,
              v34[0],
              a6);
          }
          if ( n16 == 10 || n16 == 19 ) /*0xffc25be9*/
          {
            LOBYTE(__return_address_2) = n4; /*0xffc25bef*/
            AutoGenFunc7F8C((int)__return_address, __return_address_2, n63_2, &v38, buf_6, v40, v32[0], v31, v34[0]); /*0xffc25c0f*/
            __return_address_4 = __return_address_3; /*0xffc25c14*/
            v23 = 0; /*0xffc25c1b*/
            __return_address_2 = 6; /*0xffc25c1f*/
            do /*0xffc25c2f*/
            {
              v24 = (v38 >> v23++) & 1; /*0xffc25c26*/
              *__return_address_4++ = v24; /*0xffc25c29*/
              --__return_address_2; /*0xffc25c2c*/
            }
            while ( __return_address_2 ); /*0xffc25c2f*/
          }
        }
        n7_1 = v32[0] + 1; /*0xffc25c35*/
        v32[0] = n7_1; /*0xffc25c37*/
      }
      while ( n7_1 <= n7 ); /*0xffc25c3f*/
      LOBYTE(v31) = v31 + 1; /*0xffc25c4b*/
    }
    while ( (unsigned __int8)v31 <= v29 ); /*0xffc25c53*/
    if ( v28 ) /*0xffc25c5e*/
    {
      LOBYTE(__return_address_2) = n4; /*0xffc25c60*/
      AutoGenFunc6866(__return_address, __return_address_2, n63, 0xFFu, 1, buf_5); /*0xffc25c72*/
    }
  }
  return 0; /*0xffc25c7a*/
}

// Function: AutoGenFunc5C83 @ 0xffc25c83 (0x8e bytes)
// Index: 117/2560

int __cdecl AutoGenFunc5C83(unsigned __int8 a1, int a2, int a3)
{
  int v3; // ecx
  unsigned __int8 v4; // dl
  int v5; // ebx
  int v6; // edi
  int v7; // ebp
  int v8; // eax
  int v9; // ecx
  int v10; // eax
  int v11; // ebp
  const void *src; // esi
  void *dst; // eax
  int v15; // [esp+10h] [ebp-8h]

  v4 = a1; /*0xffc25c86*/
  v5 = v3; /*0xffc25c8b*/
  v6 = a3; /*0xffc25c92*/
  v7 = 0; /*0xffc25c96*/
  v8 = *(_DWORD *)(v3 + 4 * a1 + 229493); /*0xffc25c9c*/
  v9 = v8 + a3; /*0xffc25ca3*/
  v15 = v8 + a3; /*0xffc25ca6*/
  if ( (unsigned int)(v8 + a3) >= 0x80 ) /*0xffc25cb0*/
    return 1; /*0xffc25d07*/
  if ( v8 ) /*0xffc25cb4*/
  {
    v10 = v8 - 1; /*0xffc25cb6*/
    if ( v10 >= a2 ) /*0xffc25cbb*/
    {
      v11 = v10; /*0xffc25cbd*/
      do /*0xffc25cef*/
      {
        src = (const void *)AutoGenFunc110E(v5, v4, v11); /*0xffc25cc8*/
        dst = (void *)AutoGenFunc110E(v5, a1, v6 + v11); /*0xffc25cd3*/
        v4 = a1; /*0xffc25cd8*/
        --v11; /*0xffc25ce1*/
        qmemcpy(dst, src, 0x14u); /*0xffc25ce5*/
        v6 = a3; /*0xffc25ce7*/
      }
      while ( v11 >= a2 ); /*0xffc25cef*/
      v9 = v15; /*0xffc25cf1*/
      v7 = 0; /*0xffc25cf5*/
    }
  }
  *(_DWORD *)(v5 + 4 * a1 + 229493) = v9; /*0xffc25cfc*/
  return v7; /*0xffc25d08*/
}

// Function: AutoGenFunc5D11 @ 0xffc25d11 (0x78 bytes)
// Index: 118/2560

int __cdecl AutoGenFunc5D11(unsigned __int8 n6, unsigned int a2)
{
  int v2; // ecx
  unsigned __int8 n6_1; // dl
  unsigned int v4; // ebx
  int v5; // ebp
  int v6; // ecx
  unsigned int v7; // eax
  const void *src; // esi
  int dst_1; // eax
  void *dst; // edi
  unsigned int v12; // [esp+8h] [ebp-8h]

  n6_1 = n6; /*0xffc25d13*/
  v4 = a2; /*0xffc25d18*/
  v5 = v2; /*0xffc25d1d*/
  v6 = 0; /*0xffc25d22*/
  v7 = *(_DWORD *)(v5 + 4 * n6 + 229493); /*0xffc25d28*/
  v12 = v7; /*0xffc25d2f*/
  if ( !a2 ) /*0xffc25d36*/
    return 1; /*0xffc25d81*/
  if ( a2 < v7 ) /*0xffc25d3a*/
  {
    do /*0xffc25d6b*/
    {
      src = (const void *)AutoGenFunc110E(v5, n6_1, v4); /*0xffc25d46*/
      dst_1 = AutoGenFunc110E(v5, n6, v4 - 1); /*0xffc25d51*/
      n6_1 = n6; /*0xffc25d56*/
      dst = (void *)dst_1; /*0xffc25d5d*/
      ++v4; /*0xffc25d5f*/
      v7 = v12; /*0xffc25d60*/
      qmemcpy(dst, src, 0x14u); /*0xffc25d67*/
    }
    while ( v4 < v12 ); /*0xffc25d6b*/
    v6 = 0; /*0xffc25d6e*/
  }
  *(_DWORD *)(v5 + 4 * n6 + 229493) = v7 - 1; /*0xffc25d76*/
  return v6; /*0xffc25d82*/
}

// Function: AutoGenResourceAllocCheck @ 0xffc25d89 (0xb0 bytes)
// Index: 119/2560

int __cdecl AutoGenResourceAllocCheck(unsigned __int8 n6, int a2)
{
  int v2; // ecx
  int v3; // ebp
  _DWORD *v4; // esi
  unsigned int *v5; // eax
  unsigned int v6; // edi
  int v7; // ebx

  v3 = v2; /*0xffc25d96*/
  v4 = (_DWORD *)AutoGenFunc110E(v2, n6, a2); /*0xffc25da1*/
  v5 = (unsigned int *)AutoGenFunc110E(v3, n6, a2 + 1); /*0xffc25daa*/
  if ( (unsigned int)(a2 + 1) >= 0x80 ) /*0xffc25dba*/
    return 1; /*0xffc25dba*/
  v6 = *v5; /*0xffc25dc0*/
  if ( ((*v5 ^ *v4) & 0xE7FC0000) != 0 ) /*0xffc25dca*/
    return 1; /*0xffc25dca*/
  v7 = *v4 & 0x3FFFF; /*0xffc25dcf*/
  if ( (v6 & 0x3FFFF) != v7 + v4[1] || v5[2] != v4[2] || v5[3] != v4[3] || v5[4] != v4[4] ) /*0xffc25df8*/
    return 1; /*0xffc25e32*/
  *v5 = v7 | v6 & 0xFFFC0000; /*0xffc25e0d*/
  v5[1] += v4[1]; /*0xffc25e12*/
  AutoGenFunc5D11(n6, a2 + 1); /*0xffc25e16*/
  *(_DWORD *)(v3 + 4 * n6 + 229517) = a2; /*0xffc25e25*/
  return 0; /*0xffc25e33*/
}

// Function: AutoGenFn_FFC25E39 @ 0xffc25e39 (0x580 bytes)
// Index: 120/2560

int __fastcall AutoGenFn_FFC25E39(int src_, int j, unsigned __int8 n6, char a4, int a5, int a6, int a7, int a8, int a9)
{
  unsigned __int8 n6_1; // al
  int n6_2; // esi
  int v12; // ecx
  unsigned int v13; // ebx
  int *v14; // ebp
  int v15; // eax
  int v16; // esi
  unsigned int v17; // eax
  int v18; // ecx
  bool v19; // zf
  unsigned __int8 n6_3; // si
  int v21; // eax
  int v22; // eax
  int v23; // ecx
  int v25; // esi
  _DWORD *v26; // ecx
  int v27; // [esp-4h] [ebp-44h]
  int v28; // [esp+10h] [ebp-30h]
  int v29; // [esp+18h] [ebp-28h]
  int v30; // [esp+1Ch] [ebp-24h]
  unsigned int v31; // [esp+20h] [ebp-20h]
  int v32; // [esp+20h] [ebp-20h]
  unsigned int v33; // [esp+24h] [ebp-1Ch]
  unsigned int v34; // [esp+28h] [ebp-18h]
  unsigned int v35; // [esp+2Ch] [ebp-14h]
  int *v36; // [esp+30h] [ebp-10h]
  unsigned int v37; // [esp+34h] [ebp-Ch]
  int *v39; // [esp+3Ch] [ebp-4h]

  n6_1 = n6; /*0xffc25e3c*/
  n6_2 = n6; /*0xffc25e46*/
  v12 = 0; /*0xffc25e49*/
  v28 = 0; /*0xffc25e4f*/
  v13 = 0; /*0xffc25e53*/
  while ( 1 )
  {
    v31 = *(_DWORD *)(src_ + 4 * n6_2 + 229493); /*0xffc25e66*/
    if ( v13 >= v31 || v12 ) /*0xffc25e74*/
      break; /*0xffc25e74*/
    v14 = (int *)AutoGenFunc110E(src_, n6_1, v13); /*0xffc25e86*/
    v33 = v13 + 1; /*0xffc25e8e*/
    v36 = (int *)AutoGenFunc110E(src_, n6, v13 + 1); /*0xffc25e97*/
    v15 = AutoGenFunc110E(src_, n6, v13 + 2); /*0xffc25ea3*/
    v16 = *v14; /*0xffc25ea8*/
    v39 = (int *)v15; /*0xffc25eae*/
    v35 = v14[1]; /*0xffc25ebd*/
    if ( (*v14 & 0xE7FC0000) != (a5 & 0xE7FC0000) /*0xffc25f26*/
      || (v17 = a5 & 0x3FFFF, v37 = v16 & 0x3FFFF, v34 = v35 + (v16 & 0x3FFFF), v34 < (a5 & 0x3FFFFu))
      || v33 < v31 && (*v36 & 0xE7FC0000) == (a5 & 0xE7FC0000) && (*v36 & 0x3FFFF) == v17 )
    {
      ++v13; /*0xffc26224*/
LABEL_47:
      n6_2 = n6; /*0xffc26226*/
      v12 = v28; /*0xffc2622a*/
      goto LABEL_2; /*0xffc2622e*/
    }
    v18 = v14[2]; /*0xffc25f2f*/
    v32 = v14[3]; /*0xffc25f32*/
    v30 = v14[4]; /*0xffc25f39*/
    v29 = v18; /*0xffc25f41*/
    if ( v17 >= v37 )
    {
      v19 = v17 == v34; /*0xffc25f4f*/
      if ( v17 >= v34 ) /*0xffc25f53*/
        goto LABEL_19; /*0xffc25f53*/
      if ( (v18 | a7) == v18 && (v32 | a8) == v32 && (v30 | a9) == v30 )
      {
        if ( !a4 ) /*0xffc25f8c*/
          goto LABEL_48; /*0xffc25f8c*/
        DebugPrint(
          src_,
          2,
          j,
          255,
          255,
          255,
          255,
          255,
          "UpdateRowFailures: New failure occured in previously masked range:  fail addr = 0x%08x, error status = 0x%02x%"
          "08x%08x, search addr = 0x%08x, size = 0x%08x, mask = 0x%02x%08x%08x\n",
          a5,
          a9,
          a8,
          a7,
          v16,
          v35,
          v30,
          v32,
          v18);
        AutoGenFuncE5EA(
          src_,
          "\n\nRC_ASSERT! %s: %u   %s ",
          (int)"e:\\hs\\CpRcPkg\\Library\\AdvMemTestLib\\RowFailList.c",
          315,
          "FALSE");
        goto LABEL_47; /*0xffc25feb*/
      }
      v18 = v14[2]; /*0xffc25ff0*/
    }
    v19 = v17 == v34; /*0xffc25ff4*/
LABEL_19:
    if ( v19 && a7 == v18 && a8 == v32 && a9 == v30 ) /*0xffc26012*/
    {
      ++v14[1]; /*0xffc2626c*/
      v27 = v13; /*0xffc2626f*/
      *(_DWORD *)(src_ + 4 * n6 + 229517) = v13; /*0xffc26270*/
      goto LABEL_51; /*0xffc26270*/
    }
    if ( v17 > v37 && v17 < v34 - 1 ) /*0xffc26025*/
    {
      if ( !AutoGenFunc5C83(n6, v33, 2) ) /*0xffc2603a*/
      {
        v25 = v16 & 0x3FFFF; /*0xffc2628c*/
        v14[1] = (a5 & 0x3FFFF) - v25; /*0xffc26294*/
        v36[1] = 1; /*0xffc2629b*/
        *v36 = a5; /*0xffc262a6*/
        v36[2] = v29 | a7; /*0xffc262ae*/
        v36[3] = v32 | a8; /*0xffc262b7*/
        v36[4] = v30 | a9; /*0xffc262c2*/
        *(_DWORD *)(src_ + 4 * n6 + 229517) = v13 + 1; /*0xffc262d0*/
        v39[1] = v25 - (a5 & 0x3FFFF) + v35 - 1; /*0xffc262eb*/
        *v39 = a5; /*0xffc262f2*/
        *v39 = a5 ^ (a5 ^ (a5 + 1)) & 0x3FFFF; /*0xffc26305*/
        v39[2] = v29; /*0xffc26307*/
        v39[3] = v32; /*0xffc2630a*/
        v39[4] = v30; /*0xffc2630d*/
        return v28; /*0xffc26310*/
      }
LABEL_26:
      n6_2 = n6; /*0xffc26040*/
      v12 = 1; /*0xffc26046*/
      v28 = 1; /*0xffc26047*/
      goto LABEL_2; /*0xffc2604b*/
    }
    if ( v17 == v34 - 1 ) /*0xffc26057*/
    {
      if ( v35 <= 1 ) /*0xffc2605e*/
      {
        v14[2] = v29 | a7; /*0xffc2631d*/
        v14[3] = v32 | a8; /*0xffc26328*/
        v14[4] = v30 | a9; /*0xffc26333*/
LABEL_48:
        *(_DWORD *)(src_ + 4 * n6 + 229517) = v13; /*0xffc26233*/
        AutoGenResourceAllocCheck(n6, v13); /*0xffc26246*/
        if ( v13 ) /*0xffc2624f*/
          AutoGenResourceAllocCheck(n6, v13 - 1); /*0xffc2625c*/
        return v28; /*0xffc26263*/
      }
      n6_3 = n6; /*0xffc26064*/
      if ( !AutoGenFunc5C83(n6, v33, 1) ) /*0xffc2606e*/
      {
        --v14[1]; /*0xffc2607a*/
        v36[1] = 1; /*0xffc26081*/
        *v36 = a5; /*0xffc2608c*/
        v36[2] = v29 | a7; /*0xffc26096*/
        v36[3] = v32 | a8; /*0xffc260a1*/
        v36[4] = v30 | a9; /*0xffc260ac*/
        v21 = v13 + 1; /*0xffc260af*/
        *(_DWORD *)(src_ + 4 * n6 + 229517) = v13 + 1; /*0xffc260b6*/
LABEL_31:
        AutoGenResourceAllocCheck(n6_3, v21); /*0xffc260bd*/
        return v28; /*0xffc260bf*/
      }
      goto LABEL_26; /*0xffc26078*/
    }
    if ( v17 == v37 - 1 && a7 == v29 && a8 == v32 && a9 == v30 ) /*0xffc260eb*/
    {
      ++v14[1]; /*0xffc2633b*/
      *v14 = a5; /*0xffc26346*/
      *(_DWORD *)(src_ + 4 * n6 + 229517) = v13; /*0xffc26349*/
      if ( v13 ) /*0xffc26352*/
      {
        v27 = v13 - 1; /*0xffc2635b*/
LABEL_51:
        AutoGenResourceAllocCheck(n6, v27); /*0xffc26277*/
      }
      return v28; /*0xffc261de*/
    }
    if ( v17 != v37 ) /*0xffc260f3*/
    {
      if ( v17 < v34 ) /*0xffc26186*/
      {
        if ( !AutoGenFunc5C83(n6, v13, 1) ) /*0xffc261e8*/
        {
          v14[1] = 1; /*0xffc261fc*/
          *v14 = a5; /*0xffc26203*/
          v14[2] = a7; /*0xffc2620a*/
          v14[3] = a8; /*0xffc26211*/
          v14[4] = a9; /*0xffc26218*/
          *(_DWORD *)(src_ + 4 * n6 + 229517) = v13; /*0xffc2621b*/
          return v28; /*0xffc26222*/
        }
      }
      else if ( !AutoGenFunc5C83(n6, v33, 1) ) /*0xffc2618f*/
      {
        v36[1] = 1; /*0xffc261a3*/
        *v36 = a5; /*0xffc261ae*/
        v36[2] = a7; /*0xffc261b4*/
        v36[3] = a8; /*0xffc261bb*/
        v36[4] = a9; /*0xffc261c2*/
        *(_DWORD *)(src_ + 4 * n6 + 229517) = v13 + 1; /*0xffc261cc*/
        return v28; /*0xffc261cc*/
      }
      goto LABEL_26; /*0xffc26199*/
    }
    n6_2 = n6; /*0xffc260fe*/
    v12 = v28; /*0xffc26102*/
    if ( v35 > 1 ) /*0xffc26106*/
    {
      n6_3 = n6; /*0xffc2610c*/
      if ( !AutoGenFunc5C83(n6, v13, 1) ) /*0xffc26116*/
      {
        v14[1] = 1; /*0xffc2612e*/
        *v14 = a5; /*0xffc26139*/
        v14[2] = v29 | a7; /*0xffc26144*/
        v14[3] = v32 | a8; /*0xffc2614f*/
        v14[4] = v30 | a9; /*0xffc2615a*/
        *(_DWORD *)(src_ + 4 * n6 + 229517) = v13; /*0xffc2615d*/
        v22 = *v36; /*0xffc26164*/
        --v36[1]; /*0xffc26166*/
        v23 = v22 ^ (v22 ^ (v22 + 1)) & 0x3FFFF; /*0xffc26174*/
        v21 = v13 - 1; /*0xffc26176*/
        *v36 = v23; /*0xffc26179*/
        goto LABEL_31; /*0xffc2617b*/
      }
      goto LABEL_26; /*0xffc26120*/
    }
LABEL_2:
    n6_1 = n6; /*0xffc25e5b*/
  }
  if ( !AutoGenFunc5C83(n6_1, v13, 1) ) /*0xffc26367*/
  {
    v26 = (_DWORD *)AutoGenFunc110E(src_, n6, v13); /*0xffc2637e*/
    v26[1] = 1; /*0xffc26383*/
    *v26 = a5; /*0xffc2638e*/
    v26[2] = a7; /*0xffc26394*/
    v26[3] = a8; /*0xffc2639b*/
    v26[4] = a9; /*0xffc263a2*/
    *(_DWORD *)(src_ + 4 * n6_2 + 229517) = v13; /*0xffc263a5*/
    return v28; /*0xffc263ac*/
  }
  return 1; /*0xffc261d7*/
}

// Function: AutoGenFn_FFC263B9 @ 0xffc263b9 (0xee bytes)
// Index: 121/2560

char __thiscall AutoGenFn_FFC263B9(
        char *src_,
        unsigned __int8 n6,
        int a3,
        int a4,
        int a5,
        int a6,
        int a7,
        int a8,
        _DWORD *a9)
{
  char *src__1; // edx
  unsigned __int8 n6_1; // cl
  unsigned int v11; // edi
  unsigned int v12; // ebx
  _DWORD *v13; // ebp
  int v14; // ebx
  unsigned int i; // esi
  unsigned int j; // esi
  int v17; // eax
  unsigned int v19; // [esp+10h] [ebp-128h]
  _DWORD buf[72]; // [esp+18h] [ebp-120h] BYREF

  src__1 = src_; /*0xffc263c2*/
  memset(buf, 0, sizeof(buf)); /*0xffc263d1*/
  n6_1 = n6; /*0xffc263d3*/
  v11 = 0; /*0xffc263da*/
  v19 = *(_DWORD *)&src__1[4 * n6 + 229493]; /*0xffc263e6*/
  if ( v19 ) /*0xffc263ec*/
  {
    v12 = a3 & 0xE7FC0000; /*0xffc263f5*/
    do /*0xffc26451*/
    {
      v13 = (_DWORD *)AutoGenFunc110E((int)src__1, n6_1, v11); /*0xffc26408*/
      if ( (*v13 & 0xE7FC0000) == v12 ) /*0xffc26417*/
      {
        v14 = v13[1]; /*0xffc26419*/
        for ( i = 0; i < 0x48; ++i ) /*0xffc2641c*/
        {
          if ( ((1 << (i & 0x1F)) & v13[(i >> 5) + 2]) != 0 ) /*0xffc26431*/
            buf[i] += v14; /*0xffc26433*/
        }
        v12 = a3 & 0xE7FC0000; /*0xffc2643d*/
      }
      src__1 = src_; /*0xffc26441*/
      ++v11; /*0xffc26445*/
      n6_1 = n6; /*0xffc26446*/
    }
    while ( v11 < v19 ); /*0xffc26451*/
  }
  *a9 = a5; /*0xffc26464*/
  a9[1] = a6; /*0xffc26465*/
  a9[2] = a7; /*0xffc26466*/
  for ( j = 0; j < 0x48; ++j ) /*0xffc26467*/
  {
    if ( buf[j] < 8u ) /*0xffc2646e*/
      a9[j >> 5] &= ~(1 << (j & 0x1F)); /*0xffc26480*/
  }
  v17 = 0; /*0xffc26489*/
  while ( !a9[v17] ) /*0xffc2648f*/
  {
    if ( (unsigned int)++v17 >= 3 ) /*0xffc26495*/
      return 0; /*0xffc26499*/
  }
  return 1; /*0xffc2649d*/
}

// Function: AutoGenFunc64A7 @ 0xffc264a7 (0x3bf bytes)
// Index: 122/2560

int __fastcall AutoGenFunc64A7(
        int src_,
        char n6,
        int n63a,
        int a4,
        __int16 *a5,
        int a6,
        unsigned __int8 a7,
        _BYTE *a8,
        char a9,
        int a10,
        int a11,
        unsigned int a12,
        int a13,
        int a14,
        int n6a,
        int a16,
        int a17,
        int a18,
        int src_a,
        int a20,
        int a21,
        int a22,
        int a23,
        int dst_,
        int a25,
        int a26,
        int a27,
        int a28,
        int a29,
        int a30,
        int a31,
        __int16 *a32,
        int a33,
        int a34,
        _BYTE *a35,
        char a36,
        int a37,
        int a38,
        int a39,
        int a40,
        int a41,
        _BYTE *a42)
{
  int v42; // ebx
  int v43; // edx
  int v44; // ebp
  char *dst_2; // eax
  __int16 *v46; // edi
  int v47; // ecx
  _BYTE *v48; // esi
  int v49; // edi
  bool v50; // zf
  int j_1; // edx
  _DWORD *src; // esi
  unsigned int v53; // ebx
  char v54; // al
  unsigned int j_2; // edx
  int v57; // eax
  int v58; // ebx
  unsigned int j_4; // eax
  int v60; // eax
  int src_2[11]; // [esp-24h] [ebp-88h] BYREF
  char n2; // [esp+Ah] [ebp-5Ah]
  _BYTE j[5]; // [esp+Bh] [ebp-59h]
  int v64; // [esp+10h] [ebp-54h]
  int n6_1; // [esp+14h] [ebp-50h]
  char *dst_1; // [esp+18h] [ebp-4Ch]
  int src__1; // [esp+1Ch] [ebp-48h]
  int j_3; // [esp+20h] [ebp-44h]
  int v69; // [esp+24h] [ebp-40h]
  int v70; // [esp+2Ch] [ebp-38h]
  int v71[3]; // [esp+30h] [ebp-34h] BYREF
  _DWORD src_1[5]; // [esp+3Ch] [ebp-28h] BYREF
  _DWORD dst[5]; // [esp+50h] [ebp-14h] BYREF
  int v74; // [esp+74h] [ebp+10h]

  j[0] = n6; /*0xffc264ac*/
  v42 = src_1[0]; /*0xffc264b1*/
  v43 = 0; /*0xffc264b5*/
  *(_DWORD *)&j[1] = 0; /*0xffc264b7*/
  n2 = *(_BYTE *)(src_ + 229541); /*0xffc264c6*/
  v44 = a4 + 12; /*0xffc264ca*/
  src__1 = src_; /*0xffc264da*/
  dst_2 = (char *)(src_ + 229542); /*0xffc264de*/
  v74 = a6 - (_DWORD)a8; /*0xffc264e3*/
  v46 = a5; /*0xffc264e8*/
  v69 = a7; /*0xffc264ec*/
  v47 = 0; /*0xffc264f0*/
  v64 = 0; /*0xffc264f4*/
  LOBYTE(n6_1) = 0; /*0xffc264f8*/
  dst_1 = dst_2; /*0xffc264fc*/
  do /*0xffc266df*/
  {
    v48 = a8; /*0xffc26500*/
    if ( ((1 << v47) & n63a) == 0 ) /*0xffc26510*/
      goto LABEL_25; /*0xffc26510*/
    v49 = *(_DWORD *)v44 | *(_DWORD *)(v44 - 8); /*0xffc26523*/
    v50 = *(_BYTE *)(src__1 + 257312) == 0; /*0xffc26526*/
    j_3 = *(_DWORD *)(v44 - 4) | *(_DWORD *)(v44 - 12); /*0xffc2652d*/
    v70 = v49; /*0xffc26531*/
    if ( v50 ) /*0xffc26535*/
      j_1 = 0; /*0xffc26543*/
    else
      j_1 = *(unsigned __int8 *)(v44 + 5) | *(unsigned __int8 *)(v44 + 4); /*0xffc2653f*/
    *a8 = 0; /*0xffc2654e*/
    if ( *a5 >= 172 || j_3 | v49 | j_1 ) /*0xffc2655e*/
    {
      src = dst_1; /*0xffc265c9*/
      v53 = *(_DWORD *)(v44 + 28) & 7 | (8 * (*(_DWORD *)(v44 + 24) & 7 | 0xFFFFFF80)); /*0xffc265d6*/
      src_1[1] = 1; /*0xffc265d8*/
      v42 = *(_DWORD *)(v44 + 16) & 0x3FFFF | ((*(_DWORD *)(v44 + 20) & 7 | (8 * v53)) << 18); /*0xffc265f6*/
      memset(&src_1[2], 0, 12); /*0xffc265fa*/
      src_1[0] = v42; /*0xffc2660a*/
      if ( !n2 ) /*0xffc26613*/
        src = src_1; /*0xffc26615*/
      qmemcpy(dst, src, sizeof(dst)); /*0xffc26619*/
      if ( (n2 || a9) && (dst[0] & 0xE7FFFFFF) == v42 ) /*0xffc26633*/
      {
        v42 ^= (v42 ^ (dst[0] | (0x8000000 << (*(_DWORD *)(v44 + 20) >> v69)))) & 0x18000000; /*0xffc26652*/
        src_1[2] = j_3 | dst[2]; /*0xffc2665c*/
        src_1[3] = v70 | dst[3]; /*0xffc26668*/
        src_1[0] = v42; /*0xffc26672*/
        src_1[4] = j_1 | dst[4]; /*0xffc26676*/
      }
      qmemcpy(dst_1, src_1, 0x14u); /*0xffc26685*/
      goto LABEL_19; /*0xffc26685*/
    }
    if ( n2 ) /*0xffc2656b*/
    {
      if ( n2 == 2 ) /*0xffc26571*/
      {
        qmemcpy(src_1, dst_1, sizeof(src_1)); /*0xffc26582*/
        v42 = src_1[0]; /*0xffc26584*/
LABEL_19:
        v48 = a8; /*0xffc26687*/
        *a8 = 1; /*0xffc2668e*/
      }
    }
    else
    {
      v42 = 0; /*0xffc26595*/
      memset(src_1, 0, sizeof(src_1)); /*0xffc265aa*/
      qmemcpy(dst_1, src_1, 0x14u); /*0xffc265ae*/
      v48 = a8; /*0xffc265b0*/
    }
    if ( n2 == 2 && (v42 & 0x18000000) != 0 ) /*0xffc2669e*/
    {
      v54 = a9; /*0xffc266ef*/
    }
    else
    {
      v54 = a9; /*0xffc266a0*/
      if ( !a9 ) /*0xffc266a9*/
        goto LABEL_23; /*0xffc266a9*/
    }
    if ( !*v48 ) /*0xffc266f9*/
      goto LABEL_23; /*0xffc266f9*/
    LOBYTE(j_1) = j[0]; /*0xffc266fb*/
    qmemcpy(&src_2[2], src_1, 0x14u); /*0xffc26718*/
    if ( AutoGenFn_FFC25E39(src__1, j_1, n6_1, v54 == 0, src_2[2], src_2[3], src_2[4], src_2[5], src_2[6]) ) /*0xffc2671e*/
    {
      v48 = a8; /*0xffc2672a*/
      v43 = 1; /*0xffc26733*/
      v64 = 1; /*0xffc26734*/
      goto LABEL_24; /*0xffc26738*/
    }
    qmemcpy(src_2, src_1, 0x14u); /*0xffc26752*/
    if ( !AutoGenFn_FFC263B9((char *)src__1, n6_1, src_2[0], src_2[1], src_2[2], src_2[3], src_2[4], src_2[5], v71) ) /*0xffc26762*/
    {
      v48 = a8; /*0xffc26851*/
LABEL_23:
      v43 = v64; /*0xffc266ab*/
LABEL_24:
      v46 = a5; /*0xffc266af*/
      v47 = *(_DWORD *)&j[1]; /*0xffc266b3*/
      goto LABEL_25; /*0xffc266b3*/
    }
    src_1[2] = v71[0]; /*0xffc2677d*/
    v70 = v42 & 0x3FFFF; /*0xffc26780*/
    j_2 = 0; /*0xffc26789*/
    j_3 = 0; /*0xffc2678b*/
    src_1[3] = v71[1]; /*0xffc2678f*/
    v57 = 1 << a8[v74]; /*0xffc26793*/
    src_1[4] = v71[2]; /*0xffc26795*/
    v58 = src_1[0]; /*0xffc26796*/
    if ( v57 ) /*0xffc2679c*/
    {
      while ( 1 ) /*0xffc267a5*/
      {
        j_4 = j_2; /*0xffc267a5*/
        LOBYTE(j_2) = j[0]; /*0xffc267a7*/
        v58 ^= (v58 ^ j_4) & 0x3FFFF; /*0xffc267b5*/
        src_1[0] = v58; /*0xffc267b9*/
        qmemcpy(&src_2[2], src_1, 0x14u); /*0xffc267bd*/
        if ( AutoGenFn_FFC25E39(src__1, j_2, n6_1, 0, src_2[2], src_2[3], src_2[4], src_2[5], src_2[6]) ) /*0xffc267c9*/
          break; /*0xffc267c9*/
        j_2 = j_3 + 1; /*0xffc267e5*/
        j_3 = j_2; /*0xffc267e6*/
        if ( j_2 >= 1 << a8[v74] ) /*0xffc267f1*/
          goto LABEL_37; /*0xffc267f1*/
      }
      v64 = 1; /*0xffc267f5*/
    }
LABEL_37:
    LOBYTE(j_2) = j[0]; /*0xffc267fd*/
    v42 = (v58 ^ v70) & 0x3FFFF ^ v58; /*0xffc26813*/
    src_1[0] = v42; /*0xffc2681a*/
    qmemcpy(&src_2[2], src_1, 0x14u); /*0xffc2681e*/
    v60 = AutoGenFn_FFC25E39(src__1, j_2, n6_1, 0, src_2[2], src_2[3], src_2[4], src_2[5], src_2[6]); /*0xffc2682a*/
    v48 = a8; /*0xffc2682f*/
    v47 = *(_DWORD *)&j[1]; /*0xffc26839*/
    v46 = a5; /*0xffc2683d*/
    if ( v60 ) /*0xffc26843*/
    {
      v43 = 1; /*0xffc26847*/
      v64 = 1; /*0xffc26848*/
    }
    else
    {
      v43 = v64; /*0xffc2685d*/
    }
LABEL_25:
    ++v46; /*0xffc266b7*/
    dst_1 += 20; /*0xffc266be*/
    ++v47; /*0xffc266c5*/
    LOBYTE(n6_1) = n6_1 + 1; /*0xffc266c6*/
    v44 += 44; /*0xffc266ca*/
    *(_DWORD *)&j[1] = v47; /*0xffc266cd*/
    a5 = v46; /*0xffc266d2*/
    a8 = v48 + 1; /*0xffc266d6*/
  }
  while ( (unsigned __int8)n6_1 < 6u ); /*0xffc266df*/
  return v43; /*0xffc266e7*/
}

// Function: AutoGenFunc6866 @ 0xffc26866 (0x6d0 bytes)
// Index: 123/2560

int __fastcall AutoGenFunc6866(unsigned __int8 *n6, int n6a, int a3, unsigned __int8 n8, char a5, char *a6)
{
  unsigned __int8 *n6_1; // ebx
  int n6a_1; // ebp
  unsigned __int8 n2_1; // cl
  __int16 n15600; // ax
  int v10; // edi
  unsigned int v11; // eax
  unsigned __int8 n6_2; // dl
  char v13; // di
  int CpuCount; // eax
  unsigned __int8 n2_2; // cl
  unsigned __int8 *v16; // esi
  int v17; // eax
  unsigned __int8 v18; // bl
  int v19; // ebp
  unsigned __int8 n6_4; // dl
  char v21; // di
  int n6b_1; // ecx
  char n2_3; // dl
  int v24; // edi
  unsigned __int8 *v25; // esi
  __int16 n1200; // ax
  int n6b_2; // ebp
  int v28; // esi
  unsigned __int8 n6_5; // dl
  int v30; // ecx
  unsigned __int8 v31; // al
  unsigned __int8 v32; // si
  int v33; // eax
  unsigned __int8 n2_5; // cl
  unsigned __int8 *n6aa_1; // esi
  int v36; // edx
  unsigned __int8 v37; // al
  __int16 v38; // si
  unsigned __int16 v39; // di
  unsigned __int8 n6_6; // dl
  char v41; // si
  unsigned ... [12754 chars total]

// Function: AutoGenFunc6F36 @ 0xffc26f36 (0x88 bytes)
// Index: 124/2560

int __fastcall AutoGenFunc6F36(int a1, unsigned __int8 a2, int a3, char n12)
{
  char n2; // al
  unsigned int n128000; // edi

  n2 = *(_BYTE *)(a1 + 240); /*0xffc26f42*/
  if ( n2 == 2 ) /*0xffc26f4a*/
  {
    n128000 = *(_DWORD *)(a1 + 246); /*0xffc26f4c*/
  }
  else
  {
    if ( n2 != 1 || n12 != 12 ) /*0xffc26f5d*/
      return 0; /*0xffc26f5d*/
    n128000 = 128000; /*0xffc26f5f*/
  }
  if ( n128000 ) /*0xffc26f63*/
  {
    KtiFunc8C4(a1, 0x1F400u); /*0xffc26f68*/
    DdrTrainFunc70B9((unsigned __int8 *)a1, a2, 0xFFu); /*0xffc26f75*/
    KtiFunc8C4(a1, n128000); /*0xffc26f7c*/
    DdrTrainFunc70B9((unsigned __int8 *)a1, a2, 0); /*0xffc26f85*/
    KtiFunc8C4(a1, 0x1F400u); /*0xffc26f90*/
    DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "AdvMemTestPauseCondition = %d ms\n", n128000 / 0x3E8); /*0xffc26faf*/
  }
  return 0; /*0xffc26fb8*/
}

// Function: AutoGenFunc6FBE @ 0xffc26fbe (0x32 bytes)
// Index: 125/2560

int __fastcall AutoGenFunc6FBE(unsigned __int8 n6, int a2)
{
  int v2; // eax

  v2 = 44 * n6; /*0xffc26fc3*/
  *(_DWORD *)(v2 + a2) = 0; /*0xffc26fc6*/
  *(_DWORD *)(v2 + a2 + 4) = 0; /*0xffc26fc9*/
  *(_DWORD *)(v2 + a2 + 8) = 0; /*0xffc26fcd*/
  *(_DWORD *)(v2 + a2 + 12) = 0; /*0xffc26fd1*/
  *(_DWORD *)(v2 + a2 + 16) = 0; /*0xffc26fd5*/
  *(_DWORD *)(v2 + a2 + 40) = 0; /*0xffc26fd9*/
  *(_DWORD *)(v2 + a2 + 36) = 0; /*0xffc26fdd*/
  *(_DWORD *)(v2 + a2 + 20) = 0; /*0xffc26fe1*/
  *(_DWORD *)(v2 + a2 + 28) = 0; /*0xffc26fe5*/
  *(_DWORD *)(v2 + a2 + 24) = 0; /*0xffc26fe9*/
  return 0; /*0xffc26fef*/
}

// Function: AutoGenFunc6FF0 @ 0xffc26ff0 (0xc2 bytes)
// Index: 126/2560

char __cdecl AutoGenFunc6FF0(_BYTE *src_, int n6a, int n6, unsigned __int8 a4, _WORD *a5)
{
  char v5; // bl
  __int16 v6; // ax
  int buf; // [esp+4h] [ebp-Ch] BYREF
  int v9; // [esp+8h] [ebp-8h]
  int v10; // [esp+Ch] [ebp-4h] BYREF

  v5 = 0; /*0xffc26ff7*/
  v10 = 0; /*0xffc27000*/
  memset_save_flags(&buf, 0, 6u); /*0xffc27003*/
  if ( *(char *)(1379 * a4 + GetCpuCount((int)src_, n6a, n6) + 128) < 0 ) /*0xffc2702e*/
  {
    LOWORD(buf) = 4; /*0xffc27033*/
    LOWORD(v9) = v9 & 0xF0F | 0x30; /*0xffc27042*/
    DdrTrainFunc466A((int)src_, n6a, n6, a4, (int)&buf); /*0xffc27054*/
    DdrTrainFunc4A71(src_, n6a, buf, v9, 5, (unsigned __int8 *)&v10); /*0xffc27079*/
    v6 = v10 & 0x1FFC; /*0xffc27084*/
    if ( (v10 & 0x1000) != 0 ) /*0xffc2708e*/
      v6 |= 0xE000u; /*0xffc27090*/
    v5 = 1; /*0xffc27099*/
    *a5 = v6 / 8; /*0xffc270a8*/
  }
  return v5; /*0xffc270ad*/
}

// Function: MemAdvTestFailureCheck @ 0xffc270b2 (0x465 bytes)
// Index: 127/2560

// positive sp value has been detected, the output may be wrong!
int __cdecl MemAdvTestFailureCheck(
        unsigned __int8 *__return_address,
        int buf,
        int n63,
        int bufa,
        int a5,
        unsigned __int8 n3,
        int a7,
        int a8,
        unsigned __int8 n8,
        _BYTE *a10,
        char a11)
{
  unsigned __int8 *src__1; // ebx
  int n63a_1; // ebp
  unsigned __int8 n6_3; // dl
  int v14; // edi
  unsigned int *v15; // esi
  unsigned int v16; // eax
  int v17; // ebp
  int v18; // edx
  bool v19; // zf
  int *src__6; // eax
  int v21; // edx
  _BYTE *src__7; // ecx
  __int16 *v23; // edi
  unsigned __int8 n6_4; // dl
  _DWORD *v25; // esi
  int v26; // ebp
  int v28; // [esp-A8h] [ebp-240h]
  int v29; // [esp-A4h] [ebp-23Ch]
  int v30; // [esp-A0h] [ebp-238h]
  int v31; // [esp-9Ch] [ebp-234h]
  unsigned int v32; // [esp-98h] [ebp-230h]
  int v33; // [esp-94h] [ebp-22Ch]
  int v34; // [esp-90h] [ebp-228h]
  int n6_2; // [esp-8Ch] [ebp-224h]
 ... [10325 chars total]

// Function: AutoGenFunc7517 @ 0xffc27517 (0xd9 bytes)
// Index: 128/2560

bool __fastcall AutoGenFunc7517(
        int src_,
        unsigned __int8 n6,
        char n6a,
        char a4,
        unsigned __int8 a5,
        int a6,
        int a7,
        int a8)
{
  unsigned __int8 n3; // bl
  int v11; // ebp
  int v12; // edx
  unsigned __int8 n0x12; // bh
  unsigned int v14; // esi
  unsigned __int8 v15; // dl
  int v16; // eax
  _DWORD v18[3]; // [esp+14h] [ebp-Ch]
  int v19; // [esp+30h] [ebp+10h]

  n3 = 0; /*0xffc2752e*/
  GetCpuCount(src_, n6, n6a); /*0xffc27530*/
  v11 = KtiFunc91AF(src_, n6, n6a, a4); /*0xffc27548*/
  v18[0] = a6; /*0xffc27555*/
  v18[1] = a7; /*0xffc2755d*/
  v18[2] = a8; /*0xffc27561*/
  if ( !(a8 | a7 | a6) ) /*0xffc2755b*/
    return 0; /*0xffc2755b*/
  if ( !*(_BYTE *)(src_ + 257312) ) /*0xffc27567*/
    return 1; /*0xffc27567*/
  v12 = 0; /*0xffc27570*/
  n0x12 = 0; /*0xffc27572*/
  v14 = 0; /*0xffc27574*/
  do /*0xffc275c0*/
  {
    if ( ((v18[v14 >> 3] >> (4 * (v14 & 7))) & 0xF) != 0 ) /*0xffc2758b*/
    {
      LOBYTE(v12) = v12 + 1; /*0xffc2758d*/
      n3 = (v18[v14 >> 3] >> (4 * (v14 & 7))) & 0xF; /*0xffc2758f*/
      v19 = v12; /*0xffc27591*/
      v15 = n0x12 >> 1; /*0xffc27597*/
      if ( (n0x12 & 1) != 0 ) /*0xffc2759c*/
        v15 += 9; /*0xffc2759e*/
      v16 = v15; /*0xffc275ac*/
      v12 = v19; /*0xffc275af*/
      *(_BYTE *)(v16 + v11 + 242 * a5 + 44) |= 0x20u; /*0xffc275b5*/
    }
    ++n0x12; /*0xffc275ba*/
    ++v14; /*0xffc275bc*/
  }
  while ( n0x12 < 0x12u ); /*0xffc275c0*/
  return (unsigned __int8)v12 > 1u /*0xffc275c7*/
      || (_BYTE)v12 == 1 && (n3 == 3 || n3 > 5u && (n3 <= 7u || (unsigned __int8)(n3 - 11) <= 4u));
}

// Function: AutoGenFn_FFC275F0 @ 0xffc275f0 (0x2b2 bytes)
// Index: 129/2560

char __fastcall AutoGenFn_FFC275F0(
        int src_,
        int n6,
        int n63a,
        int *p_n63,
        int buf,
        int a6,
        unsigned __int8 n8,
        char a8,
        char a9)
{
  int n63a_1; // ebp
  unsigned __int8 n6_1; // cl
  unsigned __int8 n6_2; // cl
  int v14; // eax
  int n6_3; // edx
  int v16; // ecx
  int v17; // eax
  int v18; // ebp
  int v19; // edx
  int v20; // ebp
  int v21; // ecx
  bool v22; // zf
  bool v23; // al
  int v25; // [esp+10h] [ebp-138h]
  int v26; // [esp+14h] [ebp-134h]
  int n6a; // [esp+18h] [ebp-130h]
  int v28; // [esp+20h] [ebp-128h]
  int v29; // [esp+24h] [ebp-124h]
  int v30; // [esp+28h] [ebp-120h]
  char n6_4; // [esp+2Ch] [ebp-11Ch]
  _DWORD v32[3]; // [esp+34h] [ebp-114h] BYREF
  int v33[9]; // [esp+40h] [ebp-108h] BYREF

  n63a_1 = n63a; /*0xffc275fc*/
  *p_n63 = n63a; /*0xffc27607*/
  MailBoxFuncD2C5((unsigned __int8 *)src_, n6, n63a, (int)v33); /*0xffc27613*/
  n6_1 = 0; /*0xffc2761b*/
  while ( ((1 << n6_1) & n63a) == 0 ) /*0xffc27624*/
  {
    if ( ++n6_1 >= 6u ) /*0xffc2762b*/
      goto LABEL_7; /*0xffc2762b*/
  }
  if ( (*(_BYTE *)(src_ + 246408) & 4) != 0 ) /*0xffc27636*/
    AutoGenFunc6FBE(n6_1, (int)v33); /*0xffc2763c*/
LABEL_7:
  n6_2 = 0; /*0xffc27641*/
  v14 = 6 * n8; /*0xffc2764b*/
  LOBYTE(n6a) = 0; /*0xffc2764e*/
  while ( 1 ) /*0xffc27656*/
  {
    n6_3 = n6_2; /*0xffc27656*/
    n6_4 = n6_3; /*0xffc27659*/
    v16 = v14 + n6_2; /*0xffc2765d*/
    LOBYTE(v30) = *(_BYTE *)(v16 + buf); /*0xffc2766a*/
    LOBYTE(v25) = *(_BYTE *)(v16 + a6); /*0xffc2767a*/
    if ( ((1 << n6_3) & n63a_1) != 0 ) /*0xffc27685*/
    {
      v17 = 11 * n6_3; /*0xffc2768b*/
      v29 = v17 * 4; /*0xffc2768e*/
      v18 = v33[11 * n6_3 + 1]; /*0xffc27696*/
      v19 = v33[11 * n6_3] | v33[11 * n6_3 + 2]; /*0xffc2769a*/
      v20 = v33[v17 + 3] | v18; /*0xffc2769e*/
      v28 = v19; /*0xffc276a9*/
      if ( *(_BYTE *)(src_ + 257312) ) /*0xffc276a2*/
        v21 = BYTE1(v33[v17 + 4]) | LOBYTE(v33[v17 + 4]); /*0xffc276bd*/
      else
        v21 = 0; /*0xffc276c1*/
      v22 = (*(_BYTE *)(src_ + 246408) & 4) == 0; /*0xffc276c3*/
      v26 = v21; /*0xffc276ca*/
      v32[0] = v19; /*0xffc276ce*/
      v32[1] = v20; /*0xffc276d2*/
      v32[2] = v21; /*0xffc276d6*/
      if ( v22 && v19 | v20 | v21 ) /*0xffc276e4*/
      {
        if ( ProcCommonFuncFB4A(src_, 3u) ) /*0xffc276ef*/
        {
          KtiFunc8014(src_); /*0xffc27707*/
          DebugPrint(src_, 3, n6, n6a, v30, v25, 255, 255, "MemTest Failure!\n"); /*0xffc27724*/
          DebugPrint(src_, 3, n6, n6a, v30, v25, 255, 255, "B0:B3 = 0x%x\n", v28); /*0xffc27743*/
          DebugPrint(src_, 3, n6, n6a, v30, v25, 255, 255, "B4:B7 = 0x%x\n", v20); /*0xffc27765*/
          if ( *(_BYTE *)(src_ + 257312) ) /*0xffc2776d*/
            DebugPrint(src_, 3, n6, n6a, v30, v25, 255, 255, "ECC = 0x%x\n", v26); /*0xffc27790*/
          KtiFunc834D(src_); /*0xffc27799*/
        }
        v23 = AutoGenFunc7517(src_, n6, n6a, v30, v25, v28, v20, v26); /*0xffc277b5*/
        if ( v23 ) /*0xffc277bf*/
        {
          if ( !a9 ) /*0xffc277c9*/
            return 1; /*0xffc277c9*/
          KtiFunc9671((_BYTE *)src_, n6, n6a, v30, v25); /*0xffc277d7*/
          *p_n63 &= ~(1 << n6_4); /*0xffc277ec*/
          KtiFunc1764((_BYTE *)src_, 11, 28, n6, n6a, v30, v25, 1, a8, *((_BYTE *)&v33[8] + v29), (char *)v32); /*0xffc27812*/
        }
        else if ( !v23 ) /*0xffc2781e*/
        {
          KtiFunc1764((_BYTE *)src_, 48, 28, n6, n6a, v30, v25, 1, a8, *((_BYTE *)&v33[8] + v29), (char *)v32); /*0xffc27844*/
          if ( (*(_DWORD *)(src_ + 134) & 0x200) == 0 ) /*0xffc27856*/
          {
            if ( !a9 ) /*0xffc27860*/
              return 1; /*0xffc27893*/
            KtiFunc9671((_BYTE *)src_, n6, n6a, v30, v25); /*0xffc2786a*/
          }
        }
      }
      n63a_1 = n63a; /*0xffc27872*/
    }
    n6_2 = n6a + 1; /*0xffc2787d*/
    LOBYTE(n6a) = n6_2; /*0xffc2787f*/
    if ( n6_2 >= 6u ) /*0xffc27886*/
      break; /*0xffc27886*/
    v14 = 6 * n8; /*0xffc27888*/
  }
  return 0; /*0xffc27897*/
}

// Function: AutoGenTableEntryFind @ 0xffc278a2 (0x9b bytes)
// Index: 130/2560

BOOL __fastcall AutoGenTableEntryFind(int a1, char *buf, unsigned int n20, _DWORD *p_j)
{
  unsigned int n20_1; // esi
  char *buf_1; // edi
  char v9[7]; // [esp+10h] [ebp-24h] BYREF
  int v10; // [esp+17h] [ebp-1Dh]
  _BYTE v11[7]; // [esp+20h] [ebp-14h] BYREF
  int v12; // [esp+27h] [ebp-Dh]

  AutoGenFunc8E72((int)v11, (char *)a1, 16); /*0xffc278b5*/
  v12 = 0; /*0xffc278ba*/
  n20_1 = 0; /*0xffc278bf*/
  if ( n20 ) /*0xffc278c8*/
  {
    buf_1 = buf; /*0xffc278ca*/
    while ( 1 ) /*0xffc278d4*/
    {
      AutoGenFunc8E72((int)v9, buf_1, 16); /*0xffc278d4*/
      v10 = 0; /*0xffc278d9*/
      if ( v9[0] != 1 ) /*0xffc278e8*/
        break; /*0xffc278e8*/
      if ( !AutoGenFunc8E45((int)v11, v9, 16) ) /*0xffc278fe*/
      {
        *(_DWORD *)&buf[16 * n20_1 + 7] |= *(_DWORD *)(a1 + 7); /*0xffc27913*/
        goto LABEL_9; /*0xffc27917*/
      }
      ++n20_1; /*0xffc27900*/
      buf_1 += 16; /*0xffc27901*/
      if ( n20_1 >= n20 ) /*0xffc27908*/
        goto LABEL_9; /*0xffc27908*/
    }
    AutoGenFunc8E72((int)buf_1, (char *)a1, 16); /*0xffc2791b*/
  }
LABEL_9:
  *p_j = n20_1 + 1; /*0xffc27923*/
  return n20_1 == n20; /*0xffc2792a*/
}

// Function: AutoGenFn_FFC2793D @ 0xffc2793d (0x64f bytes)
// Index: 131/2560

int __fastcall AutoGenFn_FFC2793D(
        int src_,
        _BYTE *__return_address,
        int n63,
        _BYTE *buf,
        _BYTE *a5,
        unsigned __int8 a6,
        unsigned __int8 a7,
        unsigned __int8 a8,
        _BYTE *a9)
{
  int src__1; // ebx
  int n63_1; // esi
  unsigned __int8 n6_1; // dl
  unsigned int v12; // edi
  unsigned int *v13; // ebp
  unsigned int v14; // eax
  unsigned __int8 v15; // cl
  unsigned int v16; // eax
  char v17; // si
  int v18; // esi
  unsigned int v19; // eax
  int v20; // esi
  int src; // ebp
  char v22; // al
  int *buf_2; // esi
  int n3; // edi
  int *v25; // edx
  int *buf_4; // ecx
  int n3_1; // esi
  int v28; // eax
  int CpuCount; // eax
  bool v30; // zf
  unsigned int i; // edx
  int v32; // edi
  char v33; // al
  int n0x12_2; // ebp
  char n0x12_1; // si
  int v36; // eax
  unsigned int n20; // esi
  unsigned int n20_1; // eax
  BOOL v39; // edx
  unsigned __int16 v40; // di
  unsigned __int8 v41; // bl
  unsigned int... [13385 chars total]

// Function: AutoGenFunc7F8C @ 0xffc27f8c (0x34b bytes)
// Index: 132/2560

int __fastcall AutoGenFunc7F8C(
        int __return_address,
        int n6,
        int n63,
        unsigned int *a4,
        _BYTE *buf,
        _BYTE *a6,
        unsigned __int8 a7,
        char a8,
        char a9)
{
  unsigned __int8 n6a_1; // dl
  _DWORD *v12; // ebp
  int v13; // edi
  int v14; // ebx
  _BYTE *v15; // ecx
  int bufa_1; // eax
  unsigned __int8 v17; // dh
  int v18; // eax
  unsigned int v19; // ecx
  char v20; // di
  int v21; // edi
  int v22; // eax
  unsigned int *v23; // eax
  unsigned int *v24; // ebp
  int v25; // edx
  int v26; // ebx
  bool v27; // al
  unsigned int v28; // edx
  bool v29; // cl
  unsigned __int16 v30; // bx
  unsigned __int8 v31; // [esp+11h] [ebp-43h]
  unsigned __int8 v32; // [esp+12h] [ebp-42h]
  int n6a; // [esp+14h] [ebp-40h]
  int v34; // [esp+18h] [ebp-3Ch]
  unsigned __int8 v35; // [esp+1Ch] [ebp-38h]
  int n6_1; // [esp+20h] [ebp-34h]
  int v37; // [esp+24h] [ebp-30h]
  int v38; // [esp+28h] [ebp-2Ch]
  _BYTE *v39; // [esp+34h] [ebp-20h]
  _DWORD *v40; // [esp+38h] [ebp-1Ch]
  int v41; // [esp+40h] [ebp-14h]
  _DWORD v42[3]; // [esp+48h] [ebp-Ch] BYREF
  _BYTE *bufa; // [esp+60h] [ebp+Ch]

  *a4 = n63; /*0xffc27fa6*/
  n6a_1 = 0; /*0xffc27fa8*/
  v12 = (_DWORD *)(__return_address + 229493); /*0xffc27fb3*/
  n6_1 = n6; /*0xffc27fc1*/
  v13 = 1 << a9; /*0xffc27fc5*/
  v14 = 0; /*0xffc27fc7*/
  LOBYTE(n6a) = 0; /*0xffc27fd0*/
  v34 = 0; /*0xffc27fd8*/
  v15 = &a6[6 * a7]; /*0xffc27fdc*/
  bufa_1 = buf - a6; /*0xffc27fe0*/
  v39 = v15; /*0xffc27fe4*/
  v40 = v12; /*0xffc27fe8*/
  bufa = (_BYTE *)(buf - a6); /*0xffc27fec*/
  do /*0xffc2821d*/
  {
    v17 = 0; /*0xffc27ff3*/
    LOBYTE(v38) = v15[bufa_1]; /*0xffc27ff5*/
    LOBYTE(v37) = *v15; /*0xffc27ffb*/
    v32 = 0; /*0xffc27fff*/
    if ( v13 <= 0 ) /*0xffc28005*/
      goto LABEL_23; /*0xffc28005*/
    v18 = 1 << a9; /*0xffc28024*/
    v19 = 8 * (a8 & 7 | (8 * (a7 & 7 | 0xFFFFFF80))); /*0xffc28028*/
    v20 = 0; /*0xffc2802b*/
    do /*0xffc281ed*/
    {
      v31 = 0; /*0xffc28034*/
      v21 = (v19 | v20 & 7) << 18; /*0xffc2803b*/
      if ( !*v12 ) /*0xffc28042*/
        goto LABEL_21; /*0xffc28042*/
      v22 = 0; /*0xffc28048*/
      do /*0xffc281d0*/
      {
        v23 = (unsigned int *)AutoGenFunc110E(__return_address, n6a, v22); /*0xffc28050*/
        v24 = v23; /*0xffc28055*/
        if ( v21 != (*v23 & 0xE7FC0000) ) /*0xffc28065*/
          goto LABEL_19; /*0xffc28065*/
        v25 = v23[2]; /*0xffc2806e*/
        v26 = v23[3]; /*0xffc28071*/
        v41 = v23[4]; /*0xffc28078*/
        v42[2] = v41; /*0xffc2807c*/
        v42[0] = v25; /*0xffc28083*/
        v42[1] = v26; /*0xffc28089*/
        if ( ((1 << v34) & n63) == 0 || !(v25 | v26 | v41) ) /*0xffc2809f*/
          goto LABEL_18; /*0xffc280a1*/
        v27 = AutoGenFunc7517(__return_address, n6_1, n6a, v38, v37, v25, v26, v41); /*0xffc280bc*/
        v28 = *v24; /*0xffc280c1*/
        v29 = v27; /*0xffc280c7*/
        v30 = -1; /*0xffc280c9*/
        v35 = -1; /*0xffc280d2*/
        if ( (*v24 & 0x8000000) != 0 ) /*0xffc280dd*/
        {
          v30 = (v28 >> 18) & 7 | 0xFF00; /*0xffc280ed*/
          v29 = v27; /*0xffc280f0*/
          v35 = v30; /*0xffc280f2*/
        }
        if ( (v28 & 0x10000000) != 0 ) /*0xffc280fd*/
        {
          v30 = v35 | (unsigned __int16)((((v28 >> 18) & 7) + 8) << 8); /*0xffc28112*/
          v35 = v30; /*0xffc28115*/
        }
        if ( v29 ) /*0xffc2811d*/
        {
          KtiFunc9671((_BYTE *)__return_address, n6_1, n6a, v38, v37); /*0xffc28134*/
          *a4 &= ~(1 << v34); /*0xffc28149*/
          if ( v35 != 0xFF ) /*0xffc28153*/
            KtiFunc1764((_BYTE *)__return_address, 11, 28, n6_1, n6a, v38, v37, 1, a8, v35, (char *)v42); /*0xffc28179*/
          if ( HIBYTE(v30) != 255 ) /*0xffc2818d*/
            KtiFunc1764((_BYTE *)__return_address, 11, 28, n6_1, n6a, v38, v37, 1, a8, SHIBYTE(v30), (char *)v42); /*0xffc281b0*/
LABEL_18:
          v14 = v34; /*0xffc281b8*/
          goto LABEL_19; /*0xffc281b8*/
        }
        if ( v29 ) /*0xffc2822d*/
          goto LABEL_18; /*0xffc2822d*/
        if ( v35 != 0xFF ) /*0xffc28237*/
          KtiFunc1764((_BYTE *)__return_address, 48, 28, n6_1, n6a, v38, v37, 1, a8, v35, (char *)v42); /*0xffc2825d*/
        if ( HIBYTE(v30) != 255 ) /*0xffc28275*/
          KtiFunc1764((_BYTE *)__return_address, 48, 28, n6_1, n6a, v38, v37, 1, a8, SHIBYTE(v30), (char *)v42); /*0xffc28295*/
        if ( (*(_DWORD *)(__return_address + 134) & 0x200) != 0 ) /*0xffc282a7*/
          goto LABEL_18; /*0xffc282a7*/
        KtiFunc9671((_BYTE *)__return_address, n6_1, n6a, v38, v37); /*0xffc282bb*/
        v14 = v34; /*0xffc282c7*/
        *a4 &= ~(1 << v34); /*0xffc282d0*/
LABEL_19:
        v12 = v40; /*0xffc281bc*/
        v22 = ++v31; /*0xffc281ca*/
      }
      while ( (unsigned int)v31 < *v40 ); /*0xffc281d0*/
      v18 = 1 << a9; /*0xffc281d6*/
      v17 = v32; /*0xffc281da*/
      v19 = 8 * (a8 & 7 | (8 * (a7 & 7 | 0xFFFFFF80))); /*0xffc281de*/
LABEL_21:
      v20 = ++v17; /*0xffc281e4*/
      v32 = v17; /*0xffc281e7*/
    }
    while ( v17 < v18 ); /*0xffc281ed*/
    v15 = v39; /*0xffc281f3*/
    n6a_1 = n6a; /*0xffc281f7*/
    v13 = 1 << a9; /*0xffc281fb*/
LABEL_23:
    bufa_1 = (int)bufa; /*0xffc281ff*/
    ++n6a_1; /*0xffc28203*/
    ++v14; /*0xffc28205*/
    LOBYTE(n6a) = n6a_1; /*0xffc28206*/
    ++v15; /*0xffc2820a*/
    v34 = v14; /*0xffc2820b*/
    ++v12; /*0xffc2820f*/
    v39 = v15; /*0xffc28212*/
    v40 = v12; /*0xffc28216*/
  }
  while ( n6a_1 < 6u ); /*0xffc2821d*/
  return bufa_1; /*0xffc28223*/
}

// Function: AutoGenFunc82D7 @ 0xffc282d7 (0x2c bytes)
// Index: 133/2560

unsigned __int8 AutoGenFunc82D7()
{
  unsigned __int8 v0; // al
  unsigned __int8 n3; // al

  v0 = __inbyte(0x70u); /*0xffc282dd*/
  __outbyte(0x70u, v0 & 0x80 | 0x4A); /*0xffc282e2*/
  n3 = __inbyte(0x71u); /*0xffc282e9*/
  if ( n3 > 3u ) /*0xffc282ec*/
  {
    n3 = n3; /*0xffc282ee*/
    if ( !n3 ) /*0xffc282f5*/
      return MEMORY[0xFDAF0490] & 2 | 1; /*0xffc28300*/
  }
  return n3; /*0xffc28302*/
}

// Function: AutoGenFunc8303 @ 0xffc28303 (0xc bytes)
// Index: 134/2560

int __thiscall AutoGenFunc8303(void *this)
{
  int (__cdecl **v1)(int); // eax

  v1 = (int (__cdecl **)(int))AutoGenFuncFDC8(this); /*0xffc28303*/
  return v1[4](5); /*0xffc2830e*/
}

// Function: AutoGenFunc830F @ 0xffc2830f (0x32 bytes)
// Index: 135/2560

char __thiscall AutoGenFunc830F(unsigned int n1024068)
{
  if ( (n1024068 & 0xF0000000) != 0 ) /*0xffc28321*/
    DebugPrintEx( /*0xffc2832f*/
      (int)"e:\\hs\\MdePkg\\Library\\BasePciExpressLib\\PciExpressLib.c",
      109,
      (int)"((Address) & ~0xfffffff) == 0");
  return *(_BYTE *)(AutoGenFunc8303((void *)n1024068) + n1024068); /*0xffc2833f*/
}

// Function: AutoGenFunc8341 @ 0xffc28341 (0x41 bytes)
// Index: 136/2560

__int16 __fastcall AutoGenFunc8341(unsigned int n1024064, __int16 a2)
{
  int v4; // eax

  if ( (n1024064 & 0xF0000000) != 0 ) /*0xffc28356*/
    DebugPrintEx( /*0xffc28367*/
      (int)"e:\\hs\\MdePkg\\Library\\BasePciExpressLib\\PciExpressLib.c",
      510,
      (int)"((Address) & ~0xfffffff) == 0");
  v4 = AutoGenFunc8303((void *)n1024064); /*0xffc28370*/
  return AutoGenFunc919((_WORD *)(n1024064 + v4), a2); /*0xffc2837f*/
}

// Function: AutoGenFunc8382 @ 0xffc28382 (0x245 bytes)
// Index: 137/2560

void __fastcall AutoGenFunc8382(
        _BYTE *a1,
        unsigned __int8 a2,
        int a3,
        int n318914684,
        int a5,
        int a6,
        unsigned __int8 n4,
        char a8)
{
  bool v10; // al

  if ( a1 )
  {
    v10 = ProcCommonFuncFB4A((int)a1, 4u); /*0xffc28397*/
    if ( a8 )
    {
      if ( v10
        && n318914684 != 318914684
        && n318914684 != 318914744
        && n318914684 != 318914692
        && n318914684 != 67453084
        && n318914684 != 67453088
        && n318914684 != 67453092
        && n318914684 != 318914708
        && n318914684 != 318914712
        && n318914684 != 318914716
        && n318914684 != 318915088
        && n318914684 != 318915092 )
      {
        KtiFunc8014((int)a1); /*0xffc28532*/
        LogDebugString(a1, (int)"*%d, 1, 0x%x, 1, %d, ", a2, a3, n4); /*0xffc28549*/
        if ( n4 != 1 )
        {
          if ( n4 != 2 )
          {
            if ( n4 != 4 )
            {
              LogDebugString(a1, (int)"\nInvalid Register Size in RegOffset = 0x%X\n", n318914684); /*0xffc28572*/
              AssertPrint(
                a1,
                255,
                (int)"\n\nRC_ASSERT! %s: %u   %s ",
                "e:\\hs\\PurleySktPkg\\Library\\UsraRegisterFilterLib\\UsraRegisterFilterLib.c",
                146,
                "FALSE");
              ProcMemInitCheck((int)a1, 243, 6); /*0xffc2859e*/
              goto LABEL_39; /*0xffc2859e*/
            }
            goto LABEL_19; /*0xffc28563*/
          }
LABEL_20:
          LogDebugString(a1, (int)"0x%04x\n", (unsigned __int16)a6); /*0xffc2849e*/
          goto LABEL_39; /*0xffc284a8*/
        }
LABEL_38:
        LogDebugString(a1, (int)"0x%02x\n", (unsigned __int8)a6); /*0xffc285a8*/
        goto LABEL_39; /*0xffc285b3*/
      }
    }
    else if ( v10
           && n318914684 != 318914684
           && n318914684 != 318914744
           && n318914684 != 318914692
           && n318914684 != 67453084
           && n318914684 != 67453088
           && n318914684 != 67453092
           && n318914684 != 318914708
           && n318914684 != 318914712
           && n318914684 != 318914716
           && n318914684 != 318915088
           && n318914684 != 318915092 )
    {
      KtiFunc8014((int)a1); /*0xffc2842d*/
      LogDebugString(a1, (int)"*%d, 1, 0x%x, 0, %d, ", a2, a3, n4); /*0xffc28444*/
      if ( n4 != 1 )
      {
        if ( n4 != 2 )
        {
          if ( n4 != 4 )
          {
            LogDebugString(a1, (int)"\nInvalid Register Size in RegOffset = 0x%X\n", n318914684); /*0xffc28469*/
            AssertPrint(
              a1,
              255,
              (int)"\n\nRC_ASSERT! %s: %u   %s ",
              "e:\\hs\\PurleySktPkg\\Library\\UsraRegisterFilterLib\\UsraRegisterFilterLib.c",
              114,
              "FALSE");
            ProcMemInitCheck((int)a1, 243, 5); /*0xffc2848c*/
LABEL_39:
            KtiFunc834D((int)a1); /*0xffc285bb*/
            return; /*0xffc285bc*/
          }
LABEL_19:
          LogDebugString(a1, (int)"0x%08x\n", a6); /*0xffc28491*/
          goto LABEL_39; /*0xffc28499*/
        }
        goto LABEL_20; /*0xffc28458*/
      }
      goto LABEL_38; /*0xffc2844f*/
    }
  }
}

// Function: AutoGenFunc85C7 @ 0xffc285c7 (0x86 bytes)
// Index: 138/2560

int __fastcall AutoGenFunc85C7(int a1, unsigned __int16 *a2, int *a3)
{
  _BYTE *v5; // ebp
  unsigned int n318914684; // esi
  int v7; // eax
  int v8; // eax
  __int64 v9; // rax
  int *v10; // ecx
  __int16 v11; // ax

  v5 = *(_BYTE **)(a1 + 12); /*0xffc285cf*/
  n318914684 = *(_DWORD *)a1; /*0xffc285d2*/
  AutoGenFuncAE3E((int)v5); /*0xffc285d5*/
  v7 = (*(_DWORD *)(a1 + 8) >> 8) & 0xF; /*0xffc285e0*/
  if ( v7 ) /*0xffc285e7*/
  {
    v8 = v7 - 1; /*0xffc285e9*/
    if ( v8 ) /*0xffc285ec*/
    {
      if ( v8 == 1 ) /*0xffc285f1*/
      {
        v10 = a3; /*0xffc28605*/
        *a3 = *(_DWORD *)a2; /*0xffc2860b*/
      }
      else
      {
        v9 = AutoGenFunc95F((int)a2); /*0xffc285f4*/
        v10 = a3; /*0xffc285fa*/
        *(_QWORD *)a3 = v9; /*0xffc285fe*/
      }
    }
    else
    {
      v11 = AutoGenFunc8E7(a2); /*0xffc28610*/
      v10 = a3; /*0xffc28616*/
      *(_WORD *)a3 = v11; /*0xffc2861a*/
    }
  }
  else
  {
    v10 = a3; /*0xffc2861f*/
    *(_BYTE *)a3 = *(_BYTE *)a2; /*0xffc28625*/
  }
  AutoGenFunc8382(v5, *(_BYTE *)(a1 + 5), (int)a2, n318914684, (int)v10, *v10, (n318914684 >> 12) & 7, 0); /*0xffc2863e*/
  return 0; /*0xffc28648*/
}

// Function: AutoGenFunc864D @ 0xffc2864d (0x87 bytes)
// Index: 139/2560

int __fastcall AutoGenFunc864D(int a1, int *a2, int *a3)
{
  unsigned int n318914684; // esi
  int v6; // eax
  int v7; // ecx
  int v8; // eax
  int v10; // [esp-4h] [ebp-18h]
  int v11; // [esp-4h] [ebp-18h]
  _BYTE *v12; // [esp+10h] [ebp-4h]

  n318914684 = *(_DWORD *)a1; /*0xffc28659*/
  v12 = *(_BYTE **)(a1 + 12); /*0xffc2865d*/
  AutoGenFuncAE3E((int)v12); /*0xffc28661*/
  v6 = (*(_DWORD *)(a1 + 8) >> 8) & 0xF; /*0xffc28670*/
  v7 = v10; /*0xffc28673*/
  if ( v6 ) /*0xffc28677*/
  {
    v8 = v6 - 1; /*0xffc28679*/
    if ( v8 ) /*0xffc2867c*/
    {
      if ( v8 == 1 ) /*0xffc28681*/
        *a2 = *a3; /*0xffc28695*/
      else
        AutoGenFunc990(a2, *a3, a3[1]); /*0xffc28689*/
    }
    else
    {
      AutoGenFunc919(a2, *(_WORD *)a3); /*0xffc2869e*/
      v7 = v11; /*0xffc286a4*/
    }
  }
  else
  {
    *(_BYTE *)a2 = *(_BYTE *)a3; /*0xffc286a9*/
  }
  AutoGenFunc8382(v12, *(_BYTE *)(a1 + 5), (int)a2, n318914684, v7, *a3, (n318914684 >> 12) & 7, 1); /*0xffc286c4*/
  return 0; /*0xffc286ce*/
}

// Function: AutoGenFunc86D4 @ 0xffc286d4 (0x289 bytes)
// Index: 140/2560

char __fastcall AutoGenFunc86D4(int a1, int a2, unsigned __int8 n2, _DWORD *a4)
{
  int n528; // eax
  char n528_1; // bh
  int v8; // eax
  int v9; // eax
  int v10; // eax
  int v11; // eax
  int v12; // eax

  LOBYTE(n528) = __inbyte(0x81u); /*0xffc286e7*/
  n528_1 = n528; /*0xffc286e8*/
  if ( (n528 & 7) == 5
    && (n2 || (n528 & 0x80u) != 0)
    && (n2 != 1 || (n528 & 0x40) != 0)
    && (n2 != 3 || (n528 & 0x10) != 0) )
  {
    if ( *(_BYTE *)(a1 + 8) != 2
      || *(_BYTE *)(a1 + 5)
      || *(_BYTE *)(a1 + 3) != 19
      || *(_BYTE *)(a1 + 2) != 2
      || (n528 = *(_DWORD *)a1 & 0xFFF, n528 != 528) )
    {
      if ( n2 ) /*0xffc28753*/
      {
        switch ( n2 ) /*0xffc28758*/
        {
          case 1u: /*0xffc28758*/
            AutoGenFunc89B0("[USRA TRACE] Write "); /*0xffc28777*/
            break;
          case 2u: /*0xffc28758*/
            AutoGenFunc89B0("[USRA TRACE] Modify "); /*0xffc28770*/
            break;
          case 3u: /*0xffc28758*/
            AutoGenFunc89B0("[USRA TRACE] GetAddr "); /*0xffc28769*/
            break;
        }
      }
      else
      {
        AutoGenFunc89B0("[USRA TRACE] Read "); /*0xffc2877e*/
      }
      v8 = (*(_DWORD *)(a1 + 8) >> 8) & 0xF; /*0xffc2878a*/
      if ( v8 ) /*0xffc28790*/
      {
        v9 = v8 - 1; /*0xffc28792*/
        if ( v9 ) /*0xffc28795*/
        {
          if ( v9 == 1 ) /*0xffc2879a*/
            AutoGenFunc89B0("DWord "); /*0xffc287a8*/
          else
            AutoGenFunc89B0("QWord "); /*0xffc287a1*/
        }
        else
        {
          AutoGenFunc89B0("Word  "); /*0xffc287af*/
        }
      }
      else
      {
        AutoGenFunc89B0("Byte  "); /*0xffc287b6*/
      }
      if ( (n528_1 & 8) != 0 ) /*0xffc287bf*/
      {
        if ( (unsigned __int8)*(_DWORD *)(a1 + 8) == 2 ) /*0xffc287d0*/
        {
          AutoGenFunc89B0(" Socket:%d  BoxInst:%d  ", *(unsigned __int8 *)(a1 + 5), *(unsigned __int8 *)(a1 + 4)); /*0xffc287e5*/
          switch ( *(_BYTE *)(a1 + 3) ) /*0xffc287fa*/
          {
            case 0: /*0xffc287fa*/
              AutoGenFunc89B0("CHA_MISC  "); /*0xffc28806*/
              break; /*0xffc28806*/
            case 1: /*0xffc287fa*/
              AutoGenFunc89B0("CHA_PMA  "); /*0xffc28810*/
              break; /*0xffc28810*/
            case 2: /*0xffc287fa*/
              AutoGenFunc89B0("CHA CMS  "); /*0xffc28817*/
              break; /*0xffc28817*/
            case 3: /*0xffc287fa*/
              AutoGenFunc89B0("CHABC  "); /*0xffc2881e*/
              break; /*0xffc2881e*/
            case 4: /*0xffc287fa*/
              AutoGenFunc89B0("PCU  "); /*0xffc28825*/
              break; /*0xffc28825*/
            case 5: /*0xffc287fa*/
              AutoGenFunc89B0("VCU  "); /*0xffc2882c*/
              break; /*0xffc2882c*/
            case 6: /*0xffc287fa*/
              AutoGenFunc89B0("M2MEM  "); /*0xffc28833*/
              break; /*0xffc28833*/
            case 7: /*0xffc287fa*/
              AutoGenFunc89B0("MC  "); /*0xffc2883a*/
              break; /*0xffc2883a*/
            case 8: /*0xffc287fa*/
              AutoGenFunc89B0("MCIO  "); /*0xffc28841*/
              break; /*0xffc28841*/
            case 9: /*0xffc287fa*/
              AutoGenFunc89B0("KTI  "); /*0xffc28848*/
              break; /*0xffc28848*/
            case 0xA: /*0xffc287fa*/
              AutoGenFunc89B0("M3KTI  "); /*0xffc2884f*/
              break; /*0xffc2884f*/
            case 0xB: /*0xffc287fa*/
              AutoGenFunc89B0("MCDDC  "); /*0xffc28856*/
              break; /*0xffc28856*/
            case 0xC: /*0xffc287fa*/
              AutoGenFunc89B0("M2UPCIE  "); /*0xffc2885d*/
              break; /*0xffc2885d*/
            case 0xD: /*0xffc287fa*/
              AutoGenFunc89B0("IIO PCIE DMI  "); /*0xffc28864*/
              break; /*0xffc28864*/
            case 0xE: /*0xffc287fa*/
              AutoGenFunc89B0("IIO PCIE  "); /*0xffc2886b*/
              break; /*0xffc2886b*/
            case 0xF: /*0xffc287fa*/
              AutoGenFunc89B0("IIO PCIE NTB  "); /*0xffc28872*/
              break; /*0xffc28872*/
            case 0x10: /*0xffc287fa*/
              AutoGenFunc89B0("IIO CB  "); /*0xffc28879*/
              break; /*0xffc28879*/
            case 0x11: /*0xffc287fa*/
              AutoGenFunc89B0("IIO VTD  "); /*0xffc28880*/
              break; /*0xffc28880*/
            case 0x12: /*0xffc287fa*/
              AutoGenFunc89B0("IIO DFX  "); /*0xffc28887*/
              break; /*0xffc28887*/
            case 0x13: /*0xffc287fa*/
              AutoGenFunc89B0("UBOX  "); /*0xffc2888e*/
              break; /*0xffc2888e*/
            default:
              break;
          }
          AutoGenFunc89B0("FuncBlk:%x  offset:%x ", *(unsigned __int8 *)(a1 + 2), *(_WORD *)a1 & 0xFFF); /*0xffc28894*/
        }
        else if ( !(unsigned __int8)*(_DWORD *)(a1 + 8) ) /*0xffc287c8*/
        {
          AutoGenFunc89B0( /*0xffc288e2*/
            "Seg:%d  Bus:%x  Dev:%x  Func:%x  Offset:%x ",
            *(unsigned __int16 *)(a1 + 4),
            (unsigned __int8)(*(_DWORD *)a1 >> 20),
            (*(_DWORD *)a1 >> 15) & 0x1F,
            (*(_DWORD *)a1 >> 12) & 7,
            *(_DWORD *)a1 & 0xFFF);
        }
      }
      if ( n2 >= 2u )
      {
        LOBYTE(n528) = AutoGenFunc89B0("Physical Address: 0x%x \n", a2);
        return n528; /*0xffc288f9*/
      }
      AutoGenFunc89B0(" (0x%x)  ", a2); /*0xffc28901*/
      v10 = (*(_DWORD *)(a1 + 8) >> 8) & 0xF; /*0xffc2890c*/
      if ( v10 )
      {
        v11 = v10 - 1; /*0xffc28916*/
        if ( v11 )
        {
          if ( v11 == 1 )
            LOBYTE(n528) = AutoGenFunc89B0("Value: %x \n", *a4);
          else
            LOBYTE(n528) = AutoGenFunc89B0("Value: %lx \n", *a4);
          return n528; /*0xffc28935*/
        }
        v12 = *(unsigned __int16 *)a4; /*0xffc2893e*/
      }
      else
      {
        v12 = *(unsigned __int8 *)a4; /*0xffc28946*/
      }
      LOBYTE(n528) = AutoGenFunc89B0("Value: %x \n", v12);
    }
  }
  return n528; /*0xffc28956*/
}

// Function: AutoGenFunc89B0 @ 0xffc289b0 (0x92 bytes)
// Index: 141/2560

char AutoGenFunc89B0(unsigned __int8 *n10, ...)
{
  unsigned __int8 n33; // al
  unsigned int v2; // eax
  unsigned int v3; // ecx
  unsigned __int8 *_r_n_1; // esi
  unsigned __int8 v5; // al
  unsigned int v6; // ecx
  unsigned __int8 *_r_n_2; // esi
  unsigned __int8 v8; // al
  _BYTE _r_n[516]; // [esp+8h] [ebp-204h] BYREF
  va_list va; // [esp+218h] [ebp+Ch] BYREF

  va_start(va, n10);
  UsraRegisterFilter(_r_n, 0x200u, 0, n10, (int)va); /*0xffc289cf*/
  __outbyte(0x72u, 0x5Cu); /*0xffc289df*/
  n33 = __inbyte(0x73u); /*0xffc289e6*/
  if ( n33 == 33 ) /*0xffc289ef*/
  {
    v2 = AutoGenFunc127(_r_n); /*0xffc289f1*/
    v3 = v2; /*0xffc289f6*/
    _r_n_1 = _r_n; /*0xffc289f8*/
    while ( v3 ) /*0xffc28a14*/
    {
      --v3; /*0xffc28a00*/
      do /*0xffc28a09*/
        v5 = __inbyte(0x2FDu); /*0xffc28a06*/
      while ( (v5 & 0x20) == 0 ); /*0xffc28a09*/
      LOBYTE(v2) = *_r_n_1; /*0xffc28a0b*/
      __outbyte(0x2F8u, *_r_n_1++); /*0xffc28a10*/
    }
  }
  else
  {
    v2 = AutoGenFunc127(_r_n); /*0xffc28a18*/
    v6 = v2; /*0xffc28a1d*/
    _r_n_2 = _r_n; /*0xffc28a1f*/
    while ( v6 ) /*0xffc28a3b*/
    {
      --v6; /*0xffc28a27*/
      do /*0xffc28a30*/
        v8 = __inbyte(0x3FDu); /*0xffc28a2d*/
      while ( (v8 & 0x20) == 0 ); /*0xffc28a30*/
      LOBYTE(v2) = *_r_n_2; /*0xffc28a32*/
      __outbyte(0x3F8u, *_r_n_2++); /*0xffc28a37*/
    }
  }
  return v2; /*0xffc28a3d*/
}

// Function: AutoGenFunc8A42 @ 0xffc28a42 (0x111 bytes)
// Index: 142/2560

int AutoGenFunc8A42()
{
  int n3; // eax
  int n3_1; // esi
  int v2; // eax
  unsigned __int16 n0xA1C0; // ax

  n3 = n3_0; /*0xffc28a42*/
  n3_1 = 3; /*0xffc28a4a*/
  if ( n3_0 == 3 )
  {
    v2 = AutoGenFunc8C1A(0, 31, 0); /*0xffc28a59*/
    n0xA1C0 = AutoGenFunc8E7((unsigned __int16 *)(v2 + 2)); /*0xffc28a62*/
    if ( n0xA1C0 >= 0xA1C0u && n0xA1C0 <= 0xA1CFu || n0xA1C0 == 0xA243 || n0xA1C0 >= 0xA240u && n0xA1C0 <= 0xA24Fu )
    {
      n3_1 = 1; /*0xffc28b48*/
    }
    else if ( n0xA1C0 == 0x9D40
           || n0xA1C0 == 0x9D41
           || n0xA1C0 == 0x9D42
           || n0xA1C0 == 0x9D43
           || n0xA1C0 == 0x9D46
           || n0xA1C0 == 0x9D48 )
    {
      n3_1 = 2; /*0xffc28b43*/
    }
    else
    {
      DebugPrintDispatcher(0x80000000, "Unsupported PCH SKU, LpcDeviceId: 0x%04x!\n", n0xA1C0);
      DebugPrintEx( /*0xffc28b37*/
        (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchInfoLib\\PchInfoLib.c",
        252,
        (int)"((BOOLEAN)(0==1))");
    }
    n3_0 = n3_1; /*0xffc28b49*/
    return n3_1; /*0xffc28b4f*/
  }
  return n3; /*0xffc28b51*/
}

// Function: AutoGenFunc8B53 @ 0xffc28b53 (0x18 bytes)
// Index: 143/2560

char AutoGenFunc8B53()
{
  int v0; // eax

  v0 = AutoGenFunc8A42() - 1; /*0xffc28b58*/
  if ( !v0 ) /*0xffc28b5b*/
    return 20; /*0xffc28b68*/
  if ( v0 == 1 ) /*0xffc28b60*/
    return 12; /*0xffc28b65*/
  return 0; /*0xffc28b64*/
}

// Function: AutoGenFunc8B6B @ 0xffc28b6b (0xaf bytes)
// Index: 144/2560

int __thiscall AutoGenFunc8B6B(unsigned int *p_this)
{
  int v3; // edi

  if ( p_this ) /*0xffc28b70*/
  {
    v3 = AutoGenFunc8C1A(0, 31, 2); /*0xffc28bcf*/
    if ( (unsigned __int16)AutoGenFunc8E7((unsigned __int16 *)v3) == 0xFFFF ) /*0xffc28be2*/
    {
      DebugPrintEx( /*0xffc28bfc*/
        (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchCycleDecodingLib\\PchCycleDecodingLib.c",
        303,
        (int)"((BOOLEAN)(0==1))");
      return -2147483645; /*0xffc28c04*/
    }
    else
    {
      *p_this = *(_DWORD *)(v3 + 72) & 0xFFFF0000; /*0xffc28c13*/
      return 0; /*0xffc28c15*/
    }
  }
  else
  {
    DebugPrintDispatcher(0x80000000, "PchPwrmBaseGet Error. Invalid pointer.\n"); /*0xffc28b93*/
    DebugPrintEx( /*0xffc28bb4*/
      (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchCycleDecodingLib\\PchCycleDecodingLib.c",
      293,
      (int)"((BOOLEAN)(0==1))");
    return -2147483646; /*0xffc28bbc*/
  }
}

// Function: AutoGenFunc8C1A @ 0xffc28c1a (0x6e bytes)
// Index: 145/2560

int __cdecl AutoGenFunc8C1A(unsigned __int8 a1, char n17, char n2)
{
  _DWORD v4[4]; // [esp+8h] [ebp-10h] BYREF

  v4[3] = 0; /*0xffc28c2a*/
  v4[1] = 0; /*0xffc28c32*/
  v4[2] = 512; /*0xffc28c3c*/
  v4[0] = (n2 & 7 | (8 * (n17 & 0x1F | (32 * a1)))) << 12; /*0xffc28c59*/
  return AutoGenFunc385((int)v4); /*0xffc28c84*/
}

// Function: AutoGenFunc8C88 @ 0xffc28c88 (0x7d bytes)
// Index: 146/2560

int __cdecl AutoGenFunc8C88(int a1, unsigned int n0x1020)
{
  unsigned int n0x1020_1; // ebx
  unsigned int i; // edx

  if ( !a1 ) /*0xffc28c9e*/
    DebugPrintEx((int)"e:\\hs\\MdePkg\\Library\\BaseLib\\CheckSum.c", 620, (int)"Buffer != ((void *) 0)"); /*0xffc28cab*/
  if ( n0x1020 > -a1 ) /*0xffc28cc4*/
    DebugPrintEx( /*0xffc28cd1*/
      (int)"e:\\hs\\MdePkg\\Library\\BaseLib\\CheckSum.c",
      621,
      (int)"Length <= (0xFFFFFFFF - ((UINTN) Buffer) + 1)");
  n0x1020_1 = 0; /*0xffc28cd9*/
  for ( i = -1; n0x1020_1 < n0x1020; ++n0x1020_1 ) /*0xffc28ce2*/
    i = dword_FFD50E74[(unsigned __int8)i ^ *(unsigned __int8 *)(n0x1020_1 + a1)] ^ (i >> 8); /*0xffc28cf0*/
  return ~i; /*0xffc28d00*/
}

// Function: AutoGenFunc8D05 @ 0xffc28d05 (0xa4 bytes)
// Index: 147/2560

int __cdecl AutoGenFunc8D05(unsigned int a1, _DWORD *p_n17, int *p_n2)
{
  unsigned int v4; // edx
  char v5; // si

  if ( a1 < (unsigned __int8)AutoGenFunc8B53() ) /*0xffc28d14*/
  {
    v4 = 3 * (a1 >> 2); /*0xffc28d6b*/
    v5 = a1 - byte_FFD512EE[v4]; /*0xffc28d7c*/
    *p_n17 = (unsigned __int8)byte_FFD512EC[v4]; /*0xffc28d82*/
    *p_n2 = (*(_DWORD *)(((unsigned __int8)byte_FFD512ED[v4] | 0xFFFFFD00) << 16) >> (4 * v5)) & 7; /*0xffc28da4*/
    return 0; /*0xffc28da6*/
  }
  else
  {
    DebugPrintDispatcher(0x80000000, "GetPchPcieRpDevFun invalid RpNumber %x", a1); /*0xffc28d38*/
    DebugPrintEx( /*0xffc28d57*/
      (int)"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchPcieRpLib\\PchPcieRpLib.c",
      91,
      (int)"((BOOLEAN)(0==1))");
    return -2147483646; /*0xffc28d5f*/
  }
}

// Function: UncoreInitAutoGenAssert @ 0xffc28da9 (0x58 bytes)
// Index: 148/2560

int __cdecl UncoreInitAutoGenAssert()
{
  int v0; // esi
  int result; // eax

  v0 = BaseLibConstructor(); /*0xffc28daf*/
  result = ProcessLibraryEntryPoint(); /*0xffc28db1*/
  if ( (_BYTE)result && v0 < 0 ) /*0xffc28dbc*/
  {
    if ( (unsigned __int8)DebugEnabled() ) /*0xffc28dbe*/
    {
      if ( (unsigned __int8)DebugAssertCheck(0x80000000) ) /*0xffc28dce*/
        DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v0); /*0xffc28ddf*/
    }
    return DebugPrintEx( /*0xffc28df7*/
             "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\IA32\\PurleySktPkg\\Pei\\UncoreInit\\UncoreInit\\DEBUG\\AutoGen.c",
             366,
             "!EFI_ERROR (Status)");
  }
  return result; /*0xffc28dff*/
}

// Function: UncoreInitEntry @ 0xffc28e01 (0x44 bytes)
// Index: 149/2560

EFI_STATUS __cdecl UncoreInitEntry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
  _DWORD buf[169905]; // [esp-A5EC4h] [ebp-A5EC4h] BYREF

  memset_save_flags(buf, 0, 0xA5EC0u); /*0xffc28e1d*/
  buf[62776] = SystemTable; /*0xffc28e25*/
  UncoreInitMain((int)buf); /*0xffc28e32*/
  return 0; /*0xffc28e3f*/
}

// Function: AutoGenFunc8E45 @ 0xffc28e45 (0x2d bytes)
// Index: 150/2560

int __cdecl AutoGenFunc8E45(int a1, char *a2, int a3)
{
  int v3; // edx
  char *v4; // esi
  char v5; // cl
  char v6; // al

  v3 = a3; /*0xffc28e45*/
  if ( !a3 ) /*0xffc28e4d*/
    return 0; /*0xffc28e68*/
  v4 = a2; /*0xffc28e53*/
  while ( 1 ) /*0xffc28e59*/
  {
    v5 = v4[a1 - (_DWORD)a2]; /*0xffc28e59*/
    --v3; /*0xffc28e5c*/
    v6 = *v4++; /*0xffc28e5d*/
    if ( v5 != v6 ) /*0xffc28e62*/
      break; /*0xffc28e62*/
    if ( !v3 ) /*0xffc28e66*/
      return 0; /*0xffc28e66*/
  }
  return 1; /*0xffc28e6a*/
}

// Function: AutoGenFunc8E72 @ 0xffc28e72 (0x20 bytes)
// Index: 151/2560

char __cdecl AutoGenFunc8E72(int a1, char *a2, int a3)
{
  int v3; // edx
  char *v4; // ecx
  char result; // al

  v3 = a3; /*0xffc28e72*/
  if ( a3 ) /*0xffc28e78*/
  {
    v4 = a2; /*0xffc28e7a*/
    do /*0xffc28e8e*/
    {
      result = *v4; /*0xffc28e85*/
      v4[a1 - (_DWORD)a2] = *v4; /*0xffc28e87*/
      ++v4; /*0xffc28e8a*/
      --v3; /*0xffc28e8b*/
    }
    while ( v3 ); /*0xffc28e8e*/
  }
  return result; /*0xffc28e91*/
}

// Function: memset_save_flags @ 0xffc28e92 (0x18 bytes)
// Index: 152/2560

int __cdecl memset_save_flags(void *buf, int value, unsigned int count)
{
  __asm { pushfw } /*0xffc28e93*/
  memset(buf, value, count); /*0xffc28ea3*/
  __asm { popfw } /*0xffc28ea6*/
  return value; /*0xffc28ea8*/
}

// Function: PcieEarlyInit @ 0xffc28eaa (0x4f bytes)
// Index: 153/2560

int __cdecl PcieEarlyInit(int __return_address)
{
  int n20581; // edx
  unsigned __int8 v2; // al

  n20581 = *(_DWORD *)(__return_address + 246420); /*0xffc28eb0*/
  v2 = *(_BYTE *)(__return_address + 246424); /*0xffc28eb6*/
  if ( n20581 != 20581 )
  {
    LogDebugString(
      (_BYTE *)__return_address,
      (int)"Error: Unsupported CPU Family 0x%x and/or Stepping %2x detected. System halted.\n",
      n20581,
      v2);
    __halt(); /*0xffc28ef8*/
  }
  if ( v2 )
    return LogDebugString((_BYTE *)__return_address, (int)"Warning: Newer CPU Stepping %2x detected\n", v2);
  else
    return LogDebugString((_BYTE *)__return_address, (int)"CPU Stepping %2x detected\n", 0); /*0xffc28ecf*/
}

// Function: MrcPrintfDepthCheck @ 0xffc28efd (0x49 bytes)
// Index: 154/2560

int __cdecl MrcPrintfDepthCheck(int __return_address)
{
  unsigned int v1; // ebx
  int result; // eax

  v1 = 0; /*0xffc28f03*/
  result = LogDebugString((_BYTE *)__return_address, (int)"Enhanced Warning Log: \n");
  if ( *(_BYTE *)(__return_address + 9479) && *(_DWORD *)(__return_address + 251136) ) /*0xffc28f1a*/
  {
    do /*0xffc28f40*/
    {
      KtiFunc1972(__return_address, v1 + __return_address + 251148); /*0xffc28f2d*/
      result = *(unsigned __int16 *)(v1 + __return_address + 251148 + 4); /*0xffc28f32*/
      v1 += result; /*0xffc28f36*/
    }
    while ( v1 < *(_DWORD *)(__return_address + 251136) ); /*0xffc28f40*/
  }
  return result; /*0xffc28f43*/
}

// Function: SkuInitPrepare @ 0xffc28f46 (0x35 bytes)
// Index: 155/2560

int __cdecl SkuInitPrepare(_BYTE *__return_address)
{
  int (**v1)(void); // ecx
  int result; // eax
  int (**v3)(void); // [esp+0h] [ebp-4h] BYREF

  v3 = v1; /*0xffc28f49*/
  result = AutoGenFuncFDA9(&unk_FFD51494, 0, 0, &v3); /*0xffc28f57*/
  if ( result >= 0 )
  {
    LogDebugString(__return_address, (int)"DWR: DWR flow detected\n");
    return (*v3)(); /*0xffc28f75*/
  }
  return result; /*0xffc28f79*/
}

// Function: MrcPpibControl @ 0xffc28f7b (0x1fc bytes)
// Index: 156/2560

unsigned __int8 *__cdecl MrcPpibControl(_BYTE *__return_address)
{
  unsigned __int8 v1; // bl
  unsigned __int8 *result; // eax
  unsigned __int8 *v3; // ecx
  int v4; // edi
  unsigned __int8 *v5; // ebx
  int v6; // ebp
  unsigned __int8 *v7; // eax
  int v8; // ecx
  unsigned __int8 *v9; // ebx
  int v10; // ecx
  unsigned __int8 *v11; // eax
  unsigned __int8 v12; // bl
  unsigned __int8 v13; // bh
  bool v14; // zf
  unsigned __int8 *v15; // ebx
  unsigned __int8 *v16; // [esp+8h] [ebp-38h]
  int v17; // [esp+Ch] [ebp-34h]
  int v18; // [esp+10h] [ebp-30h]
  unsigned __int8 *v19; // [esp+14h] [ebp-2Ch]
  unsigned __int8 *v20; // [esp+18h] [ebp-28h]
  unsigned __int8 *v21; // [esp+1Ch] [ebp-24h]
  _BYTE *v22; // [esp+20h] [ebp-20h]
  unsigned __int8 *v23; // [esp+24h] [ebp-1Ch]
  int n4; // [esp+28h] [ebp-18h]
  int n2_1; // [esp+2Ch] [ebp-14h]
  int n6; // [esp+30h] [ebp-10h]
  _BYTE *v27; // [esp+34h] [ebp-Ch]
  _BYTE *v28; // [esp+38h] [ebp-8h]
  int n2; // [esp+3Ch] [ebp-4h]

  AutoGenFunc804(0x72u, 0x71u); /*0xffc28f84*/
  v1 = AutoGenFunc7FD(0x73u); /*0xffc28f94*/
  result = (unsigned __int8 *)LogDebugString(__return_address, (int)"ForceInitialAllDimm Powerfail  :%x\n", v1); /*0xffc28fa0*/
  if ( v1 == 0xAA ) /*0xffc28fab*/
  {
    result = __return_address + 258722; /*0xffc28fb2*/
    n2 = 2; /*0xffc28fb8*/
    v3 = __return_address + 282; /*0xffc28fc0*/
    v28 = __return_address + 258722; /*0xffc28fc6*/
    v4 = 0; /*0xffc28fcb*/
    v27 = __return_address + 282; /*0xffc28fcd*/
    do /*0xffc29169*/
    {
      v5 = result; /*0xffc28fd1*/
      v21 = v3; /*0xffc28fd3*/
      v6 = 0; /*0xffc28fd7*/
      v20 = result; /*0xffc28fd9*/
      n6 = 6; /*0xffc28fdd*/
      do /*0xffc29145*/
      {
        LogDebugString(__return_address, (int)"Nvram socket %x, ch %x, enabled %x \n", v4, v6, *v5); /*0xffc28ff1*/
        LogDebugString(__return_address, (int)"Setup socket %x, ch %x, enabled %x \n", v4, v6, *(v21 - 5)); /*0xffc29007*/
        n2_1 = 2; /*0xffc2900f*/
        v7 = v5 + 411; /*0xffc29017*/
        v8 = 0; /*0xffc2901d*/
        v9 = v21; /*0xffc2901f*/
        v17 = 0; /*0xffc29023*/
        v23 = v7; /*0xffc29027*/
        while ( 1 ) /*0xffc2903f*/
        {
          LogDebugString( /*0xffc2903f*/
            __return_address,
            (int)"Setup socket %x, ch %x,dimm %x, dimmPresent %x \n",
            v4,
            v6,
            v8,
            *(v7 - 15));
          v10 = 0; /*0xffc29048*/
          v16 = v23; /*0xffc2904d*/
          v11 = v23 + 209; /*0xffc29051*/
          v18 = 0; /*0xffc29056*/
          v19 = v9; /*0xffc2905a*/
          v22 = v23 + 209; /*0xffc2905e*/
          n4 = 4; /*0xffc29062*/
          do /*0xffc29109*/
          {
            LogDebugString( /*0xffc2907b*/
              __return_address,
              (int)"Nvram socket %x, ch %x, dimm %x, rank %x, Enable %x \n",
              v4,
              v6,
              v17,
              v10,
              *v11);
            v12 = *v16; /*0xffc29084*/
            LogDebugString( /*0xffc2909a*/
              __return_address,
              (int)"Nvram socket %x, ch %x, dimm %x, rank %x, mapout %x \n",
              v4,
              v6,
              v17,
              v18,
              *v16);
            v13 = *v19; /*0xffc290a3*/
            LogDebugString( /*0xffc290b9*/
              __return_address,
              (int)"Setup socket %x, ch %x, dimm %x, rank %x, mapout %x \n",
              v4,
              v6,
              v17,
              v18,
              *v19);
            if ( v12 == 1 ) /*0xffc290c8*/
            {
              v14 = v13 == 1; /*0xffc290ca*/
              v15 = v20; /*0xffc290cc*/
              if ( !v14 ) /*0xffc290d0*/
              {
                *v16 = 0; /*0xffc290d6*/
                *v20 = 1; /*0xffc290d9*/
                *v22 = 1; /*0xffc290dc*/
              }
            }
            else
            {
              v15 = v20; /*0xffc290e1*/
            }
            v10 = v18 + 1; /*0xffc290e9*/
            ++v19; /*0xffc290ea*/
            ++v18; /*0xffc290ef*/
            ++v16; /*0xffc290f3*/
            v11 = v22 + 242; /*0xffc290fb*/
            v14 = n4-- == 1; /*0xffc29100*/
            v22 += 242; /*0xffc29105*/
          }
          while ( !v14 ); /*0xffc29109*/
          v8 = v17 + 1; /*0xffc29117*/
          v7 = v23 + 1379; /*0xffc29118*/
          ++v17; /*0xffc2911d*/
          v14 = n2_1-- == 1; /*0xffc29121*/
          v23 += 1379; /*0xffc29126*/
          if ( v14 ) /*0xffc2912a*/
            break; /*0xffc2912a*/
          v9 = v19; /*0xffc2902d*/
        }
        v21 += 19; /*0xffc29130*/
        v5 = v15 + 7688; /*0xffc29135*/
        ++v6; /*0xffc2913b*/
        v20 = v5; /*0xffc2913c*/
        --n6; /*0xffc29140*/
      }
      while ( n6 ); /*0xffc29145*/
      ++v4; /*0xffc2914f*/
      v3 = v27 + 119; /*0xffc29154*/
      result = v28 + 48704; /*0xffc29157*/
      v27 += 119; /*0xffc2915c*/
      v14 = n2-- == 1; /*0xffc29160*/
      v28 += 48704; /*0xffc29165*/
    }
    while ( !v14 ); /*0xffc29169*/
  }
  return result; /*0xffc29171*/
}

// Function: AutoGenFunc9177 @ 0xffc29177 (0xf0 bytes)
// Index: 157/2560

char __cdecl AutoGenFunc9177(int __return_address, unsigned __int8 n4, char a3, char a4)
{
  char n2; // bl
  int n127892; // ecx
  unsigned __int32 v6; // eax

  n2 = 0; /*0xffc29181*/
  n127892 = 0; /*0xffc29187*/
  if ( a4 ) /*0xffc29197*/
  {
    if ( !*(_BYTE *)(__return_address + 246412) ) /*0xffc29199*/
      n127892 = 127892; /*0xffc291a1*/
    KtiFunc10BE( /*0xffc291c0*/
      0,
      0xCF8u,
      n127892 & 0xFF00FFFF | ((*(unsigned __int8 *)(6 * n4 + __return_address + 255506) | 0xFFFF8000) << 16));
    v6 = KtiFunc1014(0, 0xCFCu); /*0xffc291cb*/
  }
  else
  {
    v6 = CpuIoRead(__return_address, n4, 0, 67322004); /*0xffc291dd*/
  }
  if ( !*(_BYTE *)(__return_address + 246412) ) /*0xffc291e5*/
  {
    *(_BYTE *)(n4 + __return_address + 246413) = (v6 >> 6) & 3; /*0xffc291f7*/
    switch ( a3 ) /*0xffc29208*/
    {
      case 1: /*0xffc29208*/
        n2 = 2; /*0xffc2920f*/
        break; /*0xffc29211*/
      case 2: /*0xffc29208*/
        n2 = ((v6 & 0xC0) == 0x80) + 3; /*0xffc2921a*/
        break; /*0xffc2921d*/
      case 3: /*0xffc29208*/
        n2 = 5; /*0xffc2921f*/
        break; /*0xffc29221*/
      case 4: /*0xffc29208*/
        if ( (unsigned __int8)v6 >> 6 ) /*0xffc291ef*/
          n2 = ((unsigned __int8)v6 >> 6 == 2) + 6; /*0xffc29232*/
        else
          n2 = 8; /*0xffc29228*/
        break; /*0xffc2922a*/
      case 5: /*0xffc29208*/
        n2 = 9; /*0xffc29237*/
        break; /*0xffc29239*/
      case 6: /*0xffc29208*/
        if ( (unsigned __int8)v6 >> 6 ) /*0xffc291ef*/
          n2 = ((unsigned __int8)v6 >> 6 == 2) + 10; /*0xffc2924a*/
        else
          n2 = 12; /*0xffc29240*/
        break; /*0xffc29242*/
      case 7: /*0xffc29208*/
        if ( (unsigned __int8)v6 >> 6 ) /*0xffc291ef*/
          n2 = ((unsigned __int8)v6 >> 6 == 2) + 13; /*0xffc2925e*/
        else
          n2 = 15; /*0xffc29254*/
        break; /*0xffc29256*/
      default:
        return n2;
    }
  }
  return n2; /*0xffc29261*/
}

// Function: nullsub_6 @ 0xffc2928a (0x1 bytes)
// Index: 158/2560

void nullsub_6()
{
  ; /*0xffc2928a*/
}

// Function: InitializeDefaultData @ 0xffc2928b (0x51a bytes)
// Index: 159/2560

void __cdecl InitializeDefaultData(int __return_address)
{
  void *v1; // ecx
  int v2; // eax
  int __return_address_1; // ebx
  char v4; // cl
  unsigned int n20581; // edx
  unsigned __int8 SocketNumber; // al
  int SocketNumber_1; // ebp
  unsigned int v8; // eax
  _BYTE *v9; // esi
  char v10; // dl
  int v11; // ecx
  unsigned __int8 n4_3; // ch
  int v13; // edi
  char n4_2; // ah
  char n2; // dl
  _DWORD *v16; // ebp
  unsigned __int8 n4_4; // di
  int SocketNumber_3; // ebp
  int v19; // esi
  int v20; // eax
  char *v21; // eax
  unsigned __int8 n2_1; // al
  unsigned int v23; // ecx
  char v24; // cl
  _BYTE *v25; // edx
  int p_n3; // [esp+4h] [ebp-40h] BYREF
  unsigned int p_n4; // [esp+8h] [ebp-3Ch] BYREF
  unsigned int v28; // [esp+Ch] [ebp-38h] BYREF
  signed __int64 v29; // [esp+10h] [ebp-34h]
  unsigned int v30; // [esp+18h] [ebp-2Ch]
  unsigned int v31; // [esp+1Ch] [ebp-28h]
  unsigned int v32; // [esp+20h] [ebp-24h]
  int v33; // [esp+24h] [ebp-20h]
  int n4; // [... [10144 chars total]

// Function: InitializePlatformData @ 0xffc297a5 (0x178 bytes)
// Index: 160/2560

char __cdecl InitializePlatformData(int __return_address)
{
  unsigned int v2; // eax
  unsigned int v3; // eax
  int v4; // eax
  char result; // al
  char v6; // [esp+14h] [ebp+8h]

  KtiFunc2176(__return_address); /*0xffc297af*/
  CpuCfgEarlySetup(__return_address); /*0xffc297b5*/
  PlatformDataEarlyInit(__return_address); /*0xffc297bb*/
  PlatformDataLateInit(__return_address); /*0xffc297c1*/
  v6 = GetSocketNumber(__return_address); /*0xffc297cc*/
  *(_WORD *)(__return_address + 251028) = *(_WORD *)(__return_address + 1548); /*0xffc297d8*/
  v2 = *(_DWORD *)(__return_address + 998) & 0xDEFFFFFF; /*0xffc297e5*/
  *(_DWORD *)(__return_address + 243589) = 2; /*0xffc297ea*/
  *(_DWORD *)(__return_address + 628652) = v2; /*0xffc297f4*/
  v3 = *(_DWORD *)(__return_address + 1002) & 0xFFF9FFFD; /*0xffc29802*/
  *(_DWORD *)(__return_address + 244245) = 49; /*0xffc29807*/
  *(_DWORD *)(__return_address + 628656) = v3; /*0xffc29813*/
  if ( (unsigned __int8)KtiFuncE78(__return_address, 0, 9) ) /*0xffc29819*/
    *(_DWORD *)(__return_address + 628656) = *(_DWORD *)(__return_address + 1002) & 0xFFEFFFFF; /*0xffc29830*/
  v4 = CpuIoRead(__return_address, v6, 0, 218120444); /*0xffc29840*/
  if ( *(_BYTE *)(__return_address + 246408) == 4 ) /*0xffc2984f*/
  {
    if ( (v4 & 0x80000) != 0 ) /*0xffc29856*/
    {
      *(_QWORD *)(__return_address + 628652) = KtiFuncEC9(-559038752); /*0xffc29863*/
    }
    else
    {
      *(_DWORD *)(__return_address + 628652) = 0; /*0xffc29871*/
      *(_DWORD *)(__return_address + 628656) = 0; /*0xffc29877*/
    }
  }
  LogDebugString( /*0xffc2988f*/
    (_BYTE *)__return_address,
    (int)"memFlows = 0x%x, memFlowsExt = 0x%x!\n",
    *(_DWORD *)(__return_address + 628652),
    *(_DWORD *)(__return_address + 628656));
  PciCfgWrite(__return_address, 0, 1076863048, -33554432); /*0xffc298a1*/
  *(_DWORD *)(__return_address + 246744) = PciCfgRead(__return_address, 0, 1076863048) & 0xFFFF0000; /*0xffc298b3*/
  LogDebugString(
    (_BYTE *)__return_address,
    (int)"Emulation Value is: %x!\n",
    *(unsigned __int8 *)(__return_address + 246408));
  result = *(_BYTE *)(__return_address + 246408); /*0xffc298cc*/
  switch ( result )
  {
    case 0:
      return LogDebugString((_BYTE *)__return_address, (int)"Running on hardware\n"); /*0xffc29911*/
    case 4:
      LogDebugString((_BYTE *)__return_address, (int)"Running on Simics\n"); /*0xffc298ee*/
      return LogDebugString(
               (_BYTE *)__return_address,
               (int)"Revision: %x\n",
               *(unsigned __int8 *)(__return_address + 246408));
    case 8:
      return LogDebugString((_BYTE *)__return_address, (int)"Running on RTL Simulator\n"); /*0xffc298e6*/
  }
  return result; /*0xffc29918*/
}

// Function: AutoGenFunc991D @ 0xffc2991d (0x1c bytes)
// Index: 161/2560

int __cdecl AutoGenFunc991D(_BYTE *__return_address)
{
  IioEarlyLinkInit((int)__return_address); /*0xffc29921*/
  return LogDebugString(__return_address, (int)"BIOS done set\n"); /*0xffc29938*/
}

// Function: UncoreInitMain @ 0xffc29939 (0x4a6 bytes)
// Index: 162/2560

char __cdecl UncoreInitMain(int __return_address)
{
  unsigned __int8 n4; // bl
  int v2; // eax
  int v3; // esi
  char v4; // si
  char v5; // bl
  unsigned __int8 n6; // bh
  _BYTE *CpuCount; // eax
  int n2; // ecx
  bool v9; // zf
  int v10; // eax
  char v11; // bp
  int v12; // eax
  int v13; // eax
  int n4_2; // [esp+Fh] [ebp-20009h]
  char SocketNumber; // [esp+Fh] [ebp-20009h]
  unsigned __int8 n4_1; // [esp+Fh] [ebp-20009h]
  unsigned __int8 v18; // [esp+14h] [ebp-20004h]
  int v19; // [esp+18h] [ebp-20000h] BYREF

  LogDebugString((_BYTE *)__return_address, (int)"BIOSSIM: InitializeDefaultData() \n");
  InitializeDefaultData(__return_address); /*0xffc29955*/
  LogDebugString((_BYTE *)__return_address, (int)"BIOSSIM: InitializePlatformData() \n");
  InitializePlatformData(__return_address); /*0xffc29966*/
  UncoreInitHeap(__return_address); /*0xffc2996c*/
  *(_BYTE *)(__return_address + 9479) = *(_BYTE *)(__return_address + 1494); /*0xffc29978*/
  *(_BYTE *)(__return_addres... [8997 chars total]

// Function: CollectPrevBootFatalErrors @ 0xffc29ddf (0x48b bytes)
// Index: 163/2560

int __cdecl CollectPrevBootFatalErrors(_BYTE *__return_address)
{
  unsigned __int8 v2; // bh
  unsigned __int8 n4_1; // bl
  char *v4; // edi
  char v5; // bp
  unsigned __int8 n4_3; // bh
  int n4_2; // ebp
  unsigned __int8 n7_1; // bl
  int v9; // eax
  int v10; // eax
  unsigned int v11; // ecx
  signed int v12; // edx
  int v13; // edi
  unsigned int v14; // edx
  __int64 v15; // rax
  int v16; // edi
  int v17; // edx
  unsigned __int8 v18; // bh
  char n2; // bl
  int v20; // edi
  signed int v21; // edi
  int v22; // ecx
  int n7_3; // eax
  unsigned int v24; // eax
  unsigned __int8 v25; // bl
  int v26; // edi
  int v27; // eax
  int v28; // eax
  int v29; // eax
  int v30; // eax
  int v31; // eax
  int v32; // eax
  int v34; // [esp-Ch] [ebp-6Ch]
  unsigned __int8 v35[7]; // [esp+11h] [ebp-4Fh] BYREF
  int n4; // [esp+18h] [ebp-48h]
  int n6; // [esp+1Ch] [ebp-44h]
  char v38[4]; // [esp+20h] [ebp-40h]
  signed int v39; // [esp+24h] [ebp-3Ch]
  int n7_2; // [esp+28h] [ebp-... [8724 chars total]

// Function: ProcMemInitCheck @ 0xffc2a26a (0x122 bytes)
// Index: 164/2560

int __cdecl ProcMemInitCheck(int a1, int a2, int a3)
{
  int v3; // esi
  char v4; // al
  int v5; // edi
  int v6; // ebx
  char v7; // cl
  unsigned __int8 v8; // al

  v3 = a1; /*0xffc2a270*/
  v4 = GetSocketNumber(a1); /*0xffc2a275*/
  v5 = (unsigned __int8)a2; /*0xffc2a27d*/
  v6 = (unsigned __int8)a3; /*0xffc2a283*/
  CpuIoCfgWrite( /*0xffc2a2aa*/
    v3,
    v4,
    0,
    318914688,
    (unsigned __int8)a3 | ((unsigned __int8)a2 << 8) | *(_DWORD *)(v3 + 246768) & 0xFFFF0000);
  HIBYTE(a1) = (*(_BYTE *)(v3 + 1489) & 4) != 0; /*0xffc2a2ba*/
  KtiFunc7B40(v3, a2, a3, (char *)&a1 + 3); /*0xffc2a2c8*/
  if ( *(char *)(v3 + 130) >= 0 || *(_DWORD *)(v3 + 246468) <= 1u )
  {
    LogDebugString(
      (_BYTE *)v3,
      (int)"\nFatalError: SocketId = %d registered Major Code = 0x%2x, Minor Code = 0x%2x \n",
      *(unsigned __int8 *)(v3 + 246425),
      v5,
      v6);
  }
  else
  {
    v7 = a2; /*0xffc2a2e9*/
    *(_BYTE *)(50813 * *(unsigned __int8 *)(v3 + 246425) + v3 + 10191) = 1; /*0xffc2a2f4*/
    *(_BYTE *)(50813 * *(unsigned __int8 *)(v3 + 246425) + v3 + 10192) = v7; /*0xffc2a309*/
    *(_BYTE *)(50813 * *(unsigned __int8 *)(v3 + 246425) + v3 + 10193) = a3; /*0xffc2a320*/
    v8 = *(_BYTE *)(v3 + 246425); /*0xffc2a333*/
    if ( v8 == *(_BYTE *)(v3 + 453660) )
      LogDebugString(
        (_BYTE *)v3,
        (int)"\nFatalError: BSP - SocketId = %d registered Major Code = 0x%2x, Minor Code = 0x%2x \n",
        v8,
        v5,
        v6);
    else
      LogDebugString(
        (_BYTE *)v3,
        (int)"\nFatalError: nonBSP -  SocketId = %d registered Major Code = 0x%2x, Minor Code = 0x%2x \n",
        v8,
        v5,
        v6);
    KtiFunc2F44(v3); /*0xffc2a34c*/
  }
  KtiFuncA833(v3, 1); /*0xffc2a371*/
  return KtiFunc1EF9(v3, a2, a3); /*0xffc2a385*/
}

// Function: AutoGenFuncA38C @ 0xffc2a38c (0x30 bytes)
// Index: 165/2560

int __cdecl AutoGenFuncA38C(_BYTE *__return_address)
{
  int result; // eax

  result = AutoGenFuncA4A4(__return_address); /*0xffc2a39d*/
  if ( result < 0 )
    return LogDebugString(__return_address, (int)"LnvEndofReportToBmc: Reort the End of fail\n");
  return result; /*0xffc2a3ba*/
}

// Function: AutoGenFuncA3BC @ 0xffc2a3bc (0x93 bytes)
// Index: 166/2560

int __cdecl AutoGenFuncA3BC(
        _BYTE *a1,
        unsigned __int8 a2,
        unsigned __int8 a3,
        unsigned __int8 a4,
        unsigned __int8 a5,
        unsigned __int16 a6,
        int a7)
{
  _BYTE v8[4]; // [esp+Ch] [ebp-Ch] BYREF
  unsigned __int16 v9; // [esp+10h] [ebp-8h]
  char n64; // [esp+12h] [ebp-6h]
  int v11; // [esp+13h] [ebp-5h]
  char v12; // [esp+17h] [ebp-1h]

  n64 = 64; /*0xffc2a3d7*/
  v8[2] = a4; /*0xffc2a3e1*/
  v8[3] = a5; /*0xffc2a3e7*/
  v8[0] = a2; /*0xffc2a3f1*/
  v8[1] = a3; /*0xffc2a3f4*/
  v9 = a6; /*0xffc2a3f7*/
  v11 = a7; /*0xffc2a3ff*/
  v12 = 0; /*0xffc2a402*/
  if ( AutoGenFuncA44F((int)a1, (int)v8, 12) < 0 )
    LogDebugString(a1, (int)"LnvReportCsrInfoToBmc: Reort the Status fail\n");
  return LogDebugString(a1, (int)"LnvReportCsrInfoToBmc: Socket:%x Bus:%x/%x/%x-%x: 0x%08x\n", a2, a3, a4, a5, a6, a7);
}

// Function: AutoGenFuncA44F @ 0xffc2a44f (0x55 bytes)
// Index: 167/2560

int __cdecl AutoGenFuncA44F(int a1, int a2, int n12)
{
  int result; // eax
  int v4; // [esp+0h] [ebp-10h] BYREF
  int v5; // [esp+Ch] [ebp-4h] BYREF

  result = (*(int (__cdecl **)(_DWORD, void *, _DWORD, _DWORD, int *))(**(_DWORD **)(a1 + 251104) + 32))( /*0xffc2a46e*/
             *(_DWORD *)(a1 + 251104),
             &unk_FFD514F4,
             0,
             0,
             &v5);
  if ( result >= 0 ) /*0xffc2a476*/
  {
    HIBYTE(a1) = 10; /*0xffc2a47b*/
    result = (*(int (__cdecl **)(int, int, _DWORD, int, int, int, int *, char *))(v5 + 12))( /*0xffc2a494*/
               v5,
               46,
               0,
               122,
               a2,
               n12,
               &v4,
               (char *)&a1 + 3);
    if ( result >= 0 ) /*0xffc2a49c*/
      return 0; /*0xffc2a49e*/
  }
  return result; /*0xffc2a4a0*/
}

// Function: AutoGenFuncA4A4 @ 0xffc2a4a4 (0x55 bytes)
// Index: 168/2560

int __stdcall AutoGenFuncA4A4(_BYTE *__return_address, int a2, int n14)
{
  int result; // eax
  int v4; // [esp+0h] [ebp-10h] BYREF
  int v5; // [esp+Ch] [ebp-4h] BYREF

  result = (*(int (__cdecl **)(_DWORD, void *, _DWORD, _DWORD, int *))(**((_DWORD **)__return_address + 62776) + 32))( /*0xffc2a4c3*/
             *((_DWORD *)__return_address + 62776),
             &unk_FFD514F4,
             0,
             0,
             &v5);
  if ( result >= 0 ) /*0xffc2a4cb*/
  {
    HIBYTE(__return_address) = 10; /*0xffc2a4d0*/
    result = (*(int (__cdecl **)(int, int, _DWORD, int, int, int, int *, char *))(v5 + 12))( /*0xffc2a4e9*/
               v5,
               46,
               0,
               120,
               a2,
               n14,
               &v4,
               (char *)&__return_address + 3);
    if ( result >= 0 ) /*0xffc2a4f1*/
      return 0; /*0xffc2a4f3*/
  }
  return result; /*0xffc2a4f5*/
}

// Function: AutoGenFuncA4F9 @ 0xffc2a4f9 (0x130 bytes)
// Index: 169/2560

int __cdecl AutoGenFuncA4F9(
        _BYTE *__return_address,
        char a2,
        unsigned __int8 a3,
        int a4,
        int a5,
        int a6,
        int a7,
        int a8,
        int a9)
{
  __int16 v9; // di
  __int16 v11; // [esp+10h] [ebp-10h] BYREF
  __int16 v12; // [esp+12h] [ebp-Eh]
  char n64; // [esp+14h] [ebp-Ch]
  int v14; // [esp+15h] [ebp-Bh]
  int v15; // [esp+19h] [ebp-7h]
  char v16; // [esp+1Dh] [ebp-3h]

  v9 = 4 * a3; /*0xffc2a51f*/
  v11 = (unsigned __int8)a2; /*0xffc2a523*/
  n64 = 64; /*0xffc2a52c*/
  v14 = a4; /*0xffc2a537*/
  v12 = v9 + 1025; /*0xffc2a53b*/
  v15 = a5; /*0xffc2a544*/
  v16 = 0; /*0xffc2a54e*/
  if ( AutoGenFuncA4A4(__return_address, (int)&v11, 14) < 0 )
    LogDebugString(__return_address, (int)"LnvReportMcaInfoToBmc: Reort the Status fail\n");
  v11 = (unsigned __int8)a2; /*0xffc2a572*/
  v12 = v9 + 1026; /*0xffc2a576*/
  v14 = a6; /*0xffc2a57f*/
  v15 = a7; /*0xffc2a587*/
  n64 = 64; /*0xffc2a598*/
  v16 = 0; /*0xffc2a59d*/
  if ( AutoGenFuncA4A4(__return_address, (int)&v11, 14) < 0 )
    LogDebugString(__return_address, (int)"LnvReportMcaInfoToBmc: Reort the Address fail\n");
  v11 = (unsigned __int8)a2; /*0xffc2a5c1*/
  v12 = v9 + 1027; /*0xffc2a5c5*/
  v14 = a8; /*0xffc2a5ce*/
  v15 = a9; /*0xffc2a5d6*/
  n64 = 64; /*0xffc2a5e7*/
  v16 = 0; /*0xffc2a5ec*/
  if ( AutoGenFuncA4A4(__return_address, (int)&v11, 14) < 0 )
    LogDebugString(__return_address, (int)"LnvReportMcaInfoToBmc: Reort the Misc fail\n");
  return LogDebugString(__return_address, (int)"LnvReportMcaInfoToBmc: Bank : 0x%x status : 0x%08x-%08x\n", a3, a5, a4);
}

// Function: AutoGenFuncA629 @ 0xffc2a629 (0xaf bytes)
// Index: 170/2560

int __cdecl AutoGenFuncA629(
        int __return_address,
        char n4,
        unsigned __int8 a3,
        unsigned __int8 n7,
        int a5,
        unsigned int a6,
        int a7,
        unsigned int a8,
        int a9,
        unsigned int a10)
{
  int buf; // [esp+8h] [ebp-38h] BYREF
  __int16 n51; // [esp+Ch] [ebp-34h]
  int v13; // [esp+Eh] [ebp-32h]
  __int16 n336; // [esp+14h] [ebp-2Ch]
  int v15; // [esp+16h] [ebp-2Ah]
  char n4_1; // [esp+1Ah] [ebp-26h]
  int v17; // [esp+1Bh] [ebp-25h]
  int n7_1; // [esp+1Fh] [ebp-21h]
  int v19; // [esp+23h] [ebp-1Dh]
  int v20; // [esp+27h] [ebp-19h]
  int v21; // [esp+2Bh] [ebp-15h]
  int v22; // [esp+2Fh] [ebp-11h]
  int v23; // [esp+33h] [ebp-Dh]
  int v24; // [esp+37h] [ebp-9h]
  int v25; // [esp+3Ch] [ebp-4h] BYREF

  v25 = 0; /*0xffc2a63b*/
  AutoGenFunc193((int)&buf, 0x33u); /*0xffc2a63e*/
  AutoGenFuncFF06(1, &v25, 0, 0, 0); /*0xffc2a64c*/
  n4_1 = n4; /*0xffc2a654*/
  v17 = a3; /*0xffc2a65b*/
  v15 = v25; /*0xffc2a663*/
  n51 = 51; /*0xffc2a66e*/
  buf = 22; /*0xffc2a672*/
  v13 = 0; /*0xffc2a679*/
  n336 = 336; /*0xffc2a67c*/
  n7_1 = n7; /*0xffc2a682*/
  v19 = a5 & AutoGenFuncFEC7(a6, 0x20u); /*0xffc2a695*/
  v20 = 0; /*0xffc2a698*/
  v21 = a7 & AutoGenFuncFEC7(a8, 0x20u); /*0xffc2a6ab*/
  v22 = 0; /*0xffc2a6ae*/
  v23 = a9 & AutoGenFuncFEC7(a10, 0x20u); /*0xffc2a6bc*/
  v24 = 0; /*0xffc2a6c4*/
  return KtiFunc7B13(__return_address, (int)&buf); /*0xffc2a6d2*/
}

// Function: AutoGenFuncA6D8 @ 0xffc2a6d8 (0x51 bytes)
// Index: 171/2560

int __cdecl AutoGenFuncA6D8(int a1, unsigned __int8 a2, unsigned __int8 a3, int n67190928)
{
  int n500; // esi
  int result; // eax

  n500 = 500; /*0xffc2a6df*/
  if ( CpuIoRead(a1, a2, a3, n67190928) >= 0 ) /*0xffc2a6f7*/
    return 0; /*0xffc2a6f7*/
  do /*0xffc2a71e*/
  {
    KtiFunc8C4(a1, 0xAu); /*0xffc2a6fe*/
    result = CpuIoRead(a1, a2, a3, n67190928); /*0xffc2a70f*/
    --n500; /*0xffc2a717*/
  }
  while ( n500 && result < 0 ); /*0xffc2a71e*/
  if ( result >= 0 ) /*0xffc2a722*/
    return 0; /*0xffc2a724*/
  return result; /*0xffc2a726*/
}

// Function: DimmConfigPerSocket @ 0xffc2a729 (0x1a1 bytes)
// Index: 172/2560

int __cdecl DimmConfigPerSocket(_BYTE *a1, int a2, int a3, int a4)
{
  int v4; // edi
  int v6; // ebx

  if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffc2a736*/
    LogDebugString(a1, (int)"\n  Wait for mailbox ready\n"); /*0xffc2a747*/
  v4 = AutoGenFuncA6D8(a1, a2, 0, 67190928); /*0xffc2a760*/
  if ( v4 < 0 )
  {
    LogDebugString(a1, (int)"\n  **ERROR! Timeout reached when trying to clear RUN_BUSY flag in PCU. \n"); /*0xffc2a76f*/
    AssertPrint(
      a1,
      255,
      (int)"\n\nRC_ASSERT! %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\MailBox.c",
      132,
      "FALSE");
LABEL_5:
    ProcMemInitCheck((int)a1, 247, 1); /*0xffc2a793*/
    return v4; /*0xffc2a7a5*/
  }
  if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffc2a7ac*/
    LogDebugString(a1, (int)"  Send Data portion of command.  Socket = %u Data sent == 0x%x\n", (unsigned __int8)a2, a4); /*0xffc2a7c5*/
  CpuIoCfgWrite((int)a1, a2, 0, 67190924, a4); /*0xffc2a7db*/
  if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffc2a7e2*/
    LogDebugString(a1, (int)"  Send Pcode mailbox command. Socket = %u Command sent == 0x%x\n", (unsigned __int8)a2, a3); /*0xffc2a7fc*/
  CpuIoCfgWrite((int)a1, a2, 0, 67190928, a3 | 0x80000000); /*0xffc2a816*/
  if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffc2a81d*/
    LogDebugString(a1, (int)"  Wait for mailbox ready\n"); /*0xffc2a82f*/
  v4 = AutoGenFuncA6D8(a1, a2, 0, 67190928); /*0xffc2a843*/
  if ( v4 < 0 )
  {
    LogDebugString(a1, (int)"\n  **ERROR! Timeout reached when trying to clear RUN_BUSY flag in PCU. \n"); /*0xffc2a852*/
    AssertPrint(
      a1,
      255,
      (int)"\n\nRC_ASSERT! %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\MailBox.c",
      178,
      "FALSE");
    goto LABEL_5; /*0xffc2a861*/
  }
  v6 = CpuIoRead((int)a1, a2, 0, 67190928); /*0xffc2a874*/
  if ( v6 < 0 ) /*0xffc2a87b*/
  {
    LogDebugString(a1, (int)"PCU Mailbox Not responding\n"); /*0xffc2a883*/
    ProcMemInitCheck((int)a1, 247, 1); /*0xffc2a890*/
  }
  if ( (_BYTE)v6 ) /*0xffc2a89d*/
  {
    if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffc2a8a1*/
      LogDebugString( /*0xffc2a8bb*/
        a1,
        (int)"\n  **ERROR! PCODE returned MailBox(MB) Error code = %d, MBCommand = %d, MBdata = %d. \n",
        (unsigned __int8)v6,
        a3,
        a4);
  }
  return v6; /*0xffc2a8c5*/
}

// Function: AutoGenFuncA8CA @ 0xffc2a8ca (0x172 bytes)
// Index: 173/2560

int __cdecl AutoGenFuncA8CA(_BYTE *a1, unsigned __int8 a2, int a3, int a4)
{
  int n128; // esi
  int v6; // ebp
  char v8; // [esp+18h] [ebp+8h]

  LogDebugString(a1, -2999892, a2); /*0xffc2a8e0*/
  v8 = 0; /*0xffc2a8ea*/
  while ( AutoGenFuncA6D8((int)a1, a2, 0, 83902592) >= 0 ) /*0xffc2a900*/
  {
    LogDebugString(a1, -2999768, a4); /*0xffc2a910*/
    CpuIoCfgWrite((int)a1, a2, 0, 83902596, a4); /*0xffc2a923*/
    LogDebugString(a1, -2999724, a3 | 0x80000000); /*0xffc2a939*/
    CpuIoCfgWrite((int)a1, a2, 0, 83902592, a3 | 0x80000000); /*0xffc2a948*/
    if ( AutoGenFuncA6D8((int)a1, a2, 0, 83902592) < 0 ) /*0xffc2a95e*/
    {
      LogDebugString(a1, -2999844); /*0xffc2a9bf*/
      AssertPrint( /*0xffc2a9de*/
        a1,
        255,
        -2817780,
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\MailBox.c",
        293,
        "FALSE");
      ProcMemInitCheck((int)a1, 128, 0); /*0xffc2a9eb*/
      return 128; /*0xffc2a9f5*/
    }
    n128 = (unsigned __int16)CpuIoRead((int)a1, a2, 0, 83902592); /*0xffc2a969*/
    LogDebugString(a1, -2999668, n128); /*0xffc2a973*/
    v6 = CpuIoRead((int)a1, a2, 0, 83902596); /*0xffc2a985*/
    LogDebugString(a1, -2999596, v6); /*0xffc2a98e*/
    if ( n128 == 128 && (unsigned __int8)++v8 < 3u ) /*0xffc2a9b1*/
      continue; /*0xffc2a9b1*/
    return n128; /*0xffc2a9b1*/
  }
  LogDebugString(a1, -2999844); /*0xffc2a9fd*/
  AssertPrint(a1, 255, -2817780, "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\MailBox.c", 264, "FALSE"); /*0xffc2aa1c*/
  n128 = 128; /*0xffc2aa23*/
  ProcMemInitCheck((int)a1, 128, 0); /*0xffc2aa2b*/
  return n128; /*0xffc2aa35*/
}

// Function: AutoGenFuncAA3C @ 0xffc2aa3c (0x192 bytes)
// Index: 174/2560

void __cdecl AutoGenFuncAA3C(_BYTE *a1, unsigned __int8 a2, int a3, unsigned int n318914684, int a5, char a6)
{
  bool v6; // al

  if ( a1 )
  {
    v6 = ProcCommonFuncFB4A((int)a1, 4u); /*0xffc2aa50*/
    if ( a6 )
    {
      if ( v6 && n318914684 != 318914684 && n318914684 != 318914744 && n318914684 != 318914692 )
      {
        KtiFunc8014((int)a1); /*0xffc2ab41*/
        LogDebugString(a1, (int)"*%d, 1, 0x%x, 1, %d, ", a2, a3, n318914684 >> 28); /*0xffc2ab5a*/
        if ( n318914684 >> 28 != 1 )
        {
          if ( n318914684 >> 28 != 2 )
          {
            if ( n318914684 >> 28 != 4 )
            {
              LogDebugString(a1, (int)"Invalid register size in reg = 0x%X.\n", n318914684); /*0xffc2ab79*/
              AssertPrint(
                a1,
                255,
                (int)"\n\nRC_ASSERT! %s: %u   %s ",
                "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\PciAccess.c",
                149,
                "FALSE");
              ProcMemInitCheck((int)a1, 243, 1); /*0xffc2aba5*/
              goto LABEL_23; /*0xffc2aba5*/
            }
            goto LABEL_11; /*0xffc2ab70*/
          }
LABEL_12:
          LogDebugString(a1, (int)"0x%04x\n", (unsigned __int16)a5); /*0xffc2ab02*/
          goto LABEL_23; /*0xffc2ab0c*/
        }
LABEL_22:
        LogDebugString(a1, (int)"0x%02x\n", (unsigned __int8)a5); /*0xffc2abaf*/
        goto LABEL_23; /*0xffc2abba*/
      }
    }
    else if ( v6 && n318914684 != 318914684 && n318914684 != 318914744 && n318914684 != 318914692 )
    {
      KtiFunc8014((int)a1); /*0xffc2aa91*/
      LogDebugString(a1, (int)"*%d, 1, 0x%x, 0, %d, ", a2, a3, n318914684 >> 28); /*0xffc2aaaa*/
      if ( n318914684 >> 28 != 1 )
      {
        if ( n318914684 >> 28 != 2 )
        {
          if ( n318914684 >> 28 != 4 )
          {
            LogDebugString(a1, (int)"Invalid register size in reg = 0x%X.\n", n318914684); /*0xffc2aacd*/
            AssertPrint(
              a1,
              255,
              (int)"\n\nRC_ASSERT! %s: %u   %s ",
              "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\PciAccess.c",
              120,
              "FALSE");
            ProcMemInitCheck((int)a1, 243, 0); /*0xffc2aaf0*/
LABEL_23:
            KtiFunc834D((int)a1); /*0xffc2abc2*/
            return; /*0xffc2abc3*/
          }
LABEL_11:
          LogDebugString(a1, (int)"0x%08x\n", a5); /*0xffc2aaf5*/
          goto LABEL_23; /*0xffc2aafd*/
        }
        goto LABEL_12; /*0xffc2aabe*/
      }
      goto LABEL_22; /*0xffc2aab5*/
    }
  }
}

// Function: PciCfgRead @ 0xffc2abce (0x13a bytes)
// Index: 175/2560

int __cdecl PciCfgRead(int a1, int a2, unsigned int a3)
{
  int v3; // ebx
  int v4; // ebp
  unsigned __int8 v5; // cl
  int v6; // edi

  v3 = 0; /*0xffc2abd5*/
  v4 = 0; /*0xffc2abd9*/
  AutoGenFuncAE3E(a1); /*0xffc2abdb*/
  v5 = a2; /*0xffc2abe1*/
  if ( (_BYTE)a2 )
  {
    AutoGenFuncE5EA(a1, "Invalid socket number %u.\n", (unsigned __int8)a2); /*0xffc2abf8*/
    AssertPrint(
      a1,
      255,
      "\n\nRC_ASSERT! %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\PciAccess.c",
      217,
      "FALSE");
    ProcMemInitCheck(a1, 242, 20); /*0xffc2ac20*/
    v5 = a2; /*0xffc2ac25*/
  }
  if ( (unsigned __int8)(a3 >> 20) )
  {
    if ( (unsigned __int8)(a3 >> 20) == 1 )
    {
      AutoGenFuncE5EA(a1, "Invalid bus number 0x%2X.\n", 1); /*0xffc2ac62*/
      AssertPrint(
        a1,
        255,
        "\n\nRC_ASSERT! %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\PciAccess.c",
        232,
        "FALSE");
      ProcMemInitCheck(a1, 242, 21); /*0xffc2ac8a*/
    }
    else
    {
      v4 = 0; /*0xffc2ac4b*/
      if ( (unsigned __int8)(a3 >> 20) != 2 ) /*0xffc2ac43*/
        AutoGenFuncE5EA(a1, "Attempt to access undefined bus number.\n"); /*0xffc2ac4d*/
    }
  }
  else
  {
    v4 = *(unsigned __int8 *)(v5 + a1 + 255636); /*0xffc2ac97*/
  }
  v6 = (a3 & 0xFFFFF) + (v4 << 20) + *(_DWORD *)(a1 + 255662); /*0xffc2acb3*/
  switch ( a3 >> 28 ) /*0xffc2acbf*/
  {
    case 1u: /*0xffc2acbf*/
      v3 = *(unsigned __int8 *)((a3 & 0xFFFFF) + (v4 << 20) + *(_DWORD *)(a1 + 255662)); /*0xffc2ace9*/
      break;
    case 2u: /*0xffc2acbf*/
      v3 = *(unsigned __int16 *)((a3 & 0xFFFFF) + (v4 << 20) + *(_DWORD *)(a1 + 255662)); /*0xffc2ace4*/
      break;
    case 4u: /*0xffc2acbf*/
      v3 = *(_DWORD *)((a3 & 0xFFFFF) + (v4 << 20) + *(_DWORD *)(a1 + 255662)); /*0xffc2ace0*/
      break;
    default:
      AutoGenFuncE5EA(a1, "Invalid register size in reg = 0x%X.\n", a3); /*0xffc2acd6*/
      break;
  }
  AutoGenFuncAA3C(a1, a2, v6, a3, v3, 0); /*0xffc2acf9*/
  return v3; /*0xffc2ad03*/
}

// Function: PciCfgWrite @ 0xffc2ad08 (0x136 bytes)
// Index: 176/2560

int __cdecl PciCfgWrite(int a1, int a2, unsigned int a3, int a4)
{
  int v4; // edi
  unsigned __int8 v5; // cl
  _BYTE *v6; // ebx
  int v7; // eax

  v4 = 0; /*0xffc2ad11*/
  AutoGenFuncAE3E(a1); /*0xffc2ad13*/
  v5 = a2; /*0xffc2ad19*/
  if ( (_BYTE)a2 )
  {
    AutoGenFuncE5EA(a1, "Invalid socket number %u.\n", (unsigned __int8)a2); /*0xffc2ad30*/
    AssertPrint(
      a1,
      255,
      "\n\nRC_ASSERT! %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\PciAccess.c",
      322,
      "FALSE");
    ProcMemInitCheck(a1, 242, 22); /*0xffc2ad58*/
    v5 = a2; /*0xffc2ad5d*/
  }
  if ( (unsigned __int8)(a3 >> 20) )
  {
    if ( (unsigned __int8)(a3 >> 20) == 1 )
    {
      AutoGenFuncE5EA(a1, "Invalid bus number 0x%2X.\n", 1); /*0xffc2ad95*/
      AssertPrint(
        a1,
        255,
        "\n\nRC_ASSERT! %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\PciAccess.c",
        335,
        "FALSE");
      ProcMemInitCheck(a1, 242, 23); /*0xffc2adbd*/
    }
    else if ( (unsigned __int8)(a3 >> 20) != 2 ) /*0xffc2ad7c*/
    {
      AutoGenFuncE5EA(a1, "Attempt to access undefined bus number.\n"); /*0xffc2ad84*/
    }
  }
  else
  {
    v4 = *(unsigned __int8 *)(v5 + a1 + 255636); /*0xffc2adca*/
  }
  v6 = (_BYTE *)((a3 & 0xFFFFF) + (v4 << 20) + *(_DWORD *)(a1 + 255662)); /*0xffc2ade4*/
  switch ( a3 >> 28 ) /*0xffc2adee*/
  {
    case 1u: /*0xffc2adee*/
      v7 = a4; /*0xffc2ae21*/
      *v6 = a4; /*0xffc2ae25*/
      break;
    case 2u: /*0xffc2adee*/
      v7 = a4; /*0xffc2ae18*/
      *(_WORD *)v6 = a4; /*0xffc2ae1c*/
      break;
    case 4u: /*0xffc2adee*/
      v7 = a4; /*0xffc2ae10*/
      *(_DWORD *)v6 = a4; /*0xffc2ae14*/
      break;
    default:
      AutoGenFuncE5EA(a1, "Invalid register size in reg = 0x%X.\n", a3); /*0xffc2ae02*/
      v7 = a4; /*0xffc2ae07*/
      break;
  }
  return AutoGenFuncAA3C(a1, a2, v6, a3, v7, 1); /*0xffc2ae39*/
}

// Function: AutoGenFuncAE3E @ 0xffc2ae3e (0x18 bytes)
// Index: 177/2560

int __cdecl AutoGenFuncAE3E(int a1)
{
  int result; // eax

  if ( a1 ) /*0xffc2ae43*/
    return KtiFunc41B3(a1, 0, 1); /*0xffc2ae4d*/
  return result; /*0xffc2ae55*/
}

// Function: AutoGenFuncAE56 @ 0xffc2ae56 (0xc bytes)
// Index: 178/2560

int __cdecl AutoGenFuncAE56(int __return_address)
{
  *(_BYTE *)(__return_address + 628672) = 0; /*0xffc2ae5a*/
  return __return_address; /*0xffc2ae61*/
}

// Function: AutoGenFuncAE62 @ 0xffc2ae62 (0x1a bytes)
// Index: 179/2560

int __cdecl AutoGenFuncAE62(int __return_address)
{
  *(_BYTE *)(__return_address + 628672) = 1; /*0xffc2ae66*/
  *(_DWORD *)(__return_address + 628660) = 0; /*0xffc2ae6d*/
  *(_DWORD *)(__return_address + 628664) = 0; /*0xffc2ae74*/
  return __return_address; /*0xffc2ae7b*/
}

// Function: AutoGenFuncAE7C @ 0xffc2ae7c (0x11 bytes)
// Index: 180/2560

char __cdecl AutoGenFuncAE7C(int n6)
{
  char n2; // al

  n2 = 2; /*0xffc2ae80*/
  if ( n6 ) /*0xffc2ae84*/
    return *(_BYTE *)(n6 + 244317); /*0xffc2ae86*/
  return n2; /*0xffc2ae8c*/
}

// Function: AutoGenFuncAE8D @ 0xffc2ae8d (0x3b bytes)
// Index: 181/2560

unsigned int __cdecl AutoGenFuncAE8D()
{
  __int16 v0; // ax

  v0 = KtiFuncEC9(768); /*0xffc2ae94*/
  KtiFunc10BE(0, 3320, ((v0 & 0xFF00) << 8) | 0x8000E9C0); /*0xffc2aeae*/
  return KtiFunc1014(0, 3324) & 0xFC000000; /*0xffc2aec7*/
}

// Function: GetSocketNumber @ 0xffc2aec8 (0x87 bytes)
// Index: 182/2560

char __cdecl GetSocketNumber(int a1)
{
  int v1; // esi
  unsigned int v2; // ebx
  char v3; // al

  if ( a1 ) /*0xffc2aed0*/
    return *(_BYTE *)(a1 + 453660); /*0xffc2af46*/
  v1 = (unsigned __int8)((unsigned __int16)KtiFuncEC9(768) >> 8) << 16; /*0xffc2aeeb*/
  KtiFunc10BE(0, 3320, v1 | 0x8000E9F0); /*0xffc2aef9*/
  v2 = KtiFunc1014(0, 3324); /*0xffc2af0f*/
  KtiFunc10BE(0, 3320, v1 | 0x8000E9F4); /*0xffc2af15*/
  v3 = KtiFunc1014(0, 3324); /*0xffc2af1d*/
  if ( ((v2 >> 4) & 8) == 0 ) /*0xffc2af2f*/
  {
    while ( 1 ) /*0xffc2af3b*/
      ; /*0xffc2af3b*/
  }
  return v3 & 7; /*0xffc2af4d*/
}

// Function: CpuIoRead @ 0xffc2af4f (0x43 bytes)
// Index: 183/2560

int __cdecl CpuIoWrite(int a1, unsigned __int8 a2, unsigned __int8 a3, int a4)
{
  _DWORD v5[4]; // [esp+0h] [ebp-14h] BYREF
  int v6; // [esp+10h] [ebp-4h] BYREF

  v6 = 0; /*0xffc2af5d*/
  v5[2] = 32770; /*0xffc2af66*/
  v5[0] = a4; /*0xffc2af70*/
  v5[3] = a1; /*0xffc2af76*/
  v5[1] = a3 | (a2 << 8); /*0xffc2af80*/
  AutoGenFunc3C4(v5, &v6); /*0xffc2af84*/
  return v6; /*0xffc2af8e*/
}

// Function: CpuIoCfgWrite @ 0xffc2af92 (0x3c bytes)
// Index: 184/2560

int __cdecl CpuIoCfgWrite(int a1, unsigned __int8 a2, unsigned __int8 a3, int a4, int a5)
{
  _DWORD v6[4]; // [esp+0h] [ebp-10h] BYREF

  v6[2] = 32770; /*0xffc2afa5*/
  v6[0] = a4; /*0xffc2afaf*/
  v6[3] = a1; /*0xffc2afb5*/
  v6[1] = a3 | (a2 << 8); /*0xffc2afbf*/
  return AutoGenFunc3DB(v6, &a5); /*0xffc2afca*/
}

// Function: CpuCfgEarlySetup @ 0xffc2afce (0x9c bytes)
// Index: 185/2560

int __cdecl CpuCfgEarlySetup(int __return_address)
{
  int v1; // esi

  v1 = ((int (__cdecl *)(void *))loc_FFC1FD97)(&unk_FFD5159C); /*0xffc2afdb*/
  if ( ProcessLibraryEntryPoint() && v1 < 0 ) /*0xffc2afe8*/
  {
    if ( DebugEnabled() && DebugAssertCheck(0x80000000) ) /*0xffc2aff9*/
      DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v1); /*0xffc2b00a*/
    DebugPrintEx( /*0xffc2b01e*/
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Common\\MrcHooksChipServicesPpiInstall.c",
      63,
      "!EFI_ERROR (Status)");
  }
  LogDebugString((_BYTE *)__return_address, (int)"InstallPpi MrcHooksChipServicesPpiDesc Status = %08x\n", v1); /*0xffc2b031*/
  if ( v1 >= 0 )
  {
    *(_DWORD *)(__return_address + 628684) = &unk_FFD51584; /*0xffc2b057*/
    LogDebugString(
      (_BYTE *)__return_address,
      (int)"CacheMrcChipHooksServicesPpi in HOST: Host->MrcHooksChipServicesPpi = %08x\n",
      &unk_FFD51584);
    return 0; /*0xffc2b065*/
  }
  else
  {
    *(_DWORD *)(__return_address + 628684) = 0; /*0xffc2b03d*/
    return -2147483642; /*0xffc2b044*/
  }
}

// Function: CheckResetRequest @ 0xffc2b06a (0x122 bytes)
// Index: 186/2560

char __cdecl CheckResetRequest(int __return_address)
{
  unsigned __int8 SocketNumber; // bh
  char result; // al
  char v4; // cl
  char v5; // cl
  unsigned __int8 n4; // bl
  char v7; // di
  int v8; // eax
  unsigned __int8 n4_1; // [esp+Ch] [ebp+4h]

  SocketNumber = GetSocketNumber(__return_address); /*0xffc2b077*/
  result = KtiFunc76DB(__return_address); /*0xffc2b079*/
  v4 = *(_BYTE *)(__return_address + 246400); /*0xffc2b080*/
  if ( v4 ) /*0xffc2b088*/
  {
    v5 = v4 | 2; /*0xffc2b08e*/
    *(_BYTE *)(__return_address + 246400) = v5; /*0xffc2b091*/
    if ( (v5 & 2) != 0 ) /*0xffc2b09a*/
    {
      n4 = 0; /*0xffc2b09d*/
      n4_1 = 0; /*0xffc2b0a5*/
      v7 = 0; /*0xffc2b0a9*/
      do /*0xffc2b102*/
      {
        if ( ((1 << v7) & *(_DWORD *)(__return_address + 246468)) != 0 ) /*0xffc2b0b8*/
        {
          v8 = CpuIoRead(__return_address, n4_1, 0, 318914748); /*0xffc2b0c2*/
          if ( (v8 & 0x20) == 0 ) /*0xffc2b0cc*/
          {
            if ( *(_BYTE *)(__return_address + 2) ) /*0xffc2b0ce*/
              v8 |= 0x1000000u; /*0xffc2b0d4*/
            if ( *(_BYTE *)(__return_address + 1) ) /*0xffc2b0d9*/
              v8 |= 0x8000000u; /*0xffc2b0df*/
            CpuIoCfgWrite(__return_address, n4_1, 0, 318914748, v8 | 0x20); /*0xffc2b0f0*/
          }
        }
        ++n4; /*0xffc2b0f8*/
        ++v7; /*0xffc2b0fa*/
        n4_1 = n4; /*0xffc2b0fb*/
      }
      while ( n4 < 4u ); /*0xffc2b102*/
    }
    KtiFunc769E(__return_address); /*0xffc2b107*/
    result = *(_BYTE *)(__return_address + 246400); /*0xffc2b10c*/
    if ( (result & 4) != 0 ) /*0xffc2b115*/
    {
      LogDebugString((_BYTE *)__return_address, (int)"\nPrepare for POWER GOOD RESET.\n"); /*0xffc2b11d*/
      IioEarlyLinkInit((_BYTE *)__return_address); /*0xffc2b123*/
      LogDebugString((_BYTE *)__return_address, (int)"Issue POWER GOOD RESET!\n\n\n\n"); /*0xffc2b12e*/
      KtiFunc786B(__return_address, 4); /*0xffc2b136*/
      __halt(); /*0xffc29287*/
    }
    if ( (result & 2) != 0 ) /*0xffc2b147*/
    {
      LogDebugString((_BYTE *)__return_address, (int)"Issue WARM RESET!\n\n\n\n"); /*0xffc2b14f*/
      AutoGenFunc991D((_BYTE *)__return_address); /*0xffc2b155*/
      KtiFunc4541(__return_address, 0xAFu, 0x42u, 0); /*0xffc2b164*/
      KtiFunc786B(__return_address, 2); /*0xffc2b16c*/
      AutoGenFuncB714(*(_DWORD *)(__return_address + 4 * SocketNumber + 255560) | 0x42094); /*0xffc2b181*/
    }
  }
  return result; /*0xffc2b189*/
}

// Function: PipeExitMain @ 0xffc2b18c (0xbf bytes)
// Index: 187/2560

int __cdecl PipeExitMain(int __return_address)
{
  int result; // eax
  unsigned __int8 n4; // bl
  char v4; // di
  unsigned __int8 n4_1; // [esp+Ch] [ebp+8h]

  result = *(_DWORD *)(__return_address + 116) | *(_DWORD *)(__return_address + 112); /*0xffc2b196*/
  if ( *(_QWORD *)(__return_address + 112) || *(_BYTE *)(__return_address + 246400) == (_BYTE)result ) /*0xffc2b1a1*/
  {
    n4 = 0; /*0xffc2b1a8*/
    n4_1 = 0; /*0xffc2b1ab*/
    v4 = 0; /*0xffc2b1ae*/
    do /*0xffc2b227*/
    {
      if ( n4 != *(_BYTE *)(__return_address + 453660) ) /*0xffc2b1b6*/
      {
        result = 1 << v4; /*0xffc2b1bd*/
        if ( ((1 << v4) & *(_DWORD *)(__return_address + 246468)) != 0 ) /*0xffc2b1c5*/
        {
          CpuIoCfgWrite(__return_address, n4_1, 0, 318914708, 153); /*0xffc2b1d7*/
          while ( CpuIoRead(__return_address, n4_1, 0, 318914708) ) /*0xffc2b1ea*/
            ; /*0xffc2b1df*/
          result = *(_DWORD *)(__return_address + 116) | *(_DWORD *)(__return_address + 112); /*0xffc2b1f9*/
          if ( *(_QWORD *)(__return_address + 112) ) /*0xffc2b1f6*/
          {
            if ( *(_BYTE *)(__return_address + 246411) == 4 ) /*0xffc2b205*/
            {
              do /*0xffc2b21c*/
                result = CpuIoRead(__return_address, n4_1, 0, 318783620); /*0xffc2b212*/
              while ( result ); /*0xffc2b21c*/
            }
          }
        }
      }
      ++n4; /*0xffc2b21e*/
      ++v4; /*0xffc2b220*/
      n4_1 = n4; /*0xffc2b221*/
    }
    while ( n4 < 4u ); /*0xffc2b227*/
    if ( *(_BYTE *)(__return_address + 246427) > 1u ) /*0xffc2b230*/
    {
      MEMORY[0xFEE00300] = 804096; /*0xffc2b23c*/
      do /*0xffc2b244*/
        result = MEMORY[0xFEE00300]; /*0xffc2b23e*/
      while ( (MEMORY[0xFEE00300] & 0x1000) != 0 ); /*0xffc2b244*/
    }
  }
  return result; /*0xffc2b248*/
}

// Function: PipeInitMain @ 0xffc2b24b (0x328 bytes)
// Index: 188/2560

char __cdecl PipeInitMain(int __return_address)
{
  bool v2; // zf
  unsigned __int8 n4_1; // bl
  int v4; // ebp
  unsigned int *v5; // edi
  signed __int64 v6; // rax
  unsigned int i; // ebx
  int v8; // ebp
  BOOL v10; // [esp+10h] [ebp-10h]
  unsigned __int8 n4; // [esp+14h] [ebp-Ch]
  int v12; // [esp+18h] [ebp-8h]
  char v13; // [esp+24h] [ebp+4h]

  v2 = *(_BYTE *)(__return_address + 130) >= 0; /*0xffc2b256*/
  v13 = *(_BYTE *)(__return_address + 246409); /*0xffc2b263*/
  *(_BYTE *)(__return_address + 246409) = 0; /*0xffc2b267*/
  v10 = !v2 && !*(_BYTE *)(__return_address + 246400) && *(_DWORD *)(__return_address + 246404) == 1; /*0xffc2b28c*/
  n4_1 = 0; /*0xffc2b291*/
  v4 = 0; /*0xffc2b293*/
  n4 = 0; /*0xffc2b295*/
  v12 = 0; /*0xffc2b299*/
  do /*0xffc2b55b*/
  {
    *(_BYTE *)(__return_address + 246409) = 0; /*0xffc2b29f*/
    if ( ((1 << v4) & *(_DWORD *)(__return_address + 246468)) != 0 ) /*0xffc2b2b1*/
    {
      if ( n4_1 == *(_BYTE *)(__return_address + 453660) ) /*0xffc2b2bd*/
      {
        v5 = (unsigned int *)&dword_FFD515A8; /*0xffc2b2c6*/
        if ( dword_FFD515A8 ) /*0xffc2b2cb*/
        {
          do /*0xffc2b2f3*/
          {
            v6 = KtiFuncEC9(*v5); /*0xffc2b2d3*/
            if ( v6 < 0 && (v6 & 0x2000000000000000LL) != 0 ) /*0xffc2b2e7*/
              *(_BYTE *)(__return_address + 243533) |= 1u; /*0xffc2b2e9*/
            ++v5; /*0xffc2b2f0*/
          }
          while ( *v5 ); /*0xffc2b2f3*/
        }
      }
      else
      {
        *(_BYTE *)(__return_address + 246736) = 1; /*0xffc2b30b*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914716, __return_address); /*0xffc2b312*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914712, 4); /*0xffc2b322*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914708, 1); /*0xffc2b332*/
        LogDebugString((_BYTE *)__return_address, (int)"Pass PIPE_DISPATCH_SYNCH_PSYSHOST\n"); /*0xffc2b33d*/
        while ( CpuIoRead(__return_address, n4, 0, 318914708) ) /*0xffc2b34e*/
          ; /*0xffc2b345*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914716, (int)AutoGenFuncB573); /*0xffc2b367*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914708, 1); /*0xffc2b377*/
        LogDebugString((_BYTE *)__return_address, (int)"Pass PeiPipeSlaveInit\n"); /*0xffc2b382*/
        while ( CpuIoRead(__return_address, n4, 0, 318914708) ) /*0xffc2b393*/
          ; /*0xffc2b38a*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914708, 1); /*0xffc2b3a9*/
        while ( CpuIoRead(__return_address, n4, 0, 318914708) ) /*0xffc2b3ba*/
          ; /*0xffc2b3b1*/
        if ( CpuIoRead(__return_address, n4, 0, 318914716) ) /*0xffc2b3ce*/
        {
          *(_BYTE *)(__return_address + 243533) |= 1u; /*0xffc2b3da*/
          LogDebugString((_BYTE *)__return_address, (int)"\nSocket %d indicates an uncorrectable error\n", v4); /*0xffc2b3e8*/
        }
        CpuIoCfgWrite(__return_address, n4, 0, 318914716, __return_address); /*0xffc2b3fa*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914708, 1); /*0xffc2b40a*/
        LogDebugString((_BYTE *)__return_address, (int)"Pass pointer to host\n"); /*0xffc2b415*/
        while ( CpuIoRead(__return_address, n4, 0, 318914708) ) /*0xffc2b426*/
          ; /*0xffc2b41d*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914716, 169905); /*0xffc2b43f*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914708, 1); /*0xffc2b44f*/
        LogDebugString((_BYTE *)__return_address, (int)"Copy host structure\n"); /*0xffc2b45a*/
        while ( CpuIoRead(__return_address, n4, 0, 318914708) ) /*0xffc2b46b*/
          ; /*0xffc2b462*/
        LogDebugString((_BYTE *)__return_address, (int)"\nSynch of host structure to Socket %x starting...\n", v4); /*0xffc2b47e*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914716, v10); /*0xffc2b490*/
        CpuIoCfgWrite(__return_address, n4, 0, 318914708, 1); /*0xffc2b4a0*/
        if ( v10 ) /*0xffc2b4ad*/
        {
          ProcCommonFuncFCAF((_BYTE *)__return_address, n4); /*0xffc2b4b1*/
        }
        else
        {
          for ( i = 0; i < 0x297B1; ++i ) /*0xffc2b4bd*/
          {
            v8 = *(_DWORD *)(__return_address + 4 * i); /*0xffc2b4bf*/
            if ( v8 ) /*0xffc2b4c4*/
            {
              while ( CpuIoRead(__return_address, n4, 0, 318914708) ) /*0xffc2b4cf*/
                ; /*0xffc2b4c6*/
              CpuIoCfgWrite(__return_address, n4, 0, 318914716, v8); /*0xffc2b4e6*/
              CpuIoCfgWrite(__return_address, n4, 0, 318914708, (16 * i) | 1); /*0xffc2b4fc*/
            }
          }
          while ( CpuIoRead(__return_address, n4, 0, 318914708) ) /*0xffc2b51a*/
            ; /*0xffc2b516*/
          CpuIoCfgWrite(__return_address, n4, 0, 318914716, 0); /*0xffc2b52f*/
          CpuIoCfgWrite(__return_address, n4, 0, 318914708, 2718481); /*0xffc2b53d*/
          n4_1 = n4; /*0xffc2b542*/
          v4 = v12; /*0xffc2b549*/
        }
      }
    }
    ++n4_1; /*0xffc2b54d*/
    ++v4; /*0xffc2b54f*/
    n4 = n4_1; /*0xffc2b550*/
    v12 = v4; /*0xffc2b554*/
  }
  while ( n4_1 < 4u ); /*0xffc2b55b*/
  *(_BYTE *)(__return_address + 246409) = v13; /*0xffc2b566*/
  return v13; /*0xffc2b565*/
}

// Function: AutoGenFuncB573 @ 0xffc2b573 (0x196 bytes)
// Index: 189/2560

void __cdecl __noreturn AutoGenFuncB573(int a1, int a2)
{
  _DWORD *v2; // esi
  signed __int64 v3; // rax
  unsigned int *v4; // ebx
  void **p_buf; // edi
  _DWORD *buf_5; // ebx
  char *buf; // edx
  void *buf_2; // ebp
  unsigned int i; // ecx
  unsigned int buf_3; // edi
  unsigned int n0xD; // ecx
  unsigned int n13; // ebp
  _DWORD *v13; // edx
  unsigned int j; // ebx
  _DWORD *v15; // eax
  unsigned int k; // edx
  int v17; // ecx
  _DWORD *v18; // eax
  unsigned int buf_4; // ecx
  char v20; // [esp+13h] [ebp-45h]
  _DWORD *buf_6; // [esp+18h] [ebp-40h]
  char *buf_1; // [esp+1Ch] [ebp-3Ch]
  _DWORD v23[13]; // [esp+24h] [ebp-34h]

  v2 = (_DWORD *)(a2 | 0x94); /*0xffc2b57f*/
  LOBYTE(v3) = 0; /*0xffc2b585*/
  v4 = (unsigned int *)&dword_FFD515A8; /*0xffc2b58c*/
  p_buf = (void **)(a2 | 0x9C); /*0xffc2b591*/
  v20 = 0; /*0xffc2b597*/
  *(_DWORD *)(a2 | 0x94) = 0; /*0xffc2b59b*/
  if ( dword_FFD515A8 ) /*0xffc2b5a3*/
  {
    do /*0xffc2b5cc*/
    {
      v3 = KtiFuncEC9(*v4); /*0xffc2b5a7*/
      LOBYTE(v3) = v20; /*0xffc2b5b0*/
      if ( v3 < 0 && (v3 & 0x2000000000000000LL) != 0 ) /*0xffc2b5bf*/
      {
        LOBYTE(v3) = v20 | 1; /*0xffc2b5c1*/
        v20 |= 1u; /*0xffc2b5c3*/
      }
      ++v4; /*0xffc2b5c7*/
    }
    while ( *v4 ); /*0xffc2b5cc*/
  }
  while ( !*v2 ) /*0xffc2b5d2*/
    ; /*0xffc2b5d0*/
  *p_buf = (void *)(unsigned __int8)v3; /*0xffc2b5d7*/
  *v2 = 0; /*0xffc2b5d9*/
  while ( !*v2 ) /*0xffc2b5dd*/
    ; /*0xffc2b5db*/
  buf_5 = *p_buf; /*0xffc2b5df*/
  buf_6 = *p_buf; /*0xffc2b5e8*/
  memset_save_flags(*p_buf, 0, 0xA5EC0u); /*0xffc2b5ec*/
  *v2 = 0; /*0xffc2b5f6*/
  while ( !*v2 ) /*0xffc2b5fa*/
    ; /*0xffc2b5f8*/
  buf = (char *)*p_buf; /*0xffc2b5fc*/
  buf_1 = (char *)*p_buf; /*0xffc2b5fe*/
  *v2 = 0; /*0xffc2b602*/
  while ( !*v2 ) /*0xffc2b606*/
    ; /*0xffc2b604*/
  buf_2 = *p_buf; /*0xffc2b608*/
  if ( *p_buf == (void *)1 ) /*0xffc2b60d*/
  {
    for ( i = 0; i < 13; ++i ) /*0xffc2b60f*/
      v23[i] = *(_DWORD *)(a2 | dword_FFD52124[i] & 0xFFF); /*0xffc2b622*/
  }
  *v2 = 0; /*0xffc2b630*/
  if ( buf_2 == (void *)1 ) /*0xffc2b635*/
  {
    buf_3 = 0; /*0xffc2b63b*/
    if ( buf ) /*0xffc2b63f*/
    {
      do /*0xffc2b693*/
      {
        while ( !*v2 ) /*0xffc2b643*/
          ; /*0xffc2b641*/
        n0xD = (unsigned int)&buf[-buf_3]; /*0xffc2b647*/
        if ( (unsigned int)&buf[-buf_3] >= 0xD ) /*0xffc2b64c*/
          n13 = 13; /*0xffc2b654*/
        else
          n13 = (unsigned int)&buf[-buf_3]; /*0xffc2b64e*/
        if ( n13 ) /*0xffc2b65b*/
        {
          v13 = &buf_5[buf_3]; /*0xffc2b65d*/
          for ( j = 0; j < n13; ++j ) /*0xffc2b660*/
          {
            v15 = (_DWORD *)(a2 | dword_FFD52124[j] & 0xFFF); /*0xffc2b66e*/
            *v13++ = *v15; /*0xffc2b675*/
          }
          buf_5 = buf_6; /*0xffc2b67e*/
          buf = buf_1; /*0xffc2b684*/
        }
        if ( n0xD > 0xD ) /*0xffc2b68b*/
          *v2 = 0; /*0xffc2b68d*/
        buf_3 += n13; /*0xffc2b68f*/
      }
      while ( buf_3 < (unsigned int)buf ); /*0xffc2b693*/
    }
    for ( k = 0; k < 13; ++k ) /*0xffc2b695*/
    {
      v17 = v23[k]; /*0xffc2b69d*/
      v18 = (_DWORD *)(a2 | dword_FFD52124[k] & 0xFFF); /*0xffc2b6a6*/
      *v18 = v17; /*0xffc2b6ad*/
    }
    *v2 = 0; /*0xffc2b6b4*/
    while ( !*v2 ) /*0xffc2b6bd*/
      ; /*0xffc2b6ba*/
    *v2 = 0; /*0xffc2b6bf*/
  }
  else if ( buf ) /*0xffc2b6c9*/
  {
    do /*0xffc2b6e3*/
    {
      while ( !*v2 ) /*0xffc2b6cd*/
        ; /*0xffc2b6cb*/
      buf_4 = *v2 >> 4; /*0xffc2b6d1*/
      if ( buf_4 < (unsigned int)buf ) /*0xffc2b6d6*/
        buf_5[buf_4] = *p_buf; /*0xffc2b6da*/
      *v2 = 0; /*0xffc2b6df*/
    }
    while ( buf_4 < (unsigned int)buf ); /*0xffc2b6e3*/
  }
  buf_5[63871] = 0; /*0xffc2b6e9*/
  *((_BYTE *)buf_5 + 246425) = a1; /*0xffc2b6f2*/
  ProcCommonFunc252B(buf_5, a1); /*0xffc2b6f8*/
  KtiFunc2ADC(buf_5); /*0xffc2b6fe*/
  AutoGenFuncB714((unsigned int)v2); /*0xffc2b704*/
}

// Function: AutoGenFuncB714 @ 0xffc2b714 (0x241 bytes)
// Index: 190/2560

void __cdecl __noreturn AutoGenFuncB714(unsigned int a1)
{
  unsigned __int32 v2; // eax
  unsigned __int64 v3; // rax
  unsigned __int64 v4; // rax
  unsigned __int64 v5; // rax
  unsigned int v6; // ebx
  unsigned int v7; // edi
  signed __int64 v8; // rax
  __int16 v9; // si
  unsigned int v10; // edi
  unsigned int v11; // edi
  unsigned int v12; // edi
  unsigned __int64 v13; // rax
  unsigned int v14; // edi
  unsigned int v15; // edi
  unsigned __int64 v16; // rax
  unsigned int v17; // edi
  unsigned __int64 v18; // rax

  v2 = __readcr0(); /*0xffc2b71d*/
  __writecr0(v2 | 0x40000000); /*0xffc2b725*/
  __asm { invd } /*0xffc2b728*/
  v3 = __readmsr(0x2FFu); /*0xffc2b72f*/
  LODWORD(v3) = v3 & 0xFFFFF7FF; /*0xffc2b731*/
  __writemsr(0x2FFu, v3); /*0xffc2b736*/
  v4 = __readmsr(0x2E0u); /*0xffc2b73d*/
  LODWORD(v4) = v4 & 0xFFFFFFFD; /*0xffc2b73f*/
  __writemsr(0x2E0u, v4); /*0xffc2b743*/
  LODWORD(v4) = v4 & 0xFFFFFFFE; /*0xffc2b745*/
  __writemsr(0x2E0u, v4); /*0xffc2b749*/
  v5 = __readmsr(0x1A0u); /*0xffc2b750*/
  LODWORD(v5) = v5 | 1; /*0xffc2b752*/
  __writemsr(0x1A0u, v5); /*0xffc2b756*/
  *(_DWORD *)a1 = 0; /*0xffc2b758*/
  v6 = a1 & 0xF0000000; /*0xffc2b76c*/
  v7 = a1 & 0xFFF00000 | 0x40000; /*0xffc2b770*/
  v8 = __readmsr(0x300u); /*0xffc2b77b*/
  if ( v8 < 0 ) /*0xffc2b783*/
  {
    v9 = v8; /*0xffc2b789*/
    v10 = v7 & 0xFFFFF000 | 0x84; /*0xffc2b79b*/
    if ( *(_DWORD *)v10 ) /*0xffc2b79d*/
    {
      v11 = v10 & 0xFFFFF000 | 0x80; /*0xffc2b7b7*/
      if ( *(_DWORD *)v11 ) /*0xffc2b7b9*/
      {
        __writemsr(0xD1u, 0xAu); /*0xffc2b7cb*/
        __writemsr(0xD0u, *(unsigned int *)v11); /*0xffc2b7d6*/
        v12 = v11 & 0xFFFFF000 | 0x84; /*0xffc2b7e8*/
        __writemsr(0xD1u, 0xBu); /*0xffc2b7f6*/
        __writemsr(0xD0u, *(unsigned int *)v12); /*0xffc2b801*/
        v11 = v12 & 0xFFFFF000 | 0x80; /*0xffc2b813*/
        __writemsr(0xD1u, 6u); /*0xffc2b821*/
        v13 = __readmsr(0xD0u); /*0xffc2b828*/
        *(_DWORD *)v11 = v13; /*0xffc2b82a*/
      }
      v14 = v11 & 0xFFFFF000 | 0x7C; /*0xffc2b83c*/
      if ( *(_DWORD *)v14 ) /*0xffc2b83e*/
      {
        __writemsr(0xD1u, 2u); /*0xffc2b850*/
        __writemsr(0xD0u, *(unsigned int *)v14); /*0xffc2b85b*/
        __writemsr(0xD1u, 3u); /*0xffc2b869*/
        v15 = v14 & 0xFFFFF000 | 0x84; /*0xffc2b87b*/
        __writemsr(0xD0u, *(unsigned int *)v15); /*0xffc2b886*/
        v14 = v15 & 0xFFFFF000 | 0x7C; /*0xffc2b898*/
        __writemsr(0xD1u, 6u); /*0xffc2b8a6*/
        v16 = __readmsr(0xD0u); /*0xffc2b8ad*/
        *(_DWORD *)v14 = 0; /*0xffc2b8b2*/
        *(_DWORD *)v14 = (_DWORD)v16 << 16; /*0xffc2b8b8*/
      }
      v17 = v14 & 0xFFFFF000 | 0x84; /*0xffc2b8ca*/
      __writemsr(0xD1u, 1u); /*0xffc2b8d8*/
      __writemsr(0xD0u, *(unsigned int *)v17); /*0xffc2b8e3*/
      v10 = v17 & 0xFFFFF000 | 0x7C; /*0xffc2b8f5*/
      __writemsr(0xD1u, 6u); /*0xffc2b903*/
      v18 = __readmsr(0xD0u); /*0xffc2b90a*/
      *(_WORD *)v10 |= v18; /*0xffc2b90c*/
    }
    if ( (*(_DWORD *)(((v6 | ((v9 & 0xFF00) << 12)) + 954368) | 0xF0) & 0x80) != 0 ) /*0xffc2b932*/
      __outbyte(0xCF9u, 6u); /*0xffc2b93a*/
    else
      *(_DWORD *)(v10 & 0xFFFFF000 | 0x84) = 0; /*0xffc2b951*/
  }
  _disable(); /*0xffc2b953*/
  __halt(); /*0xffc2b954*/
}

// Function: KtiInitMain @ 0xffc2b95c (0x20 bytes)
// Index: 191/2560

char __cdecl KtiInitMain(int __return_address)
{
  int v1; // eax

  KtiFunc79A8(__return_address); /*0xffc2b960*/
  v1 = ProcCommonFunc49BE(__return_address); /*0xffc2b969*/
  return KtiFunc7961(__return_address, v1); /*0xffc2b97b*/
}

// Function: AutoGenFuncB97C @ 0xffc2b97c (0x74 bytes)
// Index: 192/2560

void __cdecl AutoGenFuncB97C(int __return_address, unsigned __int8 n4)
{
  unsigned __int8 n4_1; // bl
  int v3; // ebp
  char v4; // dl
  int v5; // eax
  int v6; // [esp+10h] [ebp-4h]

  n4_1 = 0; /*0xffc2b980*/
  v3 = 0; /*0xffc2b987*/
  LOBYTE(v6) = 0; /*0xffc2b989*/
  do
  {
    v4 = *(_BYTE *)(__return_address + 257257); /*0xffc2b98d*/
    if ( !v4 && ((1 << v3) & *(_DWORD *)(__return_address + 246468)) != 0
      || v4 == 1 && *(_BYTE *)(__return_address + 257259) == n4_1 )
    {
      v5 = DimmConfigPerSocket((_BYTE *)__return_address, v6, 196, n4); /*0xffc2b9c3*/
      LogDebugString(
        (_BYTE *)__return_address,
        (int)"\n"
             ":CLX_ISS: Active Intel Speed Select Level%d, MBoxStatus = 0x%x,  MAILBOX_BIOS_CMD_CONFIG_TDP_ACTIVATE_LEVEL(0x%x) on S%d\n",
        n4,
        v5,
        196,
        v3);
    }
    ++n4_1; /*0xffc2b9de*/
    ++v3; /*0xffc2b9e0*/
    LOBYTE(v6) = n4_1; /*0xffc2b9e1*/
  }
  while ( n4_1 < 4u );
}

// Function: AutoGenFuncB9F0 @ 0xffc2b9f0 (0x75 bytes)
// Index: 193/2560

int __cdecl AutoGenFuncB9F0(_BYTE *__return_address, int n4, char a3)
{
  _DWORD v4[4]; // [esp+8h] [ebp-14h] BYREF
  int v5; // [esp+18h] [ebp-4h] BYREF

  v4[1] = (unsigned __int8)n4 << 8; /*0xffc2b9ff*/
  v4[2] = 2; /*0xffc2ba0e*/
  v5 = 0; /*0xffc2ba15*/
  v4[0] = 0; /*0xffc2ba18*/
  v4[3] = __return_address; /*0xffc2ba1b*/
  if ( (a3 & 6u) > 4 && !DimmConfigPerSocket(__return_address, n4, 192, 0) ) /*0xffc2ba2a*/
  {
    v4[0] = 67190924; /*0xffc2ba39*/
    AutoGenFunc3C4((int)v4, (int)&v5); /*0xffc2ba45*/
    LogDebugString( /*0xffc2ba54*/
      __return_address,
      (int)"\nRead back MBoxStatus = 0x%x,  MAILBOX_BIOS_CMD_CONFIG_TDP_GET_LEVELS_INFO = 0x%x\n",
      0,
      v5);
  }
  return v5; /*0xffc2ba5f*/
}

// Function: AutoGenFuncBA65 @ 0xffc2ba65 (0xbf bytes)
// Index: 194/2560

int __cdecl AutoGenFuncBA65(int __return_address, int n4)
{
  unsigned __int8 n6; // cl
  int result; // eax
  int v4; // [esp-8h] [ebp-24h]
  _DWORD v5[4]; // [esp+8h] [ebp-14h] BYREF
  int v6; // [esp+18h] [ebp-4h] BYREF

  v6 = 0; /*0xffc2ba72*/
  if ( !*(_BYTE *)(__return_address + 246412) )
  {
    n6 = *(_BYTE *)(__return_address + 246424); /*0xffc2ba7d*/
    if ( n6 < 6u )
      return LogDebugString(
               (_BYTE *)__return_address,
               (int)"\n:: Not Support PBF Steeping!!!      cpuType = 0x%x,  stepping = 0x%x  on S%d\n",
               0,
               n6,
               (unsigned __int8)n4);
  }
  v5[2] = 2; /*0xffc2bab1*/
  v5[1] = (unsigned __int8)n4 << 8; /*0xffc2babd*/
  v5[0] = 0; /*0xffc2bac0*/
  v5[3] = __return_address; /*0xffc2bac3*/
  result = DimmConfigPerSocket((_BYTE *)__return_address, n4, 199, 0); /*0xffc2bac6*/
  if ( !result )
  {
    v5[0] = 67190924; /*0xffc2bad5*/
    AutoGenFunc3C4((int)v5, (int)&v6); /*0xffc2bae1*/
    result = LogDebugString( /*0xffc2baf0*/
               (_BYTE *)__return_address,
               (int)"\nRead back MBoxStatus = 0x%x,  MAILBOX_BIOS_CMD_GET_PBF_INFO (0xC7) = 0x%x\n",
               0,
               v6);
    if ( (v6 & 1) != 0 )
    {
      v4 = *(_DWORD *)(__return_address + 246476) | (1 << n4); /*0xffc2bb07*/
      *(_DWORD *)(__return_address + 246476) = v4; /*0xffc2bb0f*/
      return LogDebugString(
               (_BYTE *)__return_address,
               (int)"\nSocket: %x, PbfCapableBitMap: 0x%x\n",
               (unsigned __int8)n4,
               v4);
    }
  }
  return result; /*0xffc2bb1e*/
}

// Function: AutoGenFuncBB24 @ 0xffc2bb24 (0x53 bytes)
// Index: 195/2560

char __cdecl AutoGenFuncBB24(int __return_address)
{
  char result; // al
  unsigned int v2; // [esp+4h] [ebp-10h] BYREF
  _BYTE v3[4]; // [esp+8h] [ebp-Ch] BYREF
  unsigned int p_n4; // [esp+Ch] [ebp-8h] BYREF
  int p_n3; // [esp+10h] [ebp-4h] BYREF

  p_n3 = 0; /*0xffc2bb2a*/
  p_n4 = 1; /*0xffc2bb35*/
  result = KtiFuncE9A(&p_n4, &v2, &p_n3, v3); /*0xffc2bb45*/
  if ( (p_n3 & 0x20) != 0 ) /*0xffc2bb51*/
  {
    result = KtiFuncEC9(58); /*0xffc2bb55*/
    if ( (result & 1) != 0 ) /*0xffc2bb5d*/
    {
      result = (result & 4) != 0; /*0xffc2bb65*/
      if ( result != *(_BYTE *)(__return_address + 89) ) /*0xffc2bb6a*/
        *(_BYTE *)(__return_address + 246400) |= 4u; /*0xffc2bb6c*/
    }
  }
  return result; /*0xffc2bb73*/
}

// Function: AutoGenFuncBB77 @ 0xffc2bb77 (0x60 bytes)
// Index: 196/2560

int __cdecl AutoGenFuncBB77(_BYTE *__return_address, int a2)
{
  int n218120608; // [esp+4h] [ebp-10h] BYREF
  int v4; // [esp+8h] [ebp-Ch]
  int n2; // [esp+Ch] [ebp-8h]
  _BYTE *__return_address_1; // [esp+10h] [ebp-4h]

  v4 = (unsigned __int8)a2 << 8; /*0xffc2bb84*/
  n2 = 2; /*0xffc2bb92*/
  n218120608 = 218120608; /*0xffc2bb9a*/
  __return_address_1 = __return_address; /*0xffc2bba1*/
  AutoGenFunc3C4((int)&n218120608, (int)&a2); /*0xffc2bba4*/
  a2 &= ~2u; /*0xffc2bba9*/
  AutoGenFunc3DB((int)&n218120608, (int)&a2); /*0xffc2bbb5*/
  return LogDebugString(__return_address, (int)"DMICTRL.auto_complete_pm cleared on S%x\n", BYTE1(v4)); /*0xffc2bbd2*/
}

// Function: AutoGenFuncBBD7 @ 0xffc2bbd7 (0x9a bytes)
// Index: 197/2560

int __cdecl AutoGenFuncBBD7(unsigned int __return_address)
{
  unsigned int __return_address_1; // edi
  unsigned int v2; // edx
  int v3; // esi
  _DWORD *v4; // ebx
  int n4; // ebp
  int result; // eax
  unsigned int __return_address_3; // ecx
  int n318914760; // [esp+10h] [ebp-10h] BYREF
  unsigned int v9; // [esp+14h] [ebp-Ch]
  int n2; // [esp+18h] [ebp-8h]
  unsigned int __return_address_2; // [esp+1Ch] [ebp-4h]

  __return_address_1 = __return_address; /*0xffc2bbde*/
  v2 = 0; /*0xffc2bbe2*/
  n2 = 2; /*0xffc2bbe6*/
  v3 = 0; /*0xffc2bbee*/
  __return_address_2 = __return_address; /*0xffc2bbf0*/
  n318914760 = 318914760; /*0xffc2bbf4*/
  v4 = (_DWORD *)(__return_address + 8480); /*0xffc2bbfc*/
  n4 = 4; /*0xffc2bc02*/
  do /*0xffc2bc67*/
  {
    result = 1 << v3; /*0xffc2bc08*/
    if ( ((1 << v3) & *(_DWORD *)(__return_address_1 + 246468)) != 0 ) /*0xffc2bc10*/
    {
      v9 = (v3 << 8) | v2 & 0xFFFF00FF; /*0xffc2bc28*/
      AutoGenFunc3C4((int)&n318914760, (int)&__return_address); /*0xffc2bc2d*/
      __return_address_3 = __return_address & 0x870000FF; /*0xffc2bc3b*/
      *v4 = (unsigned __int16)(__return_address >> 8); /*0xffc2bc44*/
      __return_address = __return_address_3; /*0xffc2bc4f*/
      result = AutoGenFunc3DB((int)&n318914760, (int)&__return_address); /*0xffc2bc54*/
      v2 = v9; /*0xffc2bc59*/
    }
    ++v3; /*0xffc2bc60*/
    ++v4; /*0xffc2bc61*/
    --n4; /*0xffc2bc64*/
  }
  while ( n4 ); /*0xffc2bc67*/
  return result; /*0xffc2bc69*/
}

// Function: AutoGenFuncBC71 @ 0xffc2bc71 (0x23d bytes)
// Index: 198/2560

void __cdecl AutoGenFuncBC71(int __return_address)
{
  unsigned __int8 v2; // bl
  int v3; // ebp
  unsigned __int8 v4; // bh
  unsigned __int8 v5; // cl
  int v6; // esi
  unsigned __int8 v7; // dl
  unsigned __int8 v8; // cl
  int n64; // esi
  int v10; // edx
  int v11; // ebx
  bool v12; // zf
  unsigned __int8 v13; // [esp+8h] [ebp-2Ch]
  unsigned __int8 n4; // [esp+Ch] [ebp-28h]
  unsigned __int8 v15; // [esp+10h] [ebp-24h]
  unsigned __int8 v16; // [esp+14h] [ebp-20h]
  unsigned __int8 v17; // [esp+18h] [ebp-1Ch]
  unsigned __int8 v18; // [esp+1Ch] [ebp-18h]
  int v19; // [esp+24h] [ebp-10h] BYREF
  unsigned int v20; // [esp+28h] [ebp-Ch]
  int n2; // [esp+2Ch] [ebp-8h]
  int __return_address_1; // [esp+30h] [ebp-4h]
  unsigned __int8 v23; // [esp+38h] [ebp+4h]

  v2 = 0; /*0xffc2bc7a*/
  v13 = 0; /*0xffc2bc7c*/
  n2 = 2; /*0xffc2bc80*/
  v20 = 0; /*0xffc2bc88*/
  v19 = 0; /*0xffc2bc8c*/
  __return_address_1 = __return_address; /*0xffc2bc90*/
  if ( *(_BYTE *)(__return_address + 246412) ) /*0xffc2bc94*/
    return; /*0xffc2bc9a*/
  LogDebugString(
    (_BYTE *)__return_address,
    (int)"\nConfig IOT/LLC via VCU Mailbox Start: resetRequested=0x%x\n",
    *(unsigned __int8 *)(__return_address + 246400));
  n4 = 0; /*0xffc2bcb8*/
  v3 = 0; /*0xffc2bcbc*/
  do
  {
    if ( ((1 << v3) & *(_DWORD *)(__return_address + 246468)) != 0 && *(_BYTE *)(__return_address + v3 + 93) )
    {
      v20 = (v3 << 8) | v20 & 0xFFFF00FF; /*0xffc2bcf2*/
      v4 = AutoGenFuncC1CF((unsigned int)&v19); /*0xffc2bcfb*/
      v15 = AutoGenFuncC218((int)&v19); /*0xffc2bd09*/
      v5 = AutoGenFuncC73E(__return_address, v15); /*0xffc2bd1e*/
      v6 = v5; /*0xffc2bd20*/
      v23 = v5; /*0xffc2bd26*/
      v16 = 2 * (*(_BYTE *)(__return_address + 257172) != 1) + 15; /*0xffc2bd35*/
      LogDebugString( /*0xffc2bd49*/
        (_BYTE *)__return_address,
        (int)"::Skt%2d NumSlices=0x%x NumOfLlcWays=0x%x LlcWaysTaken=0x%x\n",
        v3,
        v15,
        v4,
        v5);
      LogDebugString(
        (_BYTE *)__return_address,
        (int)"::Skt%2d SetupData: IotEn = 0x%x OclaMaxTorEntry=0x%x OclaWays=0x%x\n",
        v3,
        *(unsigned __int8 *)(__return_address + v3 + 93),
        *(unsigned __int8 *)(__return_address + v3 + 97),
        *(unsigned __int8 *)(__return_address + v3 + 101));
      v7 = *(_BYTE *)(__return_address + v3 + 97); /*0xffc2bd6c*/
      v8 = *(_BYTE *)(__return_address + v3 + 101); /*0xffc2bd73*/
      v18 = v7; /*0xffc2bd77*/
      v17 = v8; /*0xffc2bd7b*/
      if ( v7 > v16 )
      {
        LogDebugString(
          (_BYTE *)__return_address,
          (int)"::ERROR: Skt%2d Setupdata OclaMaxTorEntry invalid (0x%2x)\n",
          v3,
          v7);
LABEL_17:
        v2 = v13; /*0xffc2be6b*/
        goto LABEL_18; /*0xffc2be6b*/
      }
      if ( v8 > (unsigned __int8)(v4 - v23) || v23 > v4 )
      {
        LogDebugString((_BYTE *)__return_address, (int)"::ERROR: Skt%2d Setup data OclaWay invalid (0x%2x)\n", v3, v8);
        LogDebugString( /*0xffc2be63*/
          (_BYTE *)__return_address,
          (int)"::Out of %2d LLC Ways, %2d are taken, %2d are available for IOT\n",
          v4,
          v6,
          v4 - v6);
        goto LABEL_17; /*0xffc2be63*/
      }
      LogDebugString( /*0xffc2bdc4*/
        (_BYTE *)__return_address,
        (int)"::Socket%2d calling IOT_LLC_SETUP VCU API with MaxTorEntry = 0x%x LLC-ways = 0x%x\n",
        v3,
        v7,
        v8);
      if ( (*(_BYTE *)(__return_address + 246408) & 4) != 0 ) /*0xffc2bdd3*/
        goto LABEL_17; /*0xffc2bdd3*/
      n64 = AutoGenFn_FFC2E070((_BYTE *)__return_address, n4, v18, v17); /*0xffc2bdeb*/
      v11 = v10; /*0xffc2bded*/
      LogDebugString( /*0xffc2bdf8*/
        (_BYTE *)__return_address,
        (int)"::Socket%2d IOT_LLC_SETUP VCU API VCU_MAILBOX_DATA[31:0] = 0x%x, VCU_MAILBOX_INTERFACE[15:0] = 0x%x\n",
        v3,
        v10,
        n64);
      if ( n64 != 64 ) /*0xffc2be03*/
      {
        LogDebugString((_BYTE *)__return_address, (int)"::VCU API return-code indicates error occured\n"); /*0xffc2be0b*/
        goto LABEL_17; /*0xffc2be12*/
      }
      v12 = v11 == 1; /*0xffc2be14*/
      v2 = v13; /*0xffc2be17*/
      if ( v12 ) /*0xffc2be1b*/
      {
        if ( *(_BYTE *)(__return_address + 246400) ) /*0xffc2be1d*/
        {
          v2 = v13 | 2; /*0xffc2be26*/
          v13 |= 2u; /*0xffc2be29*/
        }
        LogDebugString( /*0xffc2be38*/
          (_BYTE *)__return_address,
          (int)"::VCU API return-code indicates a warm reset is needed\n",
          v3,
          1,
          64);
      }
    }
LABEL_18:
    ++v3; /*0xffc2be6f*/
    ++n4; /*0xffc2be76*/
  }
  while ( n4 < 4u );
  if ( v2 ) /*0xffc2be86*/
    *(_BYTE *)(__return_address + 246400) |= v2; /*0xffc2be88*/
  LogDebugString( /*0xffc2bea0*/
    (_BYTE *)__return_address,
    (int)"\nConfig IOT/OCLA end. Reset requested by VCU = %x, resetRequired = 0x%x \n",
    v2,
    *(unsigned __int8 *)(__return_address + 246400));
}

// Function: CpuFeatureEarlyConfig @ 0xffc2beae (0x91 bytes)
// Index: 199/2560

char __cdecl CpuFeatureEarlyConfig(int __return_address)
{
  char result; // al

  LogDebugString((_BYTE *)__return_address, (int)"\n\nCpuInit Start\n\n"); /*0xffc2beb9*/
  AutoGenFuncC0C8((_BYTE *)__return_address, -32768000, 0); /*0xffc2bec6*/
  AutoGenFuncBBD7(__return_address); /*0xffc2becc*/
  AutoGenFuncE187(__return_address); /*0xffc2bed2*/
  AutoGenFuncE36F(__return_address); /*0xffc2bed8*/
  if ( *(_DWORD *)(__return_address + 246404) == 1 ) /*0xffc2bee8*/
  {
    AutoGenFuncD992(__return_address); /*0xffc2beea*/
  }
  else
  {
    result = AutoGenFuncBB24(__return_address); /*0xffc2bef2*/
    if ( (*(_BYTE *)(__return_address + 246400) & 4) != 0 ) /*0xffc2beff*/
      return result; /*0xffc2beff*/
    AutoGenFuncD141(__return_address); /*0xffc2bf02*/
    AutoGenFuncDAAF(__return_address); /*0xffc2bf08*/
    AutoGenFuncC7B3(__return_address); /*0xffc2bf0e*/
  }
  AutoGenFuncBC71(__return_address); /*0xffc2bf17*/
  result = AutoGenFuncBF3F(__return_address); /*0xffc2bf1d*/
  if ( !*(_BYTE *)(__return_address + 257173) ) /*0xffc2bf22*/
  {
    if ( *(_BYTE *)(__return_address + 257263) ) /*0xffc2bf2d*/
      return AutoGenFuncE2C2(__return_address); /*0xffc2bf37*/
  }
  return result; /*0xffc2bf3d*/
}

// Function: AutoGenFuncBF3F @ 0xffc2bf3f (0x189 bytes)
// Index: 200/2560

char __cdecl AutoGenFuncBF3F(int __return_address)
{
  unsigned __int8 SocketNumber_1; // bl
  char v3; // bh
  int v4; // edi
  int v5; // eax
  int v6; // ecx
  unsigned int v7; // ecx
  int n218120608; // [esp+Ch] [ebp-1Ch] BYREF
  unsigned int v10; // [esp+10h] [ebp-18h]
  int n2; // [esp+14h] [ebp-14h]
  int __return_address_1; // [esp+18h] [ebp-10h]
  int v13; // [esp+1Ch] [ebp-Ch] BYREF
  int v14; // [esp+20h] [ebp-8h]
  unsigned int v15; // [esp+24h] [ebp-4h] BYREF
  char SocketNumber; // [esp+33h] [ebp+Bh]

  SocketNumber = GetSocketNumber(__return_address); /*0xffc2bf51*/
  SocketNumber_1 = 0; /*0xffc2bf56*/
  v15 = 0; /*0xffc2bf58*/
  v3 = 0; /*0xffc2bf5c*/
  n2 = 2; /*0xffc2bf5e*/
  v10 = 0; /*0xffc2bf65*/
  v4 = 0; /*0xffc2bf68*/
  n218120608 = 0; /*0xffc2bf6a*/
  __return_address_1 = __return_address; /*0xffc2bf6d*/
  LOBYTE(v14) = 0; /*0xffc2bf70*/
  do
  {
    v5 = 1 << v4; /*0xffc2bf78*/
    if ( ((1 << v4) & *(_DWORD *)(__return_address + 246468)) != 0 )
    {
      LogDebugString((_BYTE *)__return_address, (int)"CPUMISC Current S%2d: \n", v4);
      LOBYTE(v5) = 0; /*0xffc2bf9d*/
      v10 = (v4 << 8) | v10 & 0xFFFF00FF; /*0xffc2bfa5*/
      if ( SocketNumber_1 == SocketNumber ) /*0xffc2bfab*/
      {
        n218120608 = 218120608; /*0xffc2bfb0*/
        AutoGenFunc3C4((int)&n218120608, (int)&v13); /*0xffc2bfbc*/
        v13 &= ~1u; /*0xffc2bfc1*/
        LOBYTE(v5) = AutoGenFunc3DB((int)&n218120608, (int)&v13); /*0xffc2bfcd*/
      }
      if ( (*(_BYTE *)(__return_address + 246408) & 4) == 0 ) /*0xffc2bfdc*/
      {
        LOBYTE(v5) = KtiFunc791D(__return_address, v14); /*0xffc2bfe6*/
        if ( (*(_BYTE *)(__return_address + 246408) & 4) == 0 ) /*0xffc2bff4*/
        {
          if ( !DimmConfigPerSocket((_BYTE *)__return_address, v14, 5, 0) ) /*0xffc2c002*/
          {
            n218120608 = 67190924; /*0xffc2c011*/
            AutoGenFunc3C4((int)&n218120608, (int)&v15); /*0xffc2c01d*/
            LogDebugString((_BYTE *)__return_address, (int)"MBoxStatus=0x%x,  PCU_MISC_CONFIG=0x%x\n", 0, v15); /*0xffc2c02d*/
          }
          LOBYTE(v5) = *(_BYTE *)(__return_address + 8479); /*0xffc2c035*/
          if ( (_BYTE)v5 ) /*0xffc2c03d*/
          {
            v6 = (unsigned __int8)v5; /*0xffc2c03f*/
            v3 = 1; /*0xffc2c042*/
            LOBYTE(v5) = v15; /*0xffc2c04a*/
            v7 = v15 & 0xFF7FFFFF | (v6 << 23); /*0xffc2c04f*/
            v15 = v7; /*0xffc2c051*/
          }
          else
          {
            v7 = v15; /*0xffc2c056*/
          }
          if ( v3 ) /*0xffc2c05b*/
          {
            DimmConfigPerSocket((_BYTE *)__return_address, v14, 6, v7); /*0xffc2c064*/
            LogDebugString( /*0xffc2c072*/
              (_BYTE *)__return_address,
              (int)"\nSetting MAILBOX_BIOS_CMD_WRITE_PCU_MISC_CONFIG = 0x%x\n",
              v15);
            v5 = DimmConfigPerSocket((_BYTE *)__return_address, v14, 5, 0); /*0xffc2c07f*/
            if ( !v5 ) /*0xffc2c089*/
            {
              n218120608 = 67190924; /*0xffc2c08e*/
              AutoGenFunc3C4((int)&n218120608, (int)&v15); /*0xffc2c09a*/
              LOBYTE(v5) = LogDebugString( /*0xffc2c0aa*/
                             (_BYTE *)__return_address,
                             (int)"Read back MBoxStatus=%x,  MAILBOX_BIOS_CMD_READ_PCU_MISC_CONFIG=0x%x\n",
                             0,
                             v15);
            }
          }
        }
      }
    }
    ++SocketNumber_1; /*0xffc2c0b2*/
    ++v4; /*0xffc2c0b4*/
    LOBYTE(v14) = SocketNumber_1; /*0xffc2c0b5*/
  }
  while ( SocketNumber_1 < 4u );
  return v5; /*0xffc2c0c1*/
}

// Function: AutoGenFuncC0C8 @ 0xffc2c0c8 (0x87 bytes)
// Index: 201/2560

void __cdecl AutoGenFuncC0C8(_BYTE *__return_address, int a2, int a3)
{
  int v3; // eax
  int v4; // ebx

  if ( *__return_address )
  {
    if ( (a2 & 0x3FFFF) != 0 )
    {
      AssertPrint(
        __return_address,
        255,
        (int)"\n\nRC_ASSERT! %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Cpu\\CpuInit.c",
        1907,
        "(TraceHubAcpiBase.lo & (UINT32) V_MSR_TRACE_HUB_STH_ACPIBAR_BASE_MASK) == 0");
      ProcMemInitCheck((int)__return_address, 242, 0); /*0xffc2c105*/
    }
    else
    {
      v3 = KtiFuncEC9(128); /*0xffc2c117*/
      if ( (v3 & 1) == 0 ) /*0xffc2c122*/
      {
        v4 = (a2 + 1) | v3; /*0xffc2c12e*/
        KtiFuncEEB(128, v4, a3); /*0xffc2c133*/
        LogDebugString( /*0xffc2c140*/
          __return_address,
          (int)"\nSet MSR TRACE_HUB_STH_ACPIBAR_BASE[0] in CpuWriteTraceHubAcpiBase as 0x%x %x.\n",
          a3,
          v4);
      }
    }
  }
}

// Function: AutoGenFuncC14F @ 0xffc2c14f (0x5e bytes)
// Index: 202/2560

char __cdecl AutoGenFuncC14F(_BYTE *__return_address, int n4)
{
  int v3; // eax

  LogDebugString(__return_address, (int)"\n:: EnablePbf()\n");
  if ( !__return_address[246412] && __return_address[246424] < 6u ) /*0xffc2c171*/
    return 0; /*0xffc2c173*/
  v3 = DimmConfigPerSocket(__return_address, n4, 200, 0); /*0xffc2c185*/
  if ( !v3 ) /*0xffc2c18f*/
    return 1; /*0xffc2c1a8*/
  LogDebugString( /*0xffc2c19c*/
    __return_address,
    (int)"\nFail to active PBF, B2P MAILBOX_BIOS_CMD_ACTIVATE_PBF = 0x%x on S%d\n",
    v3,
    (unsigned __int8)n4);
  return 0; /*0xffc2c175*/
}

// Function: AutoGenFuncC1AD @ 0xffc2c1ad (0x22 bytes)
// Index: 203/2560

int __cdecl AutoGenFuncC1AD(int p_n67190948)
{
  int p_n67190948_1; // [esp-8h] [ebp-8h]

  p_n67190948_1 = p_n67190948; /*0xffc2c1b7*/
  *(_DWORD *)p_n67190948 = 67322040; /*0xffc2c1b8*/
  AutoGenFunc3C4(p_n67190948_1, (int)&p_n67190948); /*0xffc2c1be*/
  return p_n67190948 & 0xFFFFFFF; /*0xffc2c1cd*/
}

// Function: AutoGenFuncC1CF @ 0xffc2c1cf (0x49 bytes)
// Index: 204/2560

char __cdecl AutoGenFuncC1CF(unsigned int a1)
{
  int v2; // [esp-8h] [ebp-8h]

  v2 = a1; /*0xffc2c1d9*/
  *(_DWORD *)a1 = 67321988; /*0xffc2c1da*/
  AutoGenFunc3C4(v2, (int)&a1); /*0xffc2c1e0*/
  switch ( (a1 >> 9) & 7 ) /*0xffc2c1f3*/
  {
    case 1u: /*0xffc2c1f3*/
      return 12; /*0xffc2c214*/
    case 2u: /*0xffc2c1f3*/
      return 2; /*0xffc2c210*/
    case 3u: /*0xffc2c1f3*/
      return 8; /*0xffc2c20c*/
    case 4u: /*0xffc2c1f3*/
      return 20; /*0xffc2c208*/
  }
  return 11; /*0xffc2c206*/
}

// Function: AutoGenFuncC218 @ 0xffc2c218 (0x49 bytes)
// Index: 205/2560

char __cdecl AutoGenFuncC218(int a1)
{
  int v1; // esi
  char v2; // bl
  int v3; // eax
  unsigned int v4; // ecx
  int v6; // [esp-8h] [ebp-10h]

  v1 = a1; /*0xffc2c21d*/
  v6 = a1; /*0xffc2c224*/
  v2 = 0; /*0xffc2c225*/
  *(_DWORD *)a1 = 67322012; /*0xffc2c227*/
  AutoGenFunc3C4(v6, (int)&a1); /*0xffc2c22d*/
  LOBYTE(v3) = *(_BYTE *)(*(_DWORD *)(v1 + 12) + 246428); /*0xffc2c23a*/
  v4 = a1 & 0xFFFFFFF; /*0xffc2c240*/
  if ( (_BYTE)v3 ) /*0xffc2c248*/
  {
    v3 = (unsigned __int8)v3; /*0xffc2c24a*/
    do /*0xffc2c259*/
    {
      if ( (v4 & 1) != 0 ) /*0xffc2c250*/
        ++v2; /*0xffc2c252*/
      v4 >>= 1; /*0xffc2c254*/
      --v3; /*0xffc2c256*/
    }
    while ( v3 ); /*0xffc2c259*/
  }
  return v2; /*0xffc2c25b*/
}

// Function: AutoGenFuncC261 @ 0xffc2c261 (0xcd bytes)
// Index: 206/2560

int __cdecl AutoGenFuncC261(int __return_address, int n4)
{
  int __return_address_1; // ebx
  unsigned __int8 SocketNumber; // al
  int v4; // esi
  int v5; // edx
  int n4_1; // edi
  unsigned __int8 n4_2; // bp
  int v9; // [esp+10h] [ebp-14h]
  int n67321952; // [esp+14h] [ebp-10h] BYREF
  unsigned int v11; // [esp+18h] [ebp-Ch]
  int n2; // [esp+1Ch] [ebp-8h]
  int __return_address_2; // [esp+20h] [ebp-4h]

  __return_address_1 = __return_address; /*0xffc2c265*/
  SocketNumber = GetSocketNumber(__return_address); /*0xffc2c26d*/
  v4 = 0; /*0xffc2c277*/
  n4 = (unsigned __int8)n4; /*0xffc2c27f*/
  n2 = 2; /*0xffc2c288*/
  __return_address_2 = __return_address_1; /*0xffc2c296*/
  __return_address = 0; /*0xffc2c2a0*/
  v5 = SocketNumber << 8; /*0xffc2c2a4*/
  n67321952 = 67321952; /*0xffc2c2a6*/
  n4_1 = 4; /*0xffc2c2b3*/
  v9 = *(unsigned __int8 *)(__return_address_1 + 4 * ((unsigned __int8)n4 + 5 * SocketNumber) + 246558); /*0xffc2c2be*/
  n4_2 = n4; /*0xffc2c2c2*/
  do /*0xffc2c320*/
  {
    if ( ((1 << v4) & *(_DWORD *)(__return_address_1 + 246468)) != 0 ) /*0xffc2c2d3*/
    {
      v11 = (v4 << 8) | v5 & 0xFFFF00FF; /*0xffc2c2eb*/
      AutoGenFunc3C4((int)&n67321952, (int)&__return_address); /*0xffc2c2f0*/
      __return_address ^= ((unsigned __int8)__return_address ^ n4_2) & 3; /*0xffc2c302*/
      AutoGenFunc3DB((int)&n67321952, (int)&__return_address); /*0xffc2c310*/
      v5 = v11; /*0xffc2c315*/
    }
    ++v4; /*0xffc2c31c*/
    --n4_1; /*0xffc2c31d*/
  }
  while ( n4_1 ); /*0xffc2c320*/
  return v9; /*0xffc2c326*/
}

// Function: AutoGenFuncC32E @ 0xffc2c32e (0x17b bytes)
// Index: 207/2560

int __cdecl AutoGenFuncC32E(int __return_address)
{
  int v1; // esi
  int n4; // edx
  _DWORD *v3; // ebx
  int v4; // ebp
  int result; // eax
  int v6; // eax
  int v7; // [esp+10h] [ebp-24h] BYREF
  int v8; // [esp+14h] [ebp-20h] BYREF
  int v9; // [esp+18h] [ebp-1Ch] BYREF
  int n4_1; // [esp+1Ch] [ebp-18h]
  int v11; // [esp+20h] [ebp-14h] BYREF
  _DWORD v12[4]; // [esp+24h] [ebp-10h] BYREF

  v1 = 0; /*0xffc2c339*/
  n4 = 4; /*0xffc2c33d*/
  n4_1 = 4; /*0xffc2c33e*/
  v3 = (_DWORD *)(__return_address + 246564); /*0xffc2c342*/
  v4 = __return_address + 246536; /*0xffc2c348*/
  do /*0xffc2c49b*/
  {
    result = 1 << v1; /*0xffc2c353*/
    if ( ((1 << v1) & *(_DWORD *)(__return_address + 246468)) != 0 ) /*0xffc2c35b*/
    {
      v12[2] = 2; /*0xffc2c366*/
      v12[3] = __return_address; /*0xffc2c373*/
      v12[0] = 67125388; /*0xffc2c37c*/
      v12[1] = v1 << 8; /*0xffc2c386*/
      AutoGenFunc3C4((int)v12, (int)&v9); /*0xffc2c394*/
      v12[0] = 67321952; /*0xffc2c39d*/
      AutoGenFunc3C4((int)v12, (int)&v11); /*0xffc2c3ab*/
      v6 = v11 & 3; /*0xffc2c3b4*/
      *(_BYTE *)(v4 + 2) = 0; /*0xffc2c3b7*/
      *(_DWORD *)v4 |= v6 << 16; /*0xffc2c3be*/
      v12[0] = 67321968; /*0xffc2c3ca*/
      AutoGenFunc3C4((int)v12, (int)&v7); /*0xffc2c3d3*/
      v12[0] = 67321976; /*0xffc2c3eb*/
      *(v3 - 1) = (v7 & 0xFF0000) + ((unsigned __int16)(v7 & 0x7FFF) >> (v9 & 0xF)); /*0xffc2c405*/
      AutoGenFunc3C4((int)v12, (int)&v7); /*0xffc2c409*/
      v12[0] = 67321972; /*0xffc2c421*/
      *v3 = (v7 & 0xFF0000) + ((unsigned __int16)(v7 & 0x7FFF) >> (v9 & 0xF)); /*0xffc2c43b*/
      AutoGenFunc3C4((int)v12, (int)&v8); /*0xffc2c43e*/
      v12[0] = 67321980; /*0xffc2c44e*/
      v3[19] = v8 & 0x7FFFFFFF; /*0xffc2c467*/
      AutoGenFunc3C4((int)v12, (int)&v8); /*0xffc2c46b*/
      n4 = n4_1; /*0xffc2c477*/
      result = v8 & 0x7FFF; /*0xffc2c483*/
      v3[20] = v8 & 0x7FFFFFFF; /*0xffc2c48a*/
    }
    ++v1; /*0xffc2c48d*/
    v4 += 4; /*0xffc2c48e*/
    v3 += 5; /*0xffc2c491*/
    n4_1 = --n4; /*0xffc2c497*/
  }
  while ( n4 ); /*0xffc2c49b*/
  return result; /*0xffc2c4a1*/
}

// Function: AutoGenFuncC4A9 @ 0xffc2c4a9 (0x9c bytes)
// Index: 208/2560

int __cdecl AutoGenFuncC4A9(_BYTE *__return_address, int n4)
{
  int v2; // ebx
  int n4_1; // edi
  int v4; // esi
  _DWORD v6[4]; // [esp+10h] [ebp-10h] BYREF

  v2 = 0; /*0xffc2c4b6*/
  n4_1 = (unsigned __int8)n4; /*0xffc2c4ba*/
  v6[2] = 2; /*0xffc2c4bf*/
  v6[0] = 0; /*0xffc2c4cc*/
  v6[3] = __return_address; /*0xffc2c4d6*/
  v6[1] = (unsigned __int8)n4 << 8; /*0xffc2c4e8*/
  v4 = DimmConfigPerSocket(__return_address, n4, 208, 0); /*0xffc2c4f1*/
  LogDebugString( /*0xffc2c501*/
    __return_address,
    (int)"\nWrite B2P MAILBOX_BIOS_CMD_CONFIG_TDP_GET_P1_INFO (0x%x) = 0x%x on S%d, PcodeMailboxStatus:0x%x\n",
    208,
    0,
    n4_1,
    v4);
  if ( !v4 ) /*0xffc2c50b*/
  {
    v6[0] = 67190924; /*0xffc2c511*/
    AutoGenFunc3C4((int)v6, (int)&n4); /*0xffc2c51f*/
    LogDebugString( /*0xffc2c52f*/
      __return_address,
      (int)"\nRead back MBoxStatus = 0x%x,  MAILBOX_BIOS_CMD_CONFIG_TDP_GET_P1_INFO = 0x%x\n",
      0,
      n4);
    return n4; /*0xffc2c534*/
  }
  return v2; /*0xffc2c53b*/
}

// Function: AutoGenFuncC545 @ 0xffc2c545 (0x23 bytes)
// Index: 209/2560

int __cdecl AutoGenFuncC545(int __return_address, unsigned __int8 n4)
{
  return *(unsigned __int8 *)(__return_address /*0xffc2c566*/
                            + 4 * (n4 + 5 * (unsigned __int8)GetSocketNumber(__return_address))
                            + 246558);
}

// Function: AutoGenFuncC568 @ 0xffc2c568 (0x1b2 bytes)
// Index: 210/2560

int __cdecl AutoGenFuncC568(int __return_address, unsigned __int8 n3)
{
  unsigned __int8 n4; // dl
  int v3; // ebx
  int result; // eax
  int v5; // esi
  int v6; // esi
  int v7; // esi
  int v8; // [esp+10h] [ebp-1Ch] BYREF
  int n4_1; // [esp+14h] [ebp-18h]
  int v10; // [esp+18h] [ebp-14h]
  _DWORD v11[4]; // [esp+1Ch] [ebp-10h] BYREF

  v8 = 0; /*0xffc2c56b*/
  n4 = 0; /*0xffc2c56f*/
  v3 = 0; /*0xffc2c574*/
  LOBYTE(n4_1) = 0; /*0xffc2c576*/
  v10 = 0; /*0xffc2c57a*/
  do /*0xffc2c70c*/
  {
    result = 1 << v3; /*0xffc2c588*/
    if ( ((1 << v3) & *(_DWORD *)(__return_address + 246468)) != 0 ) /*0xffc2c590*/
    {
      v11[0] = 0; /*0xffc2c59b*/
      v11[2] = 2; /*0xffc2c5a6*/
      v11[3] = __return_address; /*0xffc2c5b3*/
      v11[1] = v3 << 8; /*0xffc2c5c8*/
      v5 = DimmConfigPerSocket((_BYTE *)__return_address, n4_1, 193, n3); /*0xffc2c5d1*/
      LogDebugString( /*0xffc2c5e1*/
        (_BYTE *)__return_address,
        (int)"\nWrite B2P MAILBOX_BIOS_CMD_CONFIG_TDP_GET_TDP_INFO (0x%x) = 0x%x on S%d, PcodeMailboxStatus:0x%x\n",
        193,
        n3,
        v3,
        v5);
      if ( !v5 ) /*0xffc2c5eb*/
      {
        v11[0] = 67190924; /*0xffc2c5f1*/
        AutoGenFunc3C4((int)v11, (int)&v8); /*0xffc2c5ff*/
        LogDebugString( /*0xffc2c60f*/
          (_BYTE *)__return_address,
          (int)"\nRead back MBoxStatus = 0x%x,  MAILBOX_BIOS_CMD_CONFIG_TDP_GET_TDP_INFO = 0x%x\n",
          0,
          v8);
        *(_DWORD *)(__return_address + 4 * (n3 + v10) + 246556) = v8; /*0xffc2c621*/
      }
      v6 = DimmConfigPerSocket((_BYTE *)__return_address, n4_1, 194, n3); /*0xffc2c638*/
      LogDebugString( /*0xffc2c648*/
        (_BYTE *)__return_address,
        (int)"\nWrite B2P MAILBOX_BIOS_CMD_CONFIG_TDP_GET_POWER_INFO (0x%x) = 0x%x on S%d, PcodeMailboxStatus:0x%x\n",
        194,
        n3,
        v3,
        v6);
      if ( !v6 ) /*0xffc2c652*/
      {
        v11[0] = 67190924; /*0xffc2c658*/
        AutoGenFunc3C4((int)v11, (int)&v8); /*0xffc2c666*/
        LogDebugString( /*0xffc2c676*/
          (_BYTE *)__return_address,
          (int)"\nRead back MBoxStatus = 0x%x,  MAILBOX_BIOS_CMD_CONFIG_TDP_GET_POWER_INFO = 0x%x\n",
          0,
          v8);
        *(_DWORD *)(__return_address + 4 * (n3 + v10) + 246636) = v8; /*0xffc2c688*/
      }
      v7 = DimmConfigPerSocket((_BYTE *)__return_address, n4_1, 195, n3); /*0xffc2c69f*/
      result = LogDebugString( /*0xffc2c6af*/
                 (_BYTE *)__return_address,
                 (int)"\n"
                      "Write B2P MAILBOX_BIOS_CMD_CONFIG_TDP_GET_CORE_COUNT (0x%x) = 0x%x on S%d, PcodeMailboxStatus:0x%x\n",
                 195,
                 n3,
                 v3,
                 v7);
      if ( !v7 ) /*0xffc2c6b9*/
      {
        v11[0] = 67190924; /*0xffc2c6bf*/
        AutoGenFunc3C4((int)v11, (int)&v8); /*0xffc2c6cd*/
        LogDebugString( /*0xffc2c6dd*/
          (_BYTE *)__return_address,
          (int)"\nRead back MBoxStatus = 0x%x,  MAILBOX_BIOS_CMD_CONFIG_TDP_GET_CORE_COUNT = 0x%x\n",
          0,
          v8);
        result = n3 + v10; /*0xffc2c6f0*/
        *(_BYTE *)(result + __return_address + 246716) = v8 & 0x1F; /*0xffc2c6f2*/
      }
      n4 = n4_1; /*0xffc2c6f9*/
    }
    v10 += 5; /*0xffc2c6fd*/
    ++n4; /*0xffc2c702*/
    ++v3; /*0xffc2c704*/
    LOBYTE(n4_1) = n4; /*0xffc2c705*/
  }
  while ( n4 < 4u ); /*0xffc2c70c*/
  return result; /*0xffc2c712*/
}

// Function: AutoGenFuncC71A @ 0xffc2c71a (0x24 bytes)
// Index: 211/2560

int __cdecl AutoGenFuncC71A(int __return_address)
{
  int result; // eax

  result = AutoGenFuncC568(__return_address, 3u); /*0xffc2c722*/
  if ( *(_BYTE *)(__return_address + 246537) > 3u ) /*0xffc2c730*/
    return AutoGenFuncC568(__return_address, 4u); /*0xffc2c735*/
  return result; /*0xffc2c73c*/
}

// Function: AutoGenFuncC73E @ 0xffc2c73e (0x57 bytes)
// Index: 212/2560

char __cdecl AutoGenFuncC73E(int __return_address, unsigned __int8 a2)
{
  char result; // al
  _DWORD v3[7]; // [esp+0h] [ebp-20h]
  char n2; // [esp+1Ch] [ebp-4h]

  v3[0] = 270020608; /*0xffc2c74b*/
  v3[1] = 117967372; /*0xffc2c752*/
  v3[2] = 84215302; /*0xffc2c759*/
  v3[3] = 67372036; /*0xffc2c760*/
  v3[4] = 50529027; /*0xffc2c767*/
  v3[5] = 50529027; /*0xffc2c76e*/
  v3[6] = 33686018; /*0xffc2c775*/
  n2 = 2; /*0xffc2c77c*/
  result = *((_BYTE *)v3 + a2) + 1; /*0xffc2c784*/
  if ( *(_BYTE *)(__return_address + 257172) ) /*0xffc2c786*/
    return *((_BYTE *)v3 + a2) + 3; /*0xffc2c78f*/
  return result; /*0xffc2c791*/
}

// Function: AutoGenFuncC795 @ 0xffc2c795 (0x1e bytes)
// Index: 213/2560

char __cdecl AutoGenFuncC795(unsigned int a1)
{
  char v1; // dl
  char v2; // cl
  int n32; // esi

  v1 = 0; /*0xffc2c796*/
  v2 = 0; /*0xffc2c79a*/
  n32 = 32; /*0xffc2c79c*/
  do /*0xffc2c7ad*/
  {
    if ( ((a1 >> v2) & 1) != 0 ) /*0xffc2c7a5*/
      ++v1; /*0xffc2c7a7*/
    ++v2; /*0xffc2c7a9*/
    --n32; /*0xffc2c7aa*/
  }
  while ( n32 ); /*0xffc2c7ad*/
  return v1; /*0xffc2c7b1*/
}

// Function: AutoGenFuncC7B3 @ 0xffc2c7b3 (0x1e2 bytes)
// Index: 214/2560

_DWORD *__cdecl AutoGenFuncC7B3(int __return_address)
{
  unsigned __int8 n4_1; // bl
  _DWORD *result; // eax
  unsigned __int8 *v4; // edi
  int v5; // ecx
  int v6; // ebp
  char v7; // bh
  unsigned __int8 *v8; // edx
  unsigned __int8 i_1; // dh
  unsigned __int8 i; // bh
  char v11; // dl
  __int64 v12; // rax
  int v13; // eax
  __int64 v14; // [esp-24h] [ebp-38h]
  int v15; // [esp-18h] [ebp-2Ch]
  int v16; // [esp-14h] [ebp-28h]
  int v17; // [esp-10h] [ebp-24h]
  unsigned __int8 *v18; // [esp+4h] [ebp-10h]
  int v19; // [esp+8h] [ebp-Ch]
  unsigned __int8 n4; // [esp+10h] [ebp-4h]
  _DWORD *v21; // [esp+18h] [ebp+4h]

  if ( *(_DWORD *)(__return_address + 246468) == *(_DWORD *)(__return_address + 246476)
    && *(_BYTE *)(__return_address + 7) )
  {
    n4_1 = 0; /*0xffc2c7df*/
    v18 = (unsigned __int8 *)(__return_address + 246716); /*0xffc2c7e1*/
    result = (_DWORD *)(__return_address + 246556); /*0xffc2c7e5*/
    v4 = (unsigned __int8 *)(__return_address + 246512); /*0xffc2c7ec*/
    n4 = 0; /*0xffc2c7f2*/
    v5 = 0; /*0xffc2c7f6*/
    v21 = (_DWORD *)(__return_address + 246556); /*0xffc2c7f8*/
    v19 = 0; /*0xffc2c7fe*/
    v6 = __return_address + 246480; /*0xffc2c804*/
    while ( 1 )
    {
      *(_DWORD *)v6 = 0; /*0xffc2c810*/
      *(_DWORD *)(v6 + 4) = 0; /*0xffc2c813*/
      *v4 = 0; /*0xffc2c816*/
      v4[4] = 0; /*0xffc2c81c*/
      v7 = *(_BYTE *)(__return_address + 257257); /*0xffc2c824*/
      v8 = v18; /*0xffc2c82a*/
      if ( !v7 ) /*0xffc2c830*/
      {
        if ( ((1 << v5) & *(_DWORD *)(__return_address + 246468)) != 0 ) /*0xffc2c83d*/
          goto LABEL_9; /*0xffc2c83d*/
        result = v21; /*0xffc2c83f*/
      }
      if ( v7 == 1 && *(_BYTE *)(__return_address + 257259) == n4_1 )
      {
LABEL_9:
        LogDebugString(
          (_BYTE *)__return_address,
          (int)"\n:: Current S%d, IssConfigTdpCoreCount: %d,  IssConfigTdpTdpInfo: 0x%x,    PbfLookupTBLLimit: %d\n",
          v5,
          *v18,
          *v21,
          (unsigned __int8)::i);
        i_1 = ::i; /*0xffc2c876*/
        for ( i = 0; i < i_1; ++i )
        {
          v11 = byte_FFD515DC[12 * i]; /*0xffc2c88f*/
          if ( v11 == -1 ) /*0xffc2c898*/
            break; /*0xffc2c898*/
          if ( v11 == *v18 && dword_FFD515E0[3 * i] == (*v21 & 0x7FFF) )
          {
            *v4 = byte_FFD515E5[12 * i]; /*0xffc2c8cb*/
            v4[4] = byte_FFD515E6[12 * i]; /*0xffc2c8d3*/
            v12 = AutoGenFn_FFC2CE24((_BYTE *)__return_address, n4, (unsigned __int8)byte_FFD515E4[12 * i]); /*0xffc2c8e7*/
            *(_QWORD *)v6 = v12; /*0xffc2c8ec*/
            v17 = v4[4]; /*0xffc2c901*/
            v16 = *v4; /*0xffc2c905*/
            HIDWORD(v14) = HIDWORD(v12); /*0xffc2c90a*/
            LODWORD(v14) = *(_DWORD *)v6; /*0xffc2c90b*/
            v15 = AutoGenFuncFF33(v14, 0, 0x1Fu); /*0xffc2c916*/
            v13 = AutoGenFuncFF33(*(_QWORD *)v6, 0x20u, 0x3Fu); /*0xffc2c921*/
            LogDebugString(
              (_BYTE *)__return_address,
              (int)"\n"
                   ":: PBF PbfActiveCoreOption on S%d, found  PbfHighPriCoreMap: 0x%x%08x - PbfP1HighRatio: %d - PbfP1LowRatio: %d\n",
              v19,
              v13,
              v15,
              v16,
              v17);
            i_1 = ::i; /*0xffc2c939*/
          }
        }
        v8 = v18; /*0xffc2c94c*/
        result = v21; /*0xffc2c950*/
        v5 = v19; /*0xffc2c954*/
      }
      ++n4_1; /*0xffc2c958*/
      ++v5; /*0xffc2c95d*/
      n4 = n4_1; /*0xffc2c95e*/
      result += 5; /*0xffc2c962*/
      v19 = v5; /*0xffc2c965*/
      v6 += 8; /*0xffc2c969*/
      v18 = v8 + 5; /*0xffc2c96c*/
      ++v4; /*0xffc2c970*/
      v21 = result; /*0xffc2c971*/
      if ( n4_1 >= 4u ) /*0xffc2c978*/
        return result; /*0xffc2c978*/
    }
  }
  return (_DWORD *)LogDebugString((_BYTE *)__return_address, (int)"PBF disabled or invalid capable bitmap.\n"); /*0xffc2c990*/
}

// Function: AutoGenFuncC995 @ 0xffc2c995 (0x22 bytes)
// Index: 215/2560

int __cdecl AutoGenFuncC995(int p_n67190948)
{
  int p_n67190948_1; // [esp-8h] [ebp-8h]

  p_n67190948_1 = p_n67190948; /*0xffc2c99f*/
  *(_DWORD *)p_n67190948 = 67322036; /*0xffc2c9a0*/
  AutoGenFunc3C4(p_n67190948_1, (int)&p_n67190948); /*0xffc2c9a6*/
  return p_n67190948 & 0xFFFFFFF; /*0xffc2c9b5*/
}

// Function: AutoGenFuncC9B7 @ 0xffc2c9b7 (0x23 bytes)
// Index: 216/2560

unsigned int __cdecl AutoGenFuncC9B7(unsigned int p_n67190948)
{
  int p_n67190948_1; // [esp-8h] [ebp-8h]

  p_n67190948_1 = p_n67190948; /*0xffc2c9c1*/
  *(_DWORD *)p_n67190948 = 67322032; /*0xffc2c9c2*/
  AutoGenFunc3C4(p_n67190948_1, (int)&p_n67190948); /*0xffc2c9c8*/
  return HIBYTE(p_n67190948) & 1; /*0xffc2c9d8*/
}

// Function: CpuIssActiveCoreCheck @ 0xffc2c9da (0x403 bytes)
// Index: 217/2560

int __cdecl CpuIssActiveCoreCheck(_BYTE *__return_address, unsigned __int8 a2, int a3)
{
  int v3; // ebp
  unsigned int n2_1; // eax
  unsigned int n0x1C; // ecx
  int v7; // eax
  int v8; // edi
  int v9; // ebx
  int v10; // esi
  unsigned int v11; // ebx
  unsigned int v12; // ebp
  unsigned int n3; // edx
  int *v14; // ecx
  int n255_1; // eax
  int n255_2; // eax
  unsigned int n2_2; // edx
  unsigned int n2_4; // edi
  int n2a_1; // ecx
  char v20; // al
  unsigned int n2_5; // edx
  int n255_3; // ecx
  char v23; // al
  unsigned int n3_1; // ebx
  int v25; // ebp
  int *v26; // eax
  int n255_4; // ecx
  int n255_5; // ecx
  int n255_6; // edx
  unsigned int n2b_1; // ebx
  int n255_7; // ebp
  char v32; // al
  int n255_8; // edi
  char v34; // al
  int n2_3; // [esp+10h] [ebp-18Ch]
  int n2_6; // [esp+10h] [ebp-18Ch]
  int v37; // [esp+14h] [ebp-188h]
  int v38; // [esp+14h] [ebp-188h]
  int n255; // [esp+18h] [ebp-184h]
  unsigned int n2; // [esp+1Ch] [ebp-180h]
  char n2a; // [esp+1Ch] [ebp-180h]
  unsigned int n2b; // [esp+1Ch] [ebp-180h]
  int v43; // [esp+20h] [ebp-17Ch]
  int v44; // [esp+24h] [ebp-178h]
  int v45; // [esp+24h] [ebp-178h]
  char n255_9; // [esp+24h] [ebp-178h]
  _DWORD v47[4]; // [esp+28h] [ebp-174h] BYREF
  int v48; // [esp+38h] [ebp-164h] BYREF
  int v49; // [esp+3Ch] [ebp-160h] BYREF
  int v50; // [esp+40h] [ebp-15Ch] BYREF
  unsigned int v51; // [esp+44h] [ebp-158h]
  int v52; // [esp+48h] [ebp-154h]
  _DWORD v53[84]; // [esp+4Ch] [ebp-150h]

  v52 = a2; /*0xffc2c9ec*/
  v3 = 0; /*0xffc2c9f0*/
  v47[1] = a2 << 8; /*0xffc2c9f6*/
  v43 = 0; /*0xffc2ca0b*/
  v47[2] = 2; /*0xffc2ca14*/
  v47[3] = __return_address; /*0xffc2ca1c*/
  v47[0] = 67322012; /*0xffc2ca20*/
  AutoGenFunc3C4((int)v47, (int)&v48); /*0xffc2ca28*/
  v47[0] = 67322024; /*0xffc2ca36*/
  v44 = v48 & 0xFFFFFFF; /*0xffc2ca3e*/
  AutoGenFunc3C4((int)v47, (int)&v49); /*0xffc2ca4c*/
  v47[0] = 67322004; /*0xffc2ca5a*/
  n2 = v49 & 0xFFFFFFF; /*0xffc2ca62*/
  AutoGenFunc3C4((int)v47, (int)&v50); /*0xffc2ca70*/
  n2_1 = (unsigned __int8)v50 >> 6; /*0xffc2ca7f*/
  if ( n2_1 < 2 )
  {
    LogDebugString(
      __return_address,
      (int)"\n:CLX_ISS: Exit IssActiveCoreOption directly due to unsupported SKU is detected!\n");
    return 0; /*0xffc2ca96*/
  }
  n255 = n2_1 - 2; /*0xffc2caa4*/
  LogDebugString(__return_address, (int)"\n:CLX ISS: Physical To logical Mapping:\n");
  n0x1C = 0; /*0xffc2cab8*/
  v7 = -1; /*0xffc2caba*/
  v8 = 0; /*0xffc2cabd*/
  do /*0xffc2cb1b*/
  {
    v9 = v43; /*0xffc2cabf*/
    v53[n0x1C + 56] = 255; /*0xffc2cac3*/
    v53[n0x1C + 28] = 255; /*0xffc2caca*/
    v53[n0x1C] = 255; /*0xffc2cad1*/
    if ( ((1 << n0x1C) & n2) != 0 ) /*0xffc2cade*/
    {
      v53[n0x1C + 56] = v43; /*0xffc2cae0*/
      v9 = ++v43; /*0xffc2cae7*/
    }
    if ( ((1 << n0x1C) & v44) != 0 ) /*0xffc2caee*/
    {
      v53[n0x1C + 28] = v8++; /*0xffc2caf0*/
      ++v7; /*0xffc2caf8*/
    }
    if ( v53[n0x1C + 28] != 255 && v53[n0x1C + 56] != 255 ) /*0xffc2cb0e*/
    {
      v53[n0x1C] = v7; /*0xffc2cb10*/
      v3 |= 1 << v7; /*0xffc2cb14*/
    }
    ++n0x1C; /*0xffc2cb17*/
  }
  while ( n0x1C < 0x1C ); /*0xffc2cb1b*/
  v10 = 0; /*0xffc2cb1d*/
  v45 = v3; /*0xffc2cb2c*/
  v11 = v9 - a3; /*0xffc2cb30*/
  if ( !v11 ) /*0xffc2cb37*/
    return 0; /*0xffc2cb37*/
  if ( (v11 & 1) != 0 )
  {
    LogDebugString(__return_address, (int)"\n:CLX_ISS: ERROR: CANNOT HAVE ODD NUMBER OF CORES!\n");
    return 0; /*0xffc2cb47*/
  }
  v12 = v11 >> 1; /*0xffc2cb54*/
  v37 = v11 - (v11 >> 1); /*0xffc2cb5e*/
  LogDebugString(__return_address, (int)"ResolvedCoreMask = 0x%x\n", v45); /*0xffc2cb62*/
  LogDebugString(__return_address, (int)"CurSliceProc = %d\n", v8); /*0xffc2cb72*/
  LogDebugString(__return_address, (int)"CurrentLogicalProc = %d\n", v43); /*0xffc2cb81*/
  LogDebugString(__return_address, (int)"LLC_IA_CORES_EN = 0x%x\n", n2); /*0xffc2cb90*/
  LogDebugString(__return_address, (int)"Total Logical Procs = %d\n", v43); /*0xffc2cb9f*/
  LogDebugString(__return_address, (int)"Total Cores to Disablen = %d\n", v11); /*0xffc2cbab*/
  LogDebugString(__return_address, (int)"DisableLeftCores = %d,  DisableRightCores = %d\n", v11 >> 1, v37); /*0xffc2cbbe*/
  n3 = 0; /*0xffc2cbca*/
  v51 = 12 * n255; /*0xffc2cbd4*/
  v14 = &dword_FFD23DEC[3 * n255]; /*0xffc2cbd8*/
  do /*0xffc2cbfb*/
  {
    n255_1 = *v14; /*0xffc2cbde*/
    if ( !v12 || n255_1 == 255 ) /*0xffc2cbe6*/
      break; /*0xffc2cbe6*/
    n255_2 = v53[n255_1]; /*0xffc2cbe8*/
    if ( n255_2 != 255 ) /*0xffc2cbee*/
    {
      v10 |= 1 << n255_2; /*0xffc2cbf0*/
      --v12; /*0xffc2cbf3*/
    }
    ++n3; /*0xffc2cbf4*/
    ++v14; /*0xffc2cbf5*/
  }
  while ( n3 < 3 ); /*0xffc2cbfb*/
  n2_2 = 1; /*0xffc2cc06*/
  n2_4 = (unsigned int)dword_FFD23DE4[n255] >> 1; /*0xffc2cc07*/
  n2_3 = 1; /*0xffc2cc09*/
  if ( n2_4 > 1 ) /*0xffc2cc13*/
  {
    do /*0xffc2cc62*/
    {
      if ( !v12 ) /*0xffc2cc1e*/
        break; /*0xffc2cc1e*/
      n2a_1 = v53[n2_2]; /*0xffc2cc20*/
      n2a = n2a_1; /*0xffc2cc24*/
      if ( n2a_1 != 255 && ((1 << n2a_1) & v10) == 0 ) /*0xffc2cc37*/
      {
        v20 = AutoGenFuncCDDD((int)__return_address, n2_2, 0, n255); /*0xffc2cc41*/
        n2_2 = n2_3; /*0xffc2cc46*/
        if ( v20 ) /*0xffc2cc4f*/
        {
          v10 |= 1 << n2a; /*0xffc2cc55*/
          --v12; /*0xffc2cc58*/
        }
      }
      n2_2 += 2; /*0xffc2cc59*/
      n2_3 = n2_2; /*0xffc2cc5c*/
    }
    while ( n2_2 < n2_4 ); /*0xffc2cc62*/
  }
  n2_5 = 2; /*0xffc2cc66*/
  n2_6 = 2; /*0xffc2cc6a*/
  for ( n2b = n2_4 + 1; n2_5 < n2_4 + 1; n2_6 = n2_5 ) /*0xffc2cc74*/
  {
    if ( !v12 ) /*0xffc2cc7f*/
      break; /*0xffc2cc7f*/
    n255_3 = v53[n2_5]; /*0xffc2cc81*/
    n255_9 = n255_3; /*0xffc2cc85*/
    if ( n255_3 != 255 && ((1 << n255_3) & v10) == 0 ) /*0xffc2cc98*/
    {
      v23 = AutoGenFuncCDDD((int)__return_address, n2_5, 0, n255); /*0xffc2cca2*/
      n2_5 = n2_6; /*0xffc2cca7*/
      if ( v23 ) /*0xffc2ccb0*/
      {
        v10 |= 1 << n255_9; /*0xffc2ccb6*/
        --v12; /*0xffc2ccb9*/
      }
    }
    n2_5 += 2; /*0xffc2ccba*/
  }
  n3_1 = 0; /*0xffc2cccd*/
  v25 = v37; /*0xffc2cccf*/
  v26 = &dword_FFD23E04[v51 / 4]; /*0xffc2ccd8*/
  do /*0xffc2ccfb*/
  {
    n255_4 = *v26; /*0xffc2ccde*/
    if ( !v25 || n255_4 == 255 ) /*0xffc2cce6*/
      break; /*0xffc2cce6*/
    n255_5 = v53[n255_4]; /*0xffc2cce8*/
    if ( n255_5 != 255 ) /*0xffc2ccee*/
    {
      v10 |= 1 << n255_5; /*0xffc2ccf0*/
      --v25; /*0xffc2ccf3*/
    }
    ++n3_1; /*0xffc2ccf4*/
    ++v26; /*0xffc2ccf5*/
  }
  while ( n3_1 < 3 ); /*0xffc2ccfb*/
  n255_6 = n255; /*0xffc2ccfd*/
  n2b_1 = n2_4 + 1; /*0xffc2cd01*/
  v38 = v25; /*0xffc2cd05*/
  if ( n2_4 < dword_FFD23DE4[n255] ) /*0xffc2cd10*/
  {
    do /*0xffc2cd69*/
    {
      if ( !v25 ) /*0xffc2cd1f*/
        break; /*0xffc2cd1f*/
      n255_7 = v53[n2_4]; /*0xffc2cd21*/
      if ( n255_7 == 255 /*0xffc2cd4b*/
        || ((1 << n255_7) & v10) != 0
        || (v32 = AutoGenFuncCDDD((int)__return_address, n2_4, 1, n255_6), n255_6 = n255, !v32) )
      {
        v25 = v38; /*0xffc2cd5b*/
      }
      else
      {
        v10 |= 1 << n255_7; /*0xffc2cd4d*/
        v25 = --v38; /*0xffc2cd54*/
      }
      n2_4 += 2; /*0xffc2cd5f*/
    }
    while ( n2_4 < dword_FFD23DE4[n255_6] ); /*0xffc2cd69*/
    n2b_1 = n2b; /*0xffc2cd6b*/
  }
  while ( n2b_1 < dword_FFD23DE4[n255_6] && v25 ) /*0xffc2cd73*/
  {
    n255_8 = v53[n2b_1]; /*0xffc2cd75*/
    if ( n255_8 != 255 && ((1 << n255_8) & v10) == 0 ) /*0xffc2cd8a*/
    {
      v34 = AutoGenFuncCDDD((int)__return_address, n2b_1, 1, n255_6); /*0xffc2cd97*/
      n255_6 = n255; /*0xffc2cd9c*/
      if ( v34 ) /*0xffc2cda5*/
      {
        v10 |= 1 << n255_8; /*0xffc2cda7*/
        --v25; /*0xffc2cdaa*/
      }
    }
    n2b_1 += 2; /*0xffc2cdab*/
  }
  LogDebugString(__return_address, (int)"\n:CLX_ISS: Now LogicalCoresDisableMask = 0x%x on S%d.\n", v10, v52);
  return v10; /*0xffc2cdd2*/
}

// Function: AutoGenFuncCDDD @ 0xffc2cddd (0x47 bytes)
// Index: 218/2560

char __cdecl AutoGenFuncCDDD(int __return_address, unsigned int n2, int a3, int n255)
{
  char v4; // bl
  unsigned __int8 i; // dl
  int v6; // ecx
  int n255_1; // eax

  v4 = 1; /*0xffc2cde3*/
  for ( i = 0; i < 3u; ++i )
  {
    v6 = i + 3 * n255; /*0xffc2cded*/
    if ( a3 ) /*0xffc2cdf4*/
      n255_1 = dword_FFD23E04[v6]; /*0xffc2cdff*/
    else
      n255_1 = dword_FFD23DEC[v6]; /*0xffc2cdf6*/
    if ( n255_1 == 255 ) /*0xffc2ce0b*/
      break; /*0xffc2ce0b*/
    v4 = n255_1 == n2 ? 0 : v4;
  }
  return v4; /*0xffc2ce1f*/
}

// Function: AutoGenFn_FFC2CE24 @ 0xffc2ce24 (0x31d bytes)
// Index: 219/2560

__int64 __cdecl AutoGenFn_FFC2CE24(_BYTE *__return_address, unsigned __int8 n4, unsigned int a3)
{
  int v3; // ebx
  unsigned int n2; // edi
  int v5; // esi
  int v6; // edi
  unsigned int n0x1C; // ecx
  int v8; // eax
  int v9; // ebp
  unsigned int v10; // ebp
  unsigned int v11; // edi
  int v12; // ebx
  unsigned int v13; // ecx
  _DWORD *v14; // eax
  int n255; // edx
  unsigned int v16; // ecx
  _DWORD *v17; // eax
  int n255_1; // edx
  int n4_2; // ebx
  unsigned int v20; // edi
  int v21; // eax
  int v23; // [esp-8h] [ebp-1A4h]
  int v24; // [esp+18h] [ebp-184h]
  int v25; // [esp+18h] [ebp-184h]
  int v26; // [esp+1Ch] [ebp-180h]
  int v27; // [esp+20h] [ebp-17Ch]
  unsigned int v28; // [esp+24h] [ebp-178h]
  _DWORD v29[4]; // [esp+28h] [ebp-174h] BYREF
  int v30; // [esp+38h] [ebp-164h] BYREF
  int v31; // [esp+3Ch] [ebp-160h] BYREF
  int v32; // [esp+40h] [ebp-15Ch] BYREF
  unsigned int v33; // [esp+44h] [ebp-158h]
  int n4_1; // [esp+48h] [ebp-154h]
  _DWORD v35[84]; // [esp+4Ch] [ebp-150h]

  v29[2] = 2; /*0xffc2ce2c*/
  n4_1 = n4; /*0xffc2ce45*/
  v3 = 0; /*0xffc2ce4e*/
  v29[1] = n4 << 8; /*0xffc2ce58*/
  v33 = 0; /*0xffc2ce66*/
  v29[3] = __return_address; /*0xffc2ce6b*/
  v29[0] = 67322012; /*0xffc2ce6f*/
  AutoGenFunc3C4((int)v29, (int)&v30); /*0xffc2ce77*/
  v24 = v30 & 0xFFFFFFF; /*0xffc2ce8e*/
  LogDebugString(__return_address, (int)"\n:PBF: CAPID6_PCU_FUN3_REG.llc_slice_en = 0x%x\n", v30 & 0xFFFFFFF);
  v29[0] = 67322024; /*0xffc2ce9b*/
  AutoGenFunc3C4((int)v29, (int)&v31); /*0xffc2cea9*/
  v27 = v31 & 0xFFFFFFF; /*0xffc2cebb*/
  LogDebugString(__return_address, (int)"\n:PBF: CAPID7_PCU_FUN3_REG.llc_ia_core_en = 0x%x\n", v31 & 0xFFFFFFF);
  v29[0] = 67322004; /*0xffc2cec8*/
  AutoGenFunc3C4((int)v29, (int)&v32); /*0xffc2ced6*/
  n2 = (unsigned __int8)v32 >> 6; /*0xffc2cee2*/
  LogDebugString(__return_address, (int)"\n:PBF: CAPID4_PCU_FUN3_REG.PhysicalChop = 0x%x\n", n2);
  if ( n2 < 2 )
  {
    LogDebugString(
      __return_address,
      (int)"\n:CLX_PBF: Exit PBFActiveCoreOption directly due to unsupported SKU is detected!\n");
    return 0; /*0xffc2ceff*/
  }
  v28 = n2 - 2; /*0xffc2cf14*/
  LogDebugString(__return_address, (int)"\n:CLX PBF: Physical To logical Mapping:\n");
  v5 = 0; /*0xffc2cf1d*/
  v6 = v27; /*0xffc2cf26*/
  n0x1C = 0; /*0xffc2cf2c*/
  v8 = -1; /*0xffc2cf2e*/
  v9 = 0; /*0xffc2cf31*/
  do /*0xffc2cf8b*/
  {
    v35[n0x1C + 56] = 255; /*0xffc2cf33*/
    v35[n0x1C + 28] = 255; /*0xffc2cf3a*/
    v35[n0x1C] = 255; /*0xffc2cf41*/
    if ( ((1 << n0x1C) & v6) != 0 ) /*0xffc2cf4c*/
      v35[n0x1C + 56] = v5++; /*0xffc2cf4e*/
    v6 = v27; /*0xffc2cf56*/
    if ( ((1 << n0x1C) & v24) != 0 ) /*0xffc2cf5e*/
    {
      v35[n0x1C + 28] = v9++; /*0xffc2cf60*/
      ++v8; /*0xffc2cf68*/
    }
    if ( v35[n0x1C + 28] != 255 && v35[n0x1C + 56] != 255 ) /*0xffc2cf7e*/
    {
      v35[n0x1C] = v8; /*0xffc2cf80*/
      v3 |= 1 << v8; /*0xffc2cf84*/
    }
    ++n0x1C; /*0xffc2cf87*/
  }
  while ( n0x1C < 0x1C ); /*0xffc2cf8b*/
  v26 = v9; /*0xffc2cf94*/
  v10 = v33; /*0xffc2cf98*/
  v25 = v3; /*0xffc2cfa7*/
  if ( !a3 ) /*0xffc2cfad*/
    return 0; /*0xffc2cfad*/
  if ( (a3 & 1) != 0 )
  {
    LogDebugString(__return_address, (int)"\n:CLX_PBF: ERROR: CANNOT HAVE ODD NUMBER OF CORES!\n");
    return 0; /*0xffc2d12e*/
  }
  v11 = a3 >> 1; /*0xffc2cfc5*/
  v12 = a3 - (a3 >> 1); /*0xffc2cfc7*/
  if ( a3 >> 1 == 1 )
  {
    LogDebugString(__return_address, (int)"\n:CLX_PBF: ERROR: Unsupported physical chop!\n");
    return 0; /*0xffc2cfd3*/
  }
  LogDebugString(__return_address, (int)"ResolvedCoreMask = 0x%x\n", v25); /*0xffc2cfe2*/
  LogDebugString(__return_address, (int)"CurSliceProc = %d\n", v26); /*0xffc2cff2*/
  LogDebugString(__return_address, (int)"CurrentLogicalProc = %d\n", v5); /*0xffc2d001*/
  LogDebugString(__return_address, (int)"LLC_IA_CORES_EN = 0x%x\n", v27); /*0xffc2d010*/
  LogDebugString(__return_address, (int)"Total Logical Procs = %d\n", v5); /*0xffc2d01f*/
  LogDebugString(__return_address, (int)"Total Core count for PBF = %d\n", a3); /*0xffc2d031*/
  LogDebugString(__return_address, (int)"PbfCoresLeft = %d,  PbfCoresRight = %d\n", v11, v12); /*0xffc2d041*/
  v13 = 0; /*0xffc2d046*/
  if ( dword_FFD5161C ) /*0xffc2d051*/
  {
    v14 = (_DWORD *)((char *)&unk_FFD23E1C + 20 * v28); /*0xffc2d058*/
    do /*0xffc2d07d*/
    {
      if ( !v11 ) /*0xffc2d061*/
        break; /*0xffc2d061*/
      n255 = v35[*v14]; /*0xffc2d063*/
      if ( n255 != 255 ) /*0xffc2d06d*/
      {
        v10 |= 1 << n255; /*0xffc2d06f*/
        --v11; /*0xffc2d072*/
      }
      ++v13; /*0xffc2d073*/
      ++v14; /*0xffc2d074*/
    }
    while ( v13 < dword_FFD5161C ); /*0xffc2d07d*/
  }
  v16 = 0; /*0xffc2d07f*/
  if ( dword_FFD51620 ) /*0xffc2d087*/
  {
    v17 = (_DWORD *)((char *)&unk_FFD23E44 + 24 * v28); /*0xffc2d08e*/
    do /*0xffc2d0b3*/
    {
      if ( !v12 ) /*0xffc2d097*/
        break; /*0xffc2d097*/
      n255_1 = v35[*v17]; /*0xffc2d099*/
      if ( n255_1 != 255 ) /*0xffc2d0a3*/
      {
        v10 |= 1 << n255_1; /*0xffc2d0a5*/
        --v12; /*0xffc2d0a8*/
      }
      ++v16; /*0xffc2d0a9*/
      ++v17; /*0xffc2d0aa*/
    }
    while ( v16 < dword_FFD51620 ); /*0xffc2d0b3*/
  }
  if ( v11 || v12 )
  {
    LogDebugString(__return_address, (int)"\n:CLX_PBF: ERROR: Unsupported physical chop!\n");
    LogDebugString(__return_address, (int)"   PbfCoresLeft = %d,   PbfCoresRight = %d \n", v11, v12); /*0xffc2d11a*/
    LogDebugString(__return_address, (int)"   Current LogicalCoresPbfHiMask = 0x%x \n", v10); /*0xffc2d126*/
    return 0; /*0xffc2d126*/
  }
  n4_2 = n4_1; /*0xffc2d0bd*/
  LogDebugString(__return_address, (int)"\n:CLX_PBF: LogicalCoresPbfHiMask = 0x%x on S%d.\n", v10, n4_1);
  v23 = AutoGenFuncFF33(v10, 0, 0x1Fu); /*0xffc2d0e5*/
  v20 = v10; /*0xffc2d0eb*/
  v21 = AutoGenFuncFF33(v10, 0x20u, 0x3Fu); /*0xffc2d0ee*/
  LogDebugString(__return_address, (int)"\n:CLX_PBF: Now LogicalCoresPbfHiMask = 0x%x%08x on S%d.\n", v21, v23, n4_2);
  return v20; /*0xffc2d136*/
}

// Function: AutoGenFuncD141 @ 0xffc2d141 (0x851 bytes)
// Index: 220/2560

int __cdecl AutoGenFuncD141(int __return_address)
{
  _DWORD *v1; // ecx
  _BYTE *v2; // edx
  int n4_2; // esi
  _DWORD *v4; // eax
  int n5; // edi
  unsigned __int8 n4_4; // al
  int v7; // edi
  unsigned int n4_29; // ecx
  _DWORD *n4_5; // ebx
  _DWORD *v10; // ebp
  char v11; // dl
  unsigned __int16 v12; // ax
  int v13; // ebx
  unsigned int v14; // eax
  int *n4_30; // ebx
  char v16; // ecx^2
  unsigned int v17; // eax
  int v18; // eax
  unsigned __int8 v19; // bh
  unsigned __int8 v20; // bl
  char v21; // bl
  unsigned int n4_33; // edx
  int v23; // eax
  char v24; // ch
  char *n4_32; // eax
  unsigned int n4_22; // ebp
  char n4_8; // cl
  int v28; // edi
  unsigned __int8 n4_7; // cl
  bool v30; // ch
  unsigned int n4_9; // edi
  bool v32; // al
  _DWORD *v33; // ebp
  int n4_13; // ecx
  unsigned __int8 n4_10; // cl
  int n4_34; // eax
  char v37; // di
  int n4_11; // edx
  char v39; // di
  int n4_14; // edx
  unsigned __int8 n4_15; // cl
  BOOL v42; // ebp
  char ... [18896 chars total]

// Function: AutoGenFuncD992 @ 0xffc2d992 (0x11d bytes)
// Index: 221/2560

int __cdecl AutoGenFuncD992(int __return_address)
{
  int __return_address_1; // esi
  char v2; // bl
  unsigned int v3; // edx
  int v4; // ebp
  _DWORD *v5; // edi
  int __return_address_3; // eax
  int n4; // [esp+8h] [ebp-18h]
  int v8; // [esp+Ch] [ebp-14h] BYREF
  int n67322016; // [esp+10h] [ebp-10h] BYREF
  unsigned int v10; // [esp+14h] [ebp-Ch]
  int n2; // [esp+18h] [ebp-8h]
  int __return_address_2; // [esp+1Ch] [ebp-4h]

  __return_address_1 = __return_address; /*0xffc2d997*/
  v2 = 0; /*0xffc2d99b*/
  v3 = 0; /*0xffc2d99d*/
  n2 = 2; /*0xffc2d99f*/
  n67322016 = 0; /*0xffc2d9a7*/
  __return_address_2 = __return_address; /*0xffc2d9ab*/
  if ( !*(_BYTE *)(__return_address + 107) ) /*0xffc2d9af*/
  {
    v4 = 0; /*0xffc2d9ba*/
    n4 = 4; /*0xffc2d9bc*/
    v5 = (_DWORD *)(__return_address + 257292); /*0xffc2d9c4*/
    do /*0xffc2da97*/
    {
      __return_address_3 = 1 << v4; /*0xffc2d9cf*/
      if ( ((1 << v4) & *(_DWORD *)(__return_address_1 + 246468)) != 0 ) /*0xffc2d9d7*/
      {
        n67322016 = 67322016; /*0xffc2d9df*/
        v10 = (v4 << 8) | v3 & 0xFFFF00FF; /*0xffc2d9fb*/
        AutoGenFunc3C4((int)&n67322016, (int)&v8); /*0xffc2da00*/
        if ( v8 != *(_DWORD *)(__return_address_1 + 257272) ) /*0xffc2da13*/
        {
          AutoGenFunc3DB((int)&n67322016, __return_address_1 + 257272); /*0xffc2da1b*/
          v2 |= 2u; /*0xffc2da22*/
        }
        n67322016 = 67190948; /*0xffc2da29*/
        AutoGenFunc3C4((int)&n67322016, (int)&__return_address); /*0xffc2da37*/
        if ( __return_address != *(v5 - 4) ) /*0xffc2da47*/
        {
          AutoGenFunc3DB((int)&n67322016, (int)(v5 - 4)); /*0xffc2da4f*/
          v2 |= 2u; /*0xffc2da56*/
        }
        n67322016 = 67190944; /*0xffc2da5d*/
        AutoGenFunc3C4((int)&n67322016, (int)&__return_address); /*0xffc2da6b*/
        __return_address_3 = __return_address; /*0xffc2da70*/
        if ( __return_address != *v5 ) /*0xffc2da78*/
        {
          __return_address_3 = AutoGenFunc3DB((int)&n67322016, (int)v5); /*0xffc2da80*/
          v2 |= 2u; /*0xffc2da87*/
        }
        v3 = v10; /*0xffc2da8a*/
      }
      ++v4; /*0xffc2da8e*/
      ++v5; /*0xffc2da8f*/
      --n4; /*0xffc2da92*/
    }
    while ( n4 ); /*0xffc2da97*/
    if ( v2 ) /*0xffc2daa1*/
      *(_BYTE *)(__return_address_1 + 246400) |= v2; /*0xffc2daa3*/
  }
  return __return_address_3; /*0xffc2daa9*/
}

// Function: AutoGenFuncDAAF @ 0xffc2daaf (0x4fe bytes)
// Index: 222/2560

int __cdecl AutoGenFuncDAAF(_BYTE *__return_address)
{
  bool v2; // zf
  int result; // eax
  unsigned __int8 n4; // bh
  char v5; // dl
  unsigned int v6; // edi
  int v7; // eax
  char v8; // al
  int v9; // ecx
  unsigned int v10; // eax
  unsigned __int8 n2_1; // bl
  unsigned __int8 v12; // cl
  unsigned __int8 v13; // al
  int v14; // eax
  bool v15; // bl
  unsigned int v16; // ecx
  int v17; // edx
  char v18; // bl
  char n2_3; // bl
  unsigned int v20; // [esp-30h] [ebp-84h]
  unsigned int v21; // [esp-2Ch] [ebp-80h]
  unsigned __int8 v22; // [esp+9h] [ebp-4Bh]
  char v23; // [esp+Ah] [ebp-4Ah] BYREF
  char v24; // [esp+Bh] [ebp-49h]
  _BYTE v25[4]; // [esp+Ch] [ebp-48h] BYREF
  unsigned int v26; // [esp+10h] [ebp-44h] BYREF
  unsigned int v27; // [esp+14h] [ebp-40h]
  unsigned int v28; // [esp+1Ch] [ebp-38h]
  unsigned int v29; // [esp+20h] [ebp-34h]
  int v30; // [esp+24h] [ebp-30h] BYREF
  unsigned int v31; // [esp+28h] [ebp-2Ch] BYREF
  unsigned __int8 v32[4]; // [esp+2C... [9482 chars total]

// Function: IioEarlyLinkInit @ 0xffc2dfad (0xc3 bytes)
// Index: 223/2560

int __cdecl IioEarlyLinkInit(_BYTE *__return_address)
{
  _BYTE *__return_address_1; // esi
  char __return_address_2; // al
  unsigned __int8 __return_address_4; // bl
  char v4; // di
  _DWORD v6[4]; // [esp+4h] [ebp-18h] BYREF
  int __return_address_3; // [esp+14h] [ebp-8h]
  int v8; // [esp+18h] [ebp-4h] BYREF

  __return_address_1 = __return_address; /*0xffc2dfb4*/
  LOBYTE(__return_address) = GetSocketNumber((int)__return_address); /*0xffc2dfc0*/
  v6[2] = 2; /*0xffc2dfce*/
  v6[1] = (unsigned __int8)__return_address << 8; /*0xffc2dfd5*/
  v6[0] = 318914724; /*0xffc2dfd8*/
  v6[3] = __return_address_1; /*0xffc2dfdf*/
  AutoGenFunc3C4((int)v6, (int)&v8); /*0xffc2dfe2*/
  if ( (v8 & 0x10) != 0 ) /*0xffc2dfee*/
  {
    __return_address_2 = (char)__return_address; /*0xffc2dff0*/
    __return_address_4 = 0; /*0xffc2dff4*/
    LOBYTE(__return_address_3) = 0; /*0xffc2dff7*/
    v4 = 0; /*0xffc2dffa*/
    do /*0xffc2e026*/
    {
      if ( __return_address_4 != __return_address_2 ) /*0xffc2dffe*/
      {
        if ( ((1 << v4) & *((_DWORD *)__return_address_1 + 61617)) != 0 ) /*0xffc2e00d*/
          AutoGenFuncE101(__return_address_1, __return_address_3); /*0xffc2e013*/
        __return_address_2 = (char)__return_address; /*0xffc2e01a*/
      }
      ++__return_address_4; /*0xffc2e01d*/
      ++v4; /*0xffc2e01f*/
      LOBYTE(__return_address_3) = __return_address_4; /*0xffc2e020*/
    }
    while ( __return_address_4 < 4u ); /*0xffc2e026*/
    AutoGenFuncE101(__return_address_1, (int)__return_address); /*0xffc2e02c*/
    LogDebugString(__return_address_1, (int)"Clear DMICtrlAutoPmCmplt...\n"); /*0xffc2e037*/
    return AutoGenFuncBB77(__return_address_1, (int)__return_address); /*0xffc2e040*/
  }
  else
  {
    LogDebugString(__return_address_1, (int)"called early during cold reset...\n"); /*0xffc2e052*/
    v8 |= 0x10u; /*0xffc2e057*/
    return AutoGenFunc3DB((int)v6, (int)&v8); /*0xffc2e063*/
  }
}

// Function: AutoGenFn_FFC2E070 @ 0xffc2e070 (0x91 bytes)
// Index: 224/2560

int __cdecl AutoGenFn_FFC2E070(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 a3, unsigned __int8 a4)
{
  int n64; // esi
  int v5; // edx
  int v6; // edi
  int v7; // edx
  int v8; // edx

  n64 = AutoGenFuncA8CA(__return_address, n4, 3, 65550); /*0xffc2e089*/
  v6 = v5; /*0xffc2e08e*/
  if ( n64 == 64 /*0xffc2e0d4*/
    && (n64 = AutoGenFuncA8CA(__return_address, n4, 1, a4 | (a3 << 8)), v6 = v7, n64 == 64)
    && (n64 = AutoGenFuncA8CA(__return_address, n4, 4103, 0), v6 = v8, n64 == 64) )
  {
    AutoGenFuncA8CA(__return_address, n4, 4, 65550); /*0xffc2e0e1*/
  }
  else
  {
    LogDebugString( /*0xffc2e0f0*/
      __return_address,
      (int)"\n::VCU API Error. VCU_MAILBOX_DATA[31:0] = 0x%x, VCU_MAILBOX_INTERFACE[15:0] = 0x%x \n",
      v6,
      n64);
  }
  return n64; /*0xffc2e0fc*/
}

// Function: AutoGenFuncE101 @ 0xffc2e101 (0x86 bytes)
// Index: 225/2560

int __cdecl AutoGenFuncE101(_BYTE *__return_address, int a2)
{
  int v2; // esi
  int result; // eax
  _DWORD v4[4]; // [esp+8h] [ebp-10h] BYREF

  v2 = (unsigned __int8)a2; /*0xffc2e108*/
  v4[2] = 2; /*0xffc2e10e*/
  v4[1] = (unsigned __int8)a2 << 8; /*0xffc2e118*/
  v4[0] = 67190932; /*0xffc2e126*/
  v4[3] = __return_address; /*0xffc2e12e*/
  AutoGenFunc3C4((int)v4, (int)&a2); /*0xffc2e131*/
  a2 |= 2u; /*0xffc2e136*/
  LogDebugString(__return_address, (int)"\n:INIT - BIOS_RESET_CPL: Set CPL1 on #S%d\n", v2);
  result = AutoGenFunc3DB((int)v4, (int)&a2); /*0xffc2e14e*/
  if ( (__return_address[246408] & 4) == 0 ) /*0xffc2e15d*/
  {
    while ( (a2 & 0x200) == 0 ) /*0xffc2e17f*/
    {
      v4[0] = 67190932; /*0xffc2e169*/
      result = AutoGenFunc3C4((int)v4, (int)&a2); /*0xffc2e175*/
    }
  }
  return result; /*0xffc2e181*/
}

// Function: AutoGenFuncE187 @ 0xffc2e187 (0x13b bytes)
// Index: 226/2560

int __cdecl AutoGenFuncE187(int __return_address)
{
  int __return_address_1; // esi
  unsigned __int8 n4; // bl
  int v3; // edi
  int result; // eax
  char n4_1; // dl
  unsigned int __return_address_3; // eax
  int v7; // eax
  unsigned int v8; // edx
  unsigned int v9; // ecx
  unsigned __int8 v10; // al
  int v11; // ecx
  int v12; // [esp+10h] [ebp-18h]
  __int16 v13; // [esp+14h] [ebp-14h]
  int n67256480; // [esp+18h] [ebp-10h] BYREF
  unsigned int v15; // [esp+1Ch] [ebp-Ch]
  int n2; // [esp+20h] [ebp-8h]
  unsigned int __return_address_2; // [esp+24h] [ebp-4h]

  __return_address_1 = __return_address; /*0xffc2e18d*/
  n4 = 0; /*0xffc2e191*/
  n2 = 2; /*0xffc2e19a*/
  v15 = 0; /*0xffc2e1a2*/
  __return_address_2 = __return_address; /*0xffc2e1a6*/
  n67256480 = 67256480; /*0xffc2e1aa*/
  LogDebugString((_BYTE *)__return_address, (int)"UncoreInitMisc()\n"); /*0xffc2e1b2*/
  LOBYTE(v12) = 0; /*0xffc2e1b9*/
  v3 = 0; /*0xffc2e1bd*/
  do /*0xffc2e2b4*/
  {
    result = 1 << v3; /*0xffc2e1c9*/
    if ( ((1 << v3) & *(_DWORD *)(__return_address_1 + 246468)) != 0 ) /*0xffc2e1d1*/
    {
      v15 = (v3 << 8) | v15 & 0xFFFF00FF; /*0xffc2e1f1*/
      AutoGenFunc3C4((int)&n67256480, (int)&__return_address); /*0xffc2e1f6*/
      n4_1 = *(_BYTE *)(__return_address_1 + 453660); /*0xffc2e1fb*/
      __return_address_3 = __return_address & 0xFFFF88FF | ((v3 & 7 | (16 * (n4_1 & 7))) << 8); /*0xffc2e220*/
      __return_address = __return_address_3; /*0xffc2e222*/
      if ( n4 == n4_1 ) /*0xffc2e228*/
        __return_address = __return_address_3 | 4; /*0xffc2e22d*/
      AutoGenFunc3DB((int)&n67256480, (int)&__return_address); /*0xffc2e23b*/
      LogDebugString( /*0xffc2e24b*/
        (_BYTE *)__return_address_1,
        (int)" Write Socket 0x%2d GLOBAL_PKG_C_S_CONTROL_REGISTER = 0x%X\n",
        v3,
        __return_address);
      v7 = KtiFunc2C7D(__return_address_1, v12, 0x620u); /*0xffc2e256*/
      v9 = v7 & 0xFFFF80FF; /*0xffc2e262*/
      v10 = v7 & 0x7F; /*0xffc2e268*/
      if ( *(_BYTE *)(__return_address_1 + 105) ) /*0xffc2e26a*/
        v11 = (v10 << 8) | v9; /*0xffc2e27e*/
      else
        v11 = v9 | 0xC00; /*0xffc2e270*/
      v13 = v11; /*0xffc2e287*/
      KtiFunc35EC(__return_address_1, v12, 0x620u, __PAIR64__(v8, v11)); /*0xffc2e28c*/
      result = LogDebugString( /*0xffc2e2a2*/
                 (_BYTE *)__return_address_1,
                 (int)" Write Socket 0x%2d MSR_UNCORE_RATIO_LIMIT.MIN_CLM_RATIO [14:8] = 0x%X\n",
                 v3,
                 v13 & 0x7F00);
    }
    ++n4; /*0xffc2e2aa*/
    ++v3; /*0xffc2e2ac*/
    LOBYTE(v12) = n4; /*0xffc2e2ad*/
  }
  while ( n4 < 4u ); /*0xffc2e2b4*/
  return result; /*0xffc2e2ba*/
}

// Function: AutoGenFuncE2C2 @ 0xffc2e2c2 (0xad bytes)
// Index: 227/2560

int __cdecl AutoGenFuncE2C2(int __return_address)
{
  int __return_address_1; // esi
  int result; // eax
  unsigned __int8 n4; // bl
  char v4; // di
  int v5; // [esp+4h] [ebp-14h] BYREF
  _DWORD v6[4]; // [esp+8h] [ebp-10h] BYREF

  __return_address_1 = __return_address; /*0xffc2e2c6*/
  v6[1] = (unsigned __int8)GetSocketNumber(__return_address) << 8; /*0xffc2e2d6*/
  v6[2] = 2; /*0xffc2e2e3*/
  v6[0] = 318783612; /*0xffc2e2ec*/
  v6[3] = __return_address; /*0xffc2e2f4*/
  result = AutoGenFunc3C4((int)v6, (int)&v5); /*0xffc2e2f8*/
  if ( v5 ) /*0xffc2e305*/
  {
    n4 = 0; /*0xffc2e309*/
    LOBYTE(__return_address) = 0; /*0xffc2e30c*/
    v4 = 0; /*0xffc2e310*/
    do /*0xffc2e365*/
    {
      result = 1 << v4; /*0xffc2e317*/
      if ( ((1 << v4) & *(_DWORD *)(__return_address_1 + 246468)) != 0 ) /*0xffc2e31f*/
      {
        KtiFunc35EC(__return_address_1, __return_address, 0x415u, 0); /*0xffc2e32f*/
        KtiFunc35EC(__return_address_1, __return_address, 0x431u, 0); /*0xffc2e342*/
        result = KtiFunc35EC(__return_address_1, __return_address, 0x44Du, 0); /*0xffc2e353*/
      }
      ++n4; /*0xffc2e35b*/
      ++v4; /*0xffc2e35d*/
      LOBYTE(__return_address) = n4; /*0xffc2e35e*/
    }
    while ( n4 < 4u ); /*0xffc2e365*/
  }
  return result; /*0xffc2e36a*/
}

// Function: AutoGenFuncE36F @ 0xffc2e36f (0x27b bytes)
// Index: 228/2560

void __cdecl AutoGenFuncE36F(int __return_address)
{
  unsigned int v1; // ebx
  int v2; // esi
  int n4; // ebp
  _BYTE *v4; // edx
  int v5; // edi
  char v6; // cl
  _BYTE *v7; // eax
  int n6; // ebp
  int __return_address_1; // edi
  unsigned __int8 __return_address_2; // dl
  int v11; // ebp
  int v12; // esi
  char v13; // al
  unsigned __int8 __return_address_3; // dl
  int v15; // ebp
  int v16; // eax
  int v17; // edx
  int v18; // ebp
  unsigned __int8 __return_address_4; // dl
  int v20; // esi
  int v21; // esi
  int n4_2; // ebp
  unsigned __int64 v23; // [esp-18h] [ebp-48h]
  int v24; // [esp+Ch] [ebp-24h] BYREF
  int n4_1; // [esp+10h] [ebp-20h]
  int v26; // [esp+14h] [ebp-1Ch]
  _BYTE v27[4]; // [esp+1Ch] [ebp-14h]
  int n67322100; // [esp+20h] [ebp-10h] BYREF
  unsigned int v29; // [esp+24h] [ebp-Ch]
  int n2; // [esp+28h] [ebp-8h]
  int __return_address_5; // [esp+2Ch] [ebp-4h]

  v1 = 0; /*0xffc2e379*/
  v2 = 0; /*0xffc2e37b*/
  if ( *(_BYTE *)(__return_address + 8478) )
  {
    LogDebugString((_BYTE *)__return_address, (int)"\n:: Start WFRSocketWA()...\n");
    n4 = 4; /*0xffc2e399*/
    v4 = (_BYTE *)(__return_address + 255790); /*0xffc2e39a*/
    n4_1 = 4; /*0xffc2e3a0*/
    v5 = *(_DWORD *)(__return_address + 246468); /*0xffc2e3a4*/
    v6 = 0; /*0xffc2e3aa*/
    do /*0xffc2e3dc*/
    {
      if ( ((1 << v6) & v5) != 0 ) /*0xffc2e3b3*/
      {
        v7 = v4; /*0xffc2e3b7*/
        n6 = 6; /*0xffc2e3b9*/
        do /*0xffc2e3c8*/
        {
          if ( *v7 == 2 ) /*0xffc2e3bd*/
            v2 = 1; /*0xffc2e3c1*/
          v7 += 39; /*0xffc2e3c2*/
          --n6; /*0xffc2e3c5*/
        }
        while ( n6 ); /*0xffc2e3c8*/
        n4 = n4_1; /*0xffc2e3ca*/
      }
      ++v6; /*0xffc2e3ce*/
      v4 += 351; /*0xffc2e3cf*/
      n4_1 = --n4; /*0xffc2e3d8*/
    }
    while ( n4 ); /*0xffc2e3dc*/
    __return_address_1 = __return_address; /*0xffc2e3de*/
    if ( v2 || *(_BYTE *)(__return_address + 8478) != 2 )
    {
      __return_address_2 = 0; /*0xffc2e3f3*/
      v11 = 0; /*0xffc2e3f5*/
      LOBYTE(__return_address) = 0; /*0xffc2e3f7*/
      v12 = 0; /*0xffc2e3fb*/
      do
      {
        *((_BYTE *)&n4_1 + v12) = 0; /*0xffc2e3ff*/
        v27[v12] = 0; /*0xffc2e404*/
        if ( ((1 << v12) & *(_DWORD *)(__return_address_1 + 246468)) != 0 )
        {
          LogDebugString((_BYTE *)__return_address_1, (int)"\nDo WFR WA in current S%2d: \n", v12);
          v13 = KtiFunc2C7D(__return_address_1, __return_address, 0x620u); /*0xffc2e42a*/
          *((_BYTE *)&n4_1 + v12) = v13 & 0x7F; /*0xffc2e437*/
          if ( DimmConfigPerSocket((_BYTE *)__return_address_1, __return_address, 175, v13 & 0x7F | ((v13 & 0x7F) << 8)) )
          {
            LogDebugString(
              (_BYTE *)__return_address_1,
              (int)"\nBIOS failed to request pcode to set UNCORE_RATIO_LIMIT in current S%2d: \n",
              v12);
            v11 = 1; /*0xffc2e46a*/
          }
          else
          {
            v27[v12] = KtiFunc2C7D(__return_address_1, __return_address, 0x621u) & 0x7F; /*0xffc2e481*/
          }
          __return_address_2 = __return_address; /*0xffc2e485*/
        }
        ++__return_address_2; /*0xffc2e489*/
        ++v12; /*0xffc2e48b*/
        LOBYTE(__return_address) = __return_address_2; /*0xffc2e48c*/
      }
      while ( __return_address_2 < 4u );
      v26 = v11; /*0xffc2e499*/
      if ( !v11 )
      {
        __return_address_3 = 0; /*0xffc2e4a5*/
        v15 = 0; /*0xffc2e4a7*/
        LOBYTE(__return_address) = 0; /*0xffc2e4a9*/
        do /*0xffc2e500*/
        {
          if ( ((1 << v15) & *(_DWORD *)(__return_address_1 + 246468)) != 0 ) /*0xffc2e4ba*/
          {
            v16 = KtiFunc2C7D(__return_address_1, __return_address, 0x620u); /*0xffc2e4c6*/
            HIDWORD(v23) = v17; /*0xffc2e4da*/
            LODWORD(v23) = *((unsigned __int8 *)&n4_1 + v15) /*0xffc2e4df*/
                         | v16 & 0xFFFF0000
                         | (*((unsigned __int8 *)&n4_1 + v15) << 8);
            KtiFunc35EC(__return_address_1, __return_address, 0x620u, v23); /*0xffc2e4ea*/
            __return_address_3 = __return_address; /*0xffc2e4ef*/
          }
          ++__return_address_3; /*0xffc2e4f6*/
          ++v15; /*0xffc2e4f8*/
          LOBYTE(__return_address) = __return_address_3; /*0xffc2e4f9*/
        }
        while ( __return_address_3 < 4u ); /*0xffc2e500*/
        v18 = v26; /*0xffc2e502*/
        __return_address_4 = 0; /*0xffc2e506*/
        LOBYTE(__return_address) = 0; /*0xffc2e508*/
        v20 = 0; /*0xffc2e50c*/
        do
        {
          if ( ((1 << v20) & *(_DWORD *)(__return_address_1 + 246468)) != 0 )
          {
            if ( DimmConfigPerSocket(
                   (_BYTE *)__return_address_1,
                   __return_address,
                   175,
                   ((unsigned __int8)v27[v20] << 8) | 0x3F) )
            {
              LogDebugString(
                (_BYTE *)__return_address_1,
                (int)"\nBIOS failed to request pcode to set Core and Mesh ratio in current S%2d: \n",
                v20);
              v18 = 1; /*0xffc2e550*/
            }
            __return_address_4 = __return_address; /*0xffc2e551*/
          }
          ++__return_address_4; /*0xffc2e555*/
          ++v20; /*0xffc2e557*/
          LOBYTE(__return_address) = __return_address_4; /*0xffc2e558*/
        }
        while ( __return_address_4 < 4u );
        if ( !v18 ) /*0xffc2e563*/
        {
          n2 = 2; /*0xffc2e567*/
          v21 = 0; /*0xffc2e56f*/
          v29 = 0; /*0xffc2e571*/
          __return_address_5 = __return_address_1; /*0xffc2e575*/
          n67322100 = 67322100; /*0xffc2e579*/
          n4_2 = 4; /*0xffc2e581*/
          do /*0xffc2e5d3*/
          {
            if ( ((1 << v21) & *(_DWORD *)(__return_address_1 + 246468)) != 0 ) /*0xffc2e58f*/
            {
              v29 = v1 & 0xFFFF00FF | (v21 << 8); /*0xffc2e59e*/
              AutoGenFunc3C4((int)&n67322100, (int)&v24); /*0xffc2e5ac*/
              v24 |= 0x100000u; /*0xffc2e5b1*/
              AutoGenFunc3DB((int)&n67322100, (int)&v24); /*0xffc2e5c3*/
              v1 = v29; /*0xffc2e5c8*/
            }
            ++v21; /*0xffc2e5cf*/
            --n4_2; /*0xffc2e5d0*/
          }
          while ( n4_2 ); /*0xffc2e5d3*/
          LogDebugString((_BYTE *)__return_address_1, (int)"\nBIOS completed WFR WA.\n"); /*0xffc2e5db*/
        }
      }
    }
  }
}

// Function: AutoGenFuncE5EA @ 0xffc2e5ea (0x6c bytes)
// Index: 229/2560

void AutoGenFuncE5EA(int a1, const char *a2, int a3, ...)
{
  int v3; // esi

  if ( a1 ) /*0xffc2e5f1*/
  {
    v3 = a3; /*0xffc2e5f4*/
    if ( (a3 & 0xFFFFFF00) == 0xFFFFFF00 ) /*0xffc2e602*/
    {
      v3 = (unsigned __int8)a3; /*0xffc2e604*/
      LOWORD(a3) = (unsigned __int8)a3; /*0xffc2e608*/
    }
    if ( (v3 & 0xFFFF0000) == 0xFFFF0000 ) /*0xffc2e616*/
      v3 = (unsigned __int16)a3; /*0xffc2e61e*/
    if ( DebugEnabled() && DebugAssertCheck(0x80000000) ) /*0xffc2e631*/
      DebugPrintDispatcher(0x80000000, a2, v3); /*0xffc2e640*/
  }
  while ( 1 ) /*0xffc2e64e*/
    ; /*0xffc2e64e*/
}

// Function: AutoGenFuncE656 @ 0xffc2e656 (0x1c8 bytes)
// Index: 230/2560

int __cdecl AutoGenFuncE656(
        int a1,
        unsigned __int8 a2,
        unsigned __int8 n20,
        unsigned __int8 n6,
        unsigned __int8 n2,
        int a6)
{
  int v6; // ebp
  int v7; // ecx
  int n6_2; // eax
  int n6_1; // [esp-4h] [ebp-14h]

  v6 = 0; /*0xffc2e66e*/
  v7 = a1; /*0xffc2e670*/
  if ( (((1 << a2) & *(_DWORD *)(a6 + 46)) == 0 || n20 == 20) && (((1 << a2) & *(_DWORD *)(a6 + 50)) == 0 || n20 != 20) ) /*0xffc2e686*/
  {
    AutoGenFuncE5EA(a1, "\nInvalid Socket Id %d. \n", a2); /*0xffc2e68f*/
    v7 = a1; /*0xffc2e694*/
  }
  switch ( n20 ) /*0xffc2e6b9*/
  {
    case 7u: /*0xffc2e6b9*/
    case 0xBu: /*0xffc2e6b9*/
    case 8u: /*0xffc2e6b9*/
    case 6u: /*0xffc2e6b9*/
      return *(unsigned __int8 *)(6 * (a2 + 1) + a6); /*0xffc2e813*/
    case 0x13u: /*0xffc2e6b9*/
    case 0xDu: /*0xffc2e6b9*/
    case 0x10u: /*0xffc2e6b9*/
      return *(unsigned __int8 *)(6 * a2 + a6 + 4); /*0xffc2e6d4*/
    case 0xEu: /*0xffc2e6b9*/
      goto LABEL_26; /*0xffc2e6dd*/
  }
  if ( n20 != 17 ) /*0xffc2e6e2*/
  {
    if ( n20 == 15 ) /*0xffc2e706*/
    {
      if ( !n6 ) /*0xffc2e70e*/
      {
        n6_1 = 0; /*0xffc2e72b*/
        goto LABEL_23; /*0xffc2e72b*/
      }
      LOBYTE(n6_2) = (n6 - 1) / 4 + 1; /*0xffc2e71f*/
      if ( (unsigned __int8)n6_2 >= 6u ) /*0xffc2e723*/
      {
        n6_1 = n6; /*0xffc2e725*/
LABEL_23:
        AutoGenFuncE5EA(v7, "\nInvalid BOX_IIO_PCIE_NTB BoxInstance %d. \n", n6_1); /*0xffc2e72c*/
        return v6; /*0xffc2e73a*/
      }
LABEL_36:
      n6_2 = (unsigned __int8)n6_2; /*0xffc2e7a1*/
      return *(unsigned __int8 *)(n6_2 + a6 + 6 * a2 + 4); /*0xffc2e7a1*/
    }
    if ( n20 != 18 ) /*0xffc2e742*/
    {
      if ( n20 < 6u ) /*0xffc2e7b2*/
        return *(unsigned __int8 *)(6 * a2 + a6 + 5); /*0xffc2e80b*/
      if ( n20 == 12 || n20 == 9 || n20 == 10 ) /*0xffc2e7da*/
        return *(unsigned __int8 *)(6 * a2 + a6 + 7); /*0xffc2e801*/
      if ( n20 != 20 ) /*0xffc2e7df*/
      {
        AutoGenFuncE5EA(v7, "\nInvalid BoxType %d. \n", n20); /*0xffc2e7f4*/
        return v6; /*0xffc2e7f4*/
      }
      return *(unsigned __int8 *)(6 * a2 + a6 + 4); /*0xffc2e7df*/
    }
    if ( n2 ) /*0xffc2e74a*/
    {
      if ( n2 == 2 || n2 == 4 ) /*0xffc2e775*/
      {
        LOBYTE(n6_2) = n6; /*0xffc2e799*/
        if ( n6 >= 6u ) /*0xffc2e79f*/
          return v6; /*0xffc2e79f*/
        goto LABEL_36; /*0xffc2e79f*/
      }
      if ( n2 != 5 && n2 != 1 && n2 != 3 ) /*0xffc2e781*/
      {
        AutoGenFuncE5EA(v7, "\nInvalid BoxType %d, Functional block %d. \n", 18, n2); /*0xffc2e78f*/
        return v6; /*0xffc2e797*/
      }
      return *(unsigned __int8 *)(6 * a2 + a6 + 4); /*0xffc2e7e9*/
    }
LABEL_26:
    if ( n6 ) /*0xffc2e752*/
    {
      LOBYTE(n6_2) = (n6 - 1) / 4 + 1; /*0xffc2e767*/
      if ( (unsigned __int8)n6_2 >= 6u ) /*0xffc2e76b*/
      {
        AutoGenFuncE5EA(v7, "\nInvalid IIO_PCIE BoxInstance %d. \n", n6); /*0xffc2e701*/
        return v6; /*0xffc2e701*/
      }
      goto LABEL_36; /*0xffc2e76b*/
    }
    return *(unsigned __int8 *)(6 * a2 + a6 + 4); /*0xffc2e752*/
  }
  n6_2 = n6; /*0xffc2e6ea*/
  if ( n6 < 6u ) /*0xffc2e6ed*/
    return *(unsigned __int8 *)(n6_2 + a6 + 6 * a2 + 4); /*0xffc2e7ae*/
  AutoGenFuncE5EA(v7, "\nInvalid BOX_IIO_VTD BoxInstance %d. \n", n6); /*0xffc2e6f9*/
  return v6; /*0xffc2e817*/
}

// Function: AutoGenFuncE81E @ 0xffc2e81e (0x14b bytes)
// Index: 231/2560

void __cdecl AutoGenFuncE81E(int a1, int a2)
{
  _BYTE *v2; // ebx
  int v3; // eax
  char *v4; // ecx
  _BYTE *v5; // esi
  _BYTE *v6; // edx
  _BYTE *v7; // edi
  int n6; // ebp
  char v9; // al
  char *v10; // edi
  int n2; // ebp
  char v12; // al
  char *v13; // edi
  int n6_1; // ebp
  char v15; // al
  bool v16; // zf
  char *v17; // [esp+0h] [ebp-20h]
  int n4; // [esp+4h] [ebp-1Ch]

  if ( a1 ) /*0xffc2e827*/
  {
    v17 = (char *)(a1 + 10239); /*0xffc2e839*/
    n4 = 4; /*0xffc2e841*/
    v2 = (_BYTE *)(a2 + 69); /*0xffc2e854*/
    v3 = a1 - a2; /*0xffc2e86b*/
    v4 = (char *)(a1 + 255505); /*0xffc2e86f*/
    v5 = (_BYTE *)a2; /*0xffc2e876*/
    v6 = (_BYTE *)(a2 + 61); /*0xffc2e87c*/
    do /*0xffc2e910*/
    {
      v7 = v2 - 65; /*0xffc2e88c*/
      *v5 = v5[v3 + 255497]; /*0xffc2e891*/
      n6 = 6; /*0xffc2e893*/
      do /*0xffc2e89d*/
      {
        v9 = *v4++; /*0xffc2e894*/
        *v7++ = v9; /*0xffc2e897*/
        --n6; /*0xffc2e89a*/
      }
      while ( n6 ); /*0xffc2e89d*/
      v10 = v17 - 50; /*0xffc2e8b1*/
      v5[28] = v5[a1 - a2 + 255533]; /*0xffc2e8b6*/
      v5[36] = v5[a1 - a2 + 255529]; /*0xffc2e8c7*/
      v5[40] = v5[a1 - a2 + 255537]; /*0xffc2e8d8*/
      n2 = 2; /*0xffc2e8db*/
      do /*0xffc2e8e5*/
      {
        v12 = *v10++; /*0xffc2e8dc*/
        *v6++ = v12; /*0xffc2e8df*/
        --n2; /*0xffc2e8e2*/
      }
      while ( n2 ); /*0xffc2e8e5*/
      v13 = v17; /*0xffc2e8e7*/
      n6_1 = 6; /*0xffc2e8ed*/
      do /*0xffc2e8fc*/
      {
        v15 = *v13; /*0xffc2e8ee*/
        v13 += 8077; /*0xffc2e8f0*/
        *v2++ = v15; /*0xffc2e8f6*/
        --n6_1; /*0xffc2e8f9*/
      }
      while ( n6_1 ); /*0xffc2e8fc*/
      v17 += 50813; /*0xffc2e8fe*/
      ++v5; /*0xffc2e906*/
      v16 = n4-- == 1; /*0xffc2e907*/
      v3 = a1 - a2; /*0xffc2e90c*/
    }
    while ( !v16 ); /*0xffc2e910*/
    *(_BYTE *)(a2 + 44) = *(_BYTE *)(a1 + 246412); /*0xffc2e926*/
    *(_BYTE *)(a2 + 45) = *(_BYTE *)(a1 + 246424); /*0xffc2e92f*/
    *(_DWORD *)(a2 + 46) = *(_DWORD *)(a1 + 246468); /*0xffc2e938*/
    *(_DWORD *)(a2 + 50) = *(_DWORD *)(a1 + 246472); /*0xffc2e941*/
    *(_DWORD *)(a2 + 54) = *(_DWORD *)(a1 + 246764); /*0xffc2e94a*/
    *(_BYTE *)(a2 + 60) = *(_BYTE *)(a1 + 9475); /*0xffc2e953*/
    *(_BYTE *)(a2 + 58) = 6; /*0xffc2e956*/
    *(_BYTE *)(a2 + 59) = *(_BYTE *)(a1 + 244317); /*0xffc2e961*/
  }
}

// Function: AutoGenFuncE969 @ 0xffc2e969 (0x359 bytes)
// Index: 232/2560

int __cdecl AutoGenFuncE969(int a1, unsigned __int8 n20, unsigned __int8 n0x1C, int n2, int a5)
{
  char v5; // cl
  unsigned int n0x1F; // esi
  unsigned __int8 n0x1C_1; // al
  int n0x1C_2; // eax
  int n9; // [esp-4h] [ebp-14h]
  int v11; // [esp+0h] [ebp-10h]

  v5 = *(_BYTE *)(a5 + 44); /*0xffc2e978*/
  n0x1F = 0; /*0xffc2e97f*/
  switch ( n20 ) /*0xffc2e98f*/
  {
    case 0u: /*0xffc2e98f*/
      n0x1C_1 = n0x1C; /*0xffc2ea28*/
      if ( v5 || n0x1C >= 0x1Cu ) /*0xffc2ea32*/
        goto LABEL_27; /*0xffc2ea32*/
      if ( n0x1C < 8u ) /*0xffc2ea36*/
        goto LABEL_23; /*0xffc2ea36*/
      if ( n0x1C < 0x10u ) /*0xffc2ea41*/
      {
        n9 = 9; /*0xffc2ea43*/
        goto LABEL_8; /*0xffc2ea45*/
      }
      return 11 - (n0x1C < 0x18u); /*0xffc2ea51*/
    case 1u: /*0xffc2e98f*/
      n0x1C_1 = n0x1C; /*0xffc2ea6d*/
      if ( v5 || n0x1C >= 0x1Cu ) /*0xffc2ea77*/
        goto LABEL_27; /*0xffc2ea77*/
      if ( n0x1C < 8u ) /*0xffc2ea7b*/
      {
        n9 = 14; /*0xffc2ea7d*/
        goto LABEL_8; /*0xffc2ea7f*/
      }
      if ( n0x1C < 0x10u ) /*0xffc2ea86*/
      {
        n9 = 15; /*0xffc2ea88*/
        goto LABEL_8; /*0xffc2ea8a*/
      }
      return 17 - (n0x1C < 0x18u); /*0xffc2ea96*/
    case 2u: /*0xffc2e98f*/
      n0x1C_1 = n0x1C; /*0xffc2ea9b*/
      if ( v5 || n0x1C >= 0x1Cu ) /*0xffc2eaa5*/
      {
LABEL_27:
        AutoGenFuncE5EA(a1, "\nInvalid CHA Box Instance Number %d. \n", n0x1C_1); /*0xffc2ea56*/
      }
      else
      {
        if ( n0x1C < 8u ) /*0xffc2eaa9*/
        {
          n9 = 20; /*0xffc2eaab*/
          goto LABEL_8; /*0xffc2eaad*/
        }
        if ( n0x1C < 0x10u ) /*0xffc2eab4*/
        {
          n9 = 21; /*0xffc2eab6*/
          goto LABEL_8; /*0xffc2eab8*/
        }
        return 23 - (n0x1C < 0x18u); /*0xffc2eac1*/
      }
      return n0x1F; /*0xffc2eac4*/
    case 3u: /*0xffc2e98f*/
      if ( !v5 && !n0x1C ) /*0xffc2ead3*/
      {
        n9 = 29; /*0xffc2ead5*/
        goto LABEL_8; /*0xffc2ead7*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid CHABC Box Instance Number %d. \n", n0x1C); /*0xffc2eae5*/
      return n0x1F; /*0xffc2eae5*/
    case 4u: /*0xffc2e98f*/
      if ( !v5 && !n0x1C ) /*0xffc2eaf4*/
      {
        n9 = 30; /*0xffc2eaf6*/
        goto LABEL_8; /*0xffc2eaf8*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid PCU Box Instance Number %d. \n", n0x1C); /*0xffc2eb06*/
      return n0x1F; /*0xffc2eb06*/
    case 5u: /*0xffc2e98f*/
      if ( !v5 && !n0x1C ) /*0xffc2eb15*/
      {
        n9 = 31; /*0xffc2eb17*/
        goto LABEL_8; /*0xffc2eb19*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid VCU Box Instance Number %d. \n", n0x1C); /*0xffc2eb27*/
      return n0x1F; /*0xffc2eb27*/
    case 6u: /*0xffc2e98f*/
      if ( v5 || n0x1C >= 2u ) /*0xffc2ea0d*/
        AutoGenFuncE5EA(a1, "\nInvalid M2MEM Box Instance Number %d. \n", n0x1C); /*0xffc2ea23*/
      else
        n0x1F = n0x1C + 8; /*0xffc2ea12*/
      goto LABEL_94; /*0xffc2ea15*/
    case 7u: /*0xffc2e98f*/
    case 0xBu: /*0xffc2e98f*/
      if ( v5 ) /*0xffc2e998*/
        goto LABEL_12; /*0xffc2e998*/
      if ( n0x1C <= 1u ) /*0xffc2e9a0*/
      {
        n9 = 10; /*0xffc2e9c8*/
      }
      else if ( n0x1C == 2 ) /*0xffc2e9a4*/
      {
        n9 = 11; /*0xffc2e9c4*/
      }
      else if ( n0x1C <= 4u ) /*0xffc2e9ae*/
      {
        n9 = 12; /*0xffc2e9c0*/
      }
      else
      {
        if ( n0x1C != 5 ) /*0xffc2e9b2*/
          return n0x1F; /*0xffc2e9b2*/
        n9 = 13; /*0xffc2e9b8*/
      }
      goto LABEL_8; /*0xffc2e9b8*/
    case 8u: /*0xffc2e98f*/
      if ( v5 ) /*0xffc2e9e0*/
        goto LABEL_15; /*0xffc2e9e0*/
      n0x1F = n0x1C / (unsigned int)*(unsigned __int8 *)(a5 + 60) + 22; /*0xffc2e9ec*/
      goto LABEL_94; /*0xffc2e9ef*/
    case 9u: /*0xffc2e98f*/
      if ( v5 ) /*0xffc2eb2e*/
        goto LABEL_15; /*0xffc2eb2e*/
      if ( n0x1C < 3u ) /*0xffc2eb37*/
      {
        n0x1F = n0x1C + 14; /*0xffc2eb3c*/
        goto LABEL_94; /*0xffc2eb3f*/
      }
      n0x1C_2 = n0x1C; /*0xffc2eb44*/
      goto LABEL_58; /*0xffc2eb44*/
    case 0xAu: /*0xffc2e98f*/
      if ( v5 ) /*0xffc2eb54*/
      {
LABEL_12:
        AutoGenFuncE5EA(a1, "\nInvalid Cpu type.\n", v11); /*0xffc2e9cc*/
        return n0x1F; /*0xffc2e9d9*/
      }
      if ( n0x1C < 2u ) /*0xffc2eb5f*/
      {
        n9 = 18; /*0xffc2eb61*/
        goto LABEL_8; /*0xffc2eb63*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid Box instance.\n", v11); /*0xffc2eb6d*/
      return n0x1F; /*0xffc2eb6d*/
    case 0xCu: /*0xffc2e98f*/
      if ( v5 ) /*0xffc2eb74*/
      {
LABEL_15:
        AutoGenFuncE5EA(a1, "\nInvalid Cpu type.\n", v11); /*0xffc2e9f4*/
      }
      else
      {
        n0x1C_2 = n0x1C; /*0xffc2eb7a*/
        if ( n0x1C >= 5u ) /*0xffc2eb80*/
LABEL_58:
          AutoGenFuncE5EA(a1, "\nInvalid KTI Box Instance Number %d. \n", n0x1C_2); /*0xffc2eb47*/
        else
          n0x1F = (unsigned __int8)byte_FFD516CC[n0x1C]; /*0xffc2eb82*/
      }
      goto LABEL_94; /*0xffc2eb89*/
    case 0xDu: /*0xffc2e98f*/
      if ( v5 || n0x1C >= 4u ) /*0xffc2eb98*/
        AutoGenFuncE5EA(a1, "\nInvalid IIO PCIE DMI Box Instance Number %d. \n", n0x1C); /*0xffc2eba7*/
      return n0x1F; /*0xffc2eba7*/
    case 0xEu: /*0xffc2e98f*/
      if ( v5 || n0x1C >= 0x15u ) /*0xffc2ebb3*/
      {
        AutoGenFuncE5EA(a1, "\nInvalid IIO PCIE Box Instance Number %d. \n", n0x1C); /*0xffc2ebe0*/
      }
      else
      {
        if ( !n0x1C ) /*0xffc2ebb7*/
          return n0x1F; /*0xffc2ebb7*/
        n0x1F = (n0x1C - 1) % 4; /*0xffc2ebd1*/
      }
LABEL_94:
      if ( n0x1F > 0x1F ) /*0xffc2eca5*/
        AutoGenFuncE5EA(a1, "\nInvalid Device %d accessed for Box Type %d and Box Instance %d. \n", n0x1F, n20, n0x1C); /*0xffc2ecb3*/
      return n0x1F; /*0xffc2ecb3*/
    case 0xFu: /*0xffc2e98f*/
      if ( v5 ) /*0xffc2ebe7*/
        AutoGenFuncE5EA(a1, "\nInvalid IIO PCIE Box Instance Number %d. \n", n0x1C); /*0xffc2ebf8*/
      return n0x1F; /*0xffc2ebf8*/
    case 0x10u: /*0xffc2e98f*/
      if ( !v5 ) /*0xffc2ebff*/
      {
        n9 = 4; /*0xffc2ec01*/
        goto LABEL_8; /*0xffc2ec03*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid IIO CB Box Instance Number %d. \n", n0x1C); /*0xffc2ec13*/
      return n0x1F; /*0xffc2ec13*/
    case 0x11u: /*0xffc2e98f*/
      if ( !v5 ) /*0xffc2ec1a*/
      {
        n9 = 5; /*0xffc2ec1c*/
        goto LABEL_8; /*0xffc2ec1e*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid IIO VTD Box Instance Number %d. \n", n0x1C); /*0xffc2ec2e*/
      return n0x1F; /*0xffc2ec2e*/
    case 0x12u: /*0xffc2e98f*/
      if ( !v5 && n0x1C < 0x15u ) /*0xffc2ec3d*/
      {
        n9 = 7; /*0xffc2ec3f*/
        goto LABEL_8; /*0xffc2ec41*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid IIO DFX Box Instance Number %d. \n", n0x1C); /*0xffc2ec4f*/
      return n0x1F; /*0xffc2ec4f*/
    case 0x13u: /*0xffc2e98f*/
      if ( !v5 && !n0x1C ) /*0xffc2ec5e*/
      {
LABEL_23:
        n9 = 8; /*0xffc2ea38*/
        goto LABEL_8; /*0xffc2ea3a*/
      }
      AutoGenFuncE5EA(a1, "\nInvalid Ubox Instance Number %d. \n", n0x1C); /*0xffc2ec6d*/
      break; /*0xffc2ec6d*/
    case 0x14u: /*0xffc2e98f*/
      if ( v5 || n0x1C ) /*0xffc2ec7c*/
      {
        AutoGenFuncE5EA(a1, "\nInvalid FPGA Instance number %d. \n", n0x1C); /*0xffc2ec8e*/
      }
      else
      {
        n9 = 16; /*0xffc2ec7e*/
LABEL_8:
        n0x1F = n9; /*0xffc2e9ba*/
      }
      break; /*0xffc2e9bb*/
    default:
      AutoGenFuncE5EA(a1, "\nInvalid Box Type %d. \n", n20); /*0xffc2ec9a*/
      goto LABEL_94; /*0xffc2ec9a*/
  }
  return n0x1F; /*0xffc2ecbb*/
}

// Function: AutoGenFuncED19 @ 0xffc2ed19 (0x1f5 bytes)
// Index: 233/2560

int __cdecl AutoGenFuncED19(int a1, unsigned __int8 n20, unsigned __int8 n0x1C, unsigned __int8 n2, int a5)
{
  unsigned __int8 v5; // cl
  unsigned __int8 v6; // dl
  unsigned int n7; // esi
  int v8; // esi
  unsigned __int8 n7_1; // al
  unsigned __int8 v11; // [esp+27h] [ebp+1Bh]

  v5 = *(_BYTE *)(a5 + 44); /*0xffc2ed26*/
  v6 = *(_BYTE *)(a5 + 60); /*0xffc2ed29*/
  n7 = 0; /*0xffc2ed32*/
  v11 = v5; /*0xffc2ed34*/
  switch ( n20 ) /*0xffc2ed47*/
  {
    case 0u: /*0xffc2ed47*/
    case 1u: /*0xffc2ed47*/
    case 2u: /*0xffc2ed47*/
      if ( !v5 && n0x1C < 0x1Cu ) /*0xffc2edd6*/
      {
        n7 = n0x1C & 7; /*0xffc2eddb*/
        goto LABEL_16; /*0xffc2edde*/
      }
      return n7; /*0xffc2edd6*/
    case 3u: /*0xffc2ed47*/
    case 4u: /*0xffc2ed47*/
    case 5u: /*0xffc2ed47*/
    case 6u: /*0xffc2ed47*/
    case 0xDu: /*0xffc2ed47*/
    case 0xEu: /*0xffc2ed47*/
    case 0xFu: /*0xffc2ed47*/
    case 0x10u: /*0xffc2ed47*/
    case 0x11u: /*0xffc2ed47*/
    case 0x13u: /*0xffc2ed47*/
      n7 = (unsigned __int8)byte_FFD51624[168 * v5 + 8 * n20 + n2]; /*0xffc2ee0c*/
      goto LABEL_15; /*0xffc2ee0c*/
    case 7u: /*0xffc2ed47*/
      if ( n2 >= 2u ) /*0xffc2ed50*/
        return 4; /*0xffc2ed5a*/
      v8 = (unsigned __int8)byte_FFD5165C[168 * v5 + n0x1C % (unsigned int)v6]; /*0xffc2ed75*/
LABEL_5:
      n7 = n2 + v8; /*0xffc2ed7d*/
      goto LABEL_16; /*0xffc2ed82*/
    case 8u: /*0xffc2ed47*/
      v8 = (unsigned __int8)byte_FFD51664[168 * v5 + n0x1C % (unsigned int)v6]; /*0xffc2edbd*/
      if ( n2 != 2 ) /*0xffc2edc8*/
        goto LABEL_5; /*0xffc2edc8*/
      n7 = v8 + 3; /*0xffc2edca*/
      goto LABEL_16; /*0xffc2edcd*/
    case 9u: /*0xffc2ed47*/
      n7 = (unsigned __int8)byte_FFD5166C[168 * v5 + n2]; /*0xffc2ee71*/
      if ( n0x1C >= 9u ) /*0xffc2ee7f*/
        goto LABEL_13; /*0xffc2ee7f*/
      goto LABEL_16; /*0xffc2ee7f*/
    case 0xAu: /*0xffc2ed47*/
      n7 = (unsigned __int8)byte_FFD51674[168 * v5 + n2]; /*0xffc2edec*/
      if ( n0x1C == 1 ) /*0xffc2edfa*/
LABEL_13:
        n7 += 4; /*0xffc2edfc*/
      goto LABEL_16; /*0xffc2edff*/
    case 0xBu: /*0xffc2ed47*/
      v8 = (unsigned __int8)byte_FFD5167C[168 * v5 + n0x1C % (unsigned int)v6]; /*0xffc2ed9d*/
      goto LABEL_5; /*0xffc2eda5*/
    case 0xCu: /*0xffc2ed47*/
      n7 = (unsigned __int8)byte_FFD51684[168 * v5 + n2]; /*0xffc2ee4e*/
      if ( n0x1C == 2 || n0x1C == 4 ) /*0xffc2ee5e*/
        n7 += 4; /*0xffc2ee60*/
      goto LABEL_15; /*0xffc2ee63*/
    case 0x12u: /*0xffc2ed47*/
      if ( n0x1C >= 0x15u || (n7_1 = byte_FFD516B4[168 * v5 + n2], n7_1 == 0xFF) ) /*0xffc2eea0*/
      {
        AutoGenFuncE5EA(a1, "\nInvalid IIO DFX Box Instance Number %d. \n", n0x1C); /*0xffc2eedc*/
      }
      else if ( n2 ) /*0xffc2eea4*/
      {
        n7 = n7_1; /*0xffc2eec8*/
      }
      else
      {
        if ( !n0x1C ) /*0xffc2eea8*/
          return 0; /*0xffc2eeac*/
        n7 = (n0x1C - 1) % 4; /*0xffc2eec2*/
      }
LABEL_15:
      v5 = v11; /*0xffc2ee14*/
LABEL_16:
      if ( n7 > 7 ) /*0xffc2ee1a*/
        AutoGenFuncE5EA( /*0xffc2ee33*/
          a1,
          "\nInvalid Functional Block %d accessed for CPUType %d CPUIndex %d Box Type %d and Box Instance %d. \n",
          n2,
          v5,
          0,
          n20,
          n0x1C);
      return n7;
    case 0x14u: /*0xffc2ed47*/
      if ( n0x1C ) /*0xffc2eeee*/
        AutoGenFuncE5EA(a1, "\nInvalid FPGA Box Instance Number %d. \n", n0x1C); /*0xffc2eefc*/
      return 0; /*0xffc2ef04*/
    default:
      AutoGenFuncE5EA(a1, "\nInvalid Box Type %d. \n", n20); /*0xffc2ef0c*/
      goto LABEL_15; /*0xffc2ef0c*/
  }
}

// Function: AutoGenFuncEF4E @ 0xffc2ef4e (0xa bytes)
// Index: 234/2560

unsigned int __cdecl AutoGenFuncEF4E(int a1, int a2)
{
  return a2 & 0xFFFF0000; /*0xffc2ef57*/
}

// Function: AutoGenFuncEF58 @ 0xffc2ef58 (0x8 bytes)
// Index: 235/2560

void __cdecl AutoGenFuncEF58(char a1)
{
  while ( a1 ) /*0xffc2ef5d*/
    ; /*0xffc2ef58*/
}

// Function: AutoGenFuncEF60 @ 0xffc2ef60 (0xb0 bytes)
// Index: 236/2560

char __cdecl AutoGenFuncEF60(int __return_address, int n4)
{
  int CpuCount; // eax
  unsigned __int8 n6_1; // bl
  unsigned __int8 *v4; // esi
  unsigned __int8 v5; // bh
  int CpuCount_1; // edi
  unsigned __int8 n2; // bl
  int v9; // [esp+Ch] [ebp-10h]
  char v10; // [esp+10h] [ebp-Ch]
  char SocketInfo; // [esp+14h] [ebp-8h]
  int n6; // [esp+18h] [ebp-4h]

  CpuCount = GetSocketInfo(__return_address, n4); /*0xffc2ef6f*/
  n6_1 = 0; /*0xffc2ef75*/
  LOBYTE(n6) = 0; /*0xffc2ef78*/
  v4 = (unsigned __int8 *)(CpuCount + 3); /*0xffc2ef7b*/
  do /*0xffc2f003*/
  {
    if ( *(v4 - 3) ) /*0xffc2ef7e*/
    {
      CpuCount = GetCpuCount(__return_address, n4, n6); /*0xffc2ef8d*/
      v5 = 0; /*0xffc2ef92*/
      CpuCount_1 = CpuCount; /*0xffc2ef97*/
      LOBYTE(v9) = 0; /*0xffc2ef99*/
      if ( *v4 ) /*0xffc2ef9c*/
      {
        do /*0xffc2eff0*/
        {
          if ( *(_BYTE *)(1379 * v5 + CpuCount_1 + 107) ) /*0xffc2efa9*/
          {
            SocketInfo = 0; /*0xffc2efb0*/
            do /*0xffc2efe7*/
            {
              n2 = 0; /*0xffc2efb4*/
              v10 = 0; /*0xffc2efb6*/
              do /*0xffc2efdb*/
              {
                ProcCommonFn_FFC3CB6B(__return_address, n4, n6, v9, SocketInfo, v10); /*0xffc2efcb*/
                v10 = ++n2; /*0xffc2efd5*/
              }
              while ( n2 < 2u ); /*0xffc2efdb*/
              LOBYTE(CpuCount) = SocketInfo + 1; /*0xffc2efe0*/
              SocketInfo = CpuCount; /*0xffc2efe2*/
            }
            while ( (unsigned __int8)CpuCount < 2u ); /*0xffc2efe7*/
          }
          LOBYTE(v9) = ++v5; /*0xffc2efeb*/
        }
        while ( v5 < *v4 ); /*0xffc2eff0*/
        n6_1 = n6; /*0xffc2eff2*/
      }
    }
    ++n6_1; /*0xffc2eff5*/
    v4 += 7688; /*0xffc2eff7*/
    LOBYTE(n6) = n6_1; /*0xffc2effd*/
  }
  while ( n6_1 < 6u ); /*0xffc2f003*/
  return CpuCount; /*0xffc2f009*/
}

// Function: AutoGenFuncF010 @ 0xffc2f010 (0x44 bytes)
// Index: 237/2560

int __cdecl AutoGenFuncF010(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, char a4)
{
  int v4; // eax

  v4 = MiscConfigCheck(__return_address, n4, n6, 184567104); /*0xffc2f02a*/
  return MiscIoCheck(__return_address, n4, n6, 0xB004540u, a4 & 0x3F | ((a4 & 0x3F) << 15) | v4 & 0xFFE07FC0); /*0xffc2f050*/
}

// Function: AutoGenFuncF054 @ 0xffc2f054 (0x4f bytes)
// Index: 238/2560

int __usercall AutoGenFuncF054@<eax>(int n6a@<ebx>, int n6, unsigned __int8 n6aa, char n2, char a5, bool *a6)
{
  int v6; // eax
  int v7; // eax

  v6 = MailBoxFunc8E0B(n6a, n6, n6aa, n2, 117459068); /*0xffc2f067*/
  if ( a6 ) /*0xffc2f074*/
    *a6 = (v6 & 1) == 0; /*0xffc2f07d*/
  if ( a5 == 1 ) /*0xffc2f083*/
    v7 = v6 & 0xFFFFFFFE; /*0xffc2f085*/
  else
    v7 = v6 | 1; /*0xffc2f08a*/
  return MailBoxFunc8FC5(n6, n6aa, n2, 117459068, v7); /*0xffc2f0a0*/
}

// Function: AutoGenFuncF0A3 @ 0xffc2f0a3 (0x1a bytes)
// Index: 239/2560

char __cdecl AutoGenFuncF0A3(int a1)
{
  return (unsigned __int8)KtiFuncE78(a1, 0, 3) != 0 ? 0 : 8;
}

// Function: AutoGenFuncF0BD @ 0xffc2f0bd (0x1aa bytes)
// Index: 240/2560

int __cdecl AutoGenFuncF0BD(unsigned __int8 *__return_address, int n4)
{
  unsigned __int8 n6_2; // bh
  unsigned __int8 *v3; // esi
  int result; // eax
  int n6_1; // ebp
  unsigned __int8 v6; // bl
  int CpuCount; // ecx
  int v8; // eax
  char v9; // [esp+13h] [ebp-5Dh] BYREF
  int n2; // [esp+14h] [ebp-5Ch]
  int v11; // [esp+18h] [ebp-58h]
  int i; // [esp+1Ch] [ebp-54h]
  int v13; // [esp+20h] [ebp-50h]
  int n6; // [esp+24h] [ebp-4Ch]
  int v15; // [esp+28h] [ebp-48h]
  _BYTE buf[62]; // [esp+2Ch] [ebp-44h] BYREF
  unsigned __int16 n0x111; // [esp+6Ah] [ebp-6h]
  char v18; // [esp+6Ch] [ebp-4h]

  KtiFunc7D83(buf, 0, 0x44u); /*0xffc2f0cd*/
  v9 = 0; /*0xffc2f0e2*/
  n6_2 = 0; /*0xffc2f0ec*/
  v11 = 0; /*0xffc2f0f1*/
  LOBYTE(n6) = 0; /*0xffc2f0f6*/
  v3 = (unsigned __int8 *)(GetSocketInfo((int)__return_address, n4) + 3); /*0xffc2f0fa*/
  result = 0; /*0xffc2f0fd*/
  do /*0xffc2f259*/
  {
    if ( *(v3 - 3) ) /*0xffc2f101*/
    {
      n6_1 = n6; /*0xffc2f10b*/
      v6 = 0; /*0xffc2f11a*/
      CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc2f11f*/
      LOBYTE(n2) = 0; /*0xffc2f121*/
      for ( i = CpuCount; v6 < *v3; LOBYTE(n2) = v6 ) /*0xffc2f129*/
      {
        v15 = v6; /*0xffc2f134*/
        v13 = 1379 * v6; /*0xffc2f13e*/
        if ( *(_BYTE *)(v13 + CpuCount + 107) ) /*0xffc2f142*/
        {
          v8 = DimmCommTest(__return_address, n4, n6_1, n2, (int)buf, &v9); /*0xffc2f164*/
          *(_WORD *)&__return_address[50813 * (unsigned __int8)n4 + 58741 + 2 * v11 + 2 * v15] = n0x111; /*0xffc2f18b*/
          n6_1 = n6; /*0xffc2f193*/
          CpuCount = i; /*0xffc2f197*/
          if ( v8 ) /*0xffc2f19d*/
          {
            *(_BYTE *)(v13 + i + 196) = 0; /*0xffc2f1d6*/
            DebugPrint( /*0xffc2f1f5*/
              (int)__return_address,
              3,
              n4,
              n6_1,
              n2,
              255,
              255,
              255,
              "Communication with the NGN DIMM failed\n");
            KtiFunc1162(__return_address, 15, 2, n4, n6_1, n2, 255); /*0xffc2f210*/
            KtiFunc8B24(__return_address, n4, n6_1, n2); /*0xffc2f225*/
            CpuCount = i; /*0xffc2f22a*/
          }
          else if ( n0x111 < 0x111u ) /*0xffc2f1ad*/
          {
            *(_BYTE *)(v13 + i + 196) = 0; /*0xffc2f1be*/
            v18 = 0; /*0xffc2f1c6*/
          }
          else
          {
            *(_BYTE *)(v13 + i + 196) = 1; /*0xffc2f1af*/
            v18 = 1; /*0xffc2f1b7*/
          }
        }
        ++v6; /*0xffc2f231*/
      }
      result = v11; /*0xffc2f23f*/
    }
    ++n6_2; /*0xffc2f243*/
    result += 2; /*0xffc2f245*/
    v3 += 7688; /*0xffc2f248*/
    LOBYTE(n6) = n6_2; /*0xffc2f24e*/
    v11 = result; /*0xffc2f252*/
  }
  while ( n6_2 < 6u ); /*0xffc2f259*/
  return result; /*0xffc2f25f*/
}

// Function: ProcMemFuncF267 @ 0xffc2f267 (0x436 bytes)
// Index: 241/2560

unsigned __int8 __cdecl ProcMemFuncF267(unsigned __int8 *n6, unsigned __int8 n4)
{
  unsigned __int8 *n6_1; // ebx
  unsigned __int8 n4_1; // bp
  _BYTE *SocketInfo; // ecx
  unsigned __int8 n6_2; // al
  int n6_4; // esi
  int CpuCount; // eax
  int v8; // ecx
  unsigned int v9; // ecx
  bool v10; // zf
  int v11; // edx
  unsigned int v12; // ebx
  int v13; // edi
  unsigned int v14; // esi
  unsigned __int8 n6_5; // di
  int n184632420; // esi
  unsigned __int16 v17; // ax
  int v18; // edi
  unsigned int v19; // esi
  unsigned int n64_1; // ebx
  int n8; // edi
  unsigned int v22; // eax
  unsigned int v23; // ebx
  char v24; // si
  int n73; // ebp
  unsigned int v26; // edi
  char v27; // bl
  unsigned int v28; // edx
  char v29; // si
  unsigned __int8 n5; // al
  int n5_2; // esi
  unsigned int v32; // eax
  int v33; // [esp-38h] [ebp-8Ch]
  int v34; // [esp-38h] [ebp-8Ch]
  unsigned int v35; // [esp-24h] [ebp-78h]
  unsigned int v36; // [esp-24h] [ebp-78h]
  int v37; // [esp-18h] [ebp-6Ch]
  unsigned __int8 i; // [esp+12h] [ebp-42h]
  unsigned __int8 n5_1; // [esp+13h] [ebp-41h]
  int n6_3; // [esp+14h] [ebp-40h]
  int v41; // [esp+18h] [ebp-3Ch]
  __int16 v42; // [esp+18h] [ebp-3Ch]
  int v43; // [esp+18h] [ebp-3Ch]
  int v44; // [esp+18h] [ebp-3Ch]
  int v45; // [esp+1Ch] [ebp-38h]
  int n64; // [esp+20h] [ebp-34h]
  int n9; // [esp+20h] [ebp-34h]
  int n32; // [esp+20h] [ebp-34h]
  int CpuCount_1; // [esp+24h] [ebp-30h]
  int v50; // [esp+24h] [ebp-30h]
  int n4_2; // [esp+24h] [ebp-30h]
  _BYTE *SocketInfo_1; // [esp+28h] [ebp-2Ch]
  int v53; // [esp+2Ch] [ebp-28h]
  int v54; // [esp+30h] [ebp-24h]
  int v55; // [esp+34h] [ebp-20h]
  int v56; // [esp+38h] [ebp-1Ch]
  int v57; // [esp+3Ch] [ebp-18h]
  _DWORD v58[5]; // [esp+40h] [ebp-14h] BYREF

  n6_1 = n6; /*0xffc2f26b*/
  n4_1 = n4; /*0xffc2f270*/
  SocketInfo = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffc2f27f*/
  n6_2 = 0; /*0xffc2f281*/
  SocketInfo_1 = SocketInfo; /*0xffc2f283*/
  LOBYTE(n6_3) = 0; /*0xffc2f287*/
  do /*0xffc2f68f*/
  {
    if ( *SocketInfo ) /*0xffc2f28b*/
    {
      n6_4 = n6_3; /*0xffc2f294*/
      for ( i = 0; i < 2u; ++i ) /*0xffc2f298*/
      {
        CpuCount = GetCpuCount((int)n6_1, n4_1, n6_4); /*0xffc2f2a0*/
        v8 = 1379 * i; /*0xffc2f2ad*/
        CpuCount_1 = CpuCount; /*0xffc2f2b3*/
        v45 = v8; /*0xffc2f2b7*/
        if ( *(_BYTE *)(v8 + CpuCount) && !*(_BYTE *)(v8 + CpuCount + 107) ) /*0xffc2f2c5*/
        {
          MiscIoCheck(n6_1, n4_1, n6_4, 0xB014490u, 60996); /*0xffc2f2dd*/
          n64 = 64; /*0xffc2f2e4*/
          memset(v58, 0, 16); /*0xffc2f2f3*/
          v9 = 0; /*0xffc2f2fd*/
          v53 = 0; /*0xffc2f2ff*/
          v41 = 0; /*0xffc2f300*/
          v54 = 0; /*0xffc2f304*/
          v55 = 0; /*0xffc2f305*/
          v56 = 0; /*0xffc2f306*/
          do /*0xffc2f348*/
          {
            *(&v53 + (v9 >> 4)) |= ((*(unsigned __int8 *)(v45 + (v9 >> 1) + CpuCount_1 + 1261) >> (4 * (v9 & 1))) & 3) << (2 * (v41 & 0xF)); /*0xffc2f33a*/
            v9 = v41 + 1; /*0xffc2f33e*/
            v10 = n64-- == 1; /*0xffc2f33f*/
            ++v41; /*0xffc2f344*/
          }
          while ( !v10 ); /*0xffc2f348*/
          v11 = 0; /*0xffc2f34e*/
          v12 = 0; /*0xffc2f350*/
          n9 = 9; /*0xffc2f352*/
          do /*0xffc2f387*/
          {
            if ( ((*(_BYTE *)(v45 + (v12 >> 1) + CpuCount_1 + 1261) >> (4 * (v12 & 1))) & 7u) > 3 ) /*0xffc2f375*/
              _bittestandset(&v11, v12 >> 3); /*0xffc2f37c*/
            v12 += 8; /*0xffc2f37f*/
            --n9; /*0xffc2f382*/
          }
          while ( n9 ); /*0xffc2f387*/
          v42 = v11; /*0xffc2f396*/
          if ( i ) /*0xffc2f39a*/
          {
            v18 = MiscConfigCheck(n6, n4, n6_4, 184632400); /*0xffc2f413*/
            v44 = 16 * (v42 & 0x1FF); /*0xffc2f429*/
            v19 = v44 | MiscConfigCheck(n6, n4, n6_4, 184632420) & 0xFFFFE00F; /*0xffc2f441*/
            v36 = v44 | v18 & 0xFFFFE00F; /*0xffc2f445*/
            n6_5 = n6_3; /*0xffc2f446*/
            MiscIoCheck(n6, n4, n6_3, 0xB014450u, v36); /*0xffc2f452*/
            v34 = v19; /*0xffc2f457*/
            n184632420 = 184632420; /*0xffc2f458*/
            MiscIoCheck(n6, n4, n6_3, 0xB014464u, v34); /*0xffc2f461*/
            v17 = MiscConfigCheck(n6, n4, n6_3, 184632400); /*0xffc2f471*/
          }
          else
          {
            v13 = MiscConfigCheck(n6, n4, n6_4, 184632440); /*0xffc2f3a9*/
            v43 = 16 * (v42 & 0x1FF); /*0xffc2f3bf*/
            v14 = v43 | MiscConfigCheck(n6, n4, n6_4, 184632460) & 0xFFFFE00F; /*0xffc2f3d7*/
            v35 = v43 | v13 & 0xFFFFE00F; /*0xffc2f3db*/
            n6_5 = n6_3; /*0xffc2f3dc*/
            MiscIoCheck(n6, n4, n6_3, 0xB014478u, v35); /*0xffc2f3e8*/
            v33 = v14; /*0xffc2f3ed*/
            n184632420 = 184632460; /*0xffc2f3ee*/
            MiscIoCheck(n6, n4, n6_3, 0xB01448Cu, v33); /*0xffc2f3f7*/
            v17 = MiscConfigCheck(n6, n4, n6_3, 184632440); /*0xffc2f404*/
          }
          v57 = v17; /*0xffc2f47d*/
          v58[4] = (unsigned __int16)MiscConfigCheck(n6, n4, n6_5, n184632420); /*0xffc2f494*/
          n64_1 = 64; /*0xffc2f49a*/
          n8 = 8; /*0xffc2f49d*/
          do /*0xffc2f4d0*/
          {
            *(&v53 + (n64_1 >> 4)) |= ((*(unsigned __int8 *)(v45 + (n64_1 >> 1) + CpuCount_1 + 1261) >> (4 * (n64_1 & 1))) /*0xffc2f4c8*/
                                     & 3) << (2 * ((n64_1 - 8) & 0xF));
            ++n64_1; /*0xffc2f4cc*/
            --n8; /*0xffc2f4cd*/
          }
          while ( n8 ); /*0xffc2f4d0*/
          v22 = 0; /*0xffc2f4d2*/
          n32 = 32; /*0xffc2f4d4*/
          v50 = 0; /*0xffc2f4dc*/
          do /*0xffc2f52d*/
          {
            v23 = (v22 + 1) >> 4; /*0xffc2f4e9*/
            v24 = 2 * (v22 & 0xF); /*0xffc2f4f9*/
            v58[v22 >> 4] |= (((unsigned int)*(&v53 + v23) >> (2 * ((v22 + 1) & 0xF))) & 3) << v24; /*0xffc2f508*/
            v58[v23] |= (((unsigned int)*(&v53 + (v22 >> 4)) >> v24) & 3) << (2 * ((v22 + 1) & 0xF)); /*0xffc2f519*/
            v22 = v50 + 2; /*0xffc2f521*/
            v10 = n32-- == 1; /*0xffc2f524*/
            v50 += 2; /*0xffc2f529*/
          }
          while ( !v10 ); /*0xffc2f52d*/
          n73 = 73; /*0xffc2f531*/
          n4_2 = 4; /*0xffc2f532*/
          do /*0xffc2f57f*/
          {
            v26 = (unsigned int)(n73 - 9) >> 4; /*0xffc2f548*/
            v27 = 2 * (n73 & 0xF); /*0xffc2f54b*/
            v28 = *(&v53 + ((unsigned int)(n73 - 8) >> 4)); /*0xffc2f555*/
            v29 = 2 * ((n73 - 1) & 0xF); /*0xffc2f559*/
            n73 += 2; /*0xffc2f55f*/
            v58[v26] |= ((((unsigned int)*(&v53 + v26) >> v29) & 3) << v27) | (((v28 >> v27) & 3) << v29); /*0xffc2f576*/
            --n4_2; /*0xffc2f57a*/
          }
          while ( n4_2 ); /*0xffc2f57f*/
          n4_1 = n4; /*0xffc2f581*/
          n5 = 0; /*0xffc2f585*/
          n5_1 = 0; /*0xffc2f587*/
          do /*0xffc2f65d*/
          {
            n6_1 = n6; /*0xffc2f590*/
            if ( i ) /*0xffc2f594*/
            {
              n6_4 = n6_3; /*0xffc2f5d0*/
              if ( !n5 ) /*0xffc2f5d6*/
              {
                MiscIoCheck(n6, n4, n6_3, 0xB01443Cu, v53); /*0xffc2f5e4*/
                MiscIoCheck(n6, n4, n6_3, 0xB014440u, v54); /*0xffc2f5f5*/
                MiscIoCheck(n6, n4, n6_3, 0xB014444u, v55); /*0xffc2f606*/
                MiscIoCheck(n6, n4, n6_3, 0xB01444Cu, v56); /*0xffc2f617*/
                MiscIoCheck(n6, n4, n6_3, 0xB014450u, v57); /*0xffc2f62b*/
                n5 = n5_1; /*0xffc2f630*/
              }
              MiscIoCheck(n6, n4, n6_3, 4 * n5 + 184632404, v58[n5]); /*0xffc2f649*/
            }
            else
            {
              n5_2 = n5; /*0xffc2f596*/
              MiscIoCheck(n6, n4, n6_3, 4 * n5 + 184632424, *(&v53 + n5)); /*0xffc2f5ab*/
              v37 = v58[n5_2]; /*0xffc2f5b0*/
              v32 = 4 * n5_2 + 184632444; /*0xffc2f5b4*/
              n6_4 = n6_3; /*0xffc2f5bb*/
              MiscIoCheck(n6, n4, n6_3, v32, v37); /*0xffc2f5c3*/
            }
            n5 = n5_1 + 1; /*0xffc2f655*/
            n5_1 = n5; /*0xffc2f657*/
          }
          while ( n5 < 5u ); /*0xffc2f65d*/
        }
      }
      n6_2 = n6_3; /*0xffc2f675*/
      SocketInfo = SocketInfo_1; /*0xffc2f679*/
    }
    ++n6_2; /*0xffc2f67d*/
    SocketInfo += 7688; /*0xffc2f67f*/
    LOBYTE(n6_3) = n6_2; /*0xffc2f685*/
    SocketInfo_1 = SocketInfo; /*0xffc2f689*/
  }
  while ( n6_2 < 6u ); /*0xffc2f68f*/
  return n6_2; /*0xffc2f695*/
}

// Function: AutoGenFuncF69D @ 0xffc2f69d (0x1e2 bytes)
// Index: 242/2560

_BYTE *__cdecl AutoGenFuncF69D(unsigned __int8 *n6, int n4)
{
  unsigned __int8 *n6_1; // edi
  _BYTE *result; // eax
  unsigned __int8 n6_3; // bl
  unsigned __int8 n2_1; // bh
  int v6; // ebp
  int CpuCount; // eax
  int CpuCount_1; // esi
  unsigned int n16_2; // ecx
  int n72; // edi
  unsigned int v11; // edx
  int v12; // eax
  int n16_1; // ecx
  int v14; // esi
  unsigned int v15; // eax
  unsigned int v16; // edi
  int v17; // ebp
  int v18; // esi
  int v19; // edx
  int v20; // esi
  bool v21; // zf
  int n84033612; // esi
  _BYTE v23[16]; // [esp+0h] [ebp-58h] BYREF
  int n6_2; // [esp+10h] [ebp-48h]
  int n16; // [esp+14h] [ebp-44h]
  int n2; // [esp+18h] [ebp-40h]
  int v27; // [esp+1Ch] [ebp-3Ch]
  int v28; // [esp+20h] [ebp-38h]
  int n5; // [esp+24h] [ebp-34h]
  _BYTE *v30; // [esp+28h] [ebp-30h]
  _BYTE *v31; // [esp+2Ch] [ebp-2Ch]
  _DWORD v32[4]; // [esp+30h] [ebp-28h] BYREF
  int v33; // [esp+40h] [ebp-18h]
  _DWORD v34[4]; // [esp+44h] [ebp-14h] BYREF
  int v35; // [esp+54h] [ebp-4h]

  n6_1 = n6; /*0xffc2f6a8*/
  result = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffc2f6ad*/
  n6_3 = 0; /*0xffc2f6b3*/
  v30 = result; /*0xffc2f6b5*/
  LOBYTE(n6_2) = 0; /*0xffc2f6ba*/
  do /*0xffc2f871*/
  {
    if ( *result ) /*0xffc2f6be*/
    {
      n2_1 = 0; /*0xffc2f6c7*/
      v6 = 0; /*0xffc2f6c9*/
      LOBYTE(n2) = 0; /*0xffc2f6cb*/
      v27 = 0; /*0xffc2f6cf*/
      do /*0xffc2f855*/
      {
        CpuCount = GetCpuCount((int)n6_1, n4, n6_2); /*0xffc2f6dc*/
        CpuCount_1 = CpuCount; /*0xffc2f6e1*/
        if ( *(_BYTE *)(CpuCount + v6) && *(_BYTE *)(CpuCount + v6 + 107) ) /*0xffc2f6f0*/
        {
          memset(v34, 0, sizeof(v34)); /*0xffc2f701*/
          v35 = 0; /*0xffc2f707*/
          n16_2 = 0; /*0xffc2f70e*/
          memset(v32, 0, sizeof(v32)); /*0xffc2f710*/
          n16 = 0; /*0xffc2f711*/
          v33 = 0; /*0xffc2f718*/
          n72 = 72; /*0xffc2f719*/
          do /*0xffc2f753*/
          {
            v11 = n16_2 >> 4; /*0xffc2f728*/
            v12 = ((*(unsigned __int8 *)(v6 + (n16_2 >> 1) + CpuCount_1 + 1261) >> (4 * (n16_2 & 1))) & 3) << (2 * (n16 & 0xF)); /*0xffc2f741*/
            n16_1 = n16; /*0xffc2f743*/
            v32[v11] |= v12; /*0xffc2f747*/
            n16_2 = n16_1 + 1; /*0xffc2f74b*/
            n16 = n16_2; /*0xffc2f74c*/
            --n72; /*0xffc2f750*/
          }
          while ( n72 ); /*0xffc2f753*/
          v14 = 0; /*0xffc2f755*/
          n5 = 5; /*0xffc2f757*/
          v28 = 0; /*0xffc2f75f*/
          do /*0xffc2f7ba*/
          {
            v15 = *(_DWORD *)((char *)v32 + v14); /*0xffc2f763*/
            v16 = 0; /*0xffc2f767*/
            v17 = *(_DWORD *)((char *)v34 + v14); /*0xffc2f769*/
            v18 = 0; /*0xffc2f76d*/
            v31 = (_BYTE *)v15; /*0xffc2f76f*/
            n16 = 16; /*0xffc2f773*/
            do /*0xffc2f7a4*/
            {
              v19 = (v15 >> v18) & 3; /*0xffc2f786*/
              v18 += 2; /*0xffc2f789*/
              v17 |= (v16 & 3) << (2 * (v19 + 4 * (v16 >> 2))); /*0xffc2f798*/
              v15 = (unsigned int)v31; /*0xffc2f79a*/
              ++v16; /*0xffc2f79e*/
              --n16; /*0xffc2f79f*/
            }
            while ( n16 ); /*0xffc2f7a4*/
            v20 = v28; /*0xffc2f7a6*/
            *(_DWORD *)((char *)v34 + v28) = v17; /*0xffc2f7aa*/
            v14 = v20 + 4; /*0xffc2f7ae*/
            v21 = n5-- == 1; /*0xffc2f7b1*/
            v28 = v14; /*0xffc2f7b6*/
          }
          while ( !v21 ); /*0xffc2f7ba*/
          n6_1 = n6; /*0xffc2f7bc*/
          v6 = v27; /*0xffc2f7c2*/
          HIWORD(v33) = 0; /*0xffc2f7c6*/
          HIWORD(v35) = 0; /*0xffc2f7cb*/
          if ( (*((_DWORD *)n6 + 157163) & 0x40000) != 0 ) /*0xffc2f7da*/
          {
            n5 = 5; /*0xffc2f7e1*/
            n84033612 = 84033612; /*0xffc2f7ed*/
            v31 = &v23[-84033544]; /*0xffc2f7f7*/
            do /*0xffc2f83c*/
            {
              ProcCommonFuncF4C7(n6, n4, n6_2, n2, n84033612, *(_DWORD *)&v23[n84033612 - 84033564]); /*0xffc2f80c*/
              ProcCommonFuncF4C7(n6, n4, n6_2, n2, n84033612 - 20, *(_DWORD *)&v31[n84033612]); /*0xffc2f82c*/
              n84033612 += 4; /*0xffc2f834*/
              --n5; /*0xffc2f837*/
            }
            while ( n5 ); /*0xffc2f83c*/
            v6 = v27; /*0xffc2f83e*/
          }
        }
        ++n2_1; /*0xffc2f842*/
        v6 += 1379; /*0xffc2f844*/
        LOBYTE(n2) = n2_1; /*0xffc2f84a*/
        v27 = v6; /*0xffc2f84e*/
      }
      while ( n2_1 < 2u ); /*0xffc2f855*/
      result = v30; /*0xffc2f85b*/
    }
    ++n6_3; /*0xffc2f85f*/
    result += 7688; /*0xffc2f861*/
    LOBYTE(n6_2) = n6_3; /*0xffc2f866*/
    v30 = result; /*0xffc2f86a*/
  }
  while ( n6_3 < 6u ); /*0xffc2f871*/
  return result; /*0xffc2f877*/
}

// Function: AutoGenFuncF87F @ 0xffc2f87f (0x66 bytes)
// Index: 243/2560

unsigned __int8 __cdecl AutoGenFuncF87F(
        int a1,
        unsigned __int8 a2,
        unsigned __int8 a3,
        unsigned __int8 a4,
        unsigned __int8 n8)
{
  int CpuCount; // eax
  int v6; // ebp

  CpuCount = GetCpuCount(a1, a2, a3); /*0xffc2f88e*/
  v6 = 1379 * a4; /*0xffc2f89a*/
  if ( !*(_BYTE *)(CpuCount + v6 + 107) ) /*0xffc2f8a3*/
    return n8; /*0xffc2f8dd*/
  if ( ((1 << (n8 % 9u)) & *(unsigned __int16 *)(CpuCount + v6 + 2)) == 0 ) /*0xffc2f8c8*/
    return n8; /*0xffc2f8d9*/
  if ( n8 <= 8u ) /*0xffc2f8cd*/
    return n8 + 9; /*0xffc2f8d4*/
  return n8 - 9; /*0xffc2f8e1*/
}

// Function: AutoGenFuncF8E5 @ 0xffc2f8e5 (0xf bytes)
// Index: 244/2560

bool __cdecl AutoGenFuncF8E5(int __return_address)
{
  return *(_BYTE *)(__return_address + 257313) == 0; /*0xffc2f8f3*/
}

// Function: AutoGenFuncF8F4 @ 0xffc2f8f4 (0xc bytes)
// Index: 245/2560

bool __cdecl AutoGenFuncF8F4(int n6, _BYTE *a2)
{
  return a2[13] != 0; /*0xffc2f8ff*/
}

// Function: AutoGenFuncF900 @ 0xffc2f900 (0xb9 bytes)
// Index: 246/2560

char __cdecl AutoGenFuncF900(int __return_address, int n4)
{
  int v2; // edx
  char v3; // bl
  int n6; // esi
  _BYTE *v5; // eax

  v2 = 48704 * (unsigned __int8)n4; /*0xffc2f90c*/
  v3 = 0; /*0xffc2f912*/
  n6 = 6; /*0xffc2f91d*/
  v5 = (_BYTE *)(v2 + __return_address + 258722); /*0xffc2f91e*/
  do /*0xffc2f938*/
  {
    if ( *v5 && v5[6716] == 1 ) /*0xffc2f92c*/
      v3 = 1; /*0xffc2f92e*/
    v5 += 7688; /*0xffc2f930*/
    --n6; /*0xffc2f935*/
  }
  while ( n6 ); /*0xffc2f938*/
  if ( *(_BYTE *)(v2 + __return_address + 258689) /*0xffc2f987*/
    && *(_BYTE *)(v2 + __return_address + 258716)
    && (~*(_DWORD *)(__return_address + 628652) & 0x40000) == 0
    && *(_BYTE *)(__return_address + 257312)
    && ((*(_DWORD *)(__return_address + 134) & 0x800000) != 0 || v3)
    && *(_WORD *)(__return_address + 257315) == 12
    && *(char *)(__return_address + 257309) >= 0 )
  {
    ProcCommonFunc4C0((unsigned __int8 *)__return_address, n4); /*0xffc2f98e*/
    return 1; /*0xffc2f995*/
  }
  else
  {
    DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "Skipping Swizzle Discovery.\n"); /*0xffc2f9ac*/
    return 0; /*0xffc2f9b4*/
  }
}

// Function: AutoGenFuncF9B9 @ 0xffc2f9b9 (0x3f bytes)
// Index: 247/2560

_BYTE *__cdecl AutoGenFuncF9B9(int __return_address, unsigned __int8 n4)
{
  int v2; // esi
  int n6; // ecx
  _BYTE *result; // eax

  v2 = 48704 * n4; /*0xffc2f9c3*/
  n6 = 6; /*0xffc2f9d1*/
  result = (_BYTE *)(__return_address + 351 * n4 + 255790); /*0xffc2f9d7*/
  *(_BYTE *)(v2 + __return_address + 307392) = 0; /*0xffc2f9d9*/
  do /*0xffc2f9f4*/
  {
    if ( *result == 2 ) /*0xffc2f9e4*/
      *(_BYTE *)(v2 + __return_address + 307392) = 1; /*0xffc2f9e6*/
    result += 39; /*0xffc2f9ee*/
    --n6; /*0xffc2f9f1*/
  }
  while ( n6 ); /*0xffc2f9f4*/
  return result; /*0xffc2f9f6*/
}

// Function: AutoGenFuncF9F8 @ 0xffc2f9f8 (0x21 bytes)
// Index: 248/2560

bool __cdecl AutoGenFuncF9F8(_BYTE *__return_address)
{
  return __return_address[246425] == __return_address[453660] && !__return_address[255600]; /*0xffc2fa15*/
}

// Function: AutoGenFuncFA19 @ 0xffc2fa19 (0x39 bytes)
// Index: 249/2560

bool __cdecl AutoGenFuncFA19(int a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4)
{
  int CpuCount; // ecx

  CpuCount = GetCpuCount(a1, a2, a3); /*0xffc2fa2f*/
  return !*(_DWORD *)(a1 + 246404) || *(_BYTE *)(1379 * a4 + CpuCount + 107) != 0; /*0xffc2fa4e*/
}

// Function: AutoGenFuncFA52 @ 0xffc2fa52 (0x1f bytes)
// Index: 250/2560

bool __cdecl AutoGenFuncFA52(int __return_address, char n4)
{
  return *(_BYTE *)(__return_address + 255600) && n4 != *(_BYTE *)(__return_address + 255601); /*0xffc2fa6d*/
}

// Function: AutoGenFuncFA71 @ 0xffc2fa71 (0xf2 bytes)
// Index: 251/2560

unsigned __int16 __cdecl AutoGenFuncFA71(int __return_address, int n4, int n6, int a4, unsigned __int8 *a5)
{
  char v5; // bl
  BOOL v6; // edx
  unsigned __int16 result; // ax

  v5 = *(_BYTE *)(__return_address + 195); /*0xffc2fa82*/
  v6 = v5 != 0; /*0xffc2fa8a*/
  if ( (unsigned __int16)word_FFD52098[4 * v6] > *a5 /*0xffc2fac2*/
    || (unsigned __int16)word_FFD5209A[4 * v6] > a5[1]
    || (unsigned __int16)word_FFD5209C[4 * v6] > a5[2]
    || (result = word_FFD5209E[4 * v6], result > *(_WORD *)(a5 + 3)) )
  {
    if ( a5[1] == 0x99 || a5[2] == 0x99 || *(_WORD *)(a5 + 3) == 0x9999 ) /*0xffc2fadd*/
    {
      return DebugPrint( /*0xffc2fb56*/
               __return_address,
               2,
               n4,
               n6,
               a4,
               255,
               255,
               255,
               "NVMCTLR running with Test FW. Please update prod NVMCTLR FW\n");
    }
    else
    {
      DebugPrint( /*0xffc2fb14*/
        __return_address,
        2,
        n4,
        n6,
        a4,
        255,
        255,
        255,
        "FW not supported. Please update NVMCTLR FW to at least %02x.%02x.%02x.%04x\n",
        (unsigned __int16)word_FFD52098[4 * v6],
        (unsigned __int16)word_FFD5209A[4 * v6],
        (unsigned __int16)word_FFD5209C[4 * v6],
        (unsigned __int16)word_FFD5209E[4 * v6]);
      return KtiFunc211E(__return_address, 60, v5 != 0, n4, n6, a4, 255); /*0xffc2fb2f*/
    }
  }
  return result; /*0xffc2fb5e*/
}

// Function: AutoGenFuncFB63 @ 0xffc2fb63 (0x189 bytes)
// Index: 252/2560

int __cdecl AutoGenFuncFB63(unsigned __int8 *n6, int n4, int a3, int a4, int n2)
{
  int n4_1; // edi
  unsigned __int8 n6_3; // bl
  unsigned __int8 n6_2; // dl
  int v8; // ecx
  _BYTE *SocketInfo_1; // ebp
  int result; // eax
  _BYTE *SocketInfo_2; // edx
  char v12; // bp
  unsigned __int8 v13; // al
  int n6_1; // [esp+10h] [ebp-10h]
  int v15; // [esp+14h] [ebp-Ch]
  int SocketInfo; // [esp+18h] [ebp-8h]
  int v17; // [esp+1Ch] [ebp-4h]

  n4_1 = n4; /*0xffc2fb6e*/
  n6_3 = 0; /*0xffc2fb7a*/
  SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc2fb7c*/
  n6_2 = 0; /*0xffc2fb81*/
  v8 = 0; /*0xffc2fb83*/
  LOBYTE(n6_1) = 0; /*0xffc2fb85*/
  SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffc2fb89*/
  v15 = 0; /*0xffc2fb8b*/
  do /*0xffc2fc46*/
  {
    if ( *SocketInfo_1 ) /*0xffc2fb8f*/
    {
      n4_1 = n4; /*0xffc2fb98*/
      if ( ((1 << v8) & a3) != 0 ) /*0xffc2fba5*/
      {
        if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + GetCpuCount((int)n6, n4, n6_1)) ) /*0xffc2fbc6*/
        {
          v17 = KtiFunc91DE((int)n6, n4, n6_1, n2); /*0xffc2fbdc*/
          if ( !KtiFunc89E9((int)n6, n4, n6_1, n2, a4, 0) ) /*0xffc2fbea*/
          {
            RmtFunc349(n6, n4, n6_1, n2, a4, *(unsigned __int16 *)(244 * (unsigned __int8)a4 + v17 + 10), 5); /*0xffc2fc1a*/
            KtiFunc8C4((int)n6, 1u); /*0xffc2fc22*/
          }
        }
        n6_2 = n6_1; /*0xffc2fc2a*/
        v8 = v15; /*0xffc2fc2e*/
      }
    }
    ++n6_2; /*0xffc2fc32*/
    SocketInfo_1 += 7688; /*0xffc2fc34*/
    ++v8; /*0xffc2fc3a*/
    LOBYTE(n6_1) = n6_2; /*0xffc2fc3b*/
    v15 = v8; /*0xffc2fc3f*/
  }
  while ( n6_2 < 6u ); /*0xffc2fc46*/
  result = MailBoxFunc2B5B((int)n6, n4_1); /*0xffc2fc4e*/
  SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc2fc53*/
  v12 = 0; /*0xffc2fc57*/
  LOBYTE(n6_1) = 0; /*0xffc2fc5b*/
  do /*0xffc2fcde*/
  {
    if ( *SocketInfo_2 ) /*0xffc2fc5f*/
    {
      result = 1 << v12; /*0xffc2fc69*/
      if ( ((1 << v12) & a3) != 0 ) /*0xffc2fc6f*/
      {
        DebugPrint((int)n6, 2, n4_1, 255, n2, a4, 255, 255, "Clearing alert seen bit\n"); /*0xffc2fc8a*/
        GetCpuCount((int)n6, n4_1, n6_1); /*0xffc2fc95*/
        v13 = MiscConfigCheck(n6, n4_1, n6_1, 184619364); /*0xffc2fca5*/
        result = MiscIoCheck(n6, n4_1, n6_1, 0xB011164u, v13 | 1); /*0xffc2fcbe*/
        SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc2fcc3*/
      }
    }
    ++n6_3; /*0xffc2fcca*/
    SocketInfo_2 += 7688; /*0xffc2fccc*/
    ++v12; /*0xffc2fcd2*/
    LOBYTE(n6_1) = n6_3; /*0xffc2fcd3*/
    SocketInfo = (int)SocketInfo_2; /*0xffc2fcd7*/
  }
  while ( n6_3 < 6u ); /*0xffc2fcde*/
  return result; /*0xffc2fce4*/
}

// Function: AutoGenFuncFCEC @ 0xffc2fcec (0x272 bytes)
// Index: 253/2560

int __cdecl AutoGenFuncFCEC(unsigned __int8 *n6, int n4, int a3, unsigned __int8 a4, int n2)
{
  int n4_1; // edi
  int SocketInfo; // eax
  unsigned __int8 n6_2; // dl
  int v8; // ecx
  int *v9; // ebx
  _BYTE *SocketInfo_2; // ebp
  int v11; // eax
  int result; // eax
  _BYTE *SocketInfo_3; // ebp
  int *v14; // ebx
  unsigned __int8 n6_3; // dl
  int v16; // ecx
  int v17; // eax
  unsigned __int8 v18; // al
  int n6_1; // [esp+10h] [ebp-2Ch]
  int *v20; // [esp+14h] [ebp-28h]
  int v21; // [esp+14h] [ebp-28h]
  int v22; // [esp+18h] [ebp-24h]
  int *v23; // [esp+18h] [ebp-24h]
  _BYTE *SocketInfo_1; // [esp+1Ch] [ebp-20h]
  int v25; // [esp+20h] [ebp-1Ch]
  _BYTE v26[24]; // [esp+24h] [ebp-18h] BYREF

  n4_1 = n4; /*0xffc2fcf7*/
  SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc2fcfd*/
  n6_2 = 0; /*0xffc2fd04*/
  SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffc2fd06*/
  v8 = 0; /*0xffc2fd0a*/
  LOBYTE(n6_1) = 0; /*0xffc2fd0c*/
  v9 = (int *)v26; /*0xffc2fd10*/
  v22 = 0; /*0xffc2fd14*/
  SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc2fd18*/
  v20 = (int *)v26; /*0xffc2fd1a*/
  do /*0xffc2fe4f*/
  {
    *v9 = 0; /*0xffc2fd1e*/
    if ( *SocketInfo_2 ) /*0xffc2fd21*/
    {
      n4_1 = n4; /*0xffc2fd2b*/
      if ( ((1 << v8) & a3) != 0 ) /*0xffc2fd38*/
      {
        v11 = MiscConfigCheck(n6, n4, n6_1, 184566276); /*0xffc2fd4a*/
        *v20 = v11; /*0xffc2fd53*/
        MiscIoCheck(n6, n4, n6_1, 0xB004204u, v11 & 0x3FFFFFFF | ((unsigned __int8)SocketInfo_2[7] << 30)); /*0xffc2fd6c*/
        if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + GetCpuCount((int)n6, n4, n6_1)) ) /*0xffc2fd8c*/
        {
          v25 = KtiFunc91DE((int)n6, n4, n6_1, n2); /*0xffc2fda5*/
          if ( !KtiFunc89E9((int)n6, n4, n6_1, n2, a4, 0) ) /*0xffc2fdb0*/
          {
            if ( n6[257313] == 1 ) /*0xffc2fdc3*/
            {
              RmtFunc349(n6, n4, n6_1, n2, a4, *(unsigned __int16 *)(244 * a4 + v25 + 10), 5); /*0xffc2fde6*/
            }
            else if ( !a4 ) /*0xffc2fdf5*/
            {
              RmtFunc765((int)n6, n4, n6_1, n2, 0, 6u, 6u); /*0xffc2fe04*/
              RmtFunc765((int)n6, n4, n6_1, n2, 0, 1u, 0xEu); /*0xffc2fe16*/
            }
            KtiFunc8C4((int)n6, 1u); /*0xffc2fe21*/
          }
        }
        n6_2 = n6_1; /*0xffc2fe28*/
        v9 = v20; /*0xffc2fe2c*/
        v8 = v22; /*0xffc2fe30*/
      }
    }
    ++n6_2; /*0xffc2fe34*/
    ++v9; /*0xffc2fe36*/
    ++v8; /*0xffc2fe39*/
    LOBYTE(n6_1) = n6_2; /*0xffc2fe3a*/
    SocketInfo_2 += 7688; /*0xffc2fe3e*/
    v22 = v8; /*0xffc2fe44*/
    v20 = v9; /*0xffc2fe48*/
  }
  while ( n6_2 < 6u ); /*0xffc2fe4f*/
  result = MailBoxFunc2B5B((int)n6, n4_1); /*0xffc2fe57*/
  SocketInfo_3 = SocketInfo_1; /*0xffc2fe5c*/
  v14 = (int *)v26; /*0xffc2fe60*/
  n6_3 = 0; /*0xffc2fe66*/
  v23 = (int *)v26; /*0xffc2fe68*/
  v16 = 0; /*0xffc2fe6c*/
  LOBYTE(n6_1) = 0; /*0xffc2fe6e*/
  v21 = 0; /*0xffc2fe72*/
  do /*0xffc2ff50*/
  {
    if ( *SocketInfo_3 ) /*0xffc2fe76*/
    {
      result = 1 << v16; /*0xffc2fe87*/
      if ( ((1 << v16) & a3) != 0 ) /*0xffc2fe8d*/
      {
        if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + GetCpuCount((int)n6, n4, n6_1) + 107) ) /*0xffc2feaf*/
        {
          v17 = MiscConfigCheck(n6, n4, n6_1, 117525796); /*0xffc2febe*/
          if ( (_BYTE)n2 ) /*0xffc2fec9*/
          {
            if ( (unsigned __int8)n2 == 1 ) /*0xffc2fece*/
              v17 &= ~0x20u; /*0xffc2fed0*/
          }
          else
          {
            v17 &= ~2u; /*0xffc2fed5*/
          }
          MiscIoCheck(n6, n4, n6_1, 0x7014D24u, v17); /*0xffc2fee1*/
        }
        else
        {
          v18 = MiscConfigCheck(n6, n4, n6_1, 184619364); /*0xffc2fef4*/
          MiscIoCheck(n6, n4, n6_1, 0xB011164u, v18 | 1); /*0xffc2ff03*/
        }
        result = MiscIoCheck(n6, n4, n6_1, 0xB004204u, *v23); /*0xffc2ff19*/
        n6_3 = n6_1; /*0xffc2ff1e*/
        v14 = v23; /*0xffc2ff25*/
        v16 = v21; /*0xffc2ff29*/
        SocketInfo_3 = SocketInfo_1; /*0xffc2ff2d*/
      }
    }
    ++n6_3; /*0xffc2ff31*/
    SocketInfo_3 += 7688; /*0xffc2ff33*/
    ++v16; /*0xffc2ff39*/
    LOBYTE(n6_1) = n6_3; /*0xffc2ff3a*/
    ++v14; /*0xffc2ff3e*/
    v21 = v16; /*0xffc2ff41*/
    SocketInfo_1 = SocketInfo_3; /*0xffc2ff45*/
    v23 = v14; /*0xffc2ff49*/
  }
  while ( n6_3 < 6u ); /*0xffc2ff50*/
  return result; /*0xffc2ff56*/
}

// Function: AutoGenFuncFF5E @ 0xffc2ff5e (0x122 bytes)
// Index: 254/2560

int __cdecl AutoGenFuncFF5E(unsigned __int8 *n6, unsigned __int8 n4, int a3, char n2, char *a5)
{
  int v5; // edi
  int SocketInfo; // eax
  unsigned __int8 n6_1; // dl
  int v8; // ecx
  _BYTE *SocketInfo_1; // ebx
  char *v10; // esi
  unsigned __int8 v11; // bl
  unsigned int v12; // eax
  unsigned int v13; // eax
  bool v14; // zf
  unsigned __int8 n6_2; // [esp+10h] [ebp-10h]
  int v17; // [esp+14h] [ebp-Ch]
  _BYTE *SocketInfo_2; // [esp+18h] [ebp-8h]
  int v19; // [esp+1Ch] [ebp-4h]

  v5 = 0; /*0xffc2ff6d*/
  v19 = 0; /*0xffc2ff70*/
  SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc2ff74*/
  n6_1 = 0; /*0xffc2ff7d*/
  v8 = 0; /*0xffc2ff81*/
  n6_2 = 0; /*0xffc2ff83*/
  SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffc2ff87*/
  v17 = 0; /*0xffc2ff89*/
  SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc2ff8d*/
  v10 = a5 + 8; /*0xffc2ff91*/
  do /*0xffc30070*/
  {
    if ( !*SocketInfo_1 || ((1 << v8) & a3) == 0 ) /*0xffc2ffaa*/
      goto LABEL_13; /*0xffc2ffaa*/
    v11 = 0; /*0xffc2ffb4*/
    if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + GetCpuCount((int)n6, n4, n6_2) + 107) ) /*0xffc2ffd0*/
    {
      v12 = MiscConfigCheck(n6, n4, n6_2, 117525796); /*0xffc2ffe4*/
      if ( n2 ) /*0xffc2ffef*/
      {
        if ( n2 == 1 ) /*0xffc2fff4*/
          v11 = (v12 & 0x20) != 0; /*0xffc2fffb*/
        goto LABEL_11; /*0xffc2fffe*/
      }
      v13 = v12 >> 1; /*0xffc30000*/
    }
    else
    {
      LOBYTE(v13) = MiscConfigCheck(n6, n4, n6_2, 184619364); /*0xffc30012*/
    }
    v11 = v13 & 1; /*0xffc3001c*/
LABEL_11:
    n6_1 = n6_2; /*0xffc3001e*/
    v8 = v17; /*0xffc30026*/
    v5 = v11 | v19; /*0xffc3002d*/
    v14 = v11 == 0; /*0xffc3002f*/
    SocketInfo_1 = SocketInfo_2; /*0xffc30031*/
    v19 = v5; /*0xffc30035*/
    if ( !v14 ) /*0xffc30039*/
    {
      *((_DWORD *)v10 - 2) = -1; /*0xffc3003b*/
      *((_DWORD *)v10 - 1) = -1; /*0xffc3003f*/
      *(_DWORD *)v10 = (unsigned __int8)-(n6[257312] != 0); /*0xffc30053*/
    }
LABEL_13:
    ++n6_1; /*0xffc30055*/
    SocketInfo_1 += 7688; /*0xffc30057*/
    ++v8; /*0xffc3005d*/
    n6_2 = n6_1; /*0xffc3005e*/
    v10 += 12; /*0xffc30062*/
    v17 = v8; /*0xffc30065*/
    SocketInfo_2 = SocketInfo_1; /*0xffc30069*/
  }
  while ( n6_1 < 6u ); /*0xffc30070*/
  return v5; /*0xffc30078*/
}

// Function: ProcCommonFunc80 @ 0xffc30080 (0x7c bytes)
// Index: 255/2560

int __cdecl ProcCommonFunc80(unsigned __int8 *n6, int a2, _BYTE *a3, unsigned __int8 a4)
{
  int v4; // eax
  int v5; // eax
  unsigned int v6; // edx
  int v8; // [esp+18h] [ebp+14h]

  v4 = MiscConfigCheck(n6, a2, (unsigned __int8)a3, 184567108); /*0xffc30093*/
  v5 = (unsigned __int8)(v4 ^ (v4 | a4)) ^ v4; /*0xffc300a7*/
  v6 = ((v5 & ~a4) << 15) | 0xFF807FFF; /*0xffc300ae*/
  v8 = v6 & v5; /*0xffc300b8*/
  DebugPrint( /*0xffc300df*/
    (int)n6,
    2,
    a2,
    (int)a3,
    255,
    255,
    255,
    255,
    "Deasert CKE cke_override=0x%x, cke_on=0x%x\n",
    (unsigned __int8)v6 & (unsigned __int8)v5,
    (unsigned __int8)((v6 & v5) >> 15));
  return MiscIoCheck(n6, a2, (int)a3, 0xB004544u, v8); /*0xffc300f9*/
}

// Function: ProcCommonFuncFC @ 0xffc300fc (0xd bytes)
// Index: 256/2560

_WORD *__cdecl ProcCommonFuncFC(int __return_address, _WORD *p_n4096)
{
  *p_n4096 |= 0x400u; /*0xffc30105*/
  return p_n4096; /*0xffc30108*/
}

// Function: ProcCommonFunc109 @ 0xffc30109 (0xc8 bytes)
// Index: 257/2560

char __cdecl ProcCommonFunc109(unsigned __int8 *__return_address, unsigned __int8 n6, int n6a, unsigned __int8 n2)
{
  char v4; // bl
  int v5; // eax
  unsigned int v6; // eax
  unsigned int v7; // eax
  unsigned __int8 v8; // al

  v4 = 0; /*0xffc3010f*/
  if ( !*(_BYTE *)(1379 * n2 + GetCpuCount((int)__return_address, n6, n6a) + 107) ) /*0xffc30136*/
  {
    v8 = MiscConfigCheck(__return_address, n6, n6a, 184619364); /*0xffc301a0*/
    MiscIoCheck(__return_address, n6, n6a, 0xB011164u, v8 | 1); /*0xffc301b2*/
    LOBYTE(v7) = MiscConfigCheck(__return_address, n6, n6a, 184619364); /*0xffc301be*/
    return v7 & 1; /*0xffc301be*/
  }
  v5 = MiscConfigCheck(__return_address, n6, n6a, 117525796); /*0xffc30143*/
  if ( n2 ) /*0xffc3014f*/
  {
    if ( n2 == 1 ) /*0xffc30154*/
      v5 &= ~0x20u; /*0xffc30156*/
  }
  else
  {
    v5 &= ~2u; /*0xffc3015b*/
  }
  MiscIoCheck(__return_address, n6, n6a, 0x7014D24u, v5); /*0xffc3016a*/
  v6 = MiscConfigCheck(__return_address, n6, n6a, 117525796); /*0xffc3017a*/
  if ( !n2 ) /*0xffc30184*/
  {
    v7 = v6 >> 1; /*0xffc30190*/
    return v7 & 1; /*0xffc30192*/
  }
  if ( n2 == 1 ) /*0xffc30189*/
  {
    v7 = v6 >> 5; /*0xffc3018b*/
    return v7 & 1; /*0xffc301c6*/
  }
  return v4; /*0xffc301ca*/
}

// Function: MemInitWrapper @ 0xffc301d1 (0xda bytes)
// Index: 258/2560

int __cdecl MemInitWrapper(unsigned __int8 *n6)
{
  unsigned __int8 *n6_1; // esi
  int v2; // eax

  n6_1 = n6; /*0xffc301d5*/
  if ( (~*((_DWORD *)n6 + 157163) & 0x100) != 0 ) /*0xffc301e5*/
  {
    n6[48704 * n6[9402] + 258699] = 1; /*0xffc301f4*/
  }
  else
  {
    LOBYTE(n6) = n6[9402]; /*0xffc30207*/
    v2 = 48704 * (unsigned __int8)n6; /*0xffc3020d*/
    if ( n6_1[v2 + 258689] ) /*0xffc30213*/
    {
      if ( n6_1[v2 + 258716] ) /*0xffc30221*/
      {
        n6_1[9477] = 0; /*0xffc3022b*/
        if ( n6_1[v2 + 258728] != 3 ) /*0xffc3023a*/
        {
          ProcCommonFunc3943(n6_1, (int)n6, 5u); /*0xffc30242*/
          KtiFunc8E2A(n6_1, n6_1[9402], 1); /*0xffc30252*/
          ProcCommonFunc3AF0(n6_1, (int)n6, 2u); /*0xffc3025d*/
          n6_1[48704 * n6_1[9402] + 258699] = 1; /*0xffc3026f*/
          MailBoxFunc2B5B((int)n6_1, n6_1[9402]); /*0xffc30280*/
          KtiFuncD59F(n6_1, n6_1[9402], 63); /*0xffc30290*/
          KtiFunc8920(n6_1, n6_1[9402]); /*0xffc3029e*/
        }
      }
    }
  }
  return 0; /*0xffc302a8*/
}

// Function: ProcCommonFunc2AB @ 0xffc302ab (0xf bytes)
// Index: 259/2560

bool __cdecl ProcCommonFunc2AB(int __return_address)
{
  return *(char *)(__return_address + 257309) < 0; /*0xffc302b9*/
}

// Function: ProcCommonFunc2BA @ 0xffc302ba (0xf bytes)
// Index: 260/2560

bool __cdecl ProcCommonFunc2BA(int __return_address)
{
  return (*(_BYTE *)(__return_address + 257309) & 0x63) != 0; /*0xffc302c8*/
}

// Function: ProcCommonFunc2C9 @ 0xffc302c9 (0x20 bytes)
// Index: 261/2560

int __cdecl ProcCommonFunc2C9(unsigned __int8 *n6, unsigned __int8 a2, int a3, int *a4)
{
  return MiscIoCheck(n6, a2, a3, 0xB004204u, *a4); /*0xffc302e8*/
}

// Function: ProcCommonFunc2E9 @ 0xffc302e9 (0x5e bytes)
// Index: 262/2560

int __cdecl ProcCommonFunc2E9(unsigned __int8 *n6, unsigned __int8 a2, int a3, int *a4)
{
  int SocketInfo; // esi
  int v5; // eax
  int v7; // [esp-1Ch] [ebp-28h]

  SocketInfo = GetSocketInfo((int)n6, a2); /*0xffc30307*/
  v5 = MiscConfigCheck(n6, a2, a3, 184566276); /*0xffc3030c*/
  *a4 = v5; /*0xffc3031d*/
  v7 = v5 & 0x3FFFFFFF | (*(unsigned __int8 *)(7688 * (unsigned __int8)a3 + SocketInfo + 7) << 30); /*0xffc3032e*/
  a4[1] = v7; /*0xffc30334*/
  return MiscIoCheck(n6, a2, a3, 0xB004204u, v7); /*0xffc30342*/
}

// Function: ProcCommonFunc347 @ 0xffc30347 (0xd9 bytes)
// Index: 263/2560

int __cdecl ProcCommonFunc347(_BYTE *__return_address, int n6, int n6a, int n2)
{
  int v4; // ecx
  int CpuCount; // eax
  int v6; // ecx
  int v8; // edx
  __int16 v9; // si
  char v10; // bl
  int v11; // [esp+0h] [ebp-4h] BYREF

  v11 = v4; /*0xffc3034a*/
  CpuCount = GetCpuCount((int)__return_address, n6, n6a); /*0xffc30354*/
  v6 = 1379 * (unsigned __int8)n2; /*0xffc30362*/
  if ( *(_BYTE *)(v6 + CpuCount + 107) ) /*0xffc30368*/
    return ProcCommonFuncF7F6(__return_address, n6, n6a, n2, 0x50240B8u, *(unsigned __int8 *)(v6 + CpuCount + 1229)); /*0xffc30387*/
  v8 = *(unsigned __int8 *)(v6 + CpuCount + 1229); /*0xffc30394*/
  v11 = v8; /*0xffc3039f*/
  v9 = *(_WORD *)(v6 + CpuCount + 140); /*0xffc303a7*/
  if ( (v9 == -19708 && *(_BYTE *)(v6 + CpuCount + 38) == 16 || v9 == -19712 && *(_BYTE *)(v6 + CpuCount + 38) == 80) /*0xffc303db*/
    && (v10 = *(_BYTE *)(v6 + CpuCount + 1230), (v10 & 1) != 0)
    && v8 == 1 )
  {
    v11 = (16 * (v10 & 0xC)) | 1; /*0xffc303e8*/
  }
  else
  {
    v11 = (16 * *(unsigned __int8 *)(v6 + CpuCount + 1230)) | v8; /*0xffc303fa*/
  }
  return MemJedecInit(__return_address, n6, n6a, n2, 1, 0xEu, &v11); /*0xffc3041e*/
}

// Function: ProcCommonFunc420 @ 0xffc30420 (0x67 bytes)
// Index: 264/2560

int __cdecl ProcCommonFunc420(unsigned __int8 *n6, unsigned __int8 a2, int a3, int a4)
{
  int v4; // eax
  int v5; // eax

  v4 = MiscConfigCheck(n6, a2, a3, 184632316); /*0xffc30432*/
  *(_DWORD *)(a4 + 12) = v4 & 0xFFFFFFFE; /*0xffc30446*/
  MiscIoCheck(n6, a2, a3, 0xB0143FCu, v4 & 0xFFFFFFFE); /*0xffc3044f*/
  v5 = MiscConfigCheck(n6, a2, a3, 184566952); /*0xffc30462*/
  *(_DWORD *)(a4 + 16) = v5 & 0xFFFFFFF8; /*0xffc30473*/
  return MiscIoCheck(n6, a2, a3, 0xB0044A8u, v5 & 0xFFFFFFF8); /*0xffc30484*/
}

// Function: ProcCommonFunc487 @ 0xffc30487 (0x39 bytes)
// Index: 265/2560

int __cdecl ProcCommonFunc487(unsigned __int8 *n6, unsigned __int8 a2, int a3, int a4)
{
  int v4; // eax

  v4 = MiscConfigCheck(n6, a2, a3, 184567556); /*0xffc3049a*/
  *(_DWORD *)(a4 + 20) = v4 & 0xDFFFFFFF; /*0xffc304ac*/
  return MiscIoCheck(n6, a2, a3, 0xB004704u, v4 & 0xDFFFFFFF); /*0xffc304bd*/
}

// Function: ProcCommonFunc4C0 @ 0xffc304c0 (0x164 bytes)
// Index: 266/2560

int __cdecl ProcCommonFunc4C0(unsigned __int8 *__return_address, int n4)
{
  _BYTE *SocketInfo; // ecx
  unsigned __int8 n6_1; // al
  int v4; // ebp
  int CpuCount; // eax
  bool v6; // zf
  int n84033612; // edi
  _BYTE v9[16]; // [esp+0h] [ebp-50h] BYREF
  int n6; // [esp+10h] [ebp-40h]
  int n2; // [esp+14h] [ebp-3Ch]
  int n5; // [esp+18h] [ebp-38h]
  int v13; // [esp+1Ch] [ebp-34h]
  _BYTE *SocketInfo_1; // [esp+20h] [ebp-30h]
  _BYTE *v15; // [esp+24h] [ebp-2Ch]
  _BYTE v16[15]; // [esp+28h] [ebp-28h] BYREF
  __int16 v17; // [esp+3Ah] [ebp-16h]
  _BYTE v18[15]; // [esp+3Ch] [ebp-14h] BYREF
  __int16 v19; // [esp+4Eh] [ebp-2h]

  DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, "Clear Dq Swizzle AEP -- START\n"); /*0xffc304e2*/
  SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc304ee*/
  n6_1 = 0; /*0xffc304f3*/
  SocketInfo_1 = SocketInfo; /*0xffc304f5*/
  LOBYTE(n6) = 0; /*0xffc304f9*/
  do /*0xffc305fb*/
  {
    if ( *SocketInfo ) /*0xffc304fd*/
    {
      v4 = 0; /*0xffc30506*/
      LOBYTE(n2) = 0; /*0xffc30508*/
      v13 = 0; /*0xffc3050d*/
      do /*0xffc305db*/
      {
        CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc30517*/
        if ( *(_BYTE *)(CpuCount + v4) ) /*0xffc3051f*/
        {
          if ( *(_BYTE *)(CpuCount + v4 + 107) ) /*0xffc30529*/
          {
            memset(v18, 228, sizeof(v18)); /*0xffc3053d*/
            memset(v16, 228, sizeof(v16)); /*0xffc3054b*/
            v6 = (*((_DWORD *)__return_address + 157163) & 0x40000) == 0; /*0xffc30552*/
            v17 = 0; /*0xffc3055c*/
            v19 = 0; /*0xffc30561*/
            if ( !v6 ) /*0xffc30566*/
            {
              n5 = 5; /*0xffc3056d*/
              n84033612 = 84033612; /*0xffc30579*/
              v15 = &v9[-84033552]; /*0xffc30583*/
              do /*0xffc305bf*/
              {
                ProcCommonFuncF4C7(__return_address, n4, n6, n2, n84033612, *(_DWORD *)&v9[n84033612 - 84033572]); /*0xffc30595*/
                ProcCommonFuncF4C7(__return_address, n4, n6, n2, n84033612 - 20, *(_DWORD *)&v15[n84033612]); /*0xffc305af*/
                n84033612 += 4; /*0xffc305b7*/
                --n5; /*0xffc305ba*/
              }
              while ( n5 ); /*0xffc305bf*/
              v4 = v13; /*0xffc305c1*/
            }
          }
        }
        v4 += 1379; /*0xffc305c9*/
        v13 = v4; /*0xffc305d1*/
        LOBYTE(n2) = n2 + 1; /*0xffc305d5*/
      }
      while ( (unsigned __int8)n2 < 2u ); /*0xffc305db*/
      n6_1 = n6; /*0xffc305e1*/
      SocketInfo = SocketInfo_1; /*0xffc305e5*/
    }
    ++n6_1; /*0xffc305e9*/
    SocketInfo += 7688; /*0xffc305eb*/
    LOBYTE(n6) = n6_1; /*0xffc305f1*/
    SocketInfo_1 = SocketInfo; /*0xffc305f5*/
  }
  while ( n6_1 < 6u ); /*0xffc305fb*/
  return DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, "Clear Dq Swizzle AEP -- END\n"); /*0xffc3061c*/
}

// Function: ProcCommonFunc624 @ 0xffc30624 (0x31 bytes)
// Index: 267/2560

int __cdecl ProcCommonFunc624(unsigned __int8 *__return_address, unsigned __int8 n4, int n6)
{
  unsigned __int8 v3; // al

  v3 = MiscConfigCheck(__return_address, n4, n6, 117525788); /*0xffc30637*/
  return MiscIoCheck(__return_address, n4, n6, 0x7014D1Cu, v3); /*0xffc30652*/
}

// Function: ProcCommonFunc655 @ 0xffc30655 (0x3 bytes)
// Index: 268/2560

int __cdecl ProcCommonFunc655()
{
  return 0; /*0xffc30657*/
}

// Function: ProcCommonFunc658 @ 0xffc30658 (0x55 bytes)
// Index: 269/2560

__int16 __cdecl ProcCommonFunc658(
        unsigned __int8 *__return_address,
        unsigned __int8 n4,
        char n6,
        char n2,
        __int16 a5,
        unsigned __int8 n8,
        int n0x80,
        _BYTE *a8)
{
  int CpuCount; // esi
  bool v9; // zf
  __int16 result; // ax

  CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc30672*/
  v9 = (MiscConfigCheck(__return_address, n4, n6, 117525788) & 0x7F00) == 0; /*0xffc30682*/
  result = (__int16)a8; /*0xffc30687*/
  if ( v9 ) /*0xffc3068a*/
  {
    *a8 = 1; /*0xffc3068c*/
    *(_WORD *)(1379 * (unsigned __int8)n2 + CpuCount + 1215) += a5; /*0xffc3069d*/
    return a5; /*0xffc30699*/
  }
  else
  {
    *a8 = 0; /*0xffc306a7*/
  }
  return result; /*0xffc306aa*/
}

// Function: ProcCommonFunc6AD @ 0xffc306ad (0xf8 bytes)
// Index: 270/2560

_BYTE *__cdecl ProcCommonFunc6AD(unsigned __int8 *n6, int n4, char a3)
{
  _BYTE *result; // eax
  unsigned __int8 n6_2; // bl
  _BYTE *v5; // edi
  unsigned __int8 n2; // bh
  _BYTE *v7; // esi
  int n6_1; // [esp+10h] [ebp-Ch]
  int p_n6; // [esp+14h] [ebp-8h] BYREF
  int v10; // [esp+18h] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffc306bd*/
  n6_2 = 0; /*0xffc306c3*/
  v5 = result; /*0xffc306c5*/
  LOBYTE(n6_1) = 0; /*0xffc306c8*/
  do /*0xffc30797*/
  {
    if ( *v5 ) /*0xffc306cc*/
    {
      result = (_BYTE *)GetCpuCount((int)n6, n4, n6_1); /*0xffc306de*/
      n2 = 0; /*0xffc306ea*/
      v7 = result; /*0xffc306ec*/
      LOBYTE(v10) = 0; /*0xffc306ee*/
      do /*0xffc3077e*/
      {
        if ( *v7 && v7[107] ) /*0xffc306f7*/
        {
          ProcCommonFuncDD01(n6, n4, n6_1, v10, 0x50F4D04u, &p_n6, 0, 0, 15); /*0xffc3071a*/
          if ( a3 ) /*0xffc30724*/
            p_n6 &= ~0x2000000u; /*0xffc30726*/
          else
            p_n6 |= 0x2000000u; /*0xffc30730*/
          ProcCommonFuncDD01(n6, n4, n6_1, v10, 0x50F4D04u, &p_n6, 0, 1, 15); /*0xffc30755*/
          result = (_BYTE *)ProcCommonFunc2441((int)n6, n4, n6_1, v10); /*0xffc30767*/
        }
        ++n2; /*0xffc3076f*/
        v7 += 1379; /*0xffc30771*/
        LOBYTE(v10) = n2; /*0xffc30777*/
      }
      while ( n2 < 2u ); /*0xffc3077e*/
      n6_2 = n6_1; /*0xffc30784*/
    }
    ++n6_2; /*0xffc30788*/
    v5 += 7688; /*0xffc3078a*/
    LOBYTE(n6_1) = n6_2; /*0xffc30790*/
  }
  while ( n6_2 < 6u ); /*0xffc30797*/
  return result; /*0xffc3079d*/
}

// Function: ProcCommonFunc7A5 @ 0xffc307a5 (0x197 bytes)
// Index: 271/2560

void __cdecl ProcCommonFunc7A5(_BYTE *__return_address, char a2)
{
  unsigned __int8 n4_1; // bl
  _BYTE *v3; // edi
  int SocketInfo; // eax
  unsigned __int8 n2_1; // cl
  unsigned __int8 *v6; // ebp
  int CpuCount; // eax
  unsigned __int8 v8; // bh
  int v9; // ecx
  unsigned int v10; // eax
  int n2; // [esp+10h] [ebp-18h]
  int n4; // [esp+14h] [ebp-14h]
  int v13; // [esp+18h] [ebp-10h] BYREF
  int v14; // [esp+1Ch] [ebp-Ch]
  unsigned int v15; // [esp+20h] [ebp-8h] BYREF
  int CpuCount_1; // [esp+24h] [ebp-4h]

  n4_1 = 0; /*0xffc307af*/
  LOBYTE(n4) = 0; /*0xffc307b2*/
  v3 = __return_address + 258716; /*0xffc307b6*/
  do /*0xffc3092e*/
  {
    if ( *(v3 - 27) && *v3 ) /*0xffc307c6*/
    {
      SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc307d4*/
      n2_1 = 0; /*0xffc307df*/
      v6 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc307e1*/
      LOBYTE(n2) = 0; /*0xffc307e4*/
      do /*0xffc30915*/
      {
        if ( v6[6713] ) /*0xffc307e8*/
        {
          CpuCount = GetCpuCount((int)__return_address, n4, n2); /*0xffc307fe*/
          v8 = 0; /*0xffc30803*/
          CpuCount_1 = CpuCount; /*0xffc30805*/
          for ( LOBYTE(v14) = 0; v8 < *v6; LOBYTE(v14) = v8 ) /*0xffc30810*/
          {
            v9 = 1379 * v8; /*0xffc3081c*/
            if ( *(_BYTE *)(v9 + CpuCount) && *(_BYTE *)(v9 + CpuCount + 107) ) /*0xffc3082c*/
            {
              ProcCommonFuncE56B(__return_address, n4, n2, v14, 0x5024030u, &v15); /*0xffc3084e*/
              ProcCommonFuncE56B(__return_address, n4, n2, v14, 0x5044008u, (unsigned int *)&v13); /*0xffc3086a*/
              DebugPrint( /*0xffc30893*/
                (int)__return_address,
                3,
                n4,
                n2,
                v14,
                255,
                255,
                255,
                "daTrainingEn = 0x%x, dTrainingEn = 0x%x\n",
                v15,
                v13);
              if ( a2 ) /*0xffc308a1*/
              {
                v10 = v15 | 0x20; /*0xffc308a3*/
                v13 |= 0x20u; /*0xffc308a6*/
              }
              else
              {
                v10 = v15 & 0xFFFFFFDF; /*0xffc308ad*/
                v13 &= ~0x20u; /*0xffc308b0*/
              }
              v15 = v10; /*0xffc308bf*/
              ProcCommonFuncF7F6(__return_address, n4, n2, v14, 0x5024030u, v10); /*0xffc308cc*/
              ProcCommonFuncF7F6(__return_address, n4, n2, v14, 0x5044008u, v13); /*0xffc308e7*/
              CpuCount = CpuCount_1; /*0xffc308ec*/
            }
            ++v8; /*0xffc308f3*/
          }
          n2_1 = n2; /*0xffc30902*/
        }
        ++n2_1; /*0xffc30906*/
        v6 += 7688; /*0xffc30908*/
        LOBYTE(n2) = n2_1; /*0xffc3090e*/
      }
      while ( n2_1 < 6u ); /*0xffc30915*/
      n4_1 = n4; /*0xffc3091b*/
    }
    ++n4_1; /*0xffc3091f*/
    v3 += 48704; /*0xffc30921*/
    LOBYTE(n4) = n4_1; /*0xffc30927*/
  }
  while ( n4_1 < 4u ); /*0xffc3092e*/
}

// Function: ProcCommonFunc93C @ 0xffc3093c (0xde bytes)
// Index: 272/2560

int __cdecl ProcCommonFunc93C(unsigned __int8 *__return_address, int n2, int n6)
{
  int result; // eax
  unsigned __int8 i; // bl
  int v5; // esi
  int v6; // esi
  unsigned int v7; // [esp+10h] [ebp-10h]
  int v8; // [esp+14h] [ebp-Ch]
  _DWORD v9[2]; // [esp+18h] [ebp-8h]

  v9[0] = 184566080; /*0xffc30950*/
  v9[1] = 184566084; /*0xffc30959*/
  result = GetCpuCount((int)__return_address, n2, n6); /*0xffc30961*/
  v8 = result; /*0xffc30969*/
  for ( i = 0; i < 2u; ++i ) /*0xffc3096d*/
  {
    if ( *(_BYTE *)(1379 * i + result) ) /*0xffc30978*/
    {
      v7 = v9[i]; /*0xffc3098c*/
      v5 = MiscConfigCheck(__return_address, n2, n6, v7); /*0xffc3099b*/
      if ( (unsigned __int8)MailBoxFunc9C88((int)__return_address, n2, n6) || (__return_address[130] & 0x40) == 0 ) /*0xffc309b1*/
      {
        v6 = v5 & 0xFFFFDFFF; /*0xffc309bb*/
        if ( !i && (__return_address[975] >= 0x14u || (__return_address[130] & 0x40) != 0) ) /*0xffc309d5*/
          KtiFunc211E(__return_address, 25, 1, n2, n6, 255, 255); /*0xffc309e8*/
      }
      else
      {
        v6 = v5 | 0x2000; /*0xffc309b3*/
      }
      MiscIoCheck(__return_address, n2, n6, v7, v6); /*0xffc309fb*/
      result = v8; /*0xffc30a00*/
    }
  }
  return result; /*0xffc30a12*/
}

// Function: ProcCommonFuncA1A @ 0xffc30a1a (0x44 bytes)
// Index: 273/2560

int __cdecl ProcCommonFuncA1A(_BYTE *n6, int n2, int n3, int a4)
{
  KtiFunc8C4((int)n6, 0x1F4u); /*0xffc30a26*/
  ProcCommonFuncF7F6(n6, n2, n3, a4, 0x50240A0u, 1); /*0xffc30a3f*/
  return ProcCommonFuncF7F6(n6, n2, n3, a4, 0x50240A0u, 0); /*0xffc30a5b*/
}

// Function: ProcCommonFuncA5E @ 0xffc30a5e (0x33 bytes)
// Index: 274/2560

int __cdecl ProcCommonFuncA5E(unsigned __int8 *__return_address, unsigned __int8 n4, int n6)
{
  int v3; // eax

  v3 = MiscConfigCheck(__return_address, n4, n6, 184567104); /*0xffc30a71*/
  return MiscIoCheck(__return_address, n4, n6, 0xB004540u, v3 & 0xFFE07FC0); /*0xffc30a8e*/
}

// Function: ProcCommonFuncA91 @ 0xffc30a91 (0x104 bytes)
// Index: 275/2560

int __cdecl ProcCommonFuncA91(unsigned __int8 *__return_address, int n4, int n6, int n2, int a5, _WORD *a6)
{
  char n18; // bl
  int v7; // esi
  int n0x12_1; // eax
  unsigned __int8 n8; // cl
  int v10; // edx
  int v11; // ecx
  unsigned __int8 n8_1; // bl
  int n0x12_2; // edx
  int v14; // esi
  int n0x12; // [esp+10h] [ebp-4h]

  n18 = 0; /*0xffc30aa2*/
  v7 = GetSocketInfo((int)__return_address, n4) + 7688 * (unsigned __int8)n6; /*0xffc30ac0*/
  n0x12_1 = KtiFunc91AF((int)__return_address, n4, n6, n2); /*0xffc30ac3*/
  n8 = 0; /*0xffc30ad5*/
  n0x12 = n0x12_1; /*0xffc30ad7*/
  v10 = 0; /*0xffc30adb*/
  do /*0xffc30aff*/
  {
    if ( !__return_address[257312] && (n8 == 8 || n8 == 17) /*0xffc30af5*/
      || (n0x12_1 = v10 + 18 * (unsigned __int8)n6, a6[n0x12_1] >= 0x40u) )
    {
      ++n18; /*0xffc30af7*/
    }
    ++n8; /*0xffc30af9*/
    ++v10; /*0xffc30afb*/
  }
  while ( n8 < 0x12u ); /*0xffc30aff*/
  if ( n18 == 18 ) /*0xffc30b08*/
  {
    v11 = a5; /*0xffc30b0e*/
    n8_1 = 0; /*0xffc30b12*/
    n0x12_2 = n0x12; /*0xffc30b14*/
    LOBYTE(n0x12) = 0; /*0xffc30b21*/
    n0x12_1 = 7 * *(unsigned __int8 *)(242 * (unsigned __int8)a5 + n0x12_2 + 1); /*0xffc30b2a*/
    --*(_BYTE *)(n0x12_1 + v7 + 3157); /*0xffc30b2d*/
    v14 = 0; /*0xffc30b34*/
    do /*0xffc30b8d*/
    {
      if ( __return_address[257312] || n8_1 != 8 && n8_1 != 17 ) /*0xffc30b47*/
      {
        a6[18 * (unsigned __int8)n6 + v14] -= 64; /*0xffc30b5a*/
        n0x12_1 = MrcMarginGroupTrain( /*0xffc30b77*/
                    __return_address,
                    n4,
                    (_BYTE *)n6,
                    n2,
                    v11,
                    n0x12,
                    0,
                    0,
                    0,
                    16,
                    &a6[18 * (unsigned __int8)n6 + v14]);
        v11 = a5; /*0xffc30b7c*/
      }
      ++n8_1; /*0xffc30b83*/
      ++v14; /*0xffc30b85*/
      LOBYTE(n0x12) = n8_1; /*0xffc30b86*/
    }
    while ( n8_1 < 0x12u ); /*0xffc30b8d*/
  }
  return n0x12_1; /*0xffc30b8f*/
}

// Function: ProcCommonFuncB95 @ 0xffc30b95 (0x3d bytes)
// Index: 276/2560

_BYTE *__cdecl ProcCommonFuncB95(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, _BYTE *a4)
{
  int v4; // esi

  v4 = MiscConfigCheck(__return_address, n4, n6, 184567104) & 0x7FFFFFFF; /*0xffc30bb0*/
  MiscIoCheck(__return_address, n4, n6, 0xB004540u, v4); /*0xffc30bc1*/
  *(_DWORD *)a4 = v4; /*0xffc30bcd*/
  return a4; /*0xffc30bcc*/
}

// Function: ProcCommonFuncBD2 @ 0xffc30bd2 (0xde bytes)
// Index: 277/2560

int __cdecl ProcCommonFuncBD2(int __return_address, int n4)
{
  int result; // eax
  unsigned __int8 n6_1; // bl
  int v4; // esi
  unsigned __int8 n4_1; // cl
  unsigned __int8 n2; // bh
  int v7; // edi
  int v8; // esi
  int v9; // [esp+10h] [ebp-10h]
  int n6; // [esp+14h] [ebp-Ch]
  int v11; // [esp+18h] [ebp-8h]
  int v12; // [esp+1Ch] [ebp-4h]

  result = GetSocketInfo(__return_address, n4); /*0xffc30be2*/
  n6_1 = 0; /*0xffc30be7*/
  v12 = result; /*0xffc30be9*/
  v4 = 0; /*0xffc30bee*/
  LOBYTE(n6) = 0; /*0xffc30bf0*/
  v11 = 0; /*0xffc30bf5*/
  do /*0xffc30ca2*/
  {
    if ( *(_BYTE *)(v4 + result) ) /*0xffc30bf9*/
    {
      n4_1 = n4; /*0xffc30c03*/
      n2 = 0; /*0xffc30c07*/
      LOBYTE(v9) = 0; /*0xffc30c12*/
      v7 = 0; /*0xffc30c18*/
      v8 = v4 + 48704 * (unsigned __int8)n4 + __return_address; /*0xffc30c1a*/
      do /*0xffc30c85*/
      {
        if ( *(_BYTE *)(v7 + v8 + 259118) ) /*0xffc30c1d*/
        {
          if ( ProcCommonFunc24FA(__return_address, n4_1, n6, v9) ) /*0xffc30c31*/
          {
            if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffc30c45*/
            {
              *(_BYTE *)(v7 + v8 + 259196) &= ~2u; /*0xffc30c47*/
              KtiFuncFC62(__return_address, n4, n6, v9, 0, *(_BYTE *)(v7 + v8 + 259196), 0, 0x10u); /*0xffc30c6a*/
            }
          }
          n4_1 = n4; /*0xffc30c72*/
        }
        ++n2; /*0xffc30c76*/
        v7 += 1379; /*0xffc30c78*/
        LOBYTE(v9) = n2; /*0xffc30c7e*/
      }
      while ( n2 < 2u ); /*0xffc30c85*/
      v4 = v11; /*0xffc30c87*/
      result = v12; /*0xffc30c8b*/
    }
    ++n6_1; /*0xffc30c8f*/
    v4 += 7688; /*0xffc30c91*/
    LOBYTE(n6) = n6_1; /*0xffc30c97*/
    v11 = v4; /*0xffc30c9b*/
  }
  while ( n6_1 < 6u ); /*0xffc30ca2*/
  return result; /*0xffc30ca8*/
}

// Function: ProcCommonFuncCB0 @ 0xffc30cb0 (0xb4 bytes)
// Index: 278/2560

char __cdecl ProcCommonFuncCB0(int __return_address, int n4, int n6, int n2)
{
  int v5; // ebp
  char n12; // al
  int n4a; // [esp+14h] [ebp+8h]

  v5 = __return_address + 48704 * (unsigned __int8)n4 + 7688 * (unsigned __int8)n6; /*0xffc30cda*/
  n12 = ProcCommonFunc24FA(__return_address, n4, n6, n2); /*0xffc30cdc*/
  if ( n12 ) /*0xffc30ce6*/
  {
    n12 = 12; /*0xffc30cea*/
    if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffc30cf2*/
    {
      n4a = 1379 * (unsigned __int8)n2; /*0xffc30d0a*/
      *(_BYTE *)(n4a + v5 + 259196) &= ~0x10u; /*0xffc30d0e*/
      KtiFuncFC62(__return_address, n4, n6, n2, 0, *(_BYTE *)(n4a + v5 + 259196), 0, 0x10u); /*0xffc30d24*/
      n12 = 99 * n2; /*0xffc30d29*/
      if ( *(_WORD *)(n4a + v5 + 259258) == 0xB300 && *(_BYTE *)(n4a + v5 + 259335) == 0xB0 ) /*0xffc30d47*/
        return KtiFuncFC62(__return_address, n4, n6, n2, 0, 0, 0, 0xCu); /*0xffc30d57*/
    }
  }
  return n12; /*0xffc30d60*/
}

// Function: ProcCommonFuncD64 @ 0xffc30d64 (0x33 bytes)
// Index: 279/2560

int __cdecl ProcCommonFuncD64(unsigned __int8 *__return_address, unsigned __int8 n4, int n6)
{
  int v3; // eax

  v3 = MiscConfigCheck(__return_address, n4, n6, 117525760); /*0xffc30d77*/
  return MiscIoCheck(__return_address, n4, n6, 0x7014D00u, v3 & 0x7FFFFFFF); /*0xffc30d94*/
}

// Function: ProcCommonFuncD97 @ 0xffc30d97 (0x61 bytes)
// Index: 280/2560

_BYTE *__cdecl ProcCommonFuncD97(unsigned __int8 *__return_address, unsigned __int8 n4)
{
  _BYTE *result; // eax
  unsigned __int8 n6; // bl
  _BYTE *v4; // esi
  int v5; // eax
  int v6; // [esp+Ch] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc30da4*/
  n6 = 0; /*0xffc30daa*/
  v4 = result; /*0xffc30dac*/
  LOBYTE(v6) = 0; /*0xffc30daf*/
  do /*0xffc30def*/
  {
    if ( *v4 ) /*0xffc30db7*/
    {
      v5 = MiscConfigCheck(__return_address, n4, v6, 117525792); /*0xffc30dc6*/
      result = (_BYTE *)MiscIoCheck(__return_address, n4, v6, 0x7014D20u, v5 | 4); /*0xffc30dd9*/
    }
    ++n6; /*0xffc30de1*/
    v4 += 7688; /*0xffc30de3*/
    LOBYTE(v6) = n6; /*0xffc30de9*/
  }
  while ( n6 < 6u ); /*0xffc30def*/
  return result; /*0xffc30df1*/
}

// Function: ProcCommonFuncDF8 @ 0xffc30df8 (0x170 bytes)
// Index: 281/2560

void __cdecl ProcCommonFuncDF8(int __return_address, int n4)
{
  unsigned __int8 *__return_address_1; // esi
  int v3; // eax
  int n4_1; // ebx
  _BYTE *SocketInfo; // ebp
  unsigned __int8 n6_1; // al
  int v7; // ecx
  unsigned __int8 v8; // al
  int v9; // ecx
  int CpuCount_1; // edx
  int CpuCount; // [esp+8h] [ebp-1Ch]
  int n6; // [esp+Ch] [ebp-18h]
  int v13; // [esp+10h] [ebp-14h]
  int v14; // [esp+14h] [ebp-10h]
  int v15; // [esp+18h] [ebp-Ch] BYREF
  _BYTE *SocketInfo_1; // [esp+1Ch] [ebp-8h]
  int v17; // [esp+20h] [ebp-4h] BYREF

  __return_address_1 = (unsigned __int8 *)__return_address; /*0xffc30dfc*/
  if ( __return_address ) /*0xffc30e02*/
  {
    if ( (v3 = *(_DWORD *)(__return_address + 246404)) == 0 && *(_BYTE *)(__return_address + 244457) == 1 || v3 == 1 ) /*0xffc30e1e*/
    {
      n4_1 = n4; /*0xffc30e25*/
      SocketInfo = (_BYTE *)GetSocketInfo(__return_address, n4); /*0xffc30e33*/
      n6_1 = 0; /*0xffc30e35*/
      v7 = 0; /*0xffc30e38*/
      SocketInfo_1 = SocketInfo; /*0xffc30e3a*/
      LOBYTE(n6) = 0; /*0xffc30e3e*/
      v14 = 0; /*0xffc30e42*/
      do /*0xffc30f5a*/
      {
        if ( *SocketInfo ) /*0xffc30e46*/
        {
          CpuCount = GetCpuCount((int)__return_address_1, n4_1, n6); /*0xffc30e68*/
          v8 = 0; /*0xffc30e6c*/
          LOBYTE(v13) = 0; /*0xffc30e6e*/
          v7 = v14; /*0xffc30e78*/
          if ( __return_address_1[50813 * (unsigned __int8)n4_1 + 10240 + v14] ) /*0xffc30e82*/
          {
            v9 = v14 + 50813 * (unsigned __int8)n4_1; /*0xffc30e8f*/
            CpuCount_1 = CpuCount; /*0xffc30e91*/
            do /*0xffc30f2c*/
            {
              if ( *(_BYTE *)(1379 * v8 + CpuCount_1 + 107) ) /*0xffc30e9e*/
              {
                ProcCommonFuncE302((int)__return_address_1, n4_1, n6, v13, &v15, &v17); /*0xffc30eb7*/
                if ( (v15 & 0x20000000) != 0 ) /*0xffc30ec7*/
                {
                  DebugPrint( /*0xffc30ece*/
                    (int)__return_address_1,
                    3,
                    n4_1,
                    n6,
                    v13,
                    255,
                    255,
                    255,
                    "NVMDIMM received surprise clock stop - don't disabled the LSS Latch\n");
                }
                else if ( (v15 & 0x800000) != 0 ) /*0xffc30ed8*/
                {
                  if ( !ProcCommonFuncED3F(__return_address_1, n4_1, n6, v13, 0, &__return_address) ) /*0xffc30eec*/
                    DebugPrint( /*0xffc30f0b*/
                      (int)__return_address_1,
                      3,
                      n4_1,
                      n6,
                      v13,
                      255,
                      255,
                      255,
                      "LSS Latch Disabled successfully\n");
                }
                else
                {
                  DebugPrint( /*0xffc30edf*/
                    (int)__return_address_1,
                    3,
                    n4_1,
                    n6,
                    v13,
                    255,
                    255,
                    255,
                    "WDB flush failed - don't disabled the LSS Latch\n");
                }
                CpuCount_1 = CpuCount; /*0xffc30f13*/
                v9 = v14 + 50813 * (unsigned __int8)n4_1; /*0xffc30f17*/
              }
              v8 = v13 + 1; /*0xffc30f1f*/
              LOBYTE(v13) = v8; /*0xffc30f21*/
            }
            while ( v8 < __return_address_1[v9 + 10240] ); /*0xffc30f2c*/
            SocketInfo = SocketInfo_1; /*0xffc30f32*/
            v7 = v14; /*0xffc30f36*/
          }
          n6_1 = n6; /*0xffc30f3a*/
        }
        ++n6_1; /*0xffc30f3e*/
        SocketInfo += 7688; /*0xffc30f40*/
        v7 += 8077; /*0xffc30f46*/
        LOBYTE(n6) = n6_1; /*0xffc30f4c*/
        SocketInfo_1 = SocketInfo; /*0xffc30f50*/
        v14 = v7; /*0xffc30f54*/
      }
      while ( n6_1 < 6u ); /*0xffc30f5a*/
    }
  }
}

// Function: DataCmdCtlTrain @ 0xffc30f68 (0x3de bytes)
// Index: 282/2560

int __cdecl DataCmdCtlTrain(unsigned __int8 *__return_address, int a2)
{
  int v2; // edi
  int n7; // ebx
  _BYTE *SocketInfo_1; // eax
  unsigned __int8 n6; // bh
  int v6; // edi
  unsigned __int8 n7_1; // bl
  char n7_2; // bl
  unsigned __int8 n5; // bl
  char n7_3; // bl
  int v11; // edi
  int n4; // ebx
  _BYTE *SocketInfo_3; // edi
  unsigned __int8 n6_1; // bl
  unsigned __int8 n4_1; // bh
  __int16 v17; // [esp+10h] [ebp-14h] BYREF
  char n2[4]; // [esp+14h] [ebp-10h]
  int v19; // [esp+18h] [ebp-Ch]
  _BYTE *SocketInfo_2; // [esp+1Ch] [ebp-8h]
  int SocketInfo; // [esp+20h] [ebp-4h]

  SocketInfo = GetSocketInfo((int)__return_address, a2); /*0xffc30f88*/
  DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\nSTART_DATA_CMD_CTL\n"); /*0xffc30f95*/
  DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "            "); /*0xffc30fa8*/
  v2 = 0; /*0xffc30fb0*/
  n7 = 7; /*0xffc30fb4*/
  do /*0xffc30fd5*/
  {
    DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "  %2d  ", v2++); /*0xffc30fc9*/
    --n7; /*0xffc30fd2*/
  }
  while ( n7 ); /*0xffc30fd5*/
  DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc30fea*/
  SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffc30fef*/
  n6 = 0; /*0xffc30ff6*/
  SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc30ff8*/
  LOBYTE(v19) = 0; /*0xffc30ffc*/
  do /*0xffc31209*/
  {
    if ( *SocketInfo_1 ) /*0xffc31000*/
    {
      v6 = v19; /*0xffc31012*/
      DebugPrint((int)__return_address, 10, a2, v19, 255, 255, 255, 255, "CMDN"); /*0xffc3101b*/
      n7_1 = 0; /*0xffc31023*/
      n2[0] = 0; /*0xffc31025*/
      do /*0xffc31068*/
      {
        MailBoxFunc5F13(__return_address, a2, v6, n2[0], 0, 2, &v17); /*0xffc31039*/
        DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "  %3d ", v17); /*0xffc31057*/
        n2[0] = ++n7_1; /*0xffc31061*/
      }
      while ( n7_1 < 7u ); /*0xffc31068*/
      DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc3107d*/
      DebugPrint((int)__return_address, 10, a2, v6, 255, 255, 255, 255, "CMDS"); /*0xffc31095*/
      n7_2 = 7; /*0xffc3109a*/
      n2[0] = 7; /*0xffc3109f*/
      do /*0xffc310e2*/
      {
        MailBoxFunc5F13(__return_address, a2, v6, n2[0], 0, 2, &v17); /*0xffc310b3*/
        DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "  %3d ", v17); /*0xffc310d1*/
        n2[0] = ++n7_2; /*0xffc310db*/
      }
      while ( (unsigned __int8)n7_2 < 0xEu ); /*0xffc310e2*/
      DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc310f7*/
      DebugPrint((int)__return_address, 10, a2, v6, 255, 255, 255, 255, "CKE "); /*0xffc3110f*/
      n5 = 0; /*0xffc31117*/
      n2[0] = 0; /*0xffc31119*/
      do /*0xffc3115c*/
      {
        MailBoxFunc5F13(__return_address, a2, v6, n2[0], 1, 2, &v17); /*0xffc3112d*/
        DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "  %3d ", v17); /*0xffc3114b*/
        n2[0] = ++n5; /*0xffc31155*/
      }
      while ( n5 < 5u ); /*0xffc3115c*/
      DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc31171*/
      DebugPrint((int)__return_address, 10, a2, v6, 255, 255, 255, 255, "CTL "); /*0xffc31189*/
      n7_3 = 7; /*0xffc3118e*/
      n2[0] = 7; /*0xffc31193*/
      do /*0xffc311d6*/
      {
        MailBoxFunc5F13(__return_address, a2, v6, n2[0], 1, 2, &v17); /*0xffc311a7*/
        DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "  %3d ", v17); /*0xffc311c5*/
        n2[0] = ++n7_3; /*0xffc311cf*/
      }
      while ( (unsigned __int8)n7_3 < 0xCu ); /*0xffc311d6*/
      DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc311eb*/
      SocketInfo_1 = SocketInfo_2; /*0xffc311f0*/
    }
    ++n6; /*0xffc311f7*/
    SocketInfo_1 += 7688; /*0xffc311f9*/
    LOBYTE(v19) = n6; /*0xffc311fe*/
    SocketInfo_2 = SocketInfo_1; /*0xffc31202*/
  }
  while ( n6 < 6u ); /*0xffc31209*/
  DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\nSTART_DATA_CLK\n"); /*0xffc3121d*/
  DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "       "); /*0xffc31230*/
  v11 = 0; /*0xffc31238*/
  n4 = 4; /*0xffc3123c*/
  do /*0xffc3125d*/
  {
    DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "  %3d ", v11++); /*0xffc31251*/
    --n4; /*0xffc3125a*/
  }
  while ( n4 ); /*0xffc3125d*/
  DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc31272*/
  SocketInfo_3 = (_BYTE *)SocketInfo; /*0xffc31277*/
  n6_1 = 0; /*0xffc3127e*/
  LOBYTE(v19) = 0; /*0xffc31280*/
  do /*0xffc3131d*/
  {
    if ( *SocketInfo_3 ) /*0xffc31284*/
    {
      DebugPrint((int)__return_address, 10, a2, v19, 255, 255, 255, 255, byte_FFD25E04); /*0xffc312a3*/
      n4_1 = 0; /*0xffc312ab*/
      n2[0] = 0; /*0xffc312ad*/
      do /*0xffc312f1*/
      {
        MailBoxFunc5B6A(__return_address, a2, v19, n2[0], 2, &v17); /*0xffc312c2*/
        DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "  %3d ", v17); /*0xffc312e0*/
        n2[0] = ++n4_1; /*0xffc312ea*/
      }
      while ( n4_1 < 4u ); /*0xffc312f1*/
      DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc31306*/
    }
    ++n6_1; /*0xffc3130e*/
    SocketInfo_3 += 7688; /*0xffc31310*/
    LOBYTE(v19) = n6_1; /*0xffc31316*/
  }
  while ( n6_1 < 6u ); /*0xffc3131d*/
  return DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc3133e*/
}

// Function: ProcCommonFunc1346 @ 0xffc31346 (0x140 bytes)
// Index: 283/2560

int __cdecl ProcCommonFunc1346(unsigned __int8 *__return_address, int n4)
{
  int result; // eax
  unsigned __int8 n6_1; // bh
  unsigned __int8 *v4; // edi
  unsigned __int8 v5; // bl
  char v6; // [esp+13h] [ebp-45h] BYREF
  int n6; // [esp+14h] [ebp-44h]
  int v8; // [esp+18h] [ebp-40h]
  int v9; // [esp+1Ch] [ebp-3Ch]
  unsigned __int8 v10[5]; // [esp+20h] [ebp-38h] BYREF
  unsigned __int8 v11; // [esp+25h] [ebp-33h]

  v6 = 0; /*0xffc31357*/
  result = GetSocketInfo((int)__return_address, n4); /*0xffc3135c*/
  n6_1 = 0; /*0xffc31362*/
  LOBYTE(n6) = 0; /*0xffc31365*/
  v4 = (unsigned __int8 *)(result + 3); /*0xffc31369*/
  do
  {
    if ( *(v4 - 3) )
    {
      result = GetCpuCount((int)__return_address, n4, n6); /*0xffc3137c*/
      v5 = 0; /*0xffc31381*/
      v9 = result; /*0xffc31383*/
      for ( LOBYTE(v8) = 0; v5 < *v4; LOBYTE(v8) = v5 )
      {
        if ( *(_BYTE *)(1379 * v5 + result + 107) )
        {
          if ( !ProcCommonFuncDA64(__return_address, n4, n6, v8, (int)v10, &v6) )
          {
            if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffc313d1*/
              KtiFunc8014((int)__return_address); /*0xffc313dd*/
            DebugPrint(
              (int)__return_address,
              2,
              n4,
              n6,
              v8,
              255,
              255,
              255,
              "Firmware Revision: %02x.%02x.%02x.%04x Firmware Type: 0x%x\n",
              v10[0],
              v10[1],
              v10[2],
              *(unsigned __int16 *)&v10[3],
              v11);
            if ( (__return_address[246408] & 4) == 0 ) /*0xffc31429*/
              AutoGenFuncFA71((int)__return_address, n4, n6, v8, v10); /*0xffc3143a*/
            if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffc31445*/
              KtiFunc834D((int)__return_address); /*0xffc31451*/
          }
          result = v9; /*0xffc31457*/
        }
        ++v5; /*0xffc3145b*/
      }
    }
    ++n6_1; /*0xffc31469*/
    v4 += 7688; /*0xffc3146b*/
    LOBYTE(n6) = n6_1; /*0xffc31471*/
  }
  while ( n6_1 < 6u );
  return result; /*0xffc3147e*/
}

// Function: ProcCommonFunc1486 @ 0xffc31486 (0x3f bytes)
// Index: 284/2560

int __cdecl ProcCommonFunc1486(int __return_address, int n4, int n6, int n2, int a5)
{
  int v5; // eax

  v5 = KtiFunc91DE(__return_address, n4, n6, n2); /*0xffc31495*/
  return RmtFunc349(__return_address, n4, n6, n2, a5, *(unsigned __int16 *)(244 * (unsigned __int8)a5 + v5 + 10), 5); /*0xffc314c3*/
}

// Function: ProcCommonFunc14C5 @ 0xffc314c5 (0x80 bytes)
// Index: 285/2560

_BYTE *__cdecl ProcCommonFunc14C5(unsigned __int8 *__return_address, unsigned __int8 n4)
{
  _BYTE *result; // eax
  unsigned __int8 n6; // bl
  _BYTE *v4; // ebp
  int v5; // [esp+8h] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc314d0*/
  n6 = 0; /*0xffc314d6*/
  v4 = result; /*0xffc314d8*/
  LOBYTE(v5) = 0; /*0xffc314db*/
  do /*0xffc3153f*/
  {
    if ( *v4 ) /*0xffc314df*/
    {
      MiscIoCheck(__return_address, n4, v5, 0xB014524u, 0); /*0xffc314f8*/
      MiscIoCheck(__return_address, n4, v5, 0xB014528u, 0); /*0xffc31510*/
      result = (_BYTE *)MiscIoCheck(__return_address, n4, v5, 0xB01452Cu, 0); /*0xffc31528*/
    }
    ++n6; /*0xffc31530*/
    v4 += 7688; /*0xffc31532*/
    LOBYTE(v5) = n6; /*0xffc31538*/
  }
  while ( n6 < 6u ); /*0xffc3153f*/
  return result; /*0xffc31541*/
}

// Function: ProcCommonFunc1545 @ 0xffc31545 (0x26 bytes)
// Index: 286/2560

bool __cdecl ProcCommonFunc1545(int a1, unsigned __int8 a2, unsigned __int8 a3)
{
  return *(_BYTE *)(7688 * a3 + GetSocketInfo(a1, a2) + 6262) == 1; /*0xffc3156a*/
}

// Function: ProcCommonFunc156B @ 0xffc3156b (0x5 bytes)
// Index: 287/2560

// attributes: thunk
int __cdecl ProcCommonFunc156B(unsigned __int8 *n6, int n4, int a3)
{
  return KtiFunc6998(n6, n4, a3);
}

// Function: ProcCommonFunc1570 @ 0xffc31570 (0x13 bytes)
// Index: 288/2560

int __cdecl ProcCommonFunc1570(_BYTE *n6, int a2)
{
  return ProcCommonFunc3943((int)n6, a2, 0xCu); /*0xffc31582*/
}

// Function: ProcCommonFunc1583 @ 0xffc31583 (0x6e bytes)
// Index: 289/2560

char __cdecl ProcCommonFunc1583(int __return_address, int n4, int n6, int n2)
{
  int v4; // esi
  char result; // al
  int v6; // eax

  v4 = __return_address + 48704 * (unsigned __int8)n4 + 7688 * (unsigned __int8)n6; /*0xffc315ae*/
  result = ProcCommonFunc24FA(__return_address, n4, n6, n2); /*0xffc315b0*/
  if ( result ) /*0xffc315ba*/
  {
    v6 = 1379 * (unsigned __int8)n2; /*0xffc315bf*/
    *(_BYTE *)(v6 + v4 + 259196) |= 0x10u; /*0xffc315c9*/
    return KtiFuncFC62(__return_address, n4, n6, n2, 0, *(_BYTE *)(v6 + v4 + 259196), 0, 0x10u); /*0xffc315e5*/
  }
  return result; /*0xffc315ed*/
}

// Function: ProcCommonFunc15F1 @ 0xffc315f1 (0x32 bytes)
// Index: 290/2560

int __cdecl ProcCommonFunc15F1(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, char n8, _BYTE *a5)
{
  unsigned int v5; // eax
  int v7; // [esp-4h] [ebp-4h]

  v7 = *((_DWORD *)a5 + 1); /*0xffc315f7*/
  v5 = MailBoxFunc4C47((int)__return_address, 0, n8, 0x80042E8u); /*0xffc31607*/
  return MiscIoCheck(__return_address, n4, n6, v5, v7); /*0xffc31621*/
}

// Function: ProcCommonFunc1623 @ 0xffc31623 (0x49 bytes)
// Index: 291/2560

int __cdecl ProcCommonFunc1623(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, char n8)
{
  unsigned int v4; // eax
  int v6; // [esp-4h] [ebp-8h]

  v6 = *(_DWORD *)(7688 * (unsigned __int8)n6 + GetSocketInfo((int)__return_address, n4) + 11); /*0xffc31640*/
  v4 = MailBoxFunc4C47((int)__return_address, 0, n8, 0x80042E8u); /*0xffc31651*/
  return MiscIoCheck(__return_address, n4, n6, v4, v6); /*0xffc31669*/
}

// Function: ProcCommonFunc166C @ 0xffc3166c (0x1d7 bytes)
// Index: 292/2560

unsigned __int8 __cdecl ProcCommonFunc166C(_BYTE *n6, int n4)
{
  int SocketInfo; // ebp
  unsigned __int8 n6_2; // al
  unsigned __int8 *v4; // ebp
  int CpuCount; // eax
  unsigned __int8 v6; // cl
  int v7; // ebp
  int v8; // ecx
  unsigned __int16 v9; // ax
  int v10; // eax
  unsigned int v11; // eax
  unsigned int v12; // eax
  int v13; // [esp-4h] [ebp-34h]
  unsigned __int8 v14; // [esp+10h] [ebp-20h]
  int n2_1; // [esp+14h] [ebp-1Ch]
  unsigned __int8 n2; // [esp+18h] [ebp-18h]
  int n6_1; // [esp+1Ch] [ebp-14h]
  int v18; // [esp+20h] [ebp-10h]
  int CpuCount_1; // [esp+28h] [ebp-8h]
  unsigned __int8 *v20; // [esp+2Ch] [ebp-4h]

  SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc31684*/
  ProcMemFuncF267(n6, n4); /*0xffc31686*/
  n6_2 = 0; /*0xffc3168b*/
  v4 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc31690*/
  LOBYTE(n6_1) = 0; /*0xffc31693*/
  v20 = v4; /*0xffc31697*/
  do /*0xffc31835*/
  {
    if ( *(v4 - 3) ) /*0xffc3169b*/
    {
      CpuCount = GetCpuCount((int)n6, n4, n6_1); /*0xffc316ac*/
      v6 = 0; /*0xffc316b1*/
      CpuCount_1 = CpuCount; /*0xffc316b3*/
      for ( LOBYTE(n2_1) = 0; v6 < *v4; LOBYTE(n2_1) = v6 ) /*0xffc316be*/
      {
        if ( *(_BYTE *)(1379 * v6 + CpuCount) ) /*0xffc316d0*/
        {
          v18 = KtiFunc91DE((int)n6, n4, n6_1, n2_1); /*0xffc316ec*/
          v14 = 0; /*0xffc316f6*/
          if ( n6[50813 * (unsigned __int8)n4 + 10194] ) /*0xffc316ff*/
          {
            v7 = 50813 * (unsigned __int8)n4; /*0xffc3170d*/
            do /*0xffc3178d*/
            {
              if ( !KtiFunc89E9((int)n6, n4, n6_1, n2_1, v14, 0) ) /*0xffc3171c*/
              {
                v8 = 244 * v14; /*0xffc31736*/
                v9 = *(_WORD *)(v8 + v18 + 4) | 0x1000; /*0xffc31745*/
                *(_WORD *)(v8 + v18 + 4) = v9; /*0xffc31748*/
                v7 = 50813 * (unsigned __int8)n4; /*0xffc31754*/
                if ( *(_DWORD *)(n6 + 9405) != 10 && *((_DWORD *)n6 + 61601) != 1 ) /*0xffc31764*/
                  RmtFunc349(n6, n4, n6_1, n2_1, v14, v9, 2); /*0xffc31774*/
              }
              ++v14; /*0xffc31782*/
            }
            while ( v14 < n6[v7 + 10194] ); /*0xffc3178d*/
            v4 = v20; /*0xffc3178f*/
          }
          CpuCount = CpuCount_1; /*0xffc31793*/
        }
        v6 = n2_1 + 1; /*0xffc3179b*/
      }
      v10 = MiscConfigCheck(n6, n4, n6_1, 184631440); /*0xffc317b2*/
      MiscIoCheck(n6, n4, n6_1, 0xB014090u, v10 | 0x100); /*0xffc317c5*/
      for ( n2 = 0; n2 < 0x12u; ++n2 ) /*0xffc317cd*/
      {
        v11 = MailBoxFunc4CB2((int)n6, n2, 0x80042CCu); /*0xffc317dc*/
        v13 = MiscConfigCheck(n6, n4, n6_1, v11) | 0x40000000; /*0xffc317f2*/
        v12 = MailBoxFunc4CB2((int)n6, n2, 0x80042CCu); /*0xffc317fd*/
        MiscIoCheck(n6, n4, n6_1, v12, v13); /*0xffc31809*/
      }
      n6_2 = n6_1; /*0xffc3181f*/
    }
    ++n6_2; /*0xffc31823*/
    v4 += 7688; /*0xffc31825*/
    LOBYTE(n6_1) = n6_2; /*0xffc3182b*/
    v20 = v4; /*0xffc3182f*/
  }
  while ( n6_2 < 6u ); /*0xffc31835*/
  return n6_2; /*0xffc3183b*/
}

// Function: ProcCommonFunc1843 @ 0xffc31843 (0x2b bytes)
// Index: 293/2560

_BYTE *__cdecl ProcCommonFunc1843(int __return_address, char n3, _BYTE *p_n2a)
{
  _BYTE *p_n2a_1; // eax

  p_n2a_1 = p_n2a; /*0xffc31856*/
  if ( ((unsigned __int8)(1 << n3) & *(_BYTE *)(__return_address + 10185)) != 0 ) /*0xffc3185a*/
  {
    if ( *p_n2a < 3u ) /*0xffc3185f*/
      *p_n2a = 3; /*0xffc31861*/
  }
  else if ( *p_n2a < 2u ) /*0xffc31868*/
  {
    *p_n2a = 2; /*0xffc3186a*/
  }
  return p_n2a_1; /*0xffc31864*/
}

// Function: ProcCommonFunc186E @ 0xffc3186e (0xd6 bytes)
// Index: 294/2560

_BYTE *__cdecl ProcCommonFunc186E(unsigned __int8 *__return_address, int n4)
{
  _BYTE *result; // eax
  unsigned __int8 n6_2; // bl
  _BYTE *v4; // ebp
  _BYTE *v5; // edi
  unsigned __int8 n2_1; // bh
  int n6_1; // esi
  int n6; // [esp+10h] [ebp-8h]
  int n2; // [esp+14h] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc3187c*/
  n6_2 = 0; /*0xffc31882*/
  v4 = result; /*0xffc31884*/
  LOBYTE(n6) = 0; /*0xffc31887*/
  do /*0xffc31937*/
  {
    if ( *v4 ) /*0xffc3188b*/
    {
      result = (_BYTE *)GetCpuCount((int)__return_address, n4, n6); /*0xffc318a1*/
      v5 = result; /*0xffc318a9*/
      n2_1 = 0; /*0xffc318ab*/
      LOBYTE(n2) = 0; /*0xffc318ad*/
      do /*0xffc31926*/
      {
        if ( *v5 ) /*0xffc318b1*/
        {
          if ( v5[107] ) /*0xffc318b6*/
          {
            n6_1 = ProcCommonFuncE35E((int)__return_address, n4, n6, n2, 0x5034800u) | 1; /*0xffc318d8*/
            ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84101120, n6_1); /*0xffc318f1*/
            result = (_BYTE *)ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84101120, n6_1 & 0xFFFFFFFE); /*0xffc3190f*/
          }
        }
        ++n2_1; /*0xffc31917*/
        v5 += 1379; /*0xffc31919*/
        LOBYTE(n2) = n2_1; /*0xffc3191f*/
      }
      while ( n2_1 < 2u ); /*0xffc31926*/
    }
    ++n6_2; /*0xffc31928*/
    v4 += 7688; /*0xffc3192a*/
    LOBYTE(n6) = n6_2; /*0xffc31930*/
  }
  while ( n6_2 < 6u ); /*0xffc31937*/
  return result; /*0xffc3193d*/
}

// Function: ProcCommonFunc1944 @ 0xffc31944 (0x3 bytes)
// Index: 295/2560

char __cdecl ProcCommonFunc1944()
{
  return 0; /*0xffc31946*/
}

// Function: ProcCommonFunc1947 @ 0xffc31947 (0x36 bytes)
// Index: 296/2560

int __cdecl ProcCommonFunc1947(int n6, unsigned __int8 n4, unsigned __int8 a3, char n2, char a5, int *a6)
{
  int v6; // esi
  int result; // eax

  v6 = *a6; /*0xffc31958*/
  result = v6 ^ (v6 ^ ((unsigned __int8)KtiFunc88D1(n6, n4, a3, n2, a5) << 22)) & 0x1C00000; /*0xffc31975*/
  *a6 = result; /*0xffc31977*/
  return result; /*0xffc31979*/
}

// Function: ProcCommonFunc197D @ 0xffc3197d (0x4e bytes)
// Index: 297/2560

char __cdecl ProcCommonFunc197D(int a1, char a2)
{
  char n9; // bl

  n9 = 9; /*0xffc31985*/
  switch ( a2 ) /*0xffc3198a*/
  {
    case 0: /*0xffc3198a*/
    case 3: /*0xffc3198a*/
      n9 = 1; /*0xffc31991*/
      break; /*0xffc31993*/
    case 1: /*0xffc3198a*/
    case 4: /*0xffc3198a*/
      n9 = 5; /*0xffc31995*/
      break; /*0xffc31997*/
    case 2: /*0xffc3198a*/
      n9 = 6; /*0xffc31999*/
      break; /*0xffc3199b*/
    case 5: /*0xffc3198a*/
      n9 = 3; /*0xffc3199d*/
      break; /*0xffc3199f*/
    case 6: /*0xffc3198a*/
    case 7: /*0xffc3198a*/
      n9 = 7; /*0xffc319a5*/
      break; /*0xffc319a7*/
    case 9: /*0xffc3198a*/
      n9 = 2; /*0xffc319a1*/
      break; /*0xffc319a3*/
    default:
      DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "GetChipParamType called unknown parameter type\n"); /*0xffc319bf*/
      break; /*0xffc319bf*/
  }
  return n9; /*0xffc319c9*/
}

// Function: ProcCommonFunc19F5 @ 0xffc319f5 (0x17 bytes)
// Index: 298/2560

_WORD *__cdecl ProcCommonFunc19F5(int n6, int n4, _WORD *a3, _WORD *a4)
{
  *a4 = 256; /*0xffc319fe*/
  *a3 = 128; /*0xffc31a08*/
  return a3; /*0xffc31a0b*/
}

// Function: ProcCommonFunc1A0C @ 0xffc31a0c (0x4e bytes)
// Index: 299/2560

int __cdecl ProcCommonFunc1A0C(unsigned __int8 *__return_address, unsigned __int8 n4, unsigned __int8 n6, _BYTE *a4)
{
  int result; // eax

  *((_DWORD *)a4 + 1) = MiscConfigCheck(__return_address, n4, n6, 184566284); /*0xffc31a31*/
  *((_DWORD *)a4 + 2) = MiscConfigCheck(__return_address, n4, n6, 184566424); /*0xffc31a44*/
  result = MiscConfigCheck(__return_address, n4, n6, 117525024); /*0xffc31a4d*/
  *(_DWORD *)a4 = result; /*0xffc31a55*/
  return result; /*0xffc31a57*/
}

// Function: ProcCommonFunc1A5A @ 0xffc31a5a (0x12 bytes)
// Index: 300/2560

int __cdecl ProcCommonFunc1A5A(int a1)
{
  *(_WORD *)(a1 + 12) = 0; /*0xffc31a61*/
  *(_DWORD *)a1 = 0; /*0xffc31a67*/
  *(_DWORD *)(a1 + 4) = 0; /*0xffc31a68*/
  *(_DWORD *)(a1 + 8) = 0; /*0xffc31a69*/
  return 0; /*0xffc31a6a*/
}

// Function: ProcCommonFunc1A6C @ 0xffc31a6c (0x70 bytes)
// Index: 301/2560

char __cdecl ProcCommonFunc1A6C(int n6, int a2, __int16 *p_n4)
{
  _WORD v4[2]; // [esp+4h] [ebp-28h] BYREF
  int v5; // [esp+8h] [ebp-24h]
  __int16 n4; // [esp+Ch] [ebp-20h]
  __int16 v7; // [esp+Eh] [ebp-1Eh]
  __int16 v8; // [esp+10h] [ebp-1Ch]
  __int16 v9; // [esp+12h] [ebp-1Ah]
  __int16 n4_1; // [esp+14h] [ebp-18h]
  __int16 v11; // [esp+16h] [ebp-16h]
  __int16 n2; // [esp+18h] [ebp-14h]
  __int16 v13; // [esp+1Ah] [ebp-12h]
  __int16 n4_2; // [esp+1Ch] [ebp-10h]
  __int16 n2_1; // [esp+1Eh] [ebp-Eh]
  int v16; // [esp+20h] [ebp-Ch]
  __int16 n4_3; // [esp+24h] [ebp-8h]
  __int16 n2_2; // [esp+26h] [ebp-6h]
  __int16 v19; // [esp+28h] [ebp-4h]
  __int16 v20; // [esp+2Ah] [ebp-2h]

  v4[0] = 4; /*0xffc31a78*/
  v5 = 0; /*0xffc31a7f*/
  v9 = 0; /*0xffc31a84*/
  v13 = 0; /*0xffc31a89*/
  v16 = 0; /*0xffc31a8d*/
  v20 = 0; /*0xffc31a90*/
  v4[1] = 1; /*0xffc31a9d*/
  n4 = 4; /*0xffc31aa1*/
  v7 = 1; /*0xffc31aa5*/
  v8 = 1; /*0xffc31aa9*/
  n4_1 = 4; /*0xffc31aad*/
  v11 = 1; /*0xffc31ab1*/
  n2 = 2; /*0xffc31ab5*/
  n4_2 = 4; /*0xffc31ab9*/
  n2_1 = 2; /*0xffc31abd*/
  n4_3 = 4; /*0xffc31ac1*/
  n2_2 = 2; /*0xffc31ac5*/
  v19 = 1; /*0xffc31ac9*/
  AutoGenFunc8E72((int)p_n4, (char *)v4, 40); /*0xffc31acd*/
  return 5; /*0xffc31ad7*/
}

// Function: ProcCommonFunc1ADC @ 0xffc31adc (0x17 bytes)
// Index: 302/2560

int __cdecl ProcCommonFunc1ADC(int n6, _DWORD *a2, _WORD *p_i)
{
  *a2 = &unk_FFD51734; /*0xffc31ae3*/
  *p_i = 70; /*0xffc31aed*/
  return 0; /*0xffc31af2*/
}

// Function: ProcCommonFunc1AF3 @ 0xffc31af3 (0x1a bytes)
// Index: 303/2560

int __cdecl ProcCommonFunc1AF3(unsigned __int8 *__return_address, unsigned __int8 n4, unsigned __int8 a3)
{
  return MiscConfigCheck(__return_address, n4, a3, 134302244); /*0xffc31b0c*/
}

// Function: ProcCommonFunc1B0D @ 0xffc31b0d (0xcd bytes)
// Index: 304/2560

char *__cdecl ProcCommonFunc1B0D(
        int __return_address,
        unsigned __int8 n2,
        char n3,
        char n2a,
        unsigned __int8 *a5,
        char *p_n0xE)
{
  int CpuCount; // edi
  int v7; // edx
  char v8; // cl

  CpuCount = GetCpuCount(__return_address, n2, n3); /*0xffc31b26*/
  if ( ProcCommonFunc24FA(__return_address, n2, n3, n2a ^ 1) ) /*0xffc31b34*/
  {
    v7 = 48704 * n2; /*0xffc31b43*/
    *a5 = byte_FFD516F4[*(unsigned __int8 *)(v7 + __return_address + 307390)]; /*0xffc31b5a*/
    v8 = byte_FFD51704[*(unsigned __int8 *)(v7 + __return_address + 307390)]; /*0xffc31b64*/
  }
  else if ( *(_BYTE *)(1379 * (unsigned __int8)n2a + CpuCount + 23) == 122 ) /*0xffc31b7e*/
  {
    *a5 = byte_FFD51714[*(unsigned __int8 *)(48704 * n2 + __return_address + 307390)]; /*0xffc31b97*/
    v8 = byte_FFD51724[*(unsigned __int8 *)(48704 * n2 + __return_address + 307390)]; /*0xffc31ba1*/
  }
  else
  {
    *a5 = byte_FFD516D4[*(unsigned __int8 *)(48704 * n2 + __return_address + 307390)]; /*0xffc31bc0*/
    v8 = byte_FFD516E4[*(unsigned __int8 *)(48704 * n2 + __return_address + 307390)]; /*0xffc31bca*/
  }
  *p_n0xE = v8; /*0xffc31bd6*/
  return p_n0xE; /*0xffc31bd3*/
}

// Function: ProcCommonFunc1BDA @ 0xffc31bda (0xcd bytes)
// Index: 305/2560

char *__cdecl ProcCommonFunc1BDA(int n6, unsigned __int8 n2, char n3, unsigned __int8 n2a, _BYTE *a5, char *a6)
{
  int CpuCount; // edi
  int v7; // edx
  char v8; // cl

  CpuCount = GetCpuCount(n6, n2, n3); /*0xffc31bf3*/
  if ( ProcCommonFunc24FA(n6, n2, n3, n2a ^ 1) ) /*0xffc31c01*/
  {
    v7 = 48704 * n2; /*0xffc31c10*/
    *a5 = byte_FFD516FC[*(unsigned __int8 *)(v7 + n6 + 307390)]; /*0xffc31c27*/
    v8 = byte_FFD5170C[*(unsigned __int8 *)(v7 + n6 + 307390)]; /*0xffc31c31*/
  }
  else if ( *(_BYTE *)(1379 * n2a + CpuCount + 23) == 122 ) /*0xffc31c4b*/
  {
    *a5 = byte_FFD5171C[*(unsigned __int8 *)(48704 * n2 + n6 + 307390)]; /*0xffc31c64*/
    v8 = byte_FFD5172C[*(unsigned __int8 *)(48704 * n2 + n6 + 307390)]; /*0xffc31c6e*/
  }
  else
  {
    *a5 = byte_FFD516DC[*(unsigned __int8 *)(48704 * n2 + n6 + 307390)]; /*0xffc31c8d*/
    v8 = byte_FFD516EC[*(unsigned __int8 *)(48704 * n2 + n6 + 307390)]; /*0xffc31c97*/
  }
  *a6 = v8; /*0xffc31ca3*/
  return a6; /*0xffc31ca0*/
}

// Function: ProcCommonFunc1CA7 @ 0xffc31ca7 (0x22 bytes)
// Index: 306/2560

int __cdecl ProcCommonFunc1CA7(unsigned __int8 *__return_address, unsigned __int8 n4, unsigned __int8 a3, char n2)
{
  return (unsigned __int8)ProcCommonFunc1AF3(__return_address, n4, a3) >> (4 * n2); /*0xffc31cc8*/
}

// Function: ProcCommonFunc1CC9 @ 0xffc31cc9 (0x1a bytes)
// Index: 307/2560

char __cdecl ProcCommonFunc1CC9(int n6, int n4, _WORD *a3)
{
  int v4; // ecx
  int n8; // esi

  v4 = 0; /*0xffc31ccd*/
  n8 = 8; /*0xffc31cd2*/
  do /*0xffc31cdd*/
  {
    *a3 = v4++; /*0xffc31cd3*/
    a3 += 4; /*0xffc31cd7*/
    --n8; /*0xffc31cda*/
  }
  while ( n8 ); /*0xffc31cdd*/
  return 8; /*0xffc31ce1*/
}

// Function: ProcCommonFunc1CE3 @ 0xffc31ce3 (0x28 bytes)
// Index: 308/2560

int __cdecl ProcCommonFunc1CE3(unsigned __int8 *__return_address, unsigned __int8 n4, unsigned __int8 a3, _BYTE *a4)
{
  int result; // eax

  result = MiscConfigCheck(__return_address, n4, a3, 117525788); /*0xffc31cf4*/
  if ( (result & 0x7F00) == 0 ) /*0xffc31d01*/
  {
    *a4 = 1; /*0xffc31d07*/
    return (int)a4; /*0xffc31d03*/
  }
  return result; /*0xffc31d0a*/
}

// Function: ProcCommonFunc1D0B @ 0xffc31d0b (0x66 bytes)
// Index: 309/2560

char __cdecl ProcCommonFunc1D0B(int __return_address, int n6, _WORD *a3)
{
  __int16 *v4; // esi
  int n9; // edi
  __int16 v6; // cx
  _WORD v8[10]; // [esp+8h] [ebp-14h] BYREF

  v8[0] = 0; /*0xffc31d1a*/
  v4 = v8; /*0xffc31d1e*/
  v8[1] = 1; /*0xffc31d22*/
  v8[2] = 3; /*0xffc31d29*/
  v8[3] = 4; /*0xffc31d30*/
  v8[4] = 5; /*0xffc31d37*/
  v8[5] = 7; /*0xffc31d3e*/
  v8[6] = 12; /*0xffc31d45*/
  v8[7] = 13; /*0xffc31d4c*/
  v8[8] = 15; /*0xffc31d53*/
  n9 = 9; /*0xffc31d57*/
  do /*0xffc31d67*/
  {
    v6 = *v4++; /*0xffc31d58*/
    *a3 = v6; /*0xffc31d5e*/
    a3 += 4; /*0xffc31d61*/
    --n9; /*0xffc31d64*/
  }
  while ( n9 ); /*0xffc31d67*/
  return 9; /*0xffc31d69*/
}

// Function: ProcCommonFunc1D71 @ 0xffc31d71 (0x41 bytes)
// Index: 310/2560

int __cdecl ProcCommonFunc1D71(unsigned __int8 *__return_address, unsigned __int8 n6, int n6a, char a4)
{
  int v4; // eax

  v4 = MiscConfigCheck(__return_address, n6, n6a, 184566272); /*0xffc31d84*/
  MiscIoCheck(__return_address, n6, n6a, 0xB004200u, ((a4 & 1) << 25) | v4 & 0xFDFFFFFF); /*0xffc31da5*/
  return 0; /*0xffc31daf*/
}

// Function: ProcCommonFunc1DB2 @ 0xffc31db2 (0x17f bytes)
// Index: 311/2560

char __cdecl ProcCommonFunc1DB2(
        int a1,
        unsigned __int8 a2,
        unsigned __int8 a3,
        unsigned __int8 a4,
        unsigned int n23,
        int a6)
{
  int v9; // [esp+18h] [ebp+8h]

  v9 = a1 + 48704 * a2 + 7688 * a3; /*0xffc31de0*/
  if ( ProcCommonFunc24FA(a1, a2, a3, a4) && n23 == 23 && !a6 ) /*0xffc31dff*/
    return 9; /*0xffc31dff*/
  if ( ProcCommonFunc24FA(a1, a2, a3, a4) && n23 == 23 && a6 == 1 ) /*0xffc31e24*/
    return 18; /*0xffc31e24*/
  if ( ProcCommonFunc24FA(a1, a2, a3, a4) && n23 == 5 ) /*0xffc31e47*/
  {
    if ( a6 == 1 ) /*0xffc31e4c*/
      return 9; /*0xffc31e4c*/
LABEL_20:
    if ( !a6 ) /*0xffc31e99*/
      return 9; /*0xffc31e99*/
    goto LABEL_21; /*0xffc31e99*/
  }
  if ( n23 == 24 || n23 == 98 || n23 == 30 || n23 == 103 || n23 == 6 || n23 == 37 || n23 == 36 ) /*0xffc31e8c*/
    return 9; /*0xffc31e8c*/
  if ( n23 == 5 ) /*0xffc31e95*/
    goto LABEL_20; /*0xffc31e95*/
LABEL_21:
  if ( *(_BYTE *)(1379 * a4 + v9 + 259222) /*0xffc31f24*/
    || n23 == 3
    || n23 == 4
    || n23 == 19
    || n23 <= 2
    || n23 == 22
    || n23 == 5
    || n23 == 23 && *(_WORD *)(a1 + 257315) == 11 )
  {
    return 18; /*0xffc31e28*/
  }
  return 9; /*0xffc31f2c*/
}

// Function: ProcCommonFunc1F31 @ 0xffc31f31 (0x72 bytes)
// Index: 312/2560

char __cdecl ProcCommonFunc1F31(int n6, int n4, int a3)
{
  __int16 n33; // [esp+0h] [ebp-140h] BYREF
  int v5; // [esp+2h] [ebp-13Eh]
  __int16 v6; // [esp+6h] [ebp-13Ah]
  __int16 n30; // [esp+8h] [ebp-138h]
  int v8; // [esp+Ah] [ebp-136h]
  __int16 v9; // [esp+Eh] [ebp-132h]
  __int16 n28; // [esp+10h] [ebp-130h]
  _BYTE buf[302]; // [esp+12h] [ebp-12Eh] BYREF

  n33 = 33; /*0xffc31f3f*/
  n30 = 30; /*0xffc31f4b*/
  n28 = 28; /*0xffc31f58*/
  v5 = 0; /*0xffc31f67*/
  v6 = 0; /*0xffc31f6d*/
  v8 = 0; /*0xffc31f74*/
  v9 = 0; /*0xffc31f7a*/
  KtiFunc7D83(buf, 0, 0x12Eu); /*0xffc31f81*/
  AutoGenFunc8E72(a3, (char *)&n33, 320); /*0xffc31f95*/
  return 3; /*0xffc31f9f*/
}

// Function: ProcCommonFunc1FA3 @ 0xffc31fa3 (0x15 bytes)
// Index: 313/2560

_DWORD *__cdecl ProcCommonFunc1FA3(int __return_address, _DWORD *a2, _DWORD *a3)
{
  *a3 = &unk_FFD51F24; /*0xffc31fa7*/
  *a2 = 372; /*0xffc31fb1*/
  return a2; /*0xffc31fb7*/
}

// Function: ProcCommonFunc1FB8 @ 0xffc31fb8 (0x14e bytes)
// Index: 314/2560

int __cdecl ProcCommonFunc1FB8(
        unsigned __int8 *n6,
        char n4,
        unsigned __int8 n2,
        unsigned __int8 a4,
        unsigned __int16 a5)
{
  _BYTE *SocketInfo; // edi
  unsigned __int8 n6_1; // bh
  int n6a_1; // eax
  int CpuCount; // ebp
  int v10; // ecx
  int CpuCount_2; // eax
  unsigned __int8 n9; // bl
  int v13; // ebp
  unsigned int v14; // eax
  unsigned __int8 n6_2; // [esp+10h] [ebp-18h]
  int CpuCount_1; // [esp+14h] [ebp-14h]
  int v17; // [esp+18h] [ebp-10h]
  unsigned __int8 n2_1; // [esp+1Ch] [ebp-Ch]
  _BYTE *SocketInfo_1; // [esp+20h] [ebp-8h]
  int n6a; // [esp+2Ch] [ebp+4h]

  SocketInfo = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffc31fcd*/
  n6_1 = 0; /*0xffc31fcf*/
  SocketInfo_1 = SocketInfo; /*0xffc31fd9*/
  n6_2 = 0; /*0xffc31fe1*/
  n6a_1 = 0; /*0xffc31fee*/
  n6a = 0; /*0xffc31ff2*/
  do /*0xffc320f8*/
  {
    if ( *SocketInfo ) /*0xffc31ff6*/
    {
      CpuCount = GetCpuCount((int)n6, n4, n6_2); /*0xffc32013*/
      CpuCount_1 = CpuCount; /*0xffc32019*/
      if ( !KtiFunc89E9((int)n6, n4, n6_2, n2, a4, 0) ) /*0xffc32026*/
      {
        v10 = 1379 * n2; /*0xffc3203d*/
        v17 = v10; /*0xffc32047*/
        if ( a4 < *(_BYTE *)(v10 + CpuCount + 19) ) /*0xffc3204f*/
        {
          CpuCount_2 = CpuCount; /*0xffc32055*/
          n9 = 0; /*0xffc32059*/
          v13 = 0; /*0xffc3205f*/
          n2_1 = 0; /*0xffc32061*/
          do /*0xffc320d4*/
          {
            if ( *(_BYTE *)(v10 + CpuCount_2 + 104) || n9 < 9u ) /*0xffc3206f*/
            {
              v14 = MailBoxFunc4CB2((int)n6, n2_1, 0x80042A8u); /*0xffc3207b*/
              if ( (MiscConfigCheck(n6, n4, n6_2, v14) & 0x1FFu) >= 0x10 ) /*0xffc3209a*/
                *(_DWORD *)&n6[16 * n6a + 238538 + 16 * v13 + 4 * (unsigned __int8)((a5 - 128) / 32)] |= 1 << (a5 & 0x1F); /*0xffc320bb*/
              v10 = v17; /*0xffc320c2*/
              CpuCount_2 = CpuCount_1; /*0xffc320c6*/
            }
            ++n9; /*0xffc320ca*/
            ++v13; /*0xffc320cc*/
            n2_1 = n9; /*0xffc320cd*/
          }
          while ( n9 < 0x12u ); /*0xffc320d4*/
          SocketInfo = SocketInfo_1; /*0xffc320d6*/
        }
      }
      n6a_1 = n6a; /*0xffc320da*/
    }
    ++n6_1; /*0xffc320de*/
    SocketInfo += 7688; /*0xffc320e0*/
    n6a_1 += 18; /*0xffc320e6*/
    n6_2 = n6_1; /*0xffc320e9*/
    SocketInfo_1 = SocketInfo; /*0xffc320ed*/
    n6a = n6a_1; /*0xffc320f1*/
  }
  while ( n6_1 < 6u ); /*0xffc320f8*/
  return n6a_1; /*0xffc320fe*/
}

// Function: ProcCommonFunc2106 @ 0xffc32106 (0x4f bytes)
// Index: 315/2560

int __cdecl ProcCommonFunc2106(unsigned __int8 *n6, unsigned __int8 n6a, int a3, char a4, unsigned int *a5)
{
  unsigned int v5; // eax

  v5 = MiscConfigCheck(n6, n6a, a3, 184631776); /*0xffc32119*/
  *a5 = (v5 >> 2) & 1; /*0xffc3212c*/
  return MiscIoCheck(n6, n6a, a3, 0xB0141E0u, a4 & 1 | v5 & 0xFFFFFFF8 | (2 * (a4 & 1 | (2 * (a4 & 1))))); /*0xffc32152*/
}

// Function: ProcCommonFunc2155 @ 0xffc32155 (0x119 bytes)
// Index: 316/2560

int __cdecl ProcCommonFunc2155(unsigned __int8 *a1, unsigned __int8 a2, int a3, unsigned __int8 a4, char a5, _WORD *a6)
{
  int result; // eax
  __int16 v7; // cx
  int v8; // eax
  int v9; // esi
  int v10; // eax
  int v11; // esi
  int v12; // [esp+8h] [ebp-4h]

  result = GetSocketInfo((int)a1, a2); /*0xffc32162*/
  v12 = result; /*0xffc32170*/
  if ( (a5 & 2) != 0 ) /*0xffc32174*/
  {
    if ( a4 ) /*0xffc3217e*/
    {
      if ( a4 != 1 ) /*0xffc32183*/
        return result; /*0xffc32183*/
      v7 = *(_WORD *)(7688 * (unsigned __int8)a3 + result + 7493); /*0xffc32194*/
    }
    else
    {
      v7 = *(_WORD *)(7688 * (unsigned __int8)a3 + result + 7489); /*0xffc321a9*/
    }
    *a6 = (unsigned __int8)v7; /*0xffc321bd*/
    return (int)a6; /*0xffc321b9*/
  }
  else if ( a4 ) /*0xffc321cf*/
  {
    result = a4 - 1; /*0xffc321d1*/
    if ( a4 == 1 ) /*0xffc321d4*/
    {
      v8 = MiscConfigCheck(a1, a2, a3, 117525028); /*0xffc321e6*/
      v9 = (unsigned __int8)(v8 ^ *a6) ^ v8; /*0xffc321f9*/
      MiscIoCheck(a1, a2, a3, 0x7014A24u, v9); /*0xffc32204*/
      result = 7688 * (unsigned __int8)a3; /*0xffc32213*/
      *(_DWORD *)(result + v12 + 7493) = v9; /*0xffc32219*/
    }
  }
  else
  {
    v10 = MiscConfigCheck(a1, a2, a3, 117525024); /*0xffc3222e*/
    v11 = (unsigned __int8)(v10 ^ *a6) ^ v10; /*0xffc32241*/
    MiscIoCheck(a1, a2, a3, 0x7014A20u, v11); /*0xffc3224c*/
    result = 7688 * (unsigned __int8)a3; /*0xffc3225b*/
    *(_DWORD *)(result + v12 + 7489) = v11; /*0xffc32261*/
  }
  return result; /*0xffc3226a*/
}

// Function: ProcCommonFunc226E @ 0xffc3226e (0x1f bytes)
// Index: 317/2560

int __cdecl ProcCommonFunc226E(int a1, unsigned __int8 a2, unsigned __int8 a3)
{
  return CpuIoRead(a1, a2, 0, dword_FFD520EC[a3]); /*0xffc3228c*/
}

// Function: ProcCommonFunc228D @ 0xffc3228d (0x22 bytes)
// Index: 318/2560

unsigned int __cdecl ProcCommonFunc228D(char n2, unsigned int a2)
{
  if ( n2 == 2 ) /*0xffc32293*/
    return ((unsigned __int16)a2 - 128) / 32; /*0xffc322a3*/
  else
    return a2 >> 5; /*0xffc322ab*/
}

// Function: ProcCommonFunc22AF @ 0xffc322af (0x1c bytes)
// Index: 319/2560

char __cdecl ProcCommonFunc22AF(int n6, int n4, _WORD *a3)
{
  unsigned __int8 i; // cl
  __int16 v5; // ax

  for ( i = 0; i < 0xFu; ++i ) /*0xffc322b3*/
  {
    v5 = 2 * i; /*0xffc322b8*/
    *a3 = v5; /*0xffc322bd*/
    a3 += 4; /*0xffc322c0*/
  }
  return 15; /*0xffc322ca*/
}

// Function: ProcCommonFunc22CB @ 0xffc322cb (0x96 bytes)
// Index: 320/2560

int __cdecl ProcCommonFunc22CB(unsigned __int8 *n6, unsigned __int8 a2, int n6a, unsigned __int8 n2)
{
  int v4; // esi
  int result; // eax
  unsigned __int8 n2a_1; // al
  unsigned int v7; // eax
  int n184631428; // [esp-14h] [ebp-24h]
  unsigned __int8 n2a; // [esp+20h] [ebp+10h]

  v4 = MiscConfigCheck(n6, a2, n6a, 117525076); /*0xffc322e8*/
  if ( n2 ) /*0xffc322f5*/
  {
    result = n2 - 1; /*0xffc322f7*/
    if ( n2 != 1 ) /*0xffc322fa*/
      return result; /*0xffc322fa*/
    n2a_1 = MiscConfigCheck(n6, a2, n6a, 117525028); /*0xffc32304*/
    n184631428 = 184631428; /*0xffc32309*/
  }
  else
  {
    n2a_1 = MiscConfigCheck(n6, a2, n6a, 117525024); /*0xffc32318*/
    n184631428 = 184631424; /*0xffc3231d*/
  }
  n2a = n2a_1; /*0xffc32325*/
  v7 = MiscConfigCheck(n6, a2, n6a, n184631428); /*0xffc32329*/
  return MiscIoCheck(n6, a2, n6a, 0x7014A54u, v4 ^ (v4 ^ (((v7 >> 1) - n2a - 5) << 20)) & 0x1F00000); /*0xffc3235c*/
}

// Function: ProcCommonFunc2361 @ 0xffc32361 (0xb6 bytes)
// Index: 321/2560

_BYTE *__cdecl ProcCommonFunc2361(unsigned __int8 *__return_address, int n4, int n2)
{
  _BYTE *result; // eax
  unsigned __int8 n6_2; // bl
  _BYTE *v5; // edi
  int v6; // ecx
  int n6_1; // esi
  int v8; // [esp+Ch] [ebp-Ch]
  _BYTE *v9; // [esp+10h] [ebp-8h]
  int n6; // [esp+14h] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc32370*/
  n6_2 = 0; /*0xffc32376*/
  v5 = result; /*0xffc32378*/
  LOBYTE(n6) = 0; /*0xffc3237b*/
  do /*0xffc3240a*/
  {
    if ( *v5 ) /*0xffc3237e*/
    {
      result = (_BYTE *)GetCpuCount((int)__return_address, n4, n6); /*0xffc3238c*/
      v6 = 1379 * (unsigned __int8)n2; /*0xffc3239a*/
      v9 = result; /*0xffc323a0*/
      v8 = v6; /*0xffc323a3*/
      if ( result[v6] ) /*0xffc323a6*/
      {
        if ( result[v6 + 107] ) /*0xffc323ac*/
        {
          n6_1 = *(_DWORD *)&result[v6 + 1257] | 1; /*0xffc323ba*/
          ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84689280, n6_1); /*0xffc323cd*/
          n6_1 &= ~1u; /*0xffc323d2*/
          ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84689280, n6_1); /*0xffc323e7*/
          result = v9; /*0xffc323ec*/
          *(_DWORD *)&v9[v8 + 1257] = n6_1; /*0xffc323f5*/
        }
      }
    }
    ++n6_2; /*0xffc323fc*/
    v5 += 7688; /*0xffc323fe*/
    LOBYTE(n6) = n6_2; /*0xffc32404*/
  }
  while ( n6_2 < 6u ); /*0xffc3240a*/
  return result; /*0xffc32410*/
}

// Function: ProcCommonFunc2417 @ 0xffc32417 (0x2a bytes)
// Index: 322/2560

_BYTE *__cdecl ProcCommonFunc2417(unsigned __int8 *__return_address, int n4)
{
  unsigned __int8 n2_1; // bl
  _BYTE *result; // eax
  int n2; // [esp+4h] [ebp-4h]

  n2_1 = 0; /*0xffc3241c*/
  LOBYTE(n2) = 0; /*0xffc3241e*/
  do /*0xffc3243a*/
  {
    result = ProcCommonFunc2361(__return_address, n4, n2); /*0xffc3242a*/
    LOBYTE(n2) = ++n2_1; /*0xffc32434*/
  }
  while ( n2_1 < 2u ); /*0xffc3243a*/
  return result; /*0xffc3243c*/
}

// Function: ProcCommonFunc2441 @ 0xffc32441 (0x97 bytes)
// Index: 323/2560

int __cdecl ProcCommonFunc2441(int a1, int a2, int a3, int a4)
{
  int result; // eax
  int CpuCount; // edi
  int v6; // ebx
  int v7; // esi

  result = GetSocketInfo(a1, a2); /*0xffc3244a*/
  if ( *(_BYTE *)(7688 * (unsigned __int8)a3 + result) ) /*0xffc3245d*/
  {
    CpuCount = GetCpuCount(a1, a2, a3); /*0xffc32471*/
    result = a4; /*0xffc32476*/
    v6 = 1379 * (unsigned __int8)a4; /*0xffc3247c*/
    if ( *(_BYTE *)(v6 + CpuCount) ) /*0xffc32482*/
    {
      if ( *(_BYTE *)(v6 + CpuCount + 107) ) /*0xffc32488*/
      {
        v7 = *(_DWORD *)(v6 + CpuCount + 1257) | 1; /*0xffc32497*/
        ProcCommonFuncF4C7(a1, a2, a3, a4, 84689280, v7); /*0xffc324aa*/
        v7 &= ~1u; /*0xffc324af*/
        result = ProcCommonFuncF4C7(a1, a2, a3, a4, 84689280, v7); /*0xffc324c4*/
        *(_DWORD *)(v6 + CpuCount + 1257) = v7; /*0xffc324cc*/
      }
    }
  }
  return result; /*0xffc324d6*/
}

// Function: ProcCommonFunc24D8 @ 0xffc324d8 (0x22 bytes)
// Index: 324/2560

BOOL __cdecl ProcCommonFunc24D8(unsigned __int8 *a1, unsigned __int8 a2, unsigned __int8 a3)
{
  return (MiscConfigCheck(a1, a2, a3, 184567556) & 0x2000000) == 0; /*0xffc324f9*/
}

// Function: ProcCommonFunc24FA @ 0xffc324fa (0x31 bytes)
// Index: 325/2560

char __cdecl ProcCommonFunc24FA(int a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4)
{
  return *(_BYTE *)(1379 * a4 + 48704 * a2 + a1 + 7688 * a3 + 260367); /*0xffc32522*/
}

// Function: ProcCommonFunc252B @ 0xffc3252b (0x10d bytes)
// Index: 326/2560

int __cdecl ProcCommonFunc252B(_DWORD *buf, int a2)
{
  int v2; // edi
  int v3; // esi
  int v4; // eax
  int v6; // [esp-38h] [ebp-48h]

  v2 = 7 * (unsigned __int8)a2; /*0xffc32543*/
  buf[v2 + 63811] = CpuIoRead((int)buf, a2, 0, 67321988); /*0xffc32556*/
  v3 = 7 * ((unsigned __int8)a2 + 9116); /*0xffc32564*/
  buf[v3] = CpuIoRead((int)buf, a2, 0, 67321992); /*0xffc32577*/
  buf[v2 + 63813] = CpuIoRead((int)buf, a2, 0, 67321996); /*0xffc3258b*/
  buf[v2 + 63814] = CpuIoRead((int)buf, a2, 0, 67322000); /*0xffc3259b*/
  buf[v2 + 63815] = CpuIoRead((int)buf, a2, 0, 67322004); /*0xffc325be*/
  buf[v2 + 63816] = CpuIoRead((int)buf, a2, 0, 67322008); /*0xffc325d6*/
  v4 = CpuIoRead((int)buf, a2, 0, 67322012); /*0xffc325de*/
  v6 = buf[v2 + 63816]; /*0xffc325e4*/
  buf[v2 + 63817] = v4; /*0xffc325eb*/
  return DebugPrint( /*0xffc32633*/
           (int)buf,
           2,
           a2,
           255,
           255,
           255,
           255,
           255,
           "CAPID being set for Socket %d\n"
           "   CAPID0 = %d\n"
           "   CAPID1 = %d\n"
           "   CAPID2 = %d\n"
           "   CAPID3 = %d\n"
           "   CAPID4 = %d\n"
           "   CAPID5 = %d\n"
           "   CAPID6 = %d\n",
           (unsigned __int8)a2,
           buf[v2 + 63811],
           buf[v3],
           buf[v2 + 63813],
           buf[v2 + 63814],
           buf[v2 + 63815],
           v6,
           v4);
}

// Function: ProcCommonFunc2638 @ 0xffc32638 (0x39 bytes)
// Index: 327/2560

int __cdecl ProcCommonFunc2638(
        unsigned __int8 *__return_address,
        unsigned __int8 n4,
        unsigned __int8 n6,
        char i,
        char n255)
{
  unsigned int v5; // eax
  char v6; // al

  v5 = MailBoxFunc4CB2((int)__return_address, i, 0x80042A8u); /*0xffc32646*/
  v6 = MiscConfigCheck(__return_address, n4, n6, v5); /*0xffc32655*/
  if ( n255 == -1 ) /*0xffc32663*/
    return v6 & 0xF; /*0xffc32665*/
  else
    return (v6 & 1) << n255; /*0xffc3266d*/
}

// Function: ProcCommonFunc2671 @ 0xffc32671 (0x5 bytes)
// Index: 328/2560

char __cdecl ProcCommonFunc2671(int __return_address, int a2, char a3)
{
  return a3; /*0xffc32675*/
}

// Function: ProcCommonFunc2676 @ 0xffc32676 (0x1d7 bytes)
// Index: 329/2560

char __cdecl ProcCommonFunc2676(unsigned __int8 *n6, int n4, int n64, char a4)
{
  _BYTE *SocketInfo_3; // eax
  int SocketInfo; // edx
  int v6; // eax
  unsigned __int8 n6_1; // bh
  _BYTE *SocketInfo_2; // edi
  unsigned __int8 n2_1; // bl
  unsigned __int8 n4_1; // bh
  _BYTE *buf_1; // edi
  unsigned __int8 n6_2; // bl
  _BYTE *buf_2; // eax
  char n2a_1; // bh
  int v16; // [esp+4h] [ebp-3Ch]
  unsigned __int8 n6_3; // [esp+4h] [ebp-3Ch]
  unsigned __int8 *v18; // [esp+8h] [ebp-38h]
  unsigned __int8 v19; // [esp+Ch] [ebp-34h]
  int v20; // [esp+10h] [ebp-30h]
  _BYTE *SocketInfo_1; // [esp+14h] [ebp-2Ch]
  unsigned __int8 v22; // [esp+18h] [ebp-28h]
  _BYTE *buf_3; // [esp+18h] [ebp-28h]
  char n2[4]; // [esp+1Ch] [ebp-24h]
  char n2a; // [esp+1Ch] [ebp-24h]
  int v26; // [esp+20h] [ebp-20h] BYREF
  int n255; // [esp+24h] [ebp-1Ch] BYREF
  _BYTE buf[24]; // [esp+28h] [ebp-18h] BYREF

  v26 = 0; /*0xffc32679*/
  n255 = 255; /*0xffc32688*/
  LOBYTE(SocketInfo_3) = KtiFuncE78((int)n6, 0, 3u); /*0xffc32690*/
  if ( (_BYTE)SocketInfo_3 ) /*0xffc3269a*/
  {
    SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc326b0*/
    v6 = 0; /*0xffc326b8*/
    SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffc326ba*/
    memset(buf, 0, sizeof(buf)); /*0xffc326bf*/
    n6_1 = 0; /*0xffc326c1*/
    v20 = 0; /*0xffc326c3*/
    SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc326c7*/
    n6_3 = 0; /*0xffc326c9*/
    *(_DWORD *)n2 = SocketInfo; /*0xffc326cd*/
    do /*0xffc3276d*/
    {
      if ( *SocketInfo_2 ) /*0xffc326d1*/
      {
        n2_1 = 0; /*0xffc326da*/
        v19 = 0; /*0xffc326dc*/
        do /*0xffc32745*/
        {
          n4_1 = 0; /*0xffc326ef*/
          v22 = 0; /*0xffc326f7*/
          v18 = (unsigned __int8 *)(KtiFunc91AF((int)n6, n4, n6_3, v19) + 4); /*0xffc326fb*/
          do /*0xffc3273a*/
          {
            if ( !KtiFunc89E9((int)n6, n4, n6_3, v19, v22, 0) ) /*0xffc3270f*/
              buf[v20 + *v18] = 1; /*0xffc32724*/
            v18 += 242; /*0xffc32729*/
            v22 = ++n4_1; /*0xffc32733*/
          }
          while ( n4_1 < 4u ); /*0xffc3273a*/
          v19 = ++n2_1; /*0xffc3273e*/
        }
        while ( n2_1 < 2u ); /*0xffc32745*/
        n6_1 = n6_3; /*0xffc32747*/
        SocketInfo_2 = *(_BYTE **)n2; /*0xffc3274b*/
        v6 = v20; /*0xffc3274f*/
      }
      ++n6_1; /*0xffc32753*/
      SocketInfo_2 += 7688; /*0xffc32755*/
      v6 += 4; /*0xffc3275b*/
      n6_3 = n6_1; /*0xffc3275e*/
      *(_DWORD *)n2 = SocketInfo_2; /*0xffc32762*/
      v20 = v6; /*0xffc32766*/
    }
    while ( n6_1 < 6u ); /*0xffc3276d*/
    SocketInfo_3 = SocketInfo_1; /*0xffc32773*/
    buf_1 = buf; /*0xffc32777*/
    n6_2 = 0; /*0xffc3277b*/
    LOBYTE(v16) = 0; /*0xffc3277d*/
    do /*0xffc32823*/
    {
      if ( *SocketInfo_3 ) /*0xffc32781*/
      {
        MailBoxFunc6596(n6, n4, v16, 40, 28, (__int16 *)&n64, (unsigned __int16 *)&n255, (unsigned __int16 *)&v26); /*0xffc327a3*/
        MailBoxFunc6CF5(n6, n4, v16, 44, 28, (__int16 *)&n64, (unsigned __int16 *)&n255, (unsigned __int16 *)&v26); /*0xffc327c4*/
        buf_2 = buf_1; /*0xffc327cc*/
        n2a_1 = 0; /*0xffc327ce*/
        buf_3 = buf_1; /*0xffc327d0*/
        n2a = 0; /*0xffc327d4*/
        do /*0xffc32808*/
        {
          if ( *buf_2 ) /*0xffc327d8*/
          {
            MailBoxFunc5B6A(n6, n4, v16, n2a, 28, (__int16 *)&n64); /*0xffc327ee*/
            buf_2 = buf_3; /*0xffc327f3*/
          }
          ++n2a_1; /*0xffc327fa*/
          ++buf_2; /*0xffc327fc*/
          n2a = n2a_1; /*0xffc327fd*/
          buf_3 = buf_2; /*0xffc32801*/
        }
        while ( (unsigned __int8)n2a_1 < 4u ); /*0xffc32808*/
        SocketInfo_3 = SocketInfo_1; /*0xffc3280a*/
      }
      ++n6_2; /*0xffc3280e*/
      SocketInfo_3 += 7688; /*0xffc32810*/
      buf_1 += 4; /*0xffc32815*/
      LOBYTE(v16) = n6_2; /*0xffc32818*/
      SocketInfo_1 = SocketInfo_3; /*0xffc3281c*/
    }
    while ( n6_2 < 6u ); /*0xffc32823*/
    if ( a4 ) /*0xffc3282e*/
    {
      ProcCommonFunc51EE(n6, n4, 1); /*0xffc32834*/
      LOBYTE(SocketInfo_3) = KtiFuncD59F(n6, n4, 63); /*0xffc3283d*/
    }
  }
  return (char)SocketInfo_3; /*0xffc32848*/
}

// Function: ProcCommonFunc284D @ 0xffc3284d (0xde bytes)
// Index: 330/2560

int __cdecl ProcCommonFunc284D(int __return_address, int n4)
{
  int result; // eax
  unsigned __int8 n6_1; // bl
  int v4; // esi
  unsigned __int8 n4_1; // cl
  unsigned __int8 n2; // bh
  int v7; // edi
  int v8; // esi
  int v9; // [esp+10h] [ebp-10h]
  int n6; // [esp+14h] [ebp-Ch]
  int v11; // [esp+18h] [ebp-8h]
  int v12; // [esp+1Ch] [ebp-4h]

  result = GetSocketInfo(__return_address, n4); /*0xffc3285d*/
  n6_1 = 0; /*0xffc32862*/
  v12 = result; /*0xffc32864*/
  v4 = 0; /*0xffc32869*/
  LOBYTE(n6) = 0; /*0xffc3286b*/
  v11 = 0; /*0xffc32870*/
  do /*0xffc3291d*/
  {
    if ( *(_BYTE *)(v4 + result) ) /*0xffc32874*/
    {
      n4_1 = n4; /*0xffc3287e*/
      n2 = 0; /*0xffc32882*/
      LOBYTE(v9) = 0; /*0xffc3288d*/
      v7 = 0; /*0xffc32893*/
      v8 = v4 + 48704 * (unsigned __int8)n4 + __return_address; /*0xffc32895*/
      do /*0xffc32900*/
      {
        if ( *(_BYTE *)(v7 + v8 + 259118) ) /*0xffc32898*/
        {
          if ( ProcCommonFunc24FA(__return_address, n4_1, n6, v9) ) /*0xffc328ac*/
          {
            if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffc328c0*/
            {
              *(_BYTE *)(v7 + v8 + 259196) |= 2u; /*0xffc328c2*/
              KtiFuncFC62(__return_address, n4, n6, v9, 0, *(_BYTE *)(v7 + v8 + 259196), 0, 0x10u); /*0xffc328e5*/
            }
          }
          n4_1 = n4; /*0xffc328ed*/
        }
        ++n2; /*0xffc328f1*/
        v7 += 1379; /*0xffc328f3*/
        LOBYTE(v9) = n2; /*0xffc328f9*/
      }
      while ( n2 < 2u ); /*0xffc32900*/
      v4 = v11; /*0xffc32902*/
      result = v12; /*0xffc32906*/
    }
    ++n6_1; /*0xffc3290a*/
    v4 += 7688; /*0xffc3290c*/
    LOBYTE(n6) = n6_1; /*0xffc32912*/
    v11 = v4; /*0xffc32916*/
  }
  while ( n6_1 < 6u ); /*0xffc3291d*/
  return result; /*0xffc32923*/
}

// Function: ProcCommonFunc292B @ 0xffc3292b (0x63 bytes)
// Index: 331/2560

_BYTE *__cdecl ProcCommonFunc292B(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, char n2, _BYTE *a5)
{
  int CpuCount; // edi
  int v6; // esi

  CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc32944*/
  v6 = MiscConfigCheck(__return_address, n4, n6, 184567104); /*0xffc32959*/
  if ( !*(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 107) ) /*0xffc32964*/
    v6 |= 0x80000000; /*0xffc3296b*/
  MiscIoCheck(__return_address, n4, n6, 0xB004540u, v6); /*0xffc3297c*/
  *(_DWORD *)a5 = v6; /*0xffc32988*/
  return a5; /*0xffc32987*/
}

// Function: ProcCommonFunc298E @ 0xffc3298e (0x53 bytes)
// Index: 332/2560

int __cdecl ProcCommonFunc298E(unsigned __int8 *__return_address, unsigned __int8 n6, int a3, _DWORD *a4)
{
  int v4; // eax
  int v5; // eax

  v4 = MiscConfigCheck(__return_address, n6, a3, 117525076); /*0xffc329a2*/
  if ( (*a4 & 0xC0000000) == 0x80000000 ) /*0xffc329bc*/
    v5 = v4 | 0x80000000; /*0xffc329be*/
  else
    v5 = v4 & 0x7FFFFFFF; /*0xffc329c2*/
  a4[1] = v5; /*0xffc329cc*/
  return MiscIoCheck(__return_address, n6, a3, 0x7014A54u, v5); /*0xffc329dd*/
}

// Function: ProcMemInitSetup @ 0xffc329e1 (0x6a bytes)
// Index: 333/2560

int __cdecl ProcMemInitSetup(int __return_address)
{
  *(_DWORD *)(__return_address + 244277) = 1056965140; /*0xffc329e8*/
  *(_WORD *)(__return_address + 244281) = 63; /*0xffc329f2*/
  *(_WORD *)(__return_address + 244283) = 28; /*0xffc329fb*/
  *(_DWORD *)(__return_address + 244285) = 827855378; /*0xffc32a02*/
  *(_DWORD *)(__return_address + 244289) = 318914708; /*0xffc32a0c*/
  *(_DWORD *)(__return_address + 244293) = 318914712; /*0xffc32a16*/
  *(_DWORD *)(__return_address + 244297) = 318914716; /*0xffc32a20*/
  *(_DWORD *)(__return_address + 244301) = 318914804; /*0xffc32a2a*/
  *(_DWORD *)(__return_address + 244305) = 318914720; /*0xffc32a34*/
  *(_DWORD *)(__return_address + 244309) = 0x1000000; /*0xffc32a3e*/
  return 0; /*0xffc32a4a*/
}

// Function: ProcCommonFunc2A4B @ 0xffc32a4b (0x9b bytes)
// Index: 334/2560

int __cdecl ProcCommonFunc2A4B(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, char buf)
{
  int v4; // eax
  int v5; // eax
  int v6; // eax
  int v7; // eax

  v4 = MiscConfigCheck(__return_address, n4, n6, 184566948); /*0xffc32a64*/
  MiscIoCheck(__return_address, n4, n6, 0xB0044A4u, v4 & 0x7FFFFFFF); /*0xffc32a73*/
  v5 = MiscConfigCheck(__return_address, n4, n6, 184567556); /*0xffc32a81*/
  MiscIoCheck(__return_address, n4, n6, 0xB004704u, v5 & 0xFDFFFFFF); /*0xffc32a90*/
  v6 = MiscConfigCheck(__return_address, n4, n6, 184566328); /*0xffc32aa1*/
  MiscIoCheck(__return_address, n4, n6, 0xB004238u, ((buf & 1) << 28) | v6 & 0xEFFFFFFF); /*0xffc32abc*/
  v7 = MiscConfigCheck(__return_address, n4, n6, 184567552); /*0xffc32aca*/
  return MiscIoCheck(__return_address, n4, n6, 0xB004700u, v7 & 0xFFFFFDFF); /*0xffc32ae1*/
}

// Function: ProcCommonFunc2AE6 @ 0xffc32ae6 (0x9f bytes)
// Index: 335/2560

int __cdecl ProcCommonFunc2AE6(unsigned __int8 *__return_address, unsigned __int8 n4, int n6)
{
  int v3; // eax
  int v4; // eax
  unsigned int v5; // esi
  int v6; // eax

  v3 = MiscConfigCheck(__return_address, n4, n6, 184566948); /*0xffc32aff*/
  MiscIoCheck(__return_address, n4, n6, 0xB0044A4u, v3 | 0x80000000); /*0xffc32b0e*/
  v4 = MiscConfigCheck(__return_address, n4, n6, 184567556); /*0xffc32b1c*/
  MiscIoCheck(__return_address, n4, n6, 0xB004704u, v4 | 0x2000000); /*0xffc32b2b*/
  v5 = MiscConfigCheck(__return_address, n4, n6, 184566328); /*0xffc32b40*/
  MiscIoCheck(__return_address, n4, n6, 0xB004238u, v5 & 0xEFFFFFFF); /*0xffc32b50*/
  v6 = MiscConfigCheck(__return_address, n4, n6, 184567552); /*0xffc32b5d*/
  MiscIoCheck(__return_address, n4, n6, 0xB004700u, v6 | 0x200); /*0xffc32b70*/
  return (v5 >> 28) & 1; /*0xffc32b80*/
}

// Function: ProcCommonFunc2B85 @ 0xffc32b85 (0x38 bytes)
// Index: 336/2560

int __cdecl ProcCommonFunc2B85(unsigned __int8 *__return_address, int n4, int n6, int n2, __int16 n85)
{
  return ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84033568, (unsigned __int8)n85 | ((HIBYTE(n85) | 0xF00) << 8)); /*0xffc32bbb*/
}

// Function: ProcCommonFunc2BBD @ 0xffc32bbd (0x38 bytes)
// Index: 337/2560

int __cdecl ProcCommonFunc2BBD(unsigned __int8 *__return_address, int n4, int n6, int a4, __int16 a5)
{
  return ProcCommonFuncF4C7(__return_address, n4, n6, a4, 84164636, (unsigned __int8)a5 | ((HIBYTE(a5) | 0xF00) << 8)); /*0xffc32bf3*/
}

// Function: ProcCommonFunc2BF5 @ 0xffc32bf5 (0x17a bytes)
// Index: 338/2560

int __cdecl ProcCommonFunc2BF5(unsigned __int8 *__return_address, int n4, int n6, int n2, char n4a)
{
  int CpuCount; // esi
  int n2_1; // eax
  int v7; // edx
  unsigned int n6_1; // esi
  int n2_2; // esi
  int v10; // eax
  unsigned int v11; // esi
  int n6_2; // [esp-30h] [ebp-54h]
  int v13; // [esp+10h] [ebp-14h]
  int SocketInfo; // [esp+18h] [ebp-Ch]
  int v15; // [esp+1Ch] [ebp-8h]
  int v16; // [esp+20h] [ebp-4h]

  CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc32c10*/
  n2_1 = n2; /*0xffc32c15*/
  v13 = 1379 * (unsigned __int8)n2; /*0xffc32c26*/
  if ( *(_BYTE *)(v13 + CpuCount + 107) ) /*0xffc32c2a*/
  {
    DebugPrint((int)__return_address, 2, n4, n6, n2, 255, 255, 255, "\nCalling RPQ Draining Sequence\n"); /*0xffc32c48*/
    SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc32c60*/
    v15 = 7688 * (unsigned __int8)n6; /*0xffc32c64*/
    v7 = *(_DWORD *)(v15 + SocketInfo + 7497); /*0xffc32c68*/
    *(_DWORD *)(v15 + SocketInfo + 7497) = 1; /*0xffc32c6f*/
    v16 = v7; /*0xffc32c7e*/
    if ( *(_BYTE *)(v13 + CpuCount + 23) == 121 ) /*0xffc32c87*/
    {
      n6_1 = ProcCommonFuncE35E((int)__return_address, n4, n6, n2, 0x5044704u) | 0x80000000; /*0xffc32c9c*/
      ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84166404, n6_1); /*0xffc32caf*/
      n6_2 = n6_1 & 0x7FFFFFFF; /*0xffc32cba*/
      n2_2 = n2; /*0xffc32cbb*/
      ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84166404, n6_2); /*0xffc32cc8*/
    }
    else
    {
      n2_2 = n2; /*0xffc32cd2*/
      v10 = ProcCommonFuncE35E((int)__return_address, n4, n6, n2, 0x504400Cu); /*0xffc32cdf*/
      ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84164620, v10 | 0x40000000); /*0xffc32cf3*/
    }
    DdrTrainFunc765(__return_address, n4, n6, n2_2, n4a); /*0xffc32d03*/
    v11 = (2048 << n2) & 0x1800 | MiscConfigCheck(__return_address, n4, n6, 117525072) & 0xFFFFE7FF; /*0xffc32d2d*/
    MiscIoCheck(__return_address, n4, n6, 0x7014A50u, v11); /*0xffc32d38*/
    MiscIoCheck(__return_address, n4, n6, 0x7014A50u, v11 & 0xFFFFE7FF); /*0xffc32d4c*/
    *(_DWORD *)(v15 + SocketInfo + 7497) = v16; /*0xffc32d60*/
    return SocketInfo; /*0xffc32d51*/
  }
  return n2_1; /*0xffc32d67*/
}

// Function: ProcCommonFunc2D6F @ 0xffc32d6f (0x26 bytes)
// Index: 339/2560

_WORD *__cdecl ProcCommonFunc2D6F(_BYTE *__return_address, int n6, char n6a, _WORD *buf, _BYTE *a5)
{
  buf[(unsigned __int8)n6a] = ((*((_DWORD *)a5 + 1) >> 8) & 7) - ((*((_DWORD *)a5 + 2) >> 20) & 3); /*0xffc32d90*/
  return buf; /*0xffc32d94*/
}

// Function: ReadDqDqsCleanup @ 0xffc32d95 (0x3f9 bytes)
// Index: 340/2560

int __cdecl ReadDqDqsCleanup(unsigned __int8 *__return_address, int n4)
{
  int n4_1; // ebx
  _BYTE *SocketInfo; // ecx
  unsigned __int8 n6a_1; // al
  int v5; // edx
  unsigned int v6; // ebp
  unsigned __int8 v7; // cl
  unsigned __int8 n2_1; // al
  int n19; // edi
  bool v10; // zf
  char v11; // al
  int v12; // ebp
  unsigned int n0x2F; // eax
  unsigned __int8 n2_2; // al
  int v15; // ebp
  int CpuCount_1; // eax
  int v17; // edi
  char v18; // al
  int n4_2; // [esp-4Ch] [ebp-84h]
  unsigned __int8 v21; // [esp+Bh] [ebp-2Dh]
  unsigned __int16 p_n60; // [esp+Ch] [ebp-2Ch] BYREF
  unsigned __int16 n60; // [esp+10h] [ebp-28h] BYREF
  int v24; // [esp+14h] [ebp-24h]
  int n2; // [esp+18h] [ebp-20h]
  int n6a; // [esp+1Ch] [ebp-1Ch]
  unsigned __int16 p_n60_1[2]; // [esp+20h] [ebp-18h] BYREF
  int n0x12; // [esp+24h] [ebp-14h]
  unsigned __int16 p_n60_2[2]; // [esp+28h] [ebp-10h] BYREF
  int v30; // [esp+2Ch] [ebp-Ch]
  _BYTE *SocketInfo_1; // [esp+30h] [ebp-8h]
  int CpuCount; // [esp+34h] [ebp-4h]

  DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Starting_ReadDqDqsCleanup\n"); /*0xffc32db1*/
  n4_1 = n4; /*0xffc32db6*/
  SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc32dc4*/
  n6a_1 = 0; /*0xffc32dc6*/
  SocketInfo_1 = SocketInfo; /*0xffc32dc8*/
  LOBYTE(n6a) = 0; /*0xffc32dcc*/
  do /*0xffc3310d*/
  {
    if ( *SocketInfo ) /*0xffc32dd2*/
    {
      v5 = 50813 * (unsigned __int8)n4_1; /*0xffc32dde*/
      LOBYTE(n0x12) = 0; /*0xffc32de4*/
      v30 = v5; /*0xffc32de9*/
      do /*0xffc330ed*/
      {
        v6 = 0; /*0xffc32ded*/
        v7 = 0; /*0xffc32def*/
        *(_DWORD *)p_n60_1 = 0; /*0xffc32df1*/
        n2_1 = 0; /*0xffc32df5*/
        v21 = 0; /*0xffc32df9*/
        LOBYTE(n2) = 0; /*0xffc32dfd*/
        n19 = 19; /*0xffc32e01*/
        do /*0xffc32eea*/
        {
          v10 = __return_address[v5 + 10194] == 0; /*0xffc32e02*/
          LOBYTE(v24) = 0; /*0xffc32e0a*/
          if ( !v10 ) /*0xffc32e0f*/
          {
            do /*0xffc32ed2*/
            {
              CpuCount = GetCpuCount((int)__return_address, n4_1, n6a); /*0xffc32e26*/
              v10 = !KtiFunc89E9((int)__return_address, n4_1, n6a, n2, v24, 0); /*0xffc32e3c*/
              v11 = v24; /*0xffc32e3e*/
              if ( v10 && (unsigned __int8)v24 < *(_BYTE *)(n19 + CpuCount) ) /*0xffc32e4b*/
              {
                MrcMarginGroupTrain(__return_address, n4_1, (_BYTE *)n6a, n2, v24, n0x12, 0, 0, 19, 2, &p_n60); /*0xffc32e6c*/
                v12 = (__int16)p_n60 + v6; /*0xffc32e76*/
                MrcMarginGroupTrain( /*0xffc32e9d*/
                  __return_address,
                  n4_1,
                  (_BYTE *)n6a,
                  n2,
                  v24,
                  (unsigned __int8)(n0x12 + 9),
                  0,
                  0,
                  19,
                  2,
                  &p_n60);
                v6 = (__int16)p_n60 + v12; /*0xffc32eae*/
                v11 = v24; /*0xffc32eb0*/
                v7 = v21 + 2; /*0xffc32eb4*/
                v21 += 2; /*0xffc32eb7*/
              }
              else
              {
                v7 = v21; /*0xffc32ebd*/
              }
              v5 = v30; /*0xffc32ec1*/
              LOBYTE(v24) = v11 + 1; /*0xffc32ec7*/
            }
            while ( (unsigned __int8)(v11 + 1) < __return_address[v30 + 10194] ); /*0xffc32ed2*/
            n2_1 = n2; /*0xffc32ed8*/
          }
          ++n2_1; /*0xffc32edc*/
          n19 += 1379; /*0xffc32ede*/
          LOBYTE(n2) = n2_1; /*0xffc32ee4*/
        }
        while ( n2_1 < 2u ); /*0xffc32eea*/
        n0x2F = v6 / v7 - 4; /*0xffc32ef9*/
        if ( n0x2F <= 0x47 ) /*0xffc32eff*/
        {
          if ( n0x2F <= 0x3F ) /*0xffc32f0b*/
          {
            if ( n0x2F <= 0x37 ) /*0xffc32f1a*/
            {
              if ( n0x2F <= 0x2F ) /*0xffc32f29*/
                *(_DWORD *)p_n60_1 = (0x500000027LL - (unsigned __int64)n0x2F) >> 32; /*0xffc32f3f*/
              else
                *(_DWORD *)p_n60_1 = 3; /*0xffc32f2b*/
            }
            else
            {
              *(_DWORD *)p_n60_1 = 2; /*0xffc32f1c*/
            }
          }
          else
          {
            *(_DWORD *)p_n60_1 = 1; /*0xffc32f0d*/
          }
        }
        else
        {
          *(_DWORD *)p_n60_1 = 0; /*0xffc32f01*/
        }
        v5 = v30; /*0xffc32f43*/
        n2_2 = 0; /*0xffc32f47*/
        LOBYTE(n2) = 0; /*0xffc32f49*/
        v15 = 0; /*0xffc32f4d*/
        do /*0xffc330da*/
        {
          v10 = __return_address[v5 + 10194] == 0; /*0xffc32f4f*/
          LOBYTE(v24) = 0; /*0xffc32f57*/
          if ( !v10 ) /*0xffc32f5c*/
          {
            do /*0xffc330c2*/
            {
              CpuCount_1 = GetCpuCount((int)__return_address, n4_1, n6a); /*0xffc32f68*/
              v17 = v24; /*0xffc32f6d*/
              CpuCount = CpuCount_1; /*0xffc32f78*/
              v10 = !KtiFunc89E9((int)__return_address, n4_1, n6a, n2, v24, 0); /*0xffc32f8a*/
              v18 = v24; /*0xffc32f8c*/
              if ( v10 && (unsigned __int8)v24 < *(_BYTE *)(CpuCount + v15 + 19) ) /*0xffc32f9e*/
              {
                MrcMarginGroupTrain(__return_address, n4_1, (_BYTE *)n6a, n2, v17, n0x12, 0, 0, 2, 2, &n60); /*0xffc32fc0*/
                *(_DWORD *)p_n60_2 = (unsigned __int16)(8 * (p_n60_1[0] - n60)); /*0xffc32fd6*/
                MrcMarginGroupTrain(__return_address, n4_1, (_BYTE *)n6a, n2, v17, n0x12, 0, 0, 2, 16, p_n60_1); /*0xffc32ff6*/
                MrcMarginGroupTrain(__return_address, n4_1, (_BYTE *)n6a, n2, v17, n0x12, 0, 0, 1, 20, p_n60_2); /*0xffc3301a*/
                LOBYTE(n4_1) = n0x12 + 9; /*0xffc33030*/
                MrcMarginGroupTrain(__return_address, n4, (_BYTE *)n6a, n2, v17, n4_1, 0, 0, 2, 2, &n60); /*0xffc33046*/
                *(_DWORD *)p_n60_2 = (unsigned __int16)(8 * (p_n60_1[0] - n60)); /*0xffc33062*/
                MrcMarginGroupTrain(__return_address, n4, (_BYTE *)n6a, n2, v24, n4_1, 0, 0, 2, 16, p_n60_1); /*0xffc33082*/
                n4_2 = n4_1; /*0xffc33094*/
                n4_1 = n4; /*0xffc33099*/
                MrcMarginGroupTrain(__return_address, n4, (_BYTE *)n6a, n2, v24, n4_2, 0, 0, 1, 20, p_n60_2); /*0xffc330a5*/
                v18 = v24; /*0xffc330aa*/
              }
              v5 = v30; /*0xffc330b1*/
              LOBYTE(v24) = v18 + 1; /*0xffc330b7*/
            }
            while ( (unsigned __int8)(v18 + 1) < __return_address[v30 + 10194] ); /*0xffc330c2*/
            n2_2 = n2; /*0xffc330c8*/
          }
          ++n2_2; /*0xffc330cc*/
          v15 += 1379; /*0xffc330ce*/
          LOBYTE(n2) = n2_2; /*0xffc330d4*/
        }
        while ( n2_2 < 2u ); /*0xffc330da*/
        LOBYTE(n0x12) = n0x12 + 1; /*0xffc330e6*/
      }
      while ( (unsigned __int8)n0x12 < 9u ); /*0xffc330ed*/
      n6a_1 = n6a; /*0xffc330f3*/
      SocketInfo = SocketInfo_1; /*0xffc330f7*/
    }
    ++n6a_1; /*0xffc330fb*/
    SocketInfo += 7688; /*0xffc330fd*/
    LOBYTE(n6a) = n6a_1; /*0xffc33103*/
    SocketInfo_1 = SocketInfo; /*0xffc33107*/
  }
  while ( n6a_1 < 6u ); /*0xffc3310d*/
  if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffc33116*/
  {
    RmtFunc5B54(__return_address, n4_1, 0x13u); /*0xffc33127*/
    RmtFunc5B54(__return_address, n4_1, 2u); /*0xffc33130*/
    RmtFunc5B54(__return_address, n4_1, 3u); /*0xffc33139*/
    RmtFunc5B54(__return_address, n4_1, 4u); /*0xffc33142*/
    RmtFunc5B54(__return_address, n4_1, 0x12u); /*0xffc3314b*/
    DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc33163*/
  }
  return DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "Finished_ReadDqDqsCleanup\n"); /*0xffc33188*/
}

// Function: ProcCommonFunc318E @ 0xffc3318e (0x2c bytes)
// Index: 341/2560

int __cdecl ProcCommonFunc318E(unsigned __int8 *__return_address, unsigned __int8 n4, unsigned __int8 n6, char n0x12)
{
  unsigned int v4; // eax

  v4 = MailBoxFunc4CB2((int)__return_address, n0x12, 0x80042A8u); /*0xffc3319c*/
  return MiscConfigCheck(__return_address, n4, n6, v4) & 0x1FF; /*0xffc331b8*/
}

// Function: ProcCommonFunc31BA @ 0xffc331ba (0x48 bytes)
// Index: 342/2560

unsigned int __cdecl ProcCommonFunc31BA(
        int __return_address,
        int n4,
        unsigned __int8 n6,
        unsigned __int8 n0x12,
        __int16 a5,
        unsigned int n60)
{
  unsigned int n0x20; // eax
  int v7; // ecx

  n0x20 = a5 & 0x1FF; /*0xffc331c6*/
  if ( n0x20 >= 0x20 ) /*0xffc331d5*/
  {
    v7 = (unsigned __int8)(n60 >> 5) + 4 * (n0x12 + 18 * n6); /*0xffc331ea*/
    n0x20 = *(_DWORD *)(__return_address + 4 * v7 + 238538) | (1 << (n60 & 0x1F)); /*0xffc331f4*/
    *(_DWORD *)(__return_address + 4 * v7 + 238538) = n0x20; /*0xffc331f7*/
  }
  return n0x20; /*0xffc331fe*/
}

// Function: ProcCommonFunc3202 @ 0xffc33202 (0x46 bytes)
// Index: 343/2560

_BYTE *__cdecl ProcCommonFunc3202(unsigned __int8 *__return_address, int n4)
{
  _BYTE *result; // eax
  unsigned __int8 n6_1; // bl
  _BYTE *v4; // esi
  int n6; // [esp+8h] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc3320e*/
  n6_1 = 0; /*0xffc33214*/
  v4 = result; /*0xffc33216*/
  LOBYTE(n6) = 0; /*0xffc33219*/
  do /*0xffc33240*/
  {
    if ( *v4 ) /*0xffc3321c*/
      result = (_BYTE *)ProcCommonFunc3248(__return_address, n4, n6); /*0xffc3322a*/
    ++n6_1; /*0xffc33232*/
    v4 += 7688; /*0xffc33234*/
    LOBYTE(n6) = n6_1; /*0xffc3323a*/
  }
  while ( n6_1 < 6u ); /*0xffc33240*/
  return result; /*0xffc33242*/
}

// Function: ProcCommonFunc3248 @ 0xffc33248 (0x93 bytes)
// Index: 344/2560

int __cdecl ProcCommonFunc3248(unsigned __int8 *__return_address, int n4, int n6)
{
  unsigned __int8 n2_1; // bh
  unsigned __int8 *v4; // esi
  unsigned __int8 v5; // bl
  int n2; // [esp+8h] [ebp-8h]
  int i; // [esp+Ch] [ebp-4h]

  n2_1 = 0; /*0xffc33260*/
  LOBYTE(n2) = 0; /*0xffc33262*/
  v4 = (unsigned __int8 *)(GetCpuCount((int)__return_address, n4, n6) + 19); /*0xffc33265*/
  do /*0xffc332c2*/
  {
    if ( *(v4 - 19) ) /*0xffc33268*/
    {
      v5 = 0; /*0xffc3326e*/
      for ( LOBYTE(i) = 0; v5 < *v4; LOBYTE(i) = v5 ) /*0xffc33273*/
      {
        if ( !KtiFunc89E9((int)__return_address, n4, n6, n2, i, 0) ) /*0xffc33288*/
          ProcCommonFunc4228(__return_address, n4, n6, n2, i); /*0xffc332a3*/
        ++v5; /*0xffc332ab*/
      }
    }
    ++n2_1; /*0xffc332b4*/
    v4 += 1379; /*0xffc332b6*/
    LOBYTE(n2) = n2_1; /*0xffc332bc*/
  }
  while ( n2_1 < 2u ); /*0xffc332c2*/
  return ProcCommonFunc4387(__return_address, n4, n6); /*0xffc332d5*/
}

// Function: ProcCommonFunc32DB @ 0xffc332db (0x37e bytes)
// Index: 345/2560

int __cdecl ProcCommonFunc32DB(int __return_address, int n4, int n6, int a4)
{
  int n4_1; // esi
  int __return_address_1; // edi
  int v6; // edx
  bool v7; // cf
  int v8; // ecx
  unsigned __int8 v9; // dl
  char n3; // al
  int v11; // eax
  int v12; // esi
  int v13; // edi
  int v14; // eax
  unsigned __int64 v15; // kr00_8
  unsigned int v16; // esi
  int v17; // edx
  unsigned int v18; // ecx
  int result; // eax
  int v20; // edx
  unsigned __int8 v21; // [esp+12h] [ebp-B6h]
  char v22; // [esp+13h] [ebp-B5h] BYREF
  int v23; // [esp+14h] [ebp-B4h]
  int n2; // [esp+18h] [ebp-B0h]
  unsigned int v25; // [esp+1Ch] [ebp-ACh]
  unsigned int v26; // [esp+20h] [ebp-A8h]
  char v27[4]; // [esp+24h] [ebp-A4h]
  unsigned __int64 v28; // [esp+28h] [ebp-A0h]
  int v29; // [esp+30h] [ebp-98h]
  int v30; // [esp+34h] [ebp-94h]
  __int16 v31[2]; // [esp+38h] [ebp-90h]
  int v32; // [esp+3Ch] [ebp-8Ch]
  _QWORD *v33; // [esp+40h] [ebp-88h]
  int i; // [esp+44h] [ebp-84h]
  int v35; // [esp+48h] [ebp-80h] BYREF
  unsigned __int16 v36; // [esp+4Ch] [ebp-7Ch]
  _DWORD v37[30]; // [esp+4Eh] [ebp-7Ah]

  n4_1 = n4; /*0xffc332f7*/
  __return_address_1 = __return_address; /*0xffc332ff*/
  DebugPrint(__return_address, 3, n4, n6, a4, 255, 255, 255, "ReportDcpmLog: ReportDcpm logs\n");
  v26 = 0; /*0xffc33319*/
  v25 = 0; /*0xffc33320*/
  v28 = 0; /*0xffc3332a*/
  LOBYTE(n2) = 0; /*0xffc33332*/
  do /*0xffc335a4*/
  {
    v27[0] = 0; /*0xffc33336*/
    do /*0xffc33592*/
    {
      if ( !ProcCommonFuncCAF9(__return_address_1, n4_1, n6, a4, n2, v27[0], 1, 0, 0, &v35, &v22) ) /*0xffc33357*/
      {
        v6 = v36; /*0xffc33371*/
        v7 = v36 < HIWORD(v35); /*0xffc33376*/
        *(_DWORD *)v31 = (unsigned __int16)v35; /*0xffc3337b*/
        for ( i = HIWORD(v35); ; v7 = (unsigned __int16)(v8 + v23) < (unsigned __int16)i ) /*0xffc33382*/
        {
          v23 = v6; /*0xffc33386*/
          if ( !v7 || ProcCommonFuncCAF9(__return_address_1, n4_1, n6, a4, n2, v27[0], 0, v6, v31[0], &v35, &v22) ) /*0xffc333ad*/
            break; /*0xffc333ad*/
          ProcCommonFn_FFC3C65F(__return_address_1, n4_1, n6, a4, n2, 0, (unsigned __int16 *)&v35); /*0xffc333cc*/
          v8 = v35; /*0xffc333d1*/
          v9 = 0; /*0xffc333d5*/
          v21 = 0; /*0xffc333d9*/
          if ( (_BYTE)n2 ) /*0xffc333e4*/
          {
            if ( (_WORD)v35 ) /*0xffc334b1*/
            {
              v29 = (unsigned __int16)v23; /*0xffc334be*/
              do /*0xffc33569*/
              {
                v12 = v9; /*0xffc334c2*/
                v13 = 4 * v9; /*0xffc334cb*/
                KtiFunc151C(__return_address, 132, 3, n4, n6, a4, (char *)&v35 + v13 * 4 + 2); /*0xffc334e8*/
                v14 = v12 + v29; /*0xffc334f1*/
                n4_1 = n4; /*0xffc334f3*/
                DebugPrint( /*0xffc33514*/
                  __return_address,
                  3,
                  n4,
                  n6,
                  a4,
                  255,
                  255,
                  255,
                  "Creating EWL Type27 for thermal log = %d\n",
                  v14);
                if ( (v37[v13 + 1] & 0x70000) == 0x40000 /*0xffc33543*/
                  && v37[v13] >= v25
                  && (v37[v13] > v25 || *(int *)((char *)&v35 + v13 * 4 + 2) > v26) )
                {
                  v26 = *(int *)((char *)&v35 + v13 * 4 + 2); /*0xffc33549*/
                  v25 = v37[v13]; /*0xffc33551*/
                }
                v8 = v35; /*0xffc33559*/
                v9 = ++v21; /*0xffc3355d*/
              }
              while ( v21 < (unsigned __int16)v35 ); /*0xffc33569*/
              __return_address_1 = __return_address; /*0xffc3356f*/
            }
          }
          else if ( (_WORD)v35 ) /*0xffc333ed*/
          {
            v32 = (unsigned __int16)v23; /*0xffc333fa*/
            do /*0xffc334a3*/
            {
              v30 = v9; /*0xffc33405*/
              v29 = 32 * v9; /*0xffc3340c*/
              v33 = (_QWORD *)((char *)&v35 + v29 + 2); /*0xffc3341e*/
              KtiFunc1468(__return_address_1, 132, 3, n4_1, n6, a4, (char *)&v35 + v29 + 2); /*0xffc33422*/
              DebugPrint( /*0xffc33443*/
                __return_address_1,
                3,
                n4_1,
                n6,
                a4,
                255,
                255,
                255,
                "Creating EWL Type26 for media log = %d\n",
                v32 + v30);
              if ( *v33 > __PAIR64__(v25, v26) ) /*0xffc33463*/
              {
                n3 = *((_BYTE *)&v37[5] + v29 + 1); /*0xffc33469*/
                if ( n3 == 1 || n3 == 3 || n3 == 7 ) /*0xffc33477*/
                {
                  v11 = v37[4 * v30]; /*0xffc33483*/
                  LODWORD(v28) = *(int *)((char *)&v35 + 16 * v30 + 2); /*0xffc33487*/
                  HIDWORD(v28) = v11; /*0xffc3348b*/
                }
              }
              v8 = v35; /*0xffc33493*/
              v9 = ++v21; /*0xffc33497*/
            }
            while ( v21 < (unsigned __int16)v35 ); /*0xffc334a3*/
          }
          v6 = v8 + v23; /*0xffc3357a*/
        }
      }
      ++v27[0]; /*0xffc3358c*/
    }
    while ( v27[0] < 2u ); /*0xffc33592*/
    LOBYTE(n2) = n2 + 1; /*0xffc3359e*/
  }
  while ( (unsigned __int8)n2 < 2u ); /*0xffc335a4*/
  v15 = v28; /*0xffc335b0*/
  v16 = v25; /*0xffc335b6*/
  if ( v28 && v28 > __PAIR64__(v25, v26) ) /*0xffc335c6*/
  {
    v17 = 50813 * (unsigned __int8)n4 + __return_address_1 + 8077 * (unsigned __int8)n6; /*0xffc335f3*/
    v18 = v28; /*0xffc335f5*/
    *(_BYTE *)(2688 * (unsigned __int8)a4 + v17 + 15217) |= 4u; /*0xffc335f9*/
    v15 = __PAIR64__(HIDWORD(v28), v18); /*0xffc33601*/
  }
  result = v16 | v26; /*0xffc3360b*/
  if ( v16 | v26 && __PAIR64__(v16, v26) > v15 ) /*0xffc33617*/
  {
    result = 2688 * (unsigned __int8)a4; /*0xffc3363c*/
    v20 = 50813 * (unsigned __int8)n4 + __return_address_1 + 8077 * (unsigned __int8)n6; /*0xffc33644*/
    *(_BYTE *)(result + v20 + 15217) |= 2u; /*0xffc33646*/
  }
  return result; /*0xffc3364e*/
}

// Function: ProcCommonFunc3659 @ 0xffc33659 (0xc6 bytes)
// Index: 346/2560

char __cdecl ProcCommonFunc3659(int __return_address, int n4, int n6, int a4)
{
  int CpuCount; // eax
  int v5; // esi
  unsigned int v6; // ecx
  int v8; // [esp+10h] [ebp-8h] BYREF
  int v9; // [esp+14h] [ebp-4h] BYREF

  CpuCount = GetCpuCount(__return_address, n4, n6); /*0xffc3366e*/
  if ( *(_BYTE *)(1379 * (unsigned __int8)a4 + CpuCount + 107) ) /*0xffc33683*/
  {
    ProcCommonFuncE302(__return_address, n4, n6, a4, &v8, &v9); /*0xffc3369c*/
    v5 = 50813 * (unsigned __int8)n4 + __return_address + 8077 * (unsigned __int8)n6; /*0xffc336c0*/
    v6 = (unsigned int)v8 >> 30; /*0xffc336c6*/
    LOBYTE(CpuCount) = (((unsigned int)v8 >> 30) ^ *(_BYTE *)(2688 * (unsigned __int8)a4 + v5 + 15217)) & 1; /*0xffc336d2*/
    *(_BYTE *)(2688 * (unsigned __int8)a4 + v5 + 15217) ^= CpuCount; /*0xffc336d4*/
    if ( (v6 & 1) != 0 ) /*0xffc336de*/
    {
      KtiFunc2123(__return_address, 0x84u, 3u); /*0xffc336e9*/
      KtiFunc13F6(__return_address, 132, 3, n4, n6, a4, v8, v9); /*0xffc33704*/
      LOBYTE(CpuCount) = ProcCommonFunc32DB(__return_address, n4, n6, a4); /*0xffc33710*/
    }
  }
  return CpuCount; /*0xffc33718*/
}

// Function: ProcCommonFunc371F @ 0xffc3371f (0x30 bytes)
// Index: 347/2560

int __cdecl ProcCommonFunc371F(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, int n2, int a5, char a6)
{
  char v6; // al

  v6 = ProcCommonFuncD73A(__return_address, n4, n6, a6); /*0xffc3372e*/
  return MailBoxFunc4957(__return_address, n4, n6, a6, (unsigned __int8)(v6 - 1)); /*0xffc3374d*/
}

// Function: ProcCommonFunc374F @ 0xffc3374f (0x190 bytes)
// Index: 348/2560

int __cdecl ProcCommonFunc374F(int __return_address, int n2)
{
  int v2; // edx
  int __return_address_1; // ebp
  unsigned __int8 n6_1; // bh
  int n2_1; // eax
  int v6; // edi
  unsigned __int8 *v7; // esi
  unsigned __int8 v8; // bl
  int v9; // edi
  char n2_3; // bh
  int v11; // ebp
  int v12; // ecx
  int v13; // edx
  char v14; // [esp+13h] [ebp-A5h] BYREF
  char n2a[4]; // [esp+14h] [ebp-A4h]
  int n6; // [esp+18h] [ebp-A0h]
  char v17[4]; // [esp+1Ch] [ebp-9Ch]
  int v18; // [esp+20h] [ebp-98h]
  int v19; // [esp+24h] [ebp-94h]
  unsigned __int8 *v20; // [esp+28h] [ebp-90h]
  int v21; // [esp+2Ch] [ebp-8Ch]
  int n2_2; // [esp+30h] [ebp-88h]
  int v23; // [esp+34h] [ebp-84h]
  int v24[32]; // [esp+38h] [ebp-80h] BYREF

  v2 = 0; /*0xffc3375c*/
  __return_address_1 = __return_address; /*0xffc33760*/
  n6_1 = 0; /*0xffc33767*/
  n2_1 = (unsigned __int8)n2; /*0xffc3376a*/
  v6 = 48704 * (unsigned __int8)n2; /*0xffc3376e*/
  v14 = 0; /*0xffc3377a*/
  n2_2 = (unsigned __int8)n2; /*0xffc3377f*/
  LOBYTE(n6) = 0; /*0xffc33783*/
  v21 = 0; /*0xffc33787*/
  v7 = (unsigned __int8 *)(v6 + __return_address + 258725); /*0xffc3378b*/
  v19 = v6; /*0xffc3378d*/
  v20 = v7; /*0xffc33791*/
  do /*0xffc338ce*/
  {
    if ( *(v7 - 3) ) /*0xffc33795*/
    {
      v8 = 0; /*0xffc3379f*/
      LOBYTE(v18) = 0; /*0xffc337a1*/
      if ( *v7 ) /*0xffc337a5*/
      {
        do /*0xffc3389d*/
        {
          n2_1 = v6 + 1379 * v8; /*0xffc337b6*/
          if ( *(_BYTE *)(n2_1 + __return_address_1 + 259225) ) /*0xffc337b8*/
          {
            n2a[0] = 0; /*0xffc337db*/
            v9 = 0; /*0xffc337ec*/
            v23 = v2 + 50813 * n2_2 + 2688 * v8 + __return_address_1 + 9400; /*0xffc337ee*/
            do /*0xffc3387c*/
            {
              n2_3 = 0; /*0xffc337f2*/
              v11 = 0; /*0xffc337f4*/
              v17[0] = 0; /*0xffc337f6*/
              do /*0xffc3386b*/
              {
                n2_1 = ProcCommonFuncCAF9(__return_address, n2, n6, v18, n2a[0], v17[0], 1, 0, 0, v24, &v14); /*0xffc33824*/
                if ( !n2_1 ) /*0xffc3382e*/
                {
                  v12 = v9 + v11; /*0xffc33834*/
                  v13 = v23; /*0xffc33837*/
                  n2_1 = *(int *)((char *)v24 + 2) + 1; /*0xffc3383b*/
                  *(_WORD *)(v23 + 2 * (v9 + v11) + 5826) = HIWORD(v24[0]) + 1; /*0xffc3383c*/
                  if ( !(_WORD)n2_1 ) /*0xffc33847*/
                  {
                    HIWORD(n2_1) = 0; /*0xffc3384b*/
                    *(_WORD *)(v13 + 2 * v12 + 5826) = 1; /*0xffc3384c*/
                  }
                  BYTE1(n2_1) = BYTE1(v24[0]); /*0xffc33854*/
                  *(_WORD *)(v13 + 2 * v12 + 5834) = v24[0]; /*0xffc33859*/
                }
                ++n2_3; /*0xffc33861*/
                ++v11; /*0xffc33863*/
                v17[0] = n2_3; /*0xffc33864*/
              }
              while ( (unsigned __int8)n2_3 < 2u ); /*0xffc3386b*/
              v9 += 2; /*0xffc33871*/
              LOBYTE(n2_1) = n2a[0] + 1; /*0xffc33874*/
              n2a[0] = n2_1; /*0xffc33876*/
            }
            while ( (unsigned __int8)n2_1 < 2u ); /*0xffc3387c*/
            v7 = v20; /*0xffc33882*/
            v6 = v19; /*0xffc33886*/
            v2 = v21; /*0xffc3388a*/
            __return_address_1 = __return_address; /*0xffc3388e*/
          }
          LOBYTE(v18) = ++v8; /*0xffc33897*/
        }
        while ( v8 < *v7 ); /*0xffc3389d*/
        n6_1 = n6; /*0xffc338a3*/
      }
    }
    ++n6_1; /*0xffc338a7*/
    v6 += 7688; /*0xffc338a9*/
    v7 += 7688; /*0xffc338af*/
    LOBYTE(n6) = n6_1; /*0xffc338b5*/
    v2 += 8077; /*0xffc338b9*/
    v19 = v6; /*0xffc338bf*/
    v20 = v7; /*0xffc338c3*/
    v21 = v2; /*0xffc338c7*/
  }
  while ( n6_1 < 6u ); /*0xffc338ce*/
  return n2_1; /*0xffc338d4*/
}

// Function: ProcCommonFunc38DF @ 0xffc338df (0x64 bytes)
// Index: 349/2560

int __cdecl ProcCommonFunc38DF(unsigned __int8 *__return_address, unsigned __int8 a2, int n6, _BYTE *buf)
{
  int v4; // eax
  int v5; // esi
  bool v6; // al

  v4 = MiscConfigCheck(__return_address, a2, n6, 184566276); /*0xffc338f5*/
  v5 = v4; /*0xffc338fd*/
  if ( !*(_DWORD *)&buf[4 * (unsigned __int8)n6] ) /*0xffc33905*/
    *(_DWORD *)&buf[4 * (unsigned __int8)n6] = v4; /*0xffc3390b*/
  v6 = KtiFuncE78((int)__return_address, 0, 9u); /*0xffc33915*/
  return MiscIoCheck(__return_address, a2, n6, 0xB004204u, v5 & (8 * v6 - 12) | 4); /*0xffc3393e*/
}

// Function: ProcCommonFunc3943 @ 0xffc33943 (0x1ad bytes)
// Index: 350/2560

int __cdecl ProcCommonFunc3943(unsigned __int8 *__return_address, int n4, unsigned __int8 n12)
{
  int SocketInfo; // eax
  unsigned __int8 v4; // dl
  int v5; // ecx
  int n33; // edi
  int n33_1; // esi
  unsigned __int8 n6_1; // bl
  unsigned __int8 *v9; // eax
  int CpuCount; // edx
  unsigned __int8 v11; // bh
  int v12; // ecx
  int n35; // [esp-10h] [ebp-24h]
  int n6; // [esp+4h] [ebp-10h]
  int n2; // [esp+8h] [ebp-Ch]
  int SocketInfo_1; // [esp+Ch] [ebp-8h]
  unsigned __int8 *v18; // [esp+Ch] [ebp-8h]
  int CpuCount_1; // [esp+10h] [ebp-4h]

  SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc33950*/
  SocketInfo_1 = SocketInfo; /*0xffc33957*/
  v4 = 0; /*0xffc3395b*/
  while ( 1 ) /*0xffc33960*/
  {
    v5 = 7688 * v4; /*0xffc33960*/
    if ( *(_BYTE *)(v5 + SocketInfo) ) /*0xffc33966*/
    {
      if ( *(_BYTE *)(v5 + SocketInfo + 6716) ) /*0xffc3396c*/
        break; /*0xffc3396c*/
    }
    if ( ++v4 >= 6u ) /*0xffc3397b*/
      return 0; /*0xffc3397b*/
  }
  DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, "NVMDIMM training mode = %d\n", n12); /*0xffc339a1*/
  n33 = 33; /*0xffc339ab*/
  n33_1 = 33; /*0xffc339ac*/
  if ( n12 <= 0xCu ) /*0xffc339b1*/
  {
    if ( n12 != 12 ) /*0xffc339b3*/
    {
      if ( n12 ) /*0xffc339b8*/
      {
        switch ( n12 ) /*0xffc339bd*/
        {
          case 1u: /*0xffc339bd*/
            DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, " Training Mode Enabled\n"); /*0xffc339dc*/
            goto LABEL_27; /*0xffc339dc*/
          case 2u: /*0xffc339bd*/
            DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, " Training Step Disabled\n"); /*0xffc339d5*/
            goto LABEL_27; /*0xffc339d5*/
          case 5u: /*0xffc339bd*/
LABEL_12:
            n33_1 = 37; /*0xffc339c9*/
            n33 = 37; /*0xffc339cc*/
            goto LABEL_27; /*0xffc339ce*/
        }
        goto LABEL_22; /*0xffc339c7*/
      }
      n33 = 0; /*0xffc339de*/
      n33_1 = 0; /*0xffc339e0*/
      DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, " Exit Training Mode\n"); /*0xffc339f8*/
      goto LABEL_27; /*0xffc339f8*/
    }
    n35 = 35; /*0xffc33a02*/
LABEL_26:
    n33 = n35; /*0xffc33a32*/
    goto LABEL_27; /*0xffc33a32*/
  }
  switch ( n12 ) /*0xffc33a09*/
  {
    case 0x14u: /*0xffc33a09*/
      n35 = 49; /*0xffc33a30*/
      goto LABEL_26; /*0xffc33a30*/
    case 0x24u: /*0xffc33a09*/
      goto LABEL_12; /*0xffc33a0e*/
    case 0x26u: /*0xffc33a09*/
      n35 = 9; /*0xffc33a2b*/
      n33_1 = 1; /*0xffc33a2d*/
      goto LABEL_26; /*0xffc33a2e*/
  }
  if ( n12 != 39 ) /*0xffc33a19*/
  {
LABEL_22:
    DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, " Training Step Not Supported\n"); /*0xffc33a1b*/
    goto LABEL_27; /*0xffc33a20*/
  }
  n33 = 1; /*0xffc33a24*/
  n33_1 = 1; /*0xffc33a25*/
LABEL_27:
  n6_1 = 0; /*0xffc33a33*/
  v9 = (unsigned __int8 *)(SocketInfo_1 + 3); /*0xffc33a39*/
  LOBYTE(n6) = 0; /*0xffc33a3c*/
  v18 = (unsigned __int8 *)(SocketInfo_1 + 3); /*0xffc33a40*/
  do /*0xffc33ae0*/
  {
    if ( *(v9 - 3) ) /*0xffc33a44*/
    {
      CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc33a5c*/
      v11 = 0; /*0xffc33a5e*/
      v9 = v18; /*0xffc33a60*/
      CpuCount_1 = CpuCount; /*0xffc33a67*/
      for ( LOBYTE(n2) = 0; v11 < *v9; LOBYTE(n2) = v11 ) /*0xffc33a6f*/
      {
        v12 = 1379 * v11; /*0xffc33a76*/
        if ( *(_BYTE *)(v12 + CpuCount) && *(_BYTE *)(v12 + CpuCount + 107) ) /*0xffc33a82*/
        {
          ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84033584, n33); /*0xffc33a9c*/
          ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84164616, n33_1); /*0xffc33ab4*/
          v9 = v18; /*0xffc33ab9*/
          CpuCount = CpuCount_1; /*0xffc33ac0*/
        }
        ++v11; /*0xffc33ac4*/
      }
    }
    ++n6_1; /*0xffc33ace*/
    v9 += 7688; /*0xffc33ad0*/
    LOBYTE(n6) = n6_1; /*0xffc33ad5*/
    v18 = v9; /*0xffc33ad9*/
  }
  while ( n6_1 < 6u ); /*0xffc33ae0*/
  return 0; /*0xffc33aeb*/
}

// Function: ProcCommonFunc3AF0 @ 0xffc33af0 (0x19b bytes)
// Index: 351/2560

int __cdecl ProcCommonFunc3AF0(_BYTE *n6, int n4, char n2)
{
  int SocketInfo; // eax
  unsigned __int8 v4; // dl
  int n33; // esi
  int n33_1; // edi
  unsigned __int8 n6_1; // bl
  int CpuCount; // edx
  unsigned __int8 v9; // bh
  unsigned __int8 *v10; // eax
  int v11; // ecx
  int n49; // [esp-10h] [ebp-24h]
  int n2_1; // [esp+4h] [ebp-10h]
  int v15; // [esp+8h] [ebp-Ch]
  int SocketInfo_1; // [esp+Ch] [ebp-8h]
  unsigned __int8 *v17; // [esp+Ch] [ebp-8h]
  int CpuCount_1; // [esp+10h] [ebp-4h]

  SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc33afd*/
  SocketInfo_1 = SocketInfo; /*0xffc33b04*/
  v4 = 0; /*0xffc33b08*/
  while ( !*(_BYTE *)(7688 * v4 + SocketInfo + 6716) ) /*0xffc33b1b*/
  {
    if ( ++v4 >= 6u ) /*0xffc33b22*/
      return 0; /*0xffc33b22*/
  }
  DebugPrint((int)n6, 2, n4, 255, 255, 255, 255, 255, "NVMDIMM training mode = %d\n", (unsigned __int8)n2); /*0xffc33b48*/
  n33 = 33; /*0xffc33b52*/
  n33_1 = 33; /*0xffc33b53*/
  if ( (unsigned __int8)n2 > 0xCu ) /*0xffc33b58*/
  {
    switch ( n2 ) /*0xffc33bae*/
    {
      case 20: /*0xffc33bae*/
        n49 = 49; /*0xffc33bd5*/
        break;
      case 36: /*0xffc33bae*/
LABEL_11:
        n33 = 37; /*0xffc33b70*/
LABEL_23:
        n33_1 = n33; /*0xffc33bca*/
        goto LABEL_27; /*0xffc33bcc*/
      case 38: /*0xffc33bae*/
        n49 = 9; /*0xffc33bd0*/
        n33_1 = 1; /*0xffc33bd2*/
        break;
      case 39: /*0xffc33bae*/
        n33 = 1; /*0xffc33bc9*/
        goto LABEL_23; /*0xffc33bc9*/
      default:
        goto LABEL_21; /*0xffc33bbe*/
    }
    goto LABEL_26; /*0xffc33bd3*/
  }
  if ( n2 == 12 ) /*0xffc33b5a*/
  {
    n49 = 35; /*0xffc33ba7*/
LABEL_26:
    n33 = n49; /*0xffc33bd7*/
    goto LABEL_27; /*0xffc33bd7*/
  }
  if ( n2 ) /*0xffc33b5f*/
  {
    switch ( n2 ) /*0xffc33b64*/
    {
      case 1: /*0xffc33b64*/
        DebugPrint((int)n6, 2, n4, 255, 255, 255, 255, 255, " Training Mode Enabled\n"); /*0xffc33b81*/
        goto LABEL_27; /*0xffc33b81*/
      case 2: /*0xffc33b64*/
        DebugPrint((int)n6, 2, n4, 255, 255, 255, 255, 255, " Training Step Disabled\n"); /*0xffc33b7a*/
        goto LABEL_27; /*0xffc33b7a*/
      case 5: /*0xffc33b64*/
        goto LABEL_11; /*0xffc33b6e*/
    }
LABEL_21:
    DebugPrint((int)n6, 2, n4, 255, 255, 255, 255, 255, " Training Step Not Supported\n"); /*0xffc33bc0*/
    goto LABEL_27; /*0xffc33bc5*/
  }
  n33 = 0; /*0xffc33b83*/
  n33_1 = 0; /*0xffc33b85*/
  DebugPrint((int)n6, 2, n4, 255, 255, 255, 255, 255, " Exit Training Mode\n"); /*0xffc33b9d*/
LABEL_27:
  n6_1 = 0; /*0xffc33bd8*/
  LOBYTE(n2_1) = 0; /*0xffc33be1*/
  v17 = (unsigned __int8 *)(SocketInfo_1 + 3); /*0xffc33be5*/
  do /*0xffc33c7b*/
  {
    CpuCount = GetCpuCount((int)n6, n4, n2_1); /*0xffc33bf7*/
    v9 = 0; /*0xffc33bf9*/
    v10 = v17; /*0xffc33bfb*/
    CpuCount_1 = CpuCount; /*0xffc33c02*/
    for ( LOBYTE(v15) = 0; v9 < *v10; LOBYTE(v15) = v9 ) /*0xffc33c0a*/
    {
      v11 = 1379 * v9; /*0xffc33c11*/
      if ( *(_BYTE *)(v11 + CpuCount) && *(_BYTE *)(v11 + CpuCount + 107) ) /*0xffc33c1d*/
      {
        ProcCommonFuncF7F6(n6, n4, n2_1, v15, 0x5024030u, n33); /*0xffc33c37*/
        ProcCommonFuncF7F6(n6, n4, n2_1, v15, 0x5044008u, n33_1); /*0xffc33c4f*/
        v10 = v17; /*0xffc33c54*/
        CpuCount = CpuCount_1; /*0xffc33c5b*/
      }
      ++v9; /*0xffc33c5f*/
    }
    LOBYTE(n2_1) = ++n6_1; /*0xffc33c70*/
    v17 = v10 + 7688; /*0xffc33c74*/
  }
  while ( n6_1 < 6u ); /*0xffc33c7b*/
  return 0; /*0xffc33c86*/
}

// Function: ProcCommonFunc3C8B @ 0xffc33c8b (0x68 bytes)
// Index: 352/2560

__int16 *__cdecl ProcCommonFunc3C8B(
        unsigned __int8 *__return_address,
        unsigned __int8 n4,
        int n6,
        int n7,
        __int16 *buf,
        int *a6,
        _BYTE *a7)
{
  *((_DWORD *)a7 + 1) = MiscConfigCheck(__return_address, n4, n6, 184566284); /*0xffc33cb0*/
  *((_DWORD *)a7 + 2) = MiscConfigCheck(__return_address, n4, n6, 184566424); /*0xffc33cc3*/
  *(_DWORD *)a7 = MiscConfigCheck(__return_address, n4, n6, 117525024); /*0xffc33cd1*/
  *(_WORD *)a6 = 0; /*0xffc33cdf*/
  return ProcCommonFunc584B(__return_address, n6, n7, buf, a6); /*0xffc33cf0*/
}

// Function: ProcCommonFunc3CF3 @ 0xffc33cf3 (0x49 bytes)
// Index: 353/2560

int __cdecl ProcCommonFunc3CF3(
        unsigned __int8 *__return_address,
        unsigned __int8 a2,
        unsigned __int8 n6,
        unsigned __int8 n2,
        int *a5,
        int *a6)
{
  int v6; // esi
  int v7; // eax
  int result; // eax

  v6 = *a6; /*0xffc33d0a*/
  v7 = MailBoxFunc4C47((int)__return_address, 0, n2, 0x80042A8u); /*0xffc33d0c*/
  result = MiscConfigCheck(__return_address, a2, n6, v7); /*0xffc33d1b*/
  *a5 = result; /*0xffc33d26*/
  if ( (result & 0x1FF) != 0 ) /*0xffc33d2d*/
  {
    *a6 = v6 | (1 << n2); /*0xffc33d35*/
    return n2; /*0xffc33d2f*/
  }
  return result; /*0xffc33d37*/
}

// Function: nullsub_5 @ 0xffc33d3c (0x1 bytes)
// Index: 354/2560

void __cdecl nullsub_5()
{
  ; /*0xffc33d3c*/
}

// Function: ProcCommonFunc3D3D @ 0xffc33d3d (0x43 bytes)
// Index: 355/2560

int __cdecl ProcCommonFunc3D3D(unsigned __int8 *a1, unsigned __int8 a2, int a3, char a4)
{
  int v4; // eax
  int v5; // eax

  v4 = MiscConfigCheck(a1, a2, a3, 184567556); /*0xffc33d50*/
  if ( a4 ) /*0xffc33d5c*/
    v5 = v4 & 0xFDFFFFFF; /*0xffc33d65*/
  else
    v5 = v4 | 0x2000000; /*0xffc33d5e*/
  return MiscIoCheck(a1, a2, a3, 0xB004704u, v5); /*0xffc33d7d*/
}

// Function: ProcCommonFunc3D80 @ 0xffc33d80 (0xf6 bytes)
// Index: 356/2560

int __cdecl ProcCommonFunc3D80(int __return_address, int n4, int n6, int n2, int a5)
{
  int v5; // esi
  int result; // eax
  unsigned int v7; // ecx
  unsigned __int16 v8; // si

  v5 = KtiFunc91AF(__return_address, n4, n6, n2); /*0xffc33d9d*/
  result = KtiFunc91DE(__return_address, n4, n6, n2); /*0xffc33da8*/
  if ( *(_WORD *)(__return_address + 257315) == 12 )
  {
    v7 = *(unsigned __int16 *)(242 * (unsigned __int8)a5 + v5 + 10); /*0xffc33dce*/
    if ( (v7 & 0xE00) != 0 )
    {
      v8 = *(_WORD *)(244 * (unsigned __int8)a5 + result + 10) & 0xFE3F; /*0xffc33df2*/
      if ( v7 >> 9 == 1 )
      {
        v8 |= 0x80u; /*0xffc33e4f*/
      }
      else if ( v7 >> 9 == 2 )
      {
        v8 |= 0x100u; /*0xffc33e47*/
      }
      else if ( v7 >> 9 != 3 )
      {
        if ( v7 >> 9 == 4 )
        {
          v8 |= 0x180u; /*0xffc33e3f*/
        }
        else
        {
          AssertPrint(
            (_BYTE *)__return_address,
            255,
            (int)"\n\nRC_ASSERT! %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Mem\\MemProjectSpecific.c",
            1659,
            "FALSE");
          ProcMemInitCheck(__return_address, 242, 63); /*0xffc33e35*/
        }
      }
      return RmtFunc349(__return_address, n4, n6, n2, a5, v8, 5); /*0xffc33e69*/
    }
  }
  return result; /*0xffc33e72*/
}

// Function: ProcCommonFunc3E76 @ 0xffc33e76 (0xce bytes)
// Index: 357/2560

int __cdecl ProcCommonFunc3E76(unsigned __int8 *n6, unsigned __int8 n4, int a3, _DWORD *a4)
{
  int result; // eax
  unsigned __int8 n8; // bl
  int v6; // ecx
  int v7; // ebp
  unsigned int v8; // eax
  unsigned int v9; // eax
  int v10; // [esp-4h] [ebp-1Ch]
  int v11; // [esp-4h] [ebp-1Ch]
  unsigned __int8 n2; // [esp+10h] [ebp-8h]
  int v13; // [esp+14h] [ebp-4h]

  result = GetSocketInfo((int)n6, n4); /*0xffc33e85*/
  n8 = 0; /*0xffc33e8c*/
  v6 = result; /*0xffc33e8e*/
  v13 = result; /*0xffc33e90*/
  v7 = 0; /*0xffc33e94*/
  n2 = 0; /*0xffc33e96*/
  do /*0xffc33f37*/
  {
    if ( n6[257312] || n8 != 8 && n8 != 17 ) /*0xffc33eaf*/
    {
      v10 = a4[2] | *(_DWORD *)(v6 + 4 * (v7 + 1922 * (unsigned __int8)a3) + 87); /*0xffc33ecb*/
      v8 = MailBoxFunc4CB2((int)n6, n2, 0x80042F0u); /*0xffc33ed6*/
      MiscIoCheck(n6, n4, a3, v8, v10); /*0xffc33ee8*/
      v11 = *a4 | *(_DWORD *)(7688 * (unsigned __int8)a3 + v13 + 11); /*0xffc33f04*/
      v9 = MailBoxFunc4CB2((int)n6, n2, 0x80042E8u); /*0xffc33f0f*/
      result = MiscIoCheck(n6, n4, a3, v9, v11); /*0xffc33f21*/
      v6 = v13; /*0xffc33f26*/
    }
    ++n8; /*0xffc33f2d*/
    ++v7; /*0xffc33f2f*/
    n2 = n8; /*0xffc33f30*/
  }
  while ( n8 < 0x12u ); /*0xffc33f37*/
  return result; /*0xffc33f3d*/
}

// Function: ProcCommonFunc3F44 @ 0xffc33f44 (0xa9 bytes)
// Index: 358/2560

int __cdecl ProcCommonFunc3F44(unsigned __int8 *n6, int n4, _BYTE *n6a, int n2, int a5, unsigned __int16 p_n60, int a7)
{
  int SocketInfo; // eax
  int v8; // ebp
  unsigned __int8 n8; // bl
  int SocketInfo_1; // edi
  unsigned int v11; // eax
  int v13; // [esp-4h] [ebp-18h]
  unsigned __int8 n2_1; // [esp+10h] [ebp-4h]

  SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc33f52*/
  v8 = a7; /*0xffc33f57*/
  n8 = 0; /*0xffc33f5b*/
  SocketInfo_1 = SocketInfo; /*0xffc33f5f*/
  n2_1 = 0; /*0xffc33f61*/
  do /*0xffc33fba*/
  {
    if ( n6[257312] || n8 != 8 && n8 != 17 ) /*0xffc33f76*/
    {
      v13 = *(_DWORD *)(v8 + 4) | *(_DWORD *)(7688 * (unsigned __int8)n6a + SocketInfo_1 + 11); /*0xffc33f8c*/
      v11 = MailBoxFunc4CB2((int)n6, n2_1, 0x80042E8u); /*0xffc33f97*/
      MiscIoCheck(n6, n4, (int)n6a, v11, v13); /*0xffc33fa9*/
    }
    n2_1 = ++n8; /*0xffc33fb3*/
  }
  while ( n8 < 0x12u ); /*0xffc33fba*/
  return MrcMarginGroupTrain(n6, n4, n6a, n2, a5, 255, 0, 0, 21, 16, &p_n60); /*0xffc33fe7*/
}

// Function: ProcCommonFunc3FED @ 0xffc33fed (0x7e bytes)
// Index: 359/2560

int __cdecl ProcCommonFunc3FED(unsigned __int8 *n6, unsigned __int8 n4, int n6a, int n2, _DWORD *a5)
{
  int result; // eax
  unsigned __int8 n8; // bl
  int v7; // edi
  unsigned int v8; // eax
  int v9; // [esp-4h] [ebp-18h]
  unsigned __int8 n2_1; // [esp+10h] [ebp-4h]

  result = GetSocketInfo((int)n6, n4); /*0xffc33ffb*/
  n8 = 0; /*0xffc34004*/
  v7 = result; /*0xffc34008*/
  n2_1 = 0; /*0xffc3400a*/
  do /*0xffc34063*/
  {
    if ( n6[257312] || n8 != 8 && n8 != 17 ) /*0xffc3401f*/
    {
      v9 = *a5 | *(_DWORD *)(7688 * (unsigned __int8)n6a + v7 + 11); /*0xffc34035*/
      v8 = MailBoxFunc4CB2((int)n6, n2_1, 0x80042E8u); /*0xffc34040*/
      result = MiscIoCheck(n6, n4, n6a, v8, v9); /*0xffc34052*/
    }
    n2_1 = ++n8; /*0xffc3405c*/
  }
  while ( n8 < 0x12u ); /*0xffc34063*/
  return result; /*0xffc34065*/
}

// Function: ProcCommonFunc406B @ 0xffc3406b (0xc2 bytes)
// Index: 360/2560

int __cdecl ProcCommonFunc406B(
        unsigned __int8 *n6,
        unsigned __int8 n4,
        int n6a,
        char a4,
        char a5,
        char a6,
        int n11184810,
        int n13421772,
        int n15790320)
{
  int v9; // eax

  v9 = MiscConfigCheck(n6, n4, n6a, 184632628); /*0xffc34084*/
  MiscIoCheck(n6, n4, n6a, 0xB014534u, a4 & 3 | (8 * (a5 & 3 | (8 * (a6 & 3)))) | v9 & 0xFFFFFF24); /*0xffc340b7*/
  MiscIoCheck(n6, n4, n6a, 0xB014518u, n11184810); /*0xffc340c8*/
  MiscIoCheck(n6, n4, n6a, 0xB01451Cu, n13421772); /*0xffc340d9*/
  MiscIoCheck(n6, n4, n6a, 0xB014520u, n15790320); /*0xffc340ed*/
  MiscIoCheck(n6, n4, n6a, 0xB01450Cu, n11184810); /*0xffc340fe*/
  MiscIoCheck(n6, n4, n6a, 0xB014510u, n13421772); /*0xffc3410f*/
  return MiscIoCheck(n6, n4, n6a, 0xB014514u, n15790320); /*0xffc34128*/
}

// Function: ProcCommonFunc412D @ 0xffc3412d (0x6c bytes)
// Index: 361/2560

_BYTE *__cdecl ProcCommonFunc412D(unsigned __int8 *__return_address, unsigned __int8 n4, char a3)
{
  _BYTE *result; // eax
  unsigned __int8 n6; // bl
  _BYTE *v5; // esi
  int v6; // eax
  int v7; // [esp+Ch] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffc3413a*/
  n6 = 0; /*0xffc34142*/
  v5 = result; /*0xffc34146*/
  LOBYTE(v7) = 0; /*0xffc34148*/
  do /*0xffc34190*/
  {
    if ( *v5 ) /*0xffc34150*/
    {
      v6 = MiscConfigCheck(__return_address, n4, v7, 184567556); /*0xffc3415f*/
      result = (_BYTE *)MiscIoCheck(__return_address, n4, v7, 0xB004704u, a3 & 1 | v6 & 0xFFFFFFFE); /*0xffc3417a*/
    }
    ++n6; /*0xffc34182*/
    v5 += 7688; /*0xffc34184*/
    LOBYTE(v7) = n6; /*0xffc3418a*/
  }
  while ( n6 < 6u ); /*0xffc34190*/
  return result; /*0xffc34192*/
}

// Function: ProcCommonFunc4199 @ 0xffc34199 (0x8f bytes)
// Index: 362/2560

int __cdecl ProcCommonFunc4199(unsigned __int8 *__return_address, int a2, int n6, char a4, _BYTE *buf)
{
  unsigned int v5; // esi
  int SocketInfo; // [esp+Ch] [ebp-4h]

  SocketInfo = GetSocketInfo((int)__return_address, a2); /*0xffc341b7*/
  if ( a4 ) /*0xffc341bb*/
  {
    KtiFunc8A8E((int)__return_address, a2, n6); /*0xffc34201*/
  }
  else
  {
    v5 = MiscConfigCheck(__return_address, a2, n6, 184631440) & 0xFFFFFF00 | 0x12; /*0xffc341d3*/
    MiscIoCheck(__return_address, a2, n6, 0xB014090u, v5); /*0xffc341df*/
    *(_DWORD *)(7688 * (unsigned __int8)n6 + SocketInfo + 6753) = v5; /*0xffc341f4*/
  }
  return MiscIoCheck(__return_address, a2, n6, 0xB004204u, *(_DWORD *)&buf[4 * (unsigned __int8)n6]); /*0xffc34223*/
}

// Function: ProcCommonFunc4228 @ 0xffc34228 (0x15f bytes)
// Index: 363/2560

int __cdecl ProcCommonFunc4228(unsigned __int8 *__return_address, int n4, int n6, int n2, int i)
{
  int CpuCount; // esi
  char n4a_1; // al
  int n2_1; // ecx
  unsigned __int8 v9; // bl
  int v10; // eax
  unsigned __int8 v11; // al
  unsigned __int8 v12; // bl
  int v13; // esi
  int v15; // [esp+10h] [ebp-10h]
  unsigned __int8 *v16; // [esp+14h] [ebp-Ch]
  char n4a; // [esp+18h] [ebp-8h]
  int v18; // [esp+1Ch] [ebp-4h]
  unsigned __int8 *SocketInfo; // [esp+24h] [ebp+4h]
  unsigned __int8 v20; // [esp+24h] [ebp+4h]

  v15 = KtiFunc91AF((int)__return_address, n4, n6, n2); /*0xffc34249*/
  SocketInfo = (unsigned __int8 *)GetSocketInfo((int)__return_address, n4); /*0xffc34262*/
  v18 = 7688 * (unsigned __int8)n6; /*0xffc34266*/
  v16 = &SocketInfo[v18 + 3154]; /*0xffc34272*/
  CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc3427f*/
  n4a_1 = KtiFunc88D1((int)__return_address, n4, n6, n2, i); /*0xffc34288*/
  n2_1 = n2; /*0xffc3428d*/
  n4a = n4a_1; /*0xffc34294*/
  if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 107) ) /*0xffc342a1*/
  {
    v10 = __return_address[48704 * (unsigned __int8)n4 + 307390]; /*0xffc342c6*/
    v9 = byte_FFD516D4[v10] + byte_FFD516DC[v10]; /*0xffc342d4*/
  }
  else
  {
    v9 = SocketInfo[v18 + 307]; /*0xffc342b0*/
    n2_1 = n2; /*0xffc342b7*/
  }
  v11 = __return_address[244287]; /*0xffc342da*/
  v12 = __return_address[244245] + 2 * v9; /*0xffc342e2*/
  v20 = v12; /*0xffc342e8*/
  if ( v12 >= v11 ) /*0xffc342ee*/
  {
    v12 = __return_address[244287]; /*0xffc342f0*/
    v20 = v12; /*0xffc342f2*/
    if ( (v11 & 1) == 0 ) /*0xffc342f9*/
    {
      v12 = v11 - 1; /*0xffc342fb*/
      v20 = v11 - 1; /*0xffc342fd*/
    }
  }
  DebugPrint((int)__return_address, 2, n4, n6, n2_1, i, 255, 255, "\n Initial RT = %d\n", v12); /*0xffc3431f*/
  v13 = 242 * (unsigned __int8)i; /*0xffc34337*/
  v16[7 * *(unsigned __int8 *)(v13 + v15 + 1) + 2] = v12; /*0xffc34349*/
  MailBoxFunc49CA(__return_address, n4, n6, n4a, v20); /*0xffc34354*/
  v16[7 * *(unsigned __int8 *)(v13 + v15 + 1) + 3] = 4; /*0xffc34372*/
  return MailBoxFunc4957(__return_address, n4, n6, n4a, 4); /*0xffc3437f*/
}

// Function: ProcCommonFunc4387 @ 0xffc34387 (0x5e bytes)
// Index: 364/2560

int __cdecl ProcCommonFunc4387(unsigned __int8 *__return_address, unsigned __int8 n4, int n6)
{
  int SocketInfo; // edi
  unsigned int v4; // esi
  int result; // eax

  SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc343a7*/
  v4 = MiscConfigCheck(__return_address, n4, n6, 184631440) & 0xFFFFFF00 | 0x12; /*0xffc343ba*/
  MiscIoCheck(__return_address, n4, n6, 0xB014090u, v4); /*0xffc343c8*/
  result = 7688 * (unsigned __int8)n6; /*0xffc343d3*/
  *(_DWORD *)(result + SocketInfo + 6753) = v4; /*0xffc343d9*/
  return result; /*0xffc343e0*/
}

// Function: ProcCommonFunc43E5 @ 0xffc343e5 (0x9f bytes)
// Index: 365/2560

int __cdecl ProcCommonFunc43E5(unsigned __int8 *__return_address, unsigned __int8 a2, int n6, char a4)
{
  int result; // eax
  int v6; // ebp
  unsigned int v7; // esi
  unsigned __int8 n8; // bl
  unsigned int v9; // eax
  int v10; // [esp-Ch] [ebp-18h]
  int v11; // [esp+8h] [ebp-4h]
  unsigned __int8 n2; // [esp+10h] [ebp+4h]

  result = GetSocketInfo((int)__return_address, a2); /*0xffc343f1*/
  v6 = result; /*0xffc343fd*/
  if ( (__return_address[246408] & 4) == 0 ) /*0xffc34401*/
  {
    result = 7688 * (unsigned __int8)n6; /*0xffc3440a*/
    v11 = result; /*0xffc34416*/
    v7 = *(_DWORD *)(result + v6 + 11) | 0x80000000; /*0xffc3441e*/
    n8 = 0; /*0xffc34424*/
    n2 = 0; /*0xffc34426*/
    do /*0xffc3447c*/
    {
      if ( __return_address[257312] || n8 != 8 && n8 != 17 ) /*0xffc3443b*/
      {
        if ( a4 == 1 ) /*0xffc34440*/
          v10 = v7; /*0xffc34442*/
        else
          v10 = *(_DWORD *)(result + v6 + 11); /*0xffc34445*/
        v9 = MailBoxFunc4C47((int)__return_address, 0, n2, 0x80042E8u); /*0xffc34455*/
        MiscIoCheck(__return_address, a2, n6, v9, v10); /*0xffc34467*/
        result = v11; /*0xffc3446c*/
      }
      n2 = ++n8; /*0xffc34475*/
    }
    while ( n8 < 0x12u ); /*0xffc3447c*/
  }
  return result; /*0xffc34480*/
}

// Function: ProcCommonFunc4484 @ 0xffc34484 (0x3c bytes)
// Index: 366/2560

int __cdecl ProcCommonFunc4484(unsigned __int8 *a1, unsigned __int8 a2, int a3, unsigned __int8 a4)
{
  int v4; // eax

  v4 = MiscConfigCheck(a1, a2, a3, 184567104); /*0xffc34497*/
  return MiscIoCheck(a1, a2, a3, 0xB004540u, (a4 << 31) | v4 & 0x7FFFFFFF); /*0xffc344bd*/
}

// Function: ProcCommonFunc44C0 @ 0xffc344c0 (0x23 bytes)
// Index: 367/2560

int __cdecl ProcCommonFunc44C0(int __return_address, unsigned __int8 a2, unsigned __int8 n7, int a4)
{
  return CpuIoCfgWrite(__return_address, a2, 0, dword_FFD520AC[n7], a4); /*0xffc344e2*/
}

// Function: ProcCommonFunc44E3 @ 0xffc344e3 (0x3e bytes)
// Index: 368/2560

int __cdecl ProcCommonFunc44E3(
        unsigned __int8 *__return_address,
        unsigned __int8 n2,
        int n3,
        unsigned __int8 a4,
        int n1032,
        int a6)
{
  MiscIoCheck(__return_address, n2, n3, dword_FFD5210C[a4], n1032); /*0xffc344fe*/
  return MiscIoCheck(__return_address, n2, n3, dword_FFD52118[a4], a6); /*0xffc3451e*/
}

// Function: ProcCommonFunc4521 @ 0xffc34521 (0x5b bytes)
// Index: 369/2560

__int16 __cdecl ProcCommonFunc4521(int __return_address, unsigned __int8 n4)
{
  int v2; // ecx
  unsigned __int8 v3; // al
  __int16 n8208; // cx
  char n16; // dl
  __int16 n8208_1; // [esp+0h] [ebp-4h]

  v3 = KtiFunc8F12(__return_address, n4, v2); /*0xffc3452b*/
  n8208 = v3 & 0x1F | 0x2000; /*0xffc3453c*/
  n8208_1 = n8208; /*0xffc3453f*/
  n16 = v3 & 0x1F; /*0xffc34543*/
  if ( (v3 & 0x1Fu) > 0x10 ) /*0xffc3454c*/
  {
    n8208 = 8208; /*0xffc34557*/
    n8208_1 = 8208; /*0xffc3455a*/
    n16 = 16; /*0xffc3455e*/
  }
  if ( (n16 & 0x1Fu) < 8 ) /*0xffc34567*/
    return n8208_1 & 0xFFE0 | 8; /*0xffc34572*/
  return n8208; /*0xffc3457a*/
}

// Function: ProcCommonFunc457C @ 0xffc3457c (0x274 bytes)
// Index: 370/2560

int __cdecl ProcCommonFunc457C(int __return_address, int n2, int n3)
{
  int SocketInfo; // ebx
  int v5; // edi
  int v6; // eax
  int n3_1; // ecx
  int v8; // esi
  int v9; // edx
  unsigned int v10; // edi
  unsigned __int8 n2_1; // al
  _BYTE *v12; // edx
  char v13; // al
  bool v14; // zf
  unsigned int v15; // esi
  unsigned int v16; // esi
  unsigned __int8 v17; // al
  unsigned __int8 v18; // al
  char v20; // [esp+13h] [ebp-11h]
  int CpuCount; // [esp+14h] [ebp-10h]
  _BYTE *v22; // [esp+14h] [ebp-10h]
  char v23; // [esp+18h] [ebp-Ch]
  int v24; // [esp+20h] [ebp-4h]
  unsigned __int8 n2_2; // [esp+28h] [ebp+4h]

  v23 = 0; /*0xffc3458f*/
  v20 = 0; /*0xffc34593*/
  SocketInfo = GetSocketInfo(__return_address, n2); /*0xffc345a0*/
  CpuCount = GetCpuCount(__return_address, n2, n3); /*0xffc345b2*/
  v5 = MiscConfigCheck((unsigned __int8 *)__return_address, n2, n3, 184566376); /*0xffc345c4*/
  v6 = MiscConfigCheck((unsigned __int8 *)__return_address, n2, n3, 184566392); /*0xffc345c8*/
  n3_1 = n3; /*0xffc345cd*/
  v8 = v6; /*0xffc345d1*/
  v9 = 7688 * (unsigned __int8)n3; /*0xffc345dc*/
  v10 = v5 & 0xFFCCFFFF | 0x100000; /*0xffc345e5*/
  v24 = v9; /*0xffc345ef*/
  if ( *(_BYTE *)(v9 + SocketInfo + 3) > 1u ) /*0xffc345f8*/
  {
    n2_1 = 0; /*0xffc345fe*/
    v12 = (_BYTE *)(CpuCount + 107); /*0xffc34604*/
    n2_2 = 0; /*0xffc34607*/
    v22 = (_BYTE *)(CpuCount + 107); /*0xffc3460b*/
    do /*0xffc34651*/
    {
      if ( *v12 ) /*0xffc3460f*/
      {
        v20 = 1; /*0xffc34616*/
        v13 = ProcCommonFunc24FA(__return_address, n2, n3_1, n2_1 ^ 1); /*0xffc34622*/
        n3_1 = n3; /*0xffc34627*/
        v12 = v22; /*0xffc3462e*/
        v14 = v13 == 0; /*0xffc34632*/
        n2_1 = n2_2; /*0xffc34634*/
        if ( v14 ) /*0xffc34638*/
          v23 = 1; /*0xffc3463a*/
      }
      ++n2_1; /*0xffc3463f*/
      v12 += 1379; /*0xffc34641*/
      n2_2 = n2_1; /*0xffc34647*/
      v22 = v12; /*0xffc3464b*/
    }
    while ( n2_1 < 2u ); /*0xffc34651*/
    v9 = v24; /*0xffc34653*/
  }
  v15 = v8 & 0xFFFCFFFF; /*0xffc3465b*/
  if ( ((unsigned __int8)v23 & (unsigned __int8)v20) != 0 /*0xffc34676*/
    || !*(_BYTE *)(v9 + 48704 * (unsigned __int8)n2 + __return_address + 265395) )
  {
    v16 = ((unsigned int)&loc_FFCFFFFE + 1) & v15; /*0xffc3468e*/
  }
  else
  {
    v16 = v15 & 0xFFCCFFFF | 0x100000; /*0xffc34686*/
  }
  v17 = *(_BYTE *)((unsigned __int8)n3 + __return_address + 244344); /*0xffc34698*/
  if ( v17 ) /*0xffc346a1*/
  {
    if ( v17 + ((v10 >> 20) & 3) >= 4 ) /*0xffc346b3*/
    {
      KtiFunc8A8E(__return_address, n2, n3_1); /*0xffc346d0*/
      KtiFunc211E(__return_address, 41, 3, n2, n3, 255, 255); /*0xffc346e6*/
    }
    else
    {
      v10 ^= (v10 ^ ((v10 & 0xFFF00000) + (v17 << 20))) & 0x300000; /*0xffc346c9*/
    }
  }
  v18 = *(_BYTE *)((unsigned __int8)n3 + __return_address + 244350); /*0xffc346f2*/
  if ( v18 ) /*0xffc346fb*/
  {
    if ( v18 + ((v16 >> 20) & 3) >= 4 ) /*0xffc3470d*/
    {
      KtiFunc8A8E(__return_address, n2, n3); /*0xffc3472d*/
      KtiFunc211E(__return_address, 41, 3, n2, n3, 255, 255); /*0xffc34743*/
    }
    else
    {
      v16 ^= (v16 ^ ((v16 & 0xFFF00000) + (v18 << 20))) & 0x300000; /*0xffc34723*/
    }
  }
  if ( (*(_DWORD *)(__return_address + 134) & 0x800000) != 0 ) /*0xffc34755*/
  {
    v16 = MiscConfigCheck((unsigned __int8 *)__return_address, n2, n3, dword_FFD52120); /*0xffc3476d*/
    if ( (v16 & 0x300000) >= 0x300000 ) /*0xffc34776*/
    {
      KtiFunc8A8E(__return_address, n2, n3); /*0xffc34792*/
      KtiFunc211E(__return_address, 41, 3, n2, n3, 255, 255); /*0xffc347a8*/
    }
    else
    {
      v16 ^= (v16 ^ ((v16 & 0xFFF00000) + 0x100000)) & 0x300000; /*0xffc34788*/
    }
    MiscIoCheck((unsigned __int8 *)__return_address, n2, n3, dword_FFD52120, v16); /*0xffc347bd*/
  }
  MiscIoCheck((unsigned __int8 *)__return_address, n2, n3, 0xB004268u, v10); /*0xffc347d2*/
  return MiscIoCheck((unsigned __int8 *)__return_address, n2, n3, 0xB004278u, v16); /*0xffc347e8*/
}

// Function: ProcCommonFunc47F0 @ 0xffc347f0 (0x23 bytes)
// Index: 371/2560

int __cdecl ProcCommonFunc47F0(unsigned __int8 *__return_address, int n4, int n6, int n2, unsigned __int16 n6_1)
{
  return ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84033548, n6_1); /*0xffc34811*/
}

// Function: ProcCommonFunc4813 @ 0xffc34813 (0x45 bytes)
// Index: 372/2560

int __cdecl ProcCommonFunc4813(unsigned __int8 *__return_address, int n4, int n6, int n2, unsigned __int16 n6_1)
{
  int result; // eax

  result = GetCpuCount((int)__return_address, n4, n6); /*0xffc3481f*/
  if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + result + 107) ) /*0xffc34833*/
    return ProcCommonFuncF4C7(__return_address, n4, n6, n2, 84164640, n6_1); /*0xffc3484e*/
  return result; /*0xffc34856*/
}

// Function: ProcCommonFunc4858 @ 0xffc34858 (0x154 bytes)
// Index: 373/2560

int __cdecl ProcCommonFunc4858(unsigned __int8 *__return_address, int n4, int n6)
{
  unsigned __int8 *__return_address_1; // ebp
  int CpuCount; // eax
  int n6_1; // edx
  unsigned __int8 v6; // bl
  int v7; // esi
  int CpuCount_2; // ecx
  int v9; // edx
  unsigned __int8 n2_2; // bh
  int CpuCount_3; // ecx
  int v12; // eax
  int CpuCount_1; // [esp+10h] [ebp-24h]
  unsigned __int8 n2; // [esp+14h] [ebp-20h]
  int v16; // [esp+18h] [ebp-1Ch]
  char n2_1; // [esp+1Ch] [ebp-18h]
  int v18; // [esp+20h] [ebp-14h]
  int SocketInfo; // [esp+28h] [ebp-Ch]
  int v20; // [esp+30h] [ebp-4h]

  __return_address_1 = __return_address; /*0xffc3485d*/
  SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc34872*/
  CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc34878*/
  n6_1 = n6; /*0xffc3487d*/
  v6 = 0; /*0xffc34881*/
  v7 = 0; /*0xffc3488f*/
  CpuCount_1 = CpuCount; /*0xffc34891*/
  n2 = 0; /*0xffc34899*/
  v20 = 7688 * (unsigned __int8)n6; /*0xffc3489d*/
  if ( !*(_BYTE *)(v20 + SocketInfo + 3) ) /*0xffc348a1*/
    goto LABEL_17; /*0xffc348a1*/
  CpuCount_2 = CpuCount; /*0xffc348ab*/
  do /*0xffc3497e*/
  {
    v18 = 1379 * v6; /*0xffc348bc*/
    if ( *(_BYTE *)(v18 + CpuCount_2) ) /*0xffc348c0*/
    {
      v9 = KtiFunc91AF((int)__return_address_1, n4, n6_1, n2); /*0xffc348da*/
      n2_2 = 0; /*0xffc348e0*/
      v16 = v9; /*0xffc348e5*/
      n2_1 = 0; /*0xffc348e9*/
      if ( *(_BYTE *)(v18 + CpuCount_1 + 19) ) /*0xffc348ed*/
      {
        CpuCount_3 = CpuCount_1; /*0xffc348f3*/
        do /*0xffc3494b*/
        {
          if ( *(_BYTE *)(242 * n2_2 + v9) && n2_2 < 2u ) /*0xffc3490b*/
          {
            v12 = RmtFuncE6B(__return_address_1, n4, n6, n2, n2_1); /*0xffc3491b*/
            v9 = v16; /*0xffc34920*/
            if ( v12 ) /*0xffc34929*/
              v7 |= 1 << (n2_2 + 4 * v6); /*0xffc34936*/
            CpuCount_3 = CpuCount_1; /*0xffc34939*/
          }
          n2_1 = ++n2_2; /*0xffc34943*/
        }
        while ( n2_2 < *(_BYTE *)(v18 + CpuCount_3 + 19) ); /*0xffc3494b*/
      }
      n6_1 = n6; /*0xffc34951*/
      if ( ((15 << (4 * v6)) & v7) == 0 ) /*0xffc3495f*/
        v7 |= 1 << (4 * v6); /*0xffc34961*/
      CpuCount_2 = CpuCount_1; /*0xffc34964*/
    }
    n2 = ++v6; /*0xffc34972*/
    __return_address_1 = __return_address; /*0xffc3497a*/
  }
  while ( v6 < *(_BYTE *)(SocketInfo + v20 + 3) ); /*0xffc3497e*/
  if ( !v7 ) /*0xffc34986*/
LABEL_17:
    LOWORD(v7) = 1; /*0xffc3498a*/
  return MiscIoCheck(__return_address_1, n4, n6_1, 0xB0041D4u, (unsigned __int16)v7 | 0x2000000); /*0xffc349a4*/
}

// Function: ProcCommonFunc49AC @ 0xffc349ac (0x80 bytes)
// Index: 374/2560

int __cdecl ProcCommonFunc49AC(unsigned __int8 *n6, unsigned __int8 n2, int n6a, char a4)
{
  int v4; // esi
  int CpuCount; // eax
  unsigned __int8 v6; // cl
  unsigned int v7; // esi

  v4 = MiscConfigCheck(n6, n2, n6a, 184566288); /*0xffc349ca*/
  CpuCount = GetCpuCount((int)n6, n2, n6a); /*0xffc349d0*/
  if ( !a4 ) /*0xffc349dc*/
    goto LABEL_5; /*0xffc349dc*/
  v6 = n6[1485]; /*0xffc349de*/
  if ( !v6 ) /*0xffc349e6*/
  {
    if ( *(_BYTE *)(CpuCount + 118) != 6 && *(_BYTE *)(CpuCount + 1497) != 6 ) /*0xffc349f5*/
      goto LABEL_5; /*0xffc349f5*/
LABEL_8:
    v7 = v4 & 0xFFC000FF | 0x10100; /*0xffc34a1e*/
    return MiscIoCheck(n6, n2, n6a, 0xB004210u, v7); /*0xffc34a2a*/
  }
  if ( v6 != 1 ) /*0xffc34a1c*/
    goto LABEL_8; /*0xffc34a1c*/
LABEL_5:
  v7 = ((unsigned int)&loc_FFC488FE + 1) & v4 | 0x48800; /*0xffc349f7*/
  return MiscIoCheck(n6, n2, n6a, 0xB004210u, v7); /*0xffc34a14*/
}

// Function: ProcCommonFunc4A2C @ 0xffc34a2c (0x2ab bytes)
// Index: 375/2560

int __cdecl ProcCommonFunc4A2C(unsigned __int8 *__return_address, int n4)
{
  unsigned __int8 n6a_1; // bh
  int SocketInfo_1; // eax
  int v4; // esi
  int CpuCount; // ecx
  unsigned __int8 n8; // bl
  int v7; // eax
  unsigned __int8 *v8; // esi
  unsigned __int8 n2_2; // al
  unsigned __int8 v10; // bh
  int v11; // esi
  int v12; // ecx
  unsigned int n7; // esi
  unsigned int v14; // eax
  unsigned __int8 n2_3; // [esp-Ch] [ebp-58h]
  unsigned int v17; // [esp-4h] [ebp-50h]
  unsigned __int16 p_n60; // [esp+10h] [ebp-3Ch] BYREF
  int n6a; // [esp+14h] [ebp-38h]
  int n2_1; // [esp+18h] [ebp-34h]
  unsigned __int8 n2[4]; // [esp+1Ch] [ebp-30h]
  int v22; // [esp+20h] [ebp-2Ch]
  int n4095; // [esp+24h] [ebp-28h]
  int p_n60_1; // [esp+28h] [ebp-24h]
  int v25; // [esp+2Ch] [ebp-20h]
  int v26; // [esp+30h] [ebp-1Ch]
  int SocketInfo; // [esp+34h] [ebp-18h]
  int SocketInfo_2; // [esp+38h] [ebp-14h]
  int v29; // [esp+3Ch] [ebp-10h]
  int n4095_1; // [esp+40h] [ebp-Ch]
  int v31; // [esp+44h] [ebp-8h]
  int CpuCount_1; // [esp+48h] [ebp-4h]

  n6a_1 = 0; /*0xffc34a47*/
  SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc34a4c*/
  DebugPrint( /*0xffc34a59*/
    (int)__return_address,
    2,
    255,
    255,
    255,
    255,
    255,
    255,
    "\n Starting Senseamp and ODT delay and duration calculations \n");
  DebugPrint( /*0xffc34a6c*/
    (int)__return_address,
    2,
    255,
    255,
    255,
    255,
    255,
    255,
    "------------------------------------------------------------ \n");
  SocketInfo_1 = SocketInfo; /*0xffc34a71*/
  LOBYTE(n6a) = 0; /*0xffc34a7d*/
  v4 = 0; /*0xffc34a81*/
  SocketInfo_2 = SocketInfo; /*0xffc34a83*/
  v26 = 0; /*0xffc34a87*/
  do
  {
    if ( *(_BYTE *)SocketInfo_1 )
    {
      v29 = *(_DWORD *)(SocketInfo_1 + 11) >> 31; /*0xffc34aa5*/
      CpuCount = GetCpuCount((int)__return_address, n4, n6a); /*0xffc34aae*/
      n8 = 0; /*0xffc34ab0*/
      CpuCount_1 = CpuCount; /*0xffc34ab5*/
      v7 = 0; /*0xffc34ab9*/
      n2[0] = 0; /*0xffc34abb*/
      v25 = 0; /*0xffc34abf*/
      do
      {
        if ( __return_address[257312] || n8 != 8 && n8 != 17 )
        {
          p_n60_1 = 0; /*0xffc34ade*/
          v8 = (unsigned __int8 *)(CpuCount + 19); /*0xffc34ae3*/
          n2_2 = 0; /*0xffc34ae6*/
          n4095 = 4095; /*0xffc34ae8*/
          LOBYTE(n2_1) = 0; /*0xffc34af0*/
          do /*0xffc34b7d*/
          {
            v10 = 0; /*0xffc34af4*/
            LOBYTE(v22) = 0; /*0xffc34af6*/
            if ( *v8 ) /*0xffc34afa*/
            {
              do /*0xffc34b69*/
              {
                if ( !KtiFunc89E9((int)__return_address, n4, n6a, n2_1, v22, 0) ) /*0xffc34b0e*/
                {
                  MrcMarginGroupTrain(__return_address, n4, (_BYTE *)n6a, n2_1, v22, *(int *)n2, 0, 0, 0, 2, &p_n60); /*0xffc34b38*/
                  if ( (__int16)p_n60 < (__int16)n4095 ) /*0xffc34b4a*/
                    n4095 = p_n60; /*0xffc34b4f*/
                  if ( (__int16)p_n60 > (__int16)p_n60_1 ) /*0xffc34b58*/
                    p_n60_1 = p_n60; /*0xffc34b5d*/
                }
                LOBYTE(v22) = ++v10; /*0xffc34b63*/
              }
              while ( v10 < *v8 ); /*0xffc34b69*/
              n2_2 = n2_1; /*0xffc34b6b*/
            }
            ++n2_2; /*0xffc34b6f*/
            v8 += 1379; /*0xffc34b71*/
            LOBYTE(n2_1) = n2_2; /*0xffc34b77*/
          }
          while ( n2_2 < 2u ); /*0xffc34b7d*/
          n4095_1 = (__int16)n4095; /*0xffc34b88*/
          v31 = (unsigned __int8)v29; /*0xffc34b9a*/
          v11 = (__int16)n4095 / 64; /*0xffc34b9e*/
          v12 = 2 * (unsigned __int8)v29; /*0xffc34ba1*/
          n4095 = (v11 - v12 + 15) % 16; /*0xffc34bb7*/
          p_n60_1 = (__int16)p_n60_1; /*0xffc34bc0*/
          n7 = (__int16)p_n60_1 / 64 - v11 + v12 + 4; /*0xffc34bd2*/
          if ( n7 > 7 ) /*0xffc34bd7*/
            n7 = 7; /*0xffc34bdb*/
          DebugPrint(
            (int)__return_address,
            2,
            n4,
            n6a,
            255,
            255,
            *(int *)n2,
            255,
            "Longpreamble = %d, MinRcven=%3d, MaxRcven=%3d: Senseampdelay=%d SenseAmpDuration=%d\n",
            v31,
            n4095_1,
            p_n60_1,
            n4095,
            n7);
          v17 = *(_DWORD *)(SocketInfo + 4 * (v26 + v25) + 15) & 0xF8001FFF /*0xffc34c44*/
              | ((n4095 & 0xF | (16 * (n7 & 7 | (8 * (n4095 & 0xF | (16 * (n7 & 7))))))) << 13);
          n2_3 = n2[0]; /*0xffc34c4a*/
          *(_DWORD *)(SocketInfo + 4 * (v26 + v25) + 15) = v17; /*0xffc34c4e*/
          v14 = MailBoxFunc4CB2((int)__return_address, n2_3, 0x80042ECu); /*0xffc34c53*/
          MiscIoCheck(__return_address, n4, n6a, v14, v17); /*0xffc34c62*/
          v7 = v25; /*0xffc34c67*/
          CpuCount = CpuCount_1; /*0xffc34c6e*/
        }
        ++n8; /*0xffc34c72*/
        ++v7; /*0xffc34c74*/
        n2[0] = n8; /*0xffc34c75*/
        v25 = v7; /*0xffc34c79*/
      }
      while ( n8 < 0x12u );
      n6a_1 = n6a; /*0xffc34c86*/
      SocketInfo_1 = SocketInfo_2; /*0xffc34c8a*/
      v4 = v26; /*0xffc34c8e*/
    }
    ++n6a_1; /*0xffc34c92*/
    SocketInfo_1 += 7688; /*0xffc34c94*/
    v4 += 1922; /*0xffc34c99*/
    LOBYTE(n6a) = n6a_1; /*0xffc34c9f*/
    SocketInfo_2 = SocketInfo_1; /*0xffc34ca3*/
    v26 = v4; /*0xffc34ca7*/
  }
  while ( n6a_1 < 6u );
  return DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "\n\n"); /*0xffc34ccf*/
}

// Function: ProcCommonFunc4CD7 @ 0xffc34cd7 (0x23 bytes)
// Index: 376/2560

int __cdecl ProcCommonFunc4CD7(int __return_address, unsigned __int8 SocketNumber, char n7, unsigned int a4)
{
  return CpuIoCfgWrite(__return_address, SocketNumber, 0, dword_FFD520EC[(unsigned __int8)n7], a4); /*0xffc34cf9*/
}

// Function: ProcCommonFunc4CFA @ 0xffc34cfa (0x112 bytes)
// Index: 377/2560

int __cdecl ProcCommonFunc4CFA(
        unsigned __int8 *__return_address,
        unsigned __int8 n4,
        int n6,
        unsigned __int8 n2,
        unsigned __int8 a5)
{
  int v5; // ebx
  int n6_1; // edx
  char v7; // bp
  int result; // eax
  int n6_2; // [esp+10h] [ebp-8h]
  int v10; // [esp+14h] [ebp-4h]

  v5 = KtiFunc8DC4((int)__return_address, n4, n2, a5); /*0xffc34d1a*/
  n6_1 = 0; /*0xffc34d1c*/
  v10 = v5; /*0xffc34d1e*/
  n6_2 = 0; /*0xffc34d22*/
  v7 = 0; /*0xffc34d26*/
  LOBYTE(n6) = 0; /*0xffc34d28*/
  do /*0xffc34dff*/
  {
    result = 1 << v7; /*0xffc34d31*/
    if ( ((1 << v7) & v5) != 0 ) /*0xffc34d35*/
    {
      result = GetCpuCount((int)__return_address, n4, n6); /*0xffc34d42*/
      if ( a5 < *(_BYTE *)(1379 * n2 + result + 19) ) /*0xffc34d5f*/
      {
        MiscIoCheck(__return_address, n4, n6, 0xB014534u, 32841); /*0xffc34d72*/
        MiscIoCheck(__return_address, n4, n6, 0xB01450Cu, 11184810); /*0xffc34d84*/
        MiscIoCheck(__return_address, n4, n6, 0xB014510u, 13421772); /*0xffc34d96*/
        MiscIoCheck(__return_address, n4, n6, 0xB014514u, 15790320); /*0xffc34da8*/
        MiscIoCheck(__return_address, n4, n6, 0xB014518u, 11184810); /*0xffc34dbd*/
        MiscIoCheck(__return_address, n4, n6, 0xB01451Cu, 13421772); /*0xffc34dcf*/
        result = MiscIoCheck(__return_address, n4, n6, 0xB014520u, 15790320); /*0xffc34de1*/
      }
      v5 = v10; /*0xffc34de9*/
      n6_1 = n6_2; /*0xffc34ded*/
    }
    LOBYTE(n6_1) = n6_1 + 1; /*0xffc34df1*/
    ++v7; /*0xffc34df3*/
    n6_2 = n6_1; /*0xffc34df4*/
    LOBYTE(n6) = n6_1; /*0xffc34df8*/
  }
  while ( (unsigned __int8)n6_1 < 6u ); /*0xffc34dff*/
  return result; /*0xffc34e05*/
}

// Function: ProcCommonFunc4E0C @ 0xffc34e0c (0xc8 bytes)
// Index: 378/2560

int __cdecl ProcCommonFunc4E0C(unsigned __int8 *__return_address, unsigned __int8 n4, int n6)
{
  int v3; // eax
  int v4; // eax
  int v5; // eax

  v3 = MiscConfigCheck(__return_address, n4, n6, 117525792); /*0xffc34e25*/
  MiscIoCheck(__return_address, n4, n6, 0x7014D20u, v3 & 0xFFFC03FA | 0xA001); /*0xffc34e39*/
  MiscConfigCheck(__return_address, n4, n6, 117525764); /*0xffc34e45*/
  MiscIoCheck(__return_address, n4, n6, 0x7014D04u, 370085); /*0xffc34e5c*/
  MiscConfigCheck(__return_address, n4, n6, 117525768); /*0xffc34e6d*/
  MiscIoCheck(__return_address, n4, n6, 0x7014D08u, 814188); /*0xffc34e84*/
  v4 = MiscConfigCheck(__return_address, n4, n6, 117525760); /*0xffc34e90*/
  MiscIoCheck(__return_address, n4, n6, 0x7014D00u, v4 & 0x7FFFF0F0 | 0x80000000); /*0xffc34ea4*/
  v5 = MiscConfigCheck(__return_address, n4, n6, 117525788); /*0xffc34eb5*/
  return MiscIoCheck(__return_address, n4, n6, 0x7014D1Cu, v5 & 0xFFFFFF00 | 0x80); /*0xffc34ecf*/
}

// Function: ProcCommonFunc4ED4 @ 0xffc34ed4 (0x39 bytes)
// Index: 379/2560

int __cdecl ProcCommonFunc4ED4(unsigned __int8 *__return_address, unsigned __int8 n4, int n6)
{
  int v4[3]; // [esp+0h] [ebp-Ch] BYREF

  v4[0] = 11184810; /*0xffc34edd*/
  v4[1] = 13421772; /*0xffc34eed*/
  v4[2] = 15790320; /*0xffc34ef7*/
  return DdrTrainFunc2277(__return_address, n4, n6, 21, v4); /*0xffc34f09*/
}

// Function: ProcCommonFunc4F0D @ 0xffc34f0d (0xdc bytes)
// Index: 380/2560

__int16 *__cdecl ProcCommonFunc4F0D(int a1, int a2, char n32, _WORD *a4, _WORD *a5, __int16 *a6, _DWORD *a7)
{
  __int16 n128; // cx
  int v8; // ecx

  if ( n32 != 2 ) /*0xffc34f15*/
  {
    switch ( n32 ) /*0xffc34f36*/
    {
      case 4: /*0xffc34f36*/
        *a4 = 0; /*0xffc34f3b*/
        *a5 = 0; /*0xffc34f41*/
        *a6 = 128; /*0xffc34f4c*/
        v8 = a1 + 231405; /*0xffc34f52*/
        break;
      case 8: /*0xffc34f36*/
        *a4 = 0; /*0xffc34f61*/
        *a5 = 0; /*0xffc34f69*/
        *a6 = 128; /*0xffc34f74*/
        v8 = a1 + 234969; /*0xffc34f7a*/
        break;
      case 16: /*0xffc34f36*/
        *a4 = 0; /*0xffc34f89*/
        *a5 = 0; /*0xffc34f91*/
        *a6 = 128; /*0xffc34f9c*/
        v8 = a1 + 233241; /*0xffc34fa2*/
        break;
      default:
        *a4 = 0; /*0xffc34faf*/
        if ( n32 != 32 ) /*0xffc34fb5*/
        {
          *a5 = 0; /*0xffc34fd9*/
          n128 = 128; /*0xffc34fdc*/
          goto LABEL_13; /*0xffc34fdc*/
        }
        *a5 = 0; /*0xffc34fb9*/
        *a6 = 128; /*0xffc34fc4*/
        v8 = a1 + 236805; /*0xffc34fca*/
        break;
    }
    *a7 = v8; /*0xffc34fd3*/
    return (__int16 *)a7; /*0xffc34fd6*/
  }
  *a4 = 128; /*0xffc34f1f*/
  *a5 = 128; /*0xffc34f25*/
  n128 = 256; /*0xffc34f28*/
LABEL_13:
  *a6 = n128; /*0xffc34fe1*/
  return a6; /*0xffc34fd5*/
}

// Function: ProcCommonFunc4FE9 @ 0xffc34fe9 (0xf bytes)
// Index: 381/2560

_BYTE *__cdecl ProcCommonFunc4FE9(int __return_address, int a2, int p_n32, _BYTE *a4, _BYTE *a5)
{
  *a4 = 7; /*0xffc34fed*/
  *a5 = 32; /*0xffc34ff4*/
  return a5; /*0xffc34ff7*/
}

// Function: ProcCommonFunc4FF8 @ 0xffc34ff8 (0x1f bytes)
// Index: 382/2560

bool __cdecl ProcCommonFunc4FF8(int n6, int a2)
{
  char n2; // al
  bool result; // al

  result = 1; /*0xffc35014*/
  if ( !a2 ) /*0xffc34ffd*/
  {
    n2 = *(_BYTE *)(n6 + 257313); /*0xffc35003*/
    if ( n2 != 1 && n2 != 2 ) /*0xffc3500f*/
      return 0; /*0xffc34ffd*/
  }
  return result; /*0xffc35013*/
}

// Function: ProcCommonFunc5017 @ 0xffc35017 (0x53 bytes)
// Index: 383/2560

bool __cdecl ProcCommonFunc5017(int __return_address, char n4, char n6, char n2, unsigned __int8 a5)
{
  int v5; // edi

  v5 = KtiFunc91DE(__return_address, n4, n6, n2); /*0xffc35031*/
  return ProcCommonFunc24FA(__return_address, n4, n6, n2) /*0xffc35066*/
      && *(_BYTE *)(244 * a5 + v5 + 60) != 4
      && !*(_BYTE *)(__return_address + 238535);
}

// Function: ProcCommonFunc506A @ 0xffc3506a (0x1e bytes)
// Index: 384/2560

bool __cdecl ProcCommonFunc506A(int __return_address, unsigned __int8 n4, unsigned __int8 n6, unsigned __int8 n2)
{
  return ProcCommonFunc24FA(__return_address, n4, n6, n2) != 0; /*0xffc35087*/
}

// Function: ProcCommonFunc5088 @ 0xffc35088 (0x87 bytes)
// Index: 385/2560

bool __cdecl ProcCommonFunc5088(int __return_address, unsigned __int8 n6, int a3, int *a4)
{
  int SocketInfo; // esi
  unsigned int v5; // eax
  int v6; // esi
  int v7; // eax

  SocketInfo = GetSocketInfo(__return_address, n6); /*0xffc3509e*/
  v5 = MiscConfigCheck((unsigned __int8 *)__return_address, n6, a3, 184566276); /*0xffc350aa*/
  v6 = *(unsigned __int8 *)(7688 * (unsigned __int8)a3 + SocketInfo + 6); /*0xffc350bf*/
  if ( v5 >> 30 == v6 ) /*0xffc350cb*/
    return 0; /*0xffc35109*/
  v7 = (v6 << 30) | v5 & 0x3FFFFFFF; /*0xffc350d5*/
  *a4 = v7; /*0xffc350e2*/
  MiscIoCheck((unsigned __int8 *)__return_address, n6, a3, 0xB004204u, v7); /*0xffc350e5*/
  ProcCommonFunc298E((unsigned __int8 *)__return_address, n6, a3, a4); /*0xffc350f4*/
  return *(_WORD *)(__return_address + 257315) == 11; /*0xffc3510b*/
}

// Function: ProcCommonFunc510F @ 0xffc3510f (0x34 bytes)
// Index: 386/2560

char __cdecl ProcCommonFunc510F(_BYTE *n6, int a2)
{
  if ( (~n6[628652] & 4) == 0 ) /*0xffc3511d*/
    return 0; /*0xffc35140*/
  DebugPrint((int)n6, 10, a2, 255, 255, 255, 255, 255, "Skipping Early Cmd/Clk Training\n"); /*0xffc35135*/
  return 1; /*0xffc3513f*/
}

// Function: ProcCommonFunc5143 @ 0xffc35143 (0x10 bytes)
// Index: 387/2560

int __cdecl ProcCommonFunc5143(char n2)
{
  if ( n2 == 2 ) /*0xffc35148*/
    return 128; /*0xffc3514a*/
  else
    return 0; /*0xffc35150*/
}

// Function: ProcCommonFunc5153 @ 0xffc35153 (0x30 bytes)
// Index: 388/2560

int __cdecl ProcCommonFunc5153(unsigned __int8 *__return_address, unsigned __int8 n4, int n6, int n2, int a5, char a6)
{
  char v6; // al

  v6 = ProcCommonFuncD73A(__return_address, n4, n6, a6); /*0xffc35162*/
  return MailBoxFunc4957(__return_address, n4, n6, a6, (unsigned __int8)(v6 + 1)); /*0xffc35181*/
}

// Function: ProcCommonFunc5183 @ 0xffc35183 (0x6b bytes)
// Index: 389/2560

int __cdecl ProcCommonFunc5183(unsigned __int8 *a1, unsigned __int8 a2, int a3, char a4)
{
  int result; // eax
  unsigned int n117457024; // edi
  int *v6; // esi
  int n2; // ebx

  result = GetCpuCount((int)a1, a2, a3); /*0xffc35192*/
  n117457024 = 117457024; /*0xffc3519a*/
  v6 = (int *)(result + 134); /*0xffc3519f*/
  n2 = 2; /*0xffc351a7*/
  do /*0xffc351e7*/
  {
    if ( *((_BYTE *)v6 - 134) && *((_BYTE *)v6 - 27) != 1 ) /*0xffc351b5*/
    {
      if ( a4 ) /*0xffc351bb*/
        result = MiscIoCheck(a1, a2, a3, n117457024, *v6); /*0xffc351bf*/
      else
        result = MiscIoCheck(a1, a2, a3, n117457024, *v6 & 0xFE5FFFFF); /*0xffc351d3*/
    }
    v6 = (int *)((char *)v6 + 1379); /*0xffc351db*/
    n117457024 += 4; /*0xffc351e1*/
    --n2; /*0xffc351e4*/
  }
  while ( n2 ); /*0xffc351e7*/
  return result; /*0xffc351e9*/
}

// Function: ProcCommonFunc51EE @ 0xffc351ee (0xb7 bytes)
// Index: 390/2560

_BYTE *__cdecl ProcCommonFunc51EE(unsigned __int8 *n6, int n4, char a3)
{
  _BYTE *result; // eax
  unsigned __int8 n6_2; // bl
  _BYTE *v5; // edi
  unsigned __int8 n2_1; // bh
  _BYTE *v7; // esi
  int v8; // eax
  int n2; // [esp+Ch] [ebp-8h]
  int n6_1; // [esp+10h] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffc351fc*/
  n6_2 = 0; /*0xffc35202*/
  v5 = result; /*0xffc35204*/
  LOBYTE(n6_1) = 0; /*0xffc35207*/
  do /*0xffc35298*/
  {
    if ( *v5 ) /*0xffc3520a*/
    {
      result = (_BYTE *)GetCpuCount((int)n6, n4, n6_1); /*0xffc35218*/
      n2_1 = 0; /*0xffc35223*/
      LOBYTE(n2) = 0; /*0xffc35225*/
      v7 = result + 23; /*0xffc35228*/
      do /*0xffc35285*/
      {
        if ( *(v7 - 23) && v7[84] && *v7 == 121 ) /*0xffc3523a*/
        {
          v8 = ProcCommonFuncE35E((int)n6, n4, n6_1, n2, 0x5024120u); /*0xffc3524d*/
          result = (_BYTE *)ProcCommonFuncF4C7(n6, n4, n6_1, n2, 84033824, a3 & 1 | v8 & 0xFFFFFFFE); /*0xffc3526f*/
        }
        ++n2_1; /*0xffc35277*/
        v7 += 1379; /*0xffc35279*/
        LOBYTE(n2) = n2_1; /*0xffc3527f*/
      }
      while ( n2_1 < 2u ); /*0xffc35285*/
      n6_2 = n6_1; /*0xffc35287*/
    }
    ++n6_2; /*0xffc3528a*/
    v5 += 7688; /*0xffc3528c*/
    LOBYTE(n6_1) = n6_2; /*0xffc35292*/
  }
  while ( n6_2 < 6u ); /*0xffc35298*/
  return result; /*0xffc3529e*/
}

// Function: ProcCommonFunc52A5 @ 0xffc352a5 (0xba bytes)
// Index: 391/2560

_BYTE *__cdecl ProcCommonFunc52A5(unsigned __int8 *n6, int n4, char a3)
{
  _BYTE *result; // eax
  unsigned __int8 n6_2; // bl
  _BYTE *v5; // edi
  unsigned __int8 n2_1; // bh
  _BYTE *v7; // esi
  int v8; // eax
  int n2; // [esp+Ch] [ebp-8h]
  int n6_1; // [esp+10h] [ebp-4h]

  result = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffc352b3*/
  n6_2 = 0; /*0xffc352b9*/
  v5 = result; /*0xffc352bb*/
  LOBYTE(n6_1) = 0; /*0xffc352be*/
  do /*0xffc35352*/
  {
    if ( *v5 ) /*0xffc352c1*/
    {
      result = (_BYTE *)GetCpuCount((int)n6, n4, n6_1); /*0xffc352cf*/
      n2_1 = 0; /*0xffc352da*/
      LOBYTE(n2) = 0; /*0xffc352dc*/
      v7 = result + 23; /*0xffc352df*/
      do /*0xffc3533f*/
      {
        if ( *(v7 - 23) && v7[84] && *v7 == 122 ) /*0xffc352f1*/
        {
          v8 = ProcCommonFuncE35E((int)n6, n4, n6_1, n2, 0x5024070u); /*0xffc35304*/
          result = (_BYTE *)ProcCommonFuncF4C7(n6, n4, n6_1, n2, 84033648, ((a3 & 1) << 6) | v8 & 0xFFFFFFBF); /*0xffc35329*/
        }
        ++n2_1; /*0xffc35331*/
        v7 += 1379; /*0xffc35333*/
        LOBYTE(n2) = n2_1; /*0xffc35339*/
      }
      while ( n2_1 < 2u ); /*0xffc3533f*/
      n6_2 = n6_1; /*0xffc35341*/
    }
    ++n6_2; /*0xffc35344*/
    v5 += 7688; /*0xffc35346*/
    LOBYTE(n6_1) = n6_2; /*0xffc3534c*/
  }
  while ( n6_2 < 6u ); /*0xffc35352*/
  return result; /*0xffc35358*/
}

// Function: ProcCommonFunc535F @ 0xffc3535f (0x86 bytes)
// Index: 392/2560

int __cdecl ProcCommonFunc535F(unsigned __int8 *n6, int n4, int n6a, char a4)
{
  int result; // eax
  unsigned __int8 n2_1; // bl
  _BYTE *v6; // esi
  int v7; // eax
  int n2; // [esp+Ch] [ebp-4h]

  result = GetCpuCount((int)n6, n4, n6a); /*0xffc3536f*/
  n2_1 = 0; /*0xffc3537a*/
  LOBYTE(n2) = 0; /*0xffc35381*/
  v6 = (_BYTE *)(result + 23); /*0xffc35384*/
  do /*0xffc353dc*/
  {
    if ( *(v6 - 23) && v6[84] && *v6 == 122 ) /*0xffc35396*/
    {
      v7 = ProcCommonFuncE35E((int)n6, n4, n6a, n2, 0x5024070u); /*0xffc353a5*/
      result = ProcCommonFuncF4C7(n6, n4, n6a, n2, 84033648, ((a4 & 1) << 6) | v7 & 0xFFFFFFBF); /*0xffc353c6*/
    }
    ++n2_1; /*0xffc353ce*/
    v6 += 1379; /*0xffc353d0*/
    LOBYTE(n2) = n2_1; /*0xffc353d6*/
  }
  while ( n2_1 < 2u ); /*0xffc353dc*/
  return result; /*0xffc353de*/
}

// Function: ProcCommonFunc53E5 @ 0xffc353e5 (0x10b bytes)
// Index: 393/2560

int __cdecl ProcCommonFunc53E5(unsigned __int8 *__return_address, int n4, int a3, int n2, char a5)
{
  unsigned __int8 n6_1; // bl
  char v6; // bp
  int result; // eax
  unsigned __int8 n0x12; // bh
  unsigned int v9; // eax
  unsigned int v10; // eax
  int n6; // [esp+10h] [ebp-Ch]
  int p_n6; // [esp+14h] [ebp-8h] BYREF
  unsigned __int8 v13[4]; // [esp+18h] [ebp-4h]

  n6_1 = 0; /*0xffc353eb*/
  v6 = 0; /*0xffc353ed*/
  LOBYTE(n6) = 0; /*0xffc353f4*/
  do /*0xffc354e2*/
  {
    result = 1 << v6; /*0xffc353fd*/
    if ( ((1 << v6) & a3) != 0 ) /*0xffc35403*/
    {
      result = GetCpuCount((int)__return_address, n4, n6); /*0xffc35412*/
      if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + result + 107) ) /*0xffc35427*/
      {
        n0x12 = 0; /*0xffc35437*/
        v13[0] = 0; /*0xffc3543c*/
        do /*0xffc354c1*/
        {
          v9 = MailBoxFunc4CB2((int)__return_address, v13[0], 0x50E42E8u); /*0xffc35458*/
          ProcCommonFuncDD01(__return_address, n4, n6, n2, v9, &p_n6, 0, 0, 15); /*0xffc3546e*/
          p_n6 = ((a5 & 1) << 8) | p_n6 & 0xFFFFFEFF; /*0xffc35481*/
          v10 = MailBoxFunc4CB2((int)__return_address, v13[0], 0x50E42E8u); /*0xffc3549a*/
          ProcCommonFuncDD01(__return_address, n4, n6, n2, v10, &p_n6, 0, 1, 15); /*0xffc354b0*/
          v13[0] = ++n0x12; /*0xffc354ba*/
        }
        while ( n0x12 < 0x12u ); /*0xffc354c1*/
        result = ProcCommonFunc2441((int)__return_address, n4, n6, n2); /*0xffc354d0*/
      }
    }
    ++n6_1; /*0xffc354d8*/
    ++v6; /*0xffc354da*/
    LOBYTE(n6) = n6_1; /*0xffc354db*/
  }
  while ( n6_1 < 6u ); /*0xffc354e2*/
  return result; /*0xffc354e8*/
}

// Function: ProcCommonFunc54F0 @ 0xffc354f0 (0x109 bytes)
// Index: 394/2560

int __cdecl ProcCommonFunc54F0(unsigned __int8 *__return_address, int n4, int a3, int n2, char a5)
{
  unsigned __int8 n6_1; // bl
  char v6; // bp
  int result; // eax
  unsigned __int8 n0x12; // bh
  unsigned int v9; // eax
  unsigned int v10; // eax
  int n6; // [esp+10h] [ebp-Ch]
  int p_n6; // [esp+14h] [ebp-8h] BYREF
  unsigned __int8 v13[4]; // [esp+18h] [ebp-4h]

  n6_1 = 0; /*0xffc354f6*/
  v6 = 0; /*0xffc354f8*/
  LOBYTE(n6) = 0; /*0xffc354ff*/
  do /*0xffc355eb*/
  {
    result = 1 << v6; /*0xffc35508*/
    if ( ((1 << v6) & a3) != 0 ) /*0xffc3550e*/
    {
      result = GetCpuCount((int)__return_address, n4, n6); /*0xffc3551d*/
      if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + result + 107) ) /*0xffc35532*/
      {
        n0x12 = 0; /*0xffc35542*/
        v13[0] = 0; /*0xffc35547*/
        do /*0xffc355ca*/
        {
          v9 = MailBoxFunc4CB2((int)__return_address, v13[0], 0x50E42E8u); /*0xffc35563*/
          ProcCommonFuncDD01(__return_address, n4, n6, n2, v9, &p_n6, 0, 0, 15); /*0xffc35579*/
          p_n6 = (16 * (a5 & 1)) | p_n6 & 0xFFFFFFEF; /*0xffc3558a*/
          v10 = MailBoxFunc4CB2((int)__return_address, v13[0], 0x50E42E8u); /*0xffc355a3*/
          ProcCommonFuncDD01(__return_address, n4, n6, n2, v10, &p_n6, 0, 1, 15); /*0xffc355b9*/
          v13[0] = ++n0x12; /*0xffc355c3*/
        }
        while ( n0x12 < 0x12u ); /*0xffc355ca*/
        result = ProcCommonFunc2441((int)__return_address, n4, n6, n2); /*0xffc355d9*/
      }
    }
    ++n6_1; /*0xffc355e1*/
    ++v6; /*0xffc355e3*/
    LOBYTE(n6) = n6_1; /*0xffc355e4*/
  }
  while ( n6_1 < 6u ); /*0xffc355eb*/
  return result; /*0xffc355f1*/
}

// Function: ProcCommonFunc55F9 @ 0xffc355f9 (0x39 bytes)
// Index: 395/2560

int __cdecl ProcCommonFunc55F9(unsigned __int8 *n6, unsigned __int8 a2, int n6a, _BYTE *buf)
{
  int v4; // eax

  v4 = MiscConfigCheck(n6, a2, n6a, 184566272); /*0xffc3560c*/
  *((_DWORD *)buf + 6) = v4 & 0xFDFFFFFF; /*0xffc3561e*/
  return MiscIoCheck(n6, a2, n6a, 0xB004200u, v4 & 0xFDFFFFFF); /*0xffc3562f*/
}

// Function: ProcCommonFunc5632 @ 0xffc35632 (0x39 bytes)
// Index: 396/2560

int __cdecl ProcCommonFunc5632(unsigned __int8 *n6, unsigned __int8 a2, int n6a, _BYTE *buf)
{
  int v4; // eax

  v4 = MiscConfigCheck(n6, a2, n6a, 184566272); /*0xffc35645*/
  *((_DWORD *)buf + 6) = v4 | 0x2000000; /*0xffc35657*/
  return MiscIoCheck(n6, a2, n6a, 0xB004200u, v4 | 0x2000000); /*0xffc35668*/
}

// Function: ProcCommonFunc566B @ 0xffc3566b (0x19 bytes)
// Index: 397/2560

_DWORD *__cdecl ProcCommonFunc566B(_DWORD *a1)
{
  *a1 = 2097282; /*0xffc3566f*/
  a1[2] = 32; /*0xffc35675*/
  a1[1] = 2; /*0xffc3567c*/
  return a1; /*0xffc35683*/
}

// Function: ProcCommonFunc5684 @ 0xffc35684 (0xe9 bytes)
// Index: 398/2560

int __cdecl ProcCommonFunc5684(
        unsigned __int8 *__return_address,
        unsigned __int8 n6,
        int n6a,
        _BYTE *SocketInfo,
        _WORD *buf,
        _BYTE *a6)
{
  int v6; // edx
  unsigned int v7; // ecx
  int v8; // esi
  __int16 v9; // di
  int v10; // edi
  unsigned int v11; // edx
  unsigned int v12; // eax
  int v13; // edx
  int result; // eax

  v6 = *((_DWORD *)a6 + 2); /*0xffc35698*/
  v7 = *((_DWORD *)a6 + 1) & 0xFFFFF8FF; /*0xffc3569b*/
  v8 = *(_DWORD *)a6; /*0xffc356a2*/
  v9 = buf[(unsigned __int8)n6a]; /*0xffc356a5*/
  if ( v9 >= 0 ) /*0xffc356ac*/
  {
    v11 = ((unsigned int)&loc_FFCFFFFE + 1) & v6; /*0xffc356d5*/
    v7 |= (v9 & 7) << 8; /*0xffc356e3*/
    v12 = ((v9 & 7) << 24) | v8 & 0xC8FFFFFF; /*0xffc356ec*/
  }
  else
  {
    v10 = -v9; /*0xffc356b9*/
    v11 = (v6 ^ (v10 << 20)) & 0x300000 ^ v6; /*0xffc356cc*/
    v12 = v8 & 0xC8FFFFFF | ((v10 & 3) << 28); /*0xffc356ce*/
  }
  *((_DWORD *)a6 + 1) = v7; /*0xffc356f8*/
  *((_DWORD *)a6 + 2) = v11; /*0xffc356ff*/
  *(_DWORD *)a6 = v12; /*0xffc35706*/
  MiscIoCheck(__return_address, n6, n6a, 0xB00420Cu, v7); /*0xffc35708*/
  MiscIoCheck(__return_address, n6, n6a, 0xB004298u, *((_DWORD *)a6 + 2)); /*0xffc35721*/
  MiscIoCheck(__return_address, n6, n6a, 0x7014A20u, *(_DWORD *)a6); /*0xffc35739*/
  v13 = 7688 * (unsigned __int8)n6a; /*0xffc35748*/
  *(_DWORD *)&SocketInfo[v13 + 6765] = *((_DWORD *)a6 + 1); /*0xffc35751*/
  *(_DWORD *)&SocketInfo[v13 + 6769] = *((_DWORD *)a6 + 2); /*0xffc3575b*/
  result = *(_DWORD *)a6; /*0xffc35762*/
  *(_DWORD *)&SocketInfo[v13 + 7489] = *(_DWORD *)a6; /*0xffc35764*/
  return result; /*0xffc3574e*/
}

// Function: ProcCommonFunc576D @ 0xffc3576d (0x9a bytes)
// Index: 399/2560

char __cdecl ProcCommonFunc576D(int n6, int n4, unsigned __int8 a3, __int16 n256, __int16 n2, _BYTE *buf, _BYTE *a7)
{
  int v7; // esi
  int v8; // ebp
  int n256_1; // eax
  unsigned __int8 n2_1; // dl
  int v11; // ecx

  v7 = a3 << 8; /*0xffc35785*/
  v8 = v7 + n256; /*0xffc3578d*/
  if ( buf[v8] ) /*0xffc3578f*/
  {
    LOBYTE(n256_1) = 0; /*0xffc35795*/
    *(_WORD *)&a7[2 * a3] = 0; /*0xffc35797*/
  }
  else
  {
    *(_WORD *)&a7[2 * a3] += n2; /*0xffc3579d*/
  }
  if ( *(_WORD *)&a7[2 * a3] > 0x40u ) /*0xffc357a6*/
  {
    n256_1 = (unsigned __int8)a7[12] & ~(1 << a3); /*0xffc357ac*/
    a7[12] = n256_1; /*0xffc357af*/
  }
  if ( (!a7[12] || (n256_1 = 1 << a3) == 0) && buf[v8] == 1 ) /*0xffc357c5*/
  {
    n256_1 = (unsigned __int8)a7[13] & ~(1 << a3); /*0xffc357cb*/
    a7[13] = n256_1; /*0xffc357ce*/
  }
  n2_1 = 0; /*0xffc357d4*/
  if ( n2 > 0 ) /*0xffc357d8*/
  {
    v11 = 0; /*0xffc357da*/
    do /*0xffc35800*/
    {
      n256_1 = v11 + n256; /*0xffc357e1*/
      if ( n256_1 < 256 ) /*0xffc357e8*/
      {
        LOBYTE(n256_1) = buf[v8]; /*0xffc357f1*/
        buf[v7 + n256 + v11] = n256_1; /*0xffc357f6*/
      }
      v11 = ++n2_1; /*0xffc357fb*/
    }
    while ( n2_1 < n2 ); /*0xffc35800*/
  }
  return n256_1; /*0xffc35802*/
}

// Function: ProcCommonFunc5807 @ 0xffc35807 (0x44 bytes)
// Index: 400/2560

_WORD *__cdecl ProcCommonFunc5807(
        int __return_address,
        unsigned __int8 n4,
        unsigned __int8 n6,
        unsigned __int8 n2,
        int a5,
        int n23,
        _WORD *p_n127,
        _WORD *p_n127a)
{
  _WORD *result; // eax

  result = (_WORD *)GetCpuCount(__return_address, n4, n6); /*0xffc35813*/
  if ( *((_BYTE *)result + 1379 * n2 + 107) == 1 && a5 == 1 && n23 == 23 ) /*0xffc35836*/
  {
    *p_n127 = 0; /*0xffc3583f*/
    *p_n127a = 127; /*0xffc35846*/
    return p_n127a; /*0xffc35842*/
  }
  return result; /*0xffc35849*/
}

// Function: ProcCommonFunc584B @ 0xffc3584b (0x3e bytes)
// Index: 401/2560

__int16 *__cdecl ProcCommonFunc584B(_BYTE *__return_address, int n6, int n7, __int16 *buf, _WORD *a5)
{
  __int16 *buf_1; // eax
  int v6; // eax

  *a5 = 0; /*0xffc3585a*/
  buf_1 = buf; /*0xffc3585d*/
  if ( (__int16)n7 > 7 ) /*0xffc35863*/
  {
    *buf = 7; /*0xffc35865*/
    v6 = n7 - 7; /*0xffc35868*/
LABEL_5:
    buf_1 = (__int16 *)(v6 << 7); /*0xffc3587b*/
    *a5 = (_WORD)buf_1; /*0xffc3587e*/
    return buf_1; /*0xffc35881*/
  }
  if ( (__int16)n7 < -3 ) /*0xffc35873*/
  {
    *buf = -3; /*0xffc35875*/
    v6 = n7 + 3; /*0xffc35878*/
    goto LABEL_5; /*0xffc35878*/
  }
  *buf = n7; /*0xffc35883*/
  return buf_1; /*0xffc35886*/
}

// Function: ProcCommonFunc5889 @ 0xffc35889 (0x10b bytes)
// Index: 402/2560

int __cdecl ProcCommonFunc5889(
        unsigned __int8 *__return_address,
        unsigned __int8 n4,
        int n6,
        int a4,
        _WORD *buf,
        _BYTE *a6)
{
  int v6; // ecx
  int v7; // edx
  int v8; // esi
  __int16 n7; // bp
  __int16 v10; // bp
  unsigned int v11; // ecx
  int v12; // eax
  int v13; // edi
  unsigned int v14; // edx
  unsigned int v15; // eax
  int v16; // eax

  v6 = *((_DWORD *)a6 + 1); /*0xffc35899*/
  v7 = *((_DWORD *)a6 + 2); /*0xffc3589c*/
  v8 = *(_DWORD *)a6; /*0xffc3589f*/
  n7 = buf[(unsigned __int8)n6]; /*0xffc358a4*/
  if ( n7 >= 0 ) /*0xffc358ab*/
  {
    if ( n7 > 7 ) /*0xffc3590b*/
      buf[(unsigned __int8)n6] = 7; /*0xffc35911*/
    v14 = ((unsigned int)&loc_FFCFFFFE + 1) & v7; /*0xffc35923*/
    v16 = buf[(unsigned __int8)n6] & 7; /*0xffc35929*/
    v11 = (v16 << 8) | v6 & 0xFFFFF8FF; /*0xffc35931*/
    v15 = (v16 << 24) | v8 & 0xC8FFFFFF; /*0xffc3593a*/
  }
  else
  {
    if ( n7 < -3 ) /*0xffc358ba*/
      buf[(unsigned __int8)n6] = -3; /*0xffc358c0*/
    v10 = buf[(unsigned __int8)n6]; /*0xffc358c4*/
    v11 = v6 & 0xFFFFF8FF; /*0xffc358c8*/
    LOBYTE(v12) = v10; /*0xffc358ce*/
    v13 = v10; /*0xffc358d1*/
    if ( v10 < 0 ) /*0xffc358d6*/
      v13 = -v10; /*0xffc358d8*/
    v14 = (v7 ^ (v13 << 20)) & 0x300000 ^ v7; /*0xffc358e5*/
    if ( v10 < 0 ) /*0xffc358ea*/
      v12 = -v10; /*0xffc358ec*/
    v15 = v8 & 0xC8FFFFFF | ((v12 & 3) << 28); /*0xffc358fa*/
  }
  *((_DWORD *)a6 + 1) = v11; /*0xffc35946*/
  *((_DWORD *)a6 + 2) = v14; /*0xffc3594d*/
  *(_DWORD *)a6 = v15; /*0xffc35954*/
  MiscIoCheck(__return_address, n4, n6, 0xB00420Cu, v11); /*0xffc35956*/
  MiscIoCheck(__return_address, n4, n6, 0xB004298u, *((_DWORD *)a6 + 2)); /*0xffc3596f*/
  return MiscIoCheck(__return_address, n4, n6, 0x7014A20u, *(_DWORD *)a6); /*0xffc3598f*/
}

// Function: ProcCommonFunc5994 @ 0xffc35994 (0x61 bytes)
// Index: 403/2560

int __cdecl ProcCommonFunc5994(unsigned __int8 *n6, int n4, int n6_1, int n2, unsigned __int8 n13, char n14)
{
  int result; // eax
  int v7; // esi
  int v8; // edi
  int v9; // ebx

  result = GetSocketInfo((int)n6, n4); /*0xffc359a0*/
  v7 = result; /*0xffc359a8*/
  v8 = 7688 * (unsigned __int8)n6_1; /*0xffc359af*/
  v9 = *(_DWORD *)(v8 + result + 7497); /*0xffc359b9*/
  *(_DWORD *)(v8 + result + 7497) = 1; /*0xffc359c0*/
  if ( n14 == 14 ) /*0xffc359cb*/
    result = ProcCommonFuncF4C7(n6, n4, n6_1, n2, 84033728, n13); /*0xffc359e1*/
  *(_DWORD *)(v8 + v7 + 7497) = v9; /*0xffc359e9*/
  return result; /*0xffc359f0*/
}

// Function: ProcCommonFunc59F5 @ 0xffc359f5 (0x17 bytes)
// Index: 404/2560

char __cdecl ProcCommonFunc59F5(int n6, unsigned __int8 n2)
{
  return *(_BYTE *)(48704 * n2 + n6 + 307391); /*0xffc35a0b*/
}

// Function: ProcCommonFunc5A0C @ 0xffc35a0c (0x99 bytes)
// Index: 405/2560

int __cdecl ProcCommonFunc5A0C(_BYTE *__return_address, int bufa, _DWORD *a3)
{
  unsigned __int8 v3; // cl

  if ( !bufa )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4858,
      "(Tree != NULL)");
    KtiDebugAssert((int)__return_address, 223, 59); /*0xffc35a42*/
  }
  if ( !a3 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4859,
      "(Node != NULL)");
    KtiDebugAssert((int)__return_address, 223, 60); /*0xffc35a78*/
  }
  v3 = 0; /*0xffc35a80*/
  while ( (*(_BYTE *)(bufa + 4 * v3) & 1) != 0 ) /*0xffc35a89*/
  {
    if ( ++v3 >= 0x2Eu ) /*0xffc35a90*/
      return -1; /*0xffc35a95*/
  }
  *(_DWORD *)(bufa + 4 * v3) = *a3; /*0xffc35a9c*/
  return 0; /*0xffc35aa1*/
}

// Function: ProcCommonFunc5AA5 @ 0xffc35aa5 (0x99 bytes)
// Index: 406/2560

int __cdecl ProcCommonFunc5AA5(_BYTE *__return_address, int a2, _DWORD *p_n66588417)
{
  unsigned __int8 v3; // cl

  if ( !a2 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4822,
      "(Tree != NULL)");
    KtiDebugAssert((int)__return_address, 223, 57); /*0xffc35adb*/
  }
  if ( !p_n66588417 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4823,
      "(Node != NULL)");
    KtiDebugAssert((int)__return_address, 223, 58); /*0xffc35b11*/
  }
  v3 = 0; /*0xffc35b19*/
  while ( (*(_BYTE *)(a2 + 4 * v3) & 1) != 0 ) /*0xffc35b22*/
  {
    if ( ++v3 >= 6u ) /*0xffc35b29*/
      return -1; /*0xffc35b2e*/
  }
  *(_DWORD *)(a2 + 4 * v3) = *p_n66588417; /*0xffc35b35*/
  return 0; /*0xffc35b3a*/
}

// Function: ProcCommonFunc5B3E @ 0xffc35b3e (0x1c2 bytes)
// Index: 407/2560

int __cdecl ProcCommonFunc5B3E(char *n32, _BYTE *src, unsigned __int8 *buf)
{
  char *n32_1; // esi
  unsigned __int8 *buf_1; // edi
  unsigned __int8 n4; // bl
  int n4_1; // eax
  int v7; // edx

  n32_1 = n32; /*0xffc35b41*/
  KtiDebugPrint(255, 255, 255, 169, 1, (int)n32); /*0xffc35b56*/
  buf_1 = buf; /*0xffc35b5b*/
  if ( buf[128] == 1 ) /*0xffc35b69*/
    n4 = 4 * (n32[8321] != 0) + 4; /*0xffc35b75*/
  else
    n4 = buf[99]; /*0xffc35b7e*/
  LOBYTE(n32) = n4; /*0xffc35b81*/
  if ( n4 > 4u )
  {
    RcAssertPrint(
      n32_1,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      1521,
      "(TmpTotCpu <= MAX_SOCKET)");
    KtiDebugAssert((int)n32_1, 223, 8); /*0xffc35bae*/
  }
  if ( buf_1[128] == 1 ) /*0xffc35bc1*/
    ProcCommonFuncB5A6(n32_1, src, (int)buf_1, n4); /*0xffc35bca*/
  ProcCommonFunc5F14(n32_1, src, (int)buf_1, &buf, n32); /*0xffc35bde*/
  KtiLibSocketCheck(n32_1, src, (int)buf_1, (int)&buf, n32); /*0xffc35bef*/
  ProcCommonFunc6876(n32_1, src, (int)buf_1); /*0xffc35bfb*/
  ProcCommonFunc6678(n32_1, src, buf_1); /*0xffc35c03*/
  ProcCommonFunc6F8C(n32_1, src, (int)buf_1, n4); /*0xffc35c12*/
  KtiLibAssertCheck(n32_1, src, (int)buf_1); /*0xffc35c1e*/
  ProcCommonFunc729A((int)n32_1, src, (int)buf_1); /*0xffc35c26*/
  ProcCommonFunc6F1E((int)n32_1, src, (int)buf_1); /*0xffc35c2e*/
  ProcCommonFunc6AC1((int)n32_1, src, (int)buf_1); /*0xffc35c36*/
  if ( *((_DWORD *)n32_1 + 382) < n4 << 25 )
  {
    KtiDebugPrint(255, 255, 255, 219, 1, (int)n32_1); /*0xffc35c5b*/
    RcAssertPrint(n32_1, 1u, (int)"\n Invalid MMCFG Size Supplied. "); /*0xffc35c68*/
    RcAssertPrint(n32_1, 1u, (int)"\n Each CPU must be allocated at least 32MB of MMCFG space"); /*0xffc35c75*/
    RcAssertPrint(
      n32_1,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      1556,
      "FALSE");
    KtiDebugAssert((int)n32_1, 219, 1); /*0xffc35c9d*/
  }
  *(_DWORD *)(n32_1 + 257214) = 0; /*0xffc35ca5*/
  *(_DWORD *)(n32_1 + 257210) = 1; /*0xffc35cb1*/
  *((_WORD *)n32_1 + 128602) = 2048; /*0xffc35cbb*/
  *(_DWORD *)(n32_1 + 257206) = 0x400000; /*0xffc35cc2*/
  n4_1 = RmtFunc6EA8(*(_QWORD *)(n32_1 + 257210), buf_1[125]); /*0xffc35cdd*/
  *(_DWORD *)(n32_1 + 257210) = n4_1; /*0xffc35ce5*/
  *(_DWORD *)(n32_1 + 257214) = v7; /*0xffc35ceb*/
  ProcCommonFunc82A1(n4_1, n32_1, src, (int)buf_1); /*0xffc35cf1*/
  return 0; /*0xffc35cfb*/
}

// Function: ProcCommonFunc5D00 @ 0xffc35d00 (0x214 bytes)
// Index: 408/2560

char __cdecl ProcCommonFunc5D00(_BYTE *__return_address, int n4, int buf, unsigned __int8 n4a, unsigned __int8 n2)
{
  unsigned __int8 n4a_1; // si
  int v6; // eax
  int v7; // eax
  int v8; // eax
  int v9; // eax
  int v10; // eax
  int v11; // eax
  int v12; // eax
  char n15; // al
  int v14; // edi
  bool v15; // zf
  char v16; // al
  char v18; // [esp+11h] [ebp-7h]
  char n20; // [esp+12h] [ebp-6h]
  char n10; // [esp+13h] [ebp-5h]
  int n15_1; // [esp+14h] [ebp-4h]

  n4a_1 = n4a; /*0xffc35d0f*/
  v18 = 0; /*0xffc35d1c*/
  n20 = 20; /*0xffc35d20*/
  CpuIoRead((int)__return_address, n4a, n2, 151077204); /*0xffc35d25*/
  CpuIoRead((int)__return_address, n4a, n2, 151077200); /*0xffc35d32*/
  CpuIoRead((int)__return_address, n4a, n2, 151011520); /*0xffc35d3f*/
  do /*0xffc35f03*/
  {
    if ( !n20 ) /*0xffc35d52*/
      break; /*0xffc35d52*/
    --n20; /*0xffc35d5e*/
    v6 = CpuIoRead((int)__return_address, n4a_1, n2, 151077164); /*0xffc35d62*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077164, v6 & 0xFFFFFFDF); /*0xffc35d6f*/
    v7 = CpuIoRead((int)__return_address, n4a_1, n2, 151077164); /*0xffc35d78*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077164, v7 | 1); /*0xffc35d85*/
    if ( ProcCommonFunc94EA((int)__return_address, n4, buf, n4a_1, n2) == -1 ) /*0xffc35da3*/
      break; /*0xffc35da3*/
    v8 = CpuIoRead((int)__return_address, n4a_1, n2, 151077164); /*0xffc35dad*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077164, v8 | 0x10); /*0xffc35dba*/
    v9 = CpuIoRead((int)__return_address, n4a_1, n2, 151077164); /*0xffc35dc3*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077164, v9 | 1); /*0xffc35dd0*/
    if ( ProcCommonFunc94EA((int)__return_address, n4, buf, n4a_1, n2) == -1 ) /*0xffc35dee*/
      break; /*0xffc35dee*/
    v10 = CpuIoRead((int)__return_address, n4a_1, n2, 151077164); /*0xffc35df8*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077164, v10 & 0xFFFFFFEF); /*0xffc35e05*/
    v11 = CpuIoRead((int)__return_address, n4a_1, n2, 151077164); /*0xffc35e0e*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077164, v11 | 1); /*0xffc35e1b*/
    if ( ProcCommonFunc94EA((int)__return_address, n4, buf, n4a_1, n2) == -1 ) /*0xffc35e39*/
      break; /*0xffc35e39*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077196, -1); /*0xffc35e49*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151011520, 0x7FFFFFFF); /*0xffc35e5b*/
    v12 = CpuIoRead((int)__return_address, n4a_1, n2, 151077164); /*0xffc35e64*/
    CpuIoCfgWrite((int)__return_address, n4a_1, n2, 151077164, v12 | 0x20); /*0xffc35e71*/
    n10 = 10; /*0xffc35e79*/
    n15 = 0; /*0xffc35e7e*/
    v14 = 0; /*0xffc35e80*/
    do /*0xffc35ee1*/
    {
      if ( n15 == 15 ) /*0xffc35e88*/
        break; /*0xffc35e88*/
      if ( n15 == 14 ) /*0xffc35e8d*/
        break; /*0xffc35e8d*/
      if ( (v14 & 0x40000000) != 0 ) /*0xffc35e95*/
        break; /*0xffc35e95*/
      KtiFunc8C4((int)__return_address, 0x64u); /*0xffc35e9a*/
      n15_1 = CpuIoRead((int)__return_address, n4a_1, n2, 151077200); /*0xffc35eb9*/
      v14 = CpuIoRead((int)__return_address, n4a, n2, 151077196); /*0xffc35ec3*/
      RcAssertPrint(__return_address, 4u, (int)"\n KtiReutPhPis = 0x%08X, KtiReutPhCss = 0x%08X", v14, n15_1); /*0xffc35ece*/
      n15 = n15_1; /*0xffc35ed6*/
      v15 = n10-- == 1; /*0xffc35ed8*/
      n4a_1 = n4a; /*0xffc35edd*/
    }
    while ( !v15 ); /*0xffc35ee1*/
    if ( n15 == 15 || n15 == 14 ) /*0xffc35eee*/
    {
      v16 = 1; /*0xffc35ef0*/
      v18 = 1; /*0xffc35ef2*/
    }
    else
    {
      v16 = v18; /*0xffc35ef8*/
    }
  }
  while ( !v16 ); /*0xffc35f03*/
  return v18; /*0xffc35f0d*/
}

// Function: ProcCommonFunc5F14 @ 0xffc35f14 (0x379 bytes)
// Index: 409/2560

int __cdecl ProcCommonFunc5F14(char *n32, _BYTE *src, int buf, _BYTE *p_buf, char *n4)
{
  unsigned __int8 n4_1; // al
  unsigned __int8 n4_11; // bl
  unsigned int n0x10000000; // edx
  unsigned int n256; // ecx
  _BYTE *p_buf_4; // edx
  _BYTE *src_9; // ebp
  unsigned int v11; // ecx
  char v12; // ah
  char v13; // al
  char *v14; // esi
  _BYTE *src_1; // ecx
  int v16; // edi
  int n4_2; // edx
  char v18; // al
  char *src_3; // edi
  char **p_n4; // ecx
  unsigned __int8 v21; // dl
  int n4_4; // ebx
  char v23; // al
  unsigned __int8 v24; // al
  char **p_n4_1; // eax
  _BYTE *src_4; // ecx
  int n4_5; // edx
  char **p_n4_2; // eax
  _BYTE *src_5; // ecx
  int n4_6; // edi
  _BYTE *src_6; // esi
  _BYTE *p_buf_1; // edx
  int n4_7; // ecx
  _BYTE *src_7; // edx
  _BYTE *src_8; // ecx
  _BYTE *p_buf_2; // eax
  char *n32_1; // esi
  int n4_9; // edi
  int v39; // ebx
  _BYTE *p_buf_3; // edi
  char v41; // bl
  int n4_10; // eax
  unsigned __int8 v44; // [esp+13h] [ebp-19h]
  _BYTE *src_2; // [esp+14h] [ebp-18h]
  int v46; // [esp+14h] [ebp-18h]
  unsigned int v47; // [esp+18h] [ebp-14h]
  int n4_3; // [esp+1Ch] [ebp-10h]
  int n4_8; // [esp+1Ch] [ebp-10h]
  int v50; // [esp+20h] [ebp-Ch]
  int v51; // [esp+24h] [ebp-8h]

  n4_1 = (unsigned __int8)n4; /*0xffc35f17*/
  n4_11 = 0; /*0xffc35f1d*/
  v44 = 0; /*0xffc35f23*/
  if ( (unsigned __int8)n4 > 4u )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      1663,
      "(TmpTotCpu <= MAX_SOCKET)");
    KtiDebugAssert((int)n32, 223, 10); /*0xffc35f55*/
    n4_1 = (unsigned __int8)n4; /*0xffc35f5a*/
  }
  n0x10000000 = *((_DWORD *)n32 + 382); /*0xffc35f61*/
  if ( n0x10000000 <= 0x10000000 )
  {
    src_1 = src; /*0xffc35ffc*/
    v16 = 0; /*0xffc36000*/
    v47 = n0x10000000 >> 25; /*0xffc36007*/
    n4_2 = 4; /*0xffc3600b*/
    src_2 = src; /*0xffc3600e*/
    n4_3 = 4; /*0xffc36012*/
    do
    {
      if ( ((*src_1 & 1) != 0 || *(_BYTE *)(buf + 128) == 1) && (*src_1 & 0x60) == 0 )
      {
        v18 = n32[v16 + 8293]; /*0xffc36031*/
        if ( v18 )
        {
          *((_BYTE *)&n4 + v16) = v18; /*0xffc36074*/
        }
        else
        {
          *((_BYTE *)&n4 + v16) = 1; /*0xffc36040*/
          ProcCommonFunc940C(n32, 1 << v16, 0, 0xFFu, 0xCu); /*0xffc36054*/
          RcAssertPrint(
            n32,
            2u,
            (int)"\n WARNING:  A resource is not requested for CPU%u. Forcing resource allocation. ",
            v16);
          src_1 = src_2; /*0xffc36067*/
          n4_2 = n4_3; /*0xffc3606e*/
        }
      }
      else
      {
        *((_BYTE *)&n4 + v16) = 0; /*0xffc3607a*/
      }
      src_1 += 13; /*0xffc3607e*/
      ++v16; /*0xffc36080*/
      --n4_2; /*0xffc36081*/
      src_2 = src_1; /*0xffc36084*/
      n4_3 = n4_2; /*0xffc36088*/
    }
    while ( n4_2 );
    src_3 = src; /*0xffc3608e*/
    p_n4 = &n4; /*0xffc36092*/
    v21 = 0; /*0xffc3609a*/
    n4_4 = 4; /*0xffc3609e*/
    do /*0xffc360c6*/
    {
      v23 = *src_3; /*0xffc3609f*/
      if ( ((*src_3 & 1) != 0 || *(_BYTE *)(buf + 128) == 1) && (v23 & 0x60) == 0 ) /*0xffc360b0*/
      {
        v21 += *(_BYTE *)p_n4; /*0xffc360b2*/
      }
      else if ( (v23 & 0x60) == 0x20 ) /*0xffc360ba*/
      {
        ++v44; /*0xffc360bc*/
      }
      p_n4 = (char **)((char *)p_n4 + 1); /*0xffc360c0*/
      src_3 += 13; /*0xffc360c1*/
      --n4_4; /*0xffc360c3*/
    }
    while ( n4_4 ); /*0xffc360c6*/
    v24 = v47; /*0xffc360c8*/
    if ( v21 > (unsigned __int8)v47 )
    {
      ProcCommonFunc940C(n32, 0xFFu, 0xFFu, 0xFFu, 0xDu); /*0xffc360e2*/
      RcAssertPrint(
        n32,
        2u,
        (int)"\n WARNING:  Requested Resource can not be allocated. Forcing to maximum possible value. ");
      p_n4_1 = &n4; /*0xffc360f8*/
      src_4 = src; /*0xffc36103*/
      n4_5 = 4; /*0xffc36107*/
      do /*0xffc36124*/
      {
        if ( ((*src_4 & 1) != 0 || *(_BYTE *)(buf + 128) == 1) && *(_BYTE *)p_n4_1 ) /*0xffc36116*/
          *(_BYTE *)p_n4_1 = 1; /*0xffc3611b*/
        src_4 += 13; /*0xffc3611e*/
        p_n4_1 = (char **)((char *)p_n4_1 + 1); /*0xffc36120*/
        --n4_5; /*0xffc36121*/
      }
      while ( n4_5 ); /*0xffc36124*/
      v21 = 0; /*0xffc36128*/
      p_n4_2 = &n4; /*0xffc3612a*/
      src_5 = src; /*0xffc3612e*/
      n4_6 = 4; /*0xffc36132*/
      do /*0xffc36150*/
      {
        if ( ((*src_5 & 1) != 0 || *(_BYTE *)(buf + 128) == 1) && (*src_5 & 0x60) == 0 ) /*0xffc36146*/
          v21 += *(_BYTE *)p_n4_2; /*0xffc36148*/
        src_5 += 13; /*0xffc3614a*/
        p_n4_2 = (char **)((char *)p_n4_2 + 1); /*0xffc3614c*/
        --n4_6; /*0xffc3614d*/
      }
      while ( n4_6 ); /*0xffc36150*/
      v24 = v47; /*0xffc36152*/
    }
    src_6 = src; /*0xffc36162*/
    v51 = (v24 - v44) / v21; /*0xffc36170*/
    v46 = (v24 - v44) % v21; /*0xffc36178*/
    p_buf_1 = p_buf; /*0xffc3617c*/
    n4_7 = 4; /*0xffc36184*/
    v50 = (char *)&n4 - p_buf; /*0xffc36185*/
    n4_8 = 4; /*0xffc36189*/
    do /*0xffc361c7*/
    {
      if ( ((*src_6 & 1) != 0 || *(_BYTE *)(buf + 128) == 1) && (*src_6 & 0x60) == 0 ) /*0xffc3619e*/
      {
        *p_buf_1 = v51 * p_buf_1[v50]; /*0xffc361b2*/
        n4_7 = n4_8; /*0xffc361b4*/
      }
      else
      {
        *p_buf_1 = 1; /*0xffc361ba*/
      }
      src_6 += 13; /*0xffc361bd*/
      ++p_buf_1; /*0xffc361bf*/
      n4_8 = --n4_7; /*0xffc361c3*/
    }
    while ( n4_7 ); /*0xffc361c7*/
    src_7 = src; /*0xffc361c9*/
    src_8 = src; /*0xffc361cd*/
    p_buf_2 = p_buf; /*0xffc361cf*/
    n32_1 = n32; /*0xffc361d3*/
    n4_9 = 4; /*0xffc361d9*/
    do /*0xffc36221*/
    {
      if ( (*src_8 & 1) != 0 || (n32_1 = n32, *(_BYTE *)(buf + 128) == 1) ) /*0xffc361f0*/
      {
        v39 = v46; /*0xffc361f5*/
        if ( (*src_8 & 0x60) == 0 ) /*0xffc361f9*/
        {
          if ( (_BYTE)v46 ) /*0xffc361fd*/
          {
            n32_1 = n32; /*0xffc36207*/
            if ( p_buf_2[v50] ) /*0xffc36203*/
            {
              ++*p_buf_2; /*0xffc3620d*/
              LOBYTE(v39) = v46 - 1; /*0xffc3620f*/
              v46 = v39; /*0xffc36211*/
            }
          }
        }
      }
      else
      {
        LOBYTE(v39) = v46; /*0xffc36217*/
      }
      src_8 += 13; /*0xffc3621b*/
      ++p_buf_2; /*0xffc3621d*/
      --n4_9; /*0xffc3621e*/
    }
    while ( n4_9 ); /*0xffc36221*/
    p_buf_3 = p_buf; /*0xffc36227*/
    p_buf[*(unsigned __int8 *)(buf + 1)] += v39; /*0xffc36231*/
    v41 = 0; /*0xffc36234*/
    n4_10 = 4; /*0xffc36238*/
    do /*0xffc3624f*/
    {
      if ( (*src_7 & 1) != 0 || *(_BYTE *)(buf + 128) == 1 ) /*0xffc36245*/
        v41 += *p_buf_3; /*0xffc36247*/
      src_7 += 13; /*0xffc36249*/
      ++p_buf_3; /*0xffc3624b*/
      --n4_10; /*0xffc3624c*/
    }
    while ( n4_10 ); /*0xffc3624f*/
    if ( v41 != (_BYTE)v47 )
    {
      RcAssertPrint(
        n32_1,
        1u,
        (int)"\n\n %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
        1817,
        "(TotBusChunk == AvailBusChunk)");
      KtiDebugAssert((int)n32_1, 223, 11); /*0xffc3627b*/
    }
  }
  else
  {
    n256 = (n0x10000000 / n4_1) >> 20; /*0xffc35f83*/
    if ( n256 > 0x100 ) /*0xffc35f88*/
      n256 = 256; /*0xffc35f8a*/
    p_buf_4 = p_buf; /*0xffc35f90*/
    src_9 = src; /*0xffc35f94*/
    v11 = n256 >> 5; /*0xffc35f98*/
    n32[351 * *(unsigned __int8 *)(buf + 1) + 255741] = 0; /*0xffc35fa5*/
    p_buf[*(unsigned __int8 *)(buf + 1)] = v11; /*0xffc35fb0*/
    v12 = v11; /*0xffc35fb3*/
    v13 = (v11 & 7) == 0; /*0xffc35fbd*/
    v14 = n32 + 255741; /*0xffc35fbf*/
    do /*0xffc35ff5*/
    {
      if ( n4_11 != *(_BYTE *)(buf + 1) && ((*src_9 & 1) != 0 || *(_BYTE *)(buf + 128) == 1) ) /*0xffc35fd7*/
      {
        v12 += v11; /*0xffc35fd9*/
        *p_buf_4 = v11; /*0xffc35fdb*/
        *v14 = v13; /*0xffc35fdd*/
        if ( (v12 & 7) == 0 ) /*0xffc35fe2*/
          ++v13; /*0xffc35fe4*/
      }
      ++n4_11; /*0xffc35fe6*/
      src_9 += 13; /*0xffc35fe8*/
      ++p_buf_4; /*0xffc35feb*/
      v14 += 351; /*0xffc35fec*/
    }
    while ( n4_11 < 4u ); /*0xffc35ff5*/
  }
  return 0; /*0xffc36283*/
}

// Function: KtiLibSocketCheck @ 0xffc3628d (0x3eb bytes)
// Index: 410/2560

int __cdecl KtiLibSocketCheck(char *n32, _BYTE *src, int buf, int p_buf, char *n4)
{
  int n4_1; // esi
  unsigned __int8 v6; // bl
  int buf_4; // edx
  char *n4a_1; // ebp
  int v9; // eax
  _BYTE *src_1; // edi
  char v11; // bh
  int v12; // eax
  unsigned __int8 n6; // dl
  int v14; // esi
  int v15; // ecx
  char v16; // al
  unsigned __int8 n6_1; // cl
  int v18; // ebp
  int v19; // edx
  int v20; // esi
  char v21; // bl
  char *v22; // esi
  unsigned __int8 n4_2; // al
  int v24; // ecx
  int v25; // ebp
  unsigned __int8 v26; // al
  int v27; // eax
  unsigned __int8 v28; // dl
  int v29; // eax
  int v30; // ecx
  char n4c_1; // al
  char v32; // dh
  char v33; // cl
  unsigned __int8 n6_2; // dl
  int v35; // esi
  int v36; // ebp
  char n4c_2; // bl
  unsigned __int8 n4_3; // [esp+12h] [ebp-2Ah]
  _BYTE buf_2[4]; // [esp+14h] [ebp-28h] BYREF
  _BYTE bufa[4]; // [esp+18h] [ebp-24h] BYREF
  _BYTE buf_1[4]; // [esp+1Ch] [ebp-20h] BYREF
  _BYTE buf_3[4]; // [esp+20h] [ebp-1Ch] BYREF
  int v44; // [esp+24h] [ebp-18h]
  int v45; // [esp+28h] [ebp-14h]
  int v46; // [esp+2Ch] [ebp-10h]
  int v47; // [esp+30h] [ebp-Ch]
  unsigned int v48; // [esp+34h] [ebp-8h]
  int v49; // [esp+38h] [ebp-4h]
  int p_bufa; // [esp+4Ch] [ebp+10h]
  char *n4a; // [esp+50h] [ebp+14h]
  char n4b; // [esp+50h] [ebp+14h]
  char n4c; // [esp+50h] [ebp+14h]

  n4_1 = 4; /*0xffc3629a*/
  v6 = 0; /*0xffc3629c*/
  memset_save_flags(bufa, 0, 4u); /*0xffc362a0*/
  memset_save_flags(buf_1, 0, 4u); /*0xffc362ac*/
  memset_save_flags(buf_2, 0, 4u); /*0xffc362b8*/
  memset_save_flags(buf_3, 0, 4u); /*0xffc362c4*/
  if ( (unsigned __int8)n4 > 4u )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      1858,
      "(TmpTotCpu <= MAX_SOCKET)");
    KtiDebugAssert((int)n32, 223, 12); /*0xffc362fb*/
  }
  buf_4 = buf; /*0xffc36303*/
  n4a_1 = n32 + 255790; /*0xffc36307*/
  v9 = *((_DWORD *)n32 + 381); /*0xffc3630d*/
  src_1 = src; /*0xffc36315*/
  v11 = 0; /*0xffc36319*/
  v44 = 0; /*0xffc3631b*/
  *(_DWORD *)(buf + 129) = v9; /*0xffc3631f*/
  v12 = 0; /*0xffc36325*/
  *(_BYTE *)(buf + 133) = 0; /*0xffc36327*/
  n4a = n32 + 255790; /*0xffc3632d*/
  do /*0xffc363ba*/
  {
    if ( (*src_1 & 1) != 0 || *(_BYTE *)(buf_4 + 128) == 1 ) /*0xffc3633f*/
    {
      if ( (*src_1 & 0x60) == 0 ) /*0xffc36344*/
      {
        buf_2[v12] = 0; /*0xffc36348*/
        n6 = 0; /*0xffc3634c*/
        buf_1[v12] = 0; /*0xffc3634e*/
        bufa[v12] = 0; /*0xffc36352*/
        while ( 1 ) /*0xffc36356*/
        {
          if ( *n4a_1 ) /*0xffc36356*/
          {
            if ( *n4a_1 != 1 ) /*0xffc36362*/
            {
              if ( *n4a_1 == 2 ) /*0xffc36367*/
              {
                ++buf_2[v12]; /*0xffc36374*/
              }
              else if ( *n4a_1 == 3 ) /*0xffc3636c*/
              {
                ++buf_3[v12]; /*0xffc3636e*/
              }
              goto LABEL_17; /*0xffc36372*/
            }
            if ( n6 ) /*0xffc3637c*/
              ++buf_1[v12]; /*0xffc3637e*/
          }
          ++bufa[v12]; /*0xffc36382*/
LABEL_17:
          ++n6; /*0xffc36386*/
          n4a_1 += 39; /*0xffc36388*/
          if ( n6 >= 6u ) /*0xffc3638e*/
          {
            n4a_1 = n4a; /*0xffc36390*/
            buf_4 = buf; /*0xffc36394*/
            goto LABEL_20; /*0xffc36398*/
          }
        }
      }
      buf_2[v12] = 0; /*0xffc3639a*/
      buf_1[v12] = 0; /*0xffc3639f*/
      bufa[v12] = 1; /*0xffc363a4*/
    }
LABEL_20:
    n4a_1 += 351; /*0xffc363a9*/
    src_1 += 13; /*0xffc363af*/
    ++v12; /*0xffc363b2*/
    n4a = n4a_1; /*0xffc363b3*/
    --n4_1; /*0xffc363b7*/
  }
  while ( n4_1 ); /*0xffc363ba*/
  v14 = *(unsigned __int8 *)(buf_4 + 1); /*0xffc363c0*/
  v15 = 351 * v14; /*0xffc363c8*/
  *(_DWORD *)&n32[v15 + 255785] = 0; /*0xffc363ce*/
  *(_DWORD *)&n32[v15 + 255781] = *((_DWORD *)n32 + 381) + ((unsigned __int8)n32[351 * v14 + 255741] << 28); /*0xffc363e7*/
  n32[v15 + 255743] = 0; /*0xffc363f2*/
  v16 = 32 * *(_BYTE *)(v14 + p_buf) - 1; /*0xffc36400*/
  n32[v15 + 255744] = v16; /*0xffc36402*/
  n6_1 = 0; /*0xffc3642f*/
  v18 = 9 * v14; /*0xffc36431*/
  n4b = (unsigned __int8)(v16 + 1 - (bufa[v14] + 2 * (buf_2[v14] + 3 * buf_3[v14] + 10))) % buf_1[v14]; /*0xffc36434*/
  v19 = v44; /*0xffc36438*/
  v48 = (unsigned __int8)(v16 + 1 - (bufa[v14] + 2 * (buf_2[v14] + 3 * buf_3[v14] + 10))) /*0xffc3643c*/
      / (unsigned int)(unsigned __int8)buf_1[v14];
  do /*0xffc364b3*/
  {
    v20 = 39 * (v18 + n6_1); /*0xffc36445*/
    switch ( n32[v20 + 255790] ) /*0xffc36453*/
    {
      case 0: /*0xffc36453*/
        v6 = v19; /*0xffc36494*/
        goto LABEL_35; /*0xffc36494*/
      case 1: /*0xffc36453*/
        v11 = v19; /*0xffc3647d*/
        if ( n6_1 ) /*0xffc36481*/
          v21 = v48; /*0xffc3648c*/
        else
          v21 = n4b + 20; /*0xffc36487*/
        v6 = v19 + v21; /*0xffc36490*/
        break; /*0xffc36492*/
      case 2: /*0xffc36453*/
        v6 = v19 + 1; /*0xffc36479*/
        goto LABEL_35; /*0xffc3647b*/
      case 3: /*0xffc36453*/
        v6 = v19 + 5; /*0xffc36472*/
LABEL_35:
        v11 = v19; /*0xffc36496*/
        break; /*0xffc36496*/
      case 8: /*0xffc36453*/
        v11 = -1; /*0xffc36469*/
        v6 = 0; /*0xffc3646c*/
        break;
    }
    n32[v20 + 255791] = v11; /*0xffc36498*/
    n32[v20 + 255792] = v6; /*0xffc3649f*/
    if ( v6 ) /*0xffc364a8*/
      v19 = v6 + 1; /*0xffc364ad*/
    ++n6_1; /*0xffc364ae*/
  }
  while ( n6_1 < 6u ); /*0xffc364b3*/
  v44 = v19; /*0xffc364b9*/
  p_bufa = p_buf - (_DWORD)buf_3; /*0xffc364bd*/
  v22 = n32 + 255785; /*0xffc364c1*/
  n4_2 = 0; /*0xffc364c7*/
  v48 = (unsigned int)(n32 + 255785); /*0xffc364c9*/
  v24 = 0; /*0xffc364cd*/
  n4_3 = 0; /*0xffc364cf*/
  v25 = 0; /*0xffc364d3*/
  v45 = 0; /*0xffc364d5*/
  v46 = 0; /*0xffc364d9*/
  do /*0xffc36668*/
  {
    if ( n4_2 == *(_BYTE *)(buf + 1) ) /*0xffc364e8*/
      goto LABEL_69; /*0xffc364e8*/
    v24 = v45; /*0xffc364f5*/
    if ( (*src & 1) == 0 ) /*0xffc364f9*/
    {
      v25 = v46; /*0xffc36506*/
      if ( *(_BYTE *)(buf + 128) != 1 ) /*0xffc3650a*/
      {
        *((_DWORD *)v22 - 1) = -1; /*0xffc3650c*/
        *(_DWORD *)v22 = -1; /*0xffc36510*/
        *((_WORD *)v22 - 21) = 255; /*0xffc36513*/
        goto LABEL_69; /*0xffc36519*/
      }
    }
    *(_DWORD *)v22 = 0; /*0xffc3651e*/
    *((_DWORD *)v22 - 1) = *((_DWORD *)n32 + 381) + ((unsigned __int8)*(v22 - 44) << 28); /*0xffc36534*/
    *(v22 - 42) = v19; /*0xffc3653b*/
    v26 = v19 + 32 * buf_3[v25 + p_bufa] - 1; /*0xffc36546*/
    *(v22 - 41) = v26; /*0xffc36548*/
    v27 = v26 - v19; /*0xffc3654e*/
    v28 = buf_1[v25]; /*0xffc36550*/
    v47 = v27 + 1; /*0xffc36555*/
    v29 = (unsigned __int8)buf_3[v25]; /*0xffc36559*/
    v30 = 3 * v29; /*0xffc3655c*/
    LOBYTE(v30) = bufa[v25] + 2 * (buf_2[v25] + 3 * v29 + 1); /*0xffc36567*/
    v49 = v30; /*0xffc3656b*/
    if ( v28 ) /*0xffc36571*/
    {
      n4c_1 = (unsigned __int8)(v47 - v30) / v28; /*0xffc36587*/
      LOBYTE(v30) = v49; /*0xffc36589*/
      v28 = buf_1[v25]; /*0xffc3658d*/
      n4c = n4c_1; /*0xffc36591*/
    }
    else
    {
      n4c = 0; /*0xffc36573*/
    }
    if ( v28 ) /*0xffc36597*/
      v32 = (unsigned __int8)(v47 - v30) % v28; /*0xffc365ad*/
    else
      v32 = 0; /*0xffc36599*/
    v33 = v44; /*0xffc365af*/
    n6_2 = 0; /*0xffc365b3*/
    v35 = v45; /*0xffc365b5*/
    do /*0xffc3662a*/
    {
      v36 = 39 * (v35 + n6_2); /*0xffc365be*/
      switch ( n32[v36 + 255790] ) /*0xffc365cc*/
      {
        case 0: /*0xffc365cc*/
          v6 = v33; /*0xffc3660b*/
          goto LABEL_64; /*0xffc3660b*/
        case 1: /*0xffc365cc*/
          v11 = v33; /*0xffc365f6*/
          if ( n6_2 ) /*0xffc365fa*/
            n4c_2 = n4c; /*0xffc36603*/
          else
            n4c_2 = v32 + 2; /*0xffc365fe*/
          v6 = v33 + n4c_2; /*0xffc36607*/
          break; /*0xffc36609*/
        case 2: /*0xffc365cc*/
          v6 = v33 + 1; /*0xffc365f2*/
          goto LABEL_64; /*0xffc365f4*/
        case 3: /*0xffc365cc*/
          v6 = v33 + 5; /*0xffc365eb*/
LABEL_64:
          v11 = v33; /*0xffc3660d*/
          break; /*0xffc3660d*/
        case 8: /*0xffc365cc*/
          v11 = -1; /*0xffc365e2*/
          v6 = 0; /*0xffc365e5*/
          break;
      }
      n32[v36 + 255791] = v11; /*0xffc3660f*/
      n32[v36 + 255792] = v6; /*0xffc36616*/
      if ( v6 ) /*0xffc3661f*/
        v33 = v6 + 1; /*0xffc36624*/
      ++n6_2; /*0xffc36625*/
    }
    while ( n6_2 < 6u ); /*0xffc3662a*/
    v22 = (char *)v48; /*0xffc3662c*/
    v25 = v46; /*0xffc36630*/
    n4_2 = n4_3; /*0xffc36634*/
    v24 = v45; /*0xffc36638*/
    v19 = *(unsigned __int8 *)(v48 - 41) + 1; /*0xffc36640*/
    v44 = v19; /*0xffc36641*/
LABEL_69:
    src += 13; /*0xffc36645*/
    ++n4_2; /*0xffc3664a*/
    ++v25; /*0xffc3664c*/
    n4_3 = n4_2; /*0xffc3664d*/
    v24 += 9; /*0xffc36651*/
    v46 = v25; /*0xffc36654*/
    v22 += 351; /*0xffc36658*/
    v45 = v24; /*0xffc3665e*/
    v48 = (unsigned int)v22; /*0xffc36662*/
  }
  while ( n4_2 < 4u ); /*0xffc36668*/
  return 0; /*0xffc3666e*/
}

// Function: ProcCommonFunc6678 @ 0xffc36678 (0x1fe bytes)
// Index: 411/2560

int __cdecl ProcCommonFunc6678(char *n32, _BYTE *src, unsigned __int8 *buf)
{
  int v4; // edx
  int n6; // ebx
  int v6; // ebp
  char n4; // al
  int v8; // ecx
  unsigned __int8 bufa_1; // bl
  char *v11; // esi
  unsigned __int8 v12; // bl
  _DWORD *v13; // edx
  int n6_1; // ecx
  unsigned __int8 n4_1; // al
  int v16; // ecx
  int v17; // eax
  _DWORD *v18; // eax
  int n6_2; // ecx
  unsigned __int8 v21; // [esp+13h] [ebp-1h]
  int n32a; // [esp+18h] [ebp+4h]
  unsigned __int8 bufa; // [esp+20h] [ebp+Ch]

  v21 = 0; /*0xffc3668f*/
  if ( !buf[50] )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2196,
      "KtiInternalGlobal->TotSadTargets");
    KtiDebugAssert((int)n32, 223, 13); /*0xffc366b6*/
  }
  if ( (unsigned __int8)n32[351 * buf[1] + 255742] > 6u )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2197,
      "host->var.kti.CpuInfo[KtiInternalGlobal->SbspSoc].CpuRes.TotEnabledStacks <= MAX_IIO_STACK");
    KtiDebugAssert((int)n32, 223, 14); /*0xffc366ee*/
  }
  v4 = 0; /*0xffc36700*/
  n6 = 6; /*0xffc36704*/
  *(_DWORD *)&n32[351 * buf[1] + 255749] = -20971520; /*0xffc36705*/
  do /*0xffc367a2*/
  {
    v6 = 39 * (v4 + 9 * buf[1]); /*0xffc36719*/
    n4 = n32[v6 + 255790]; /*0xffc3671c*/
    if ( (unsigned __int8)n4 < 4u && n4 ) /*0xffc36729*/
    {
      v8 = v21 << 15; /*0xffc36730*/
      *(_DWORD *)&n32[v6 + 255797] = v8 - 20971520; /*0xffc3673f*/
      *(_DWORD *)&n32[351 * buf[1] + 255801 + 39 * v4] = v8 - 20938753; /*0xffc36757*/
      ++v21; /*0xffc36771*/
      *(_DWORD *)&n32[351 * buf[1] + 255753] = *(_DWORD *)&n32[351 * buf[1] + 255801 + 39 * v4]; /*0xffc36778*/
    }
    else
    {
      *(_DWORD *)&n32[v6 + 255797] = -1; /*0xffc36781*/
      *(_DWORD *)&n32[351 * buf[1] + 255801 + 39 * v4] = 0; /*0xffc3679a*/
    }
    ++v4; /*0xffc3679e*/
    --n6; /*0xffc3679f*/
  }
  while ( n6 ); /*0xffc367a2*/
  bufa_1 = 0; /*0xffc367ac*/
  bufa = 0; /*0xffc367ae*/
  v11 = n32 + 255749; /*0xffc367b2*/
  do /*0xffc36868*/
  {
    if ( bufa_1 != buf[1] ) /*0xffc367bb*/
    {
      if ( ((*src & 1) != 0 || buf[128] == 1) && (*src & 0x60) == 0 ) /*0xffc367d3*/
      {
        v12 = v21; /*0xffc367d5*/
        v13 = v11 + 48; /*0xffc367d9*/
        n6_1 = 6; /*0xffc367e9*/
        *(_DWORD *)v11 = (v21 << 15) - 20971520; /*0xffc367ea*/
        n32a = 6; /*0xffc367ec*/
        do /*0xffc3682e*/
        {
          n4_1 = *((_BYTE *)v13 - 7); /*0xffc367f0*/
          if ( n4_1 < 4u && n4_1 ) /*0xffc367f9*/
          {
            v16 = v12++ << 15; /*0xffc367fe*/
            *v13 = v16 - 20971520; /*0xffc36809*/
            v17 = v16 - 20938753; /*0xffc3680b*/
            n6_1 = n32a; /*0xffc36811*/
            v13[1] = v17; /*0xffc36815*/
            *((_DWORD *)v11 + 1) = v17; /*0xffc36818*/
          }
          else
          {
            *v13 = -1; /*0xffc3681d*/
            v13[1] = 0; /*0xffc36820*/
          }
          v13 = (_DWORD *)((char *)v13 + 39); /*0xffc36824*/
          n32a = --n6_1; /*0xffc3682a*/
        }
        while ( n6_1 ); /*0xffc3682e*/
        v21 = v12; /*0xffc36830*/
        bufa_1 = bufa; /*0xffc36834*/
      }
      else
      {
        *(_DWORD *)v11 = -1; /*0xffc3683a*/
        v18 = v11 + 52; /*0xffc3683d*/
        *((_DWORD *)v11 + 1) = 0; /*0xffc36840*/
        n6_2 = 6; /*0xffc36846*/
        do /*0xffc36854*/
        {
          *(v18 - 1) = -1; /*0xffc36847*/
          *v18 = 0; /*0xffc3684b*/
          v18 = (_DWORD *)((char *)v18 + 39); /*0xffc3684e*/
          --n6_2; /*0xffc36851*/
        }
        while ( n6_2 ); /*0xffc36854*/
      }
    }
    ++bufa_1; /*0xffc36856*/
    src += 13; /*0xffc36858*/
    v11 += 351; /*0xffc3685b*/
    bufa = bufa_1; /*0xffc36861*/
  }
  while ( bufa_1 < 4u ); /*0xffc36868*/
  return 0; /*0xffc3686e*/
}

// Function: ProcCommonFunc6876 @ 0xffc36876 (0x24b bytes)
// Index: 412/2560

int __cdecl ProcCommonFunc6876(char *n32, _BYTE *src, int buf)
{
  int buf_1; // edi
  char n12; // ch
  unsigned __int8 i_1; // dh
  unsigned __int8 i; // cl
  unsigned __int8 j; // dl
  int v9; // esi
  int v10; // ebx
  int n6; // edx
  int v12; // ecx
  int v13; // edx
  int v14; // eax
  __int16 v15; // cx
  _BYTE *src_1; // eax
  char *bufa_1; // esi
  char *v18; // ecx
  int n4; // ebx
  char *v20; // eax
  int n6_2; // edx
  int v22; // edi
  _WORD *v23; // edx
  int n6_1; // ebp
  unsigned __int8 v25; // al
  __int16 v26; // ax
  int v28; // [esp+10h] [ebp-28h]
  int n4_1; // [esp+14h] [ebp-24h]
  int i_2; // [esp+1Ch] [ebp-1Ch]
  _BYTE bufa[24]; // [esp+20h] [ebp-18h] BYREF
  int n32a; // [esp+3Ch] [ebp+4h]
  char *n32b; // [esp+3Ch] [ebp+4h]

  n4_1 = 0; /*0xffc36887*/
  memset_save_flags(bufa, 0, 0x18u); /*0xffc3688b*/
  buf_1 = buf; /*0xffc36890*/
  n12 = 12; /*0xffc3689b*/
  i_1 = *(_BYTE *)(buf + 1); /*0xffc3689d*/
  i_2 = i_1; /*0xffc368a3*/
  bufa[6 * i_1] = 8; /*0xffc368aa*/
  do /*0xffc36919*/
  {
    for ( i = 0; i < 4u; ++i ) /*0xffc368af*/
    {
      if ( (src[13 * i] & 1) != 0 || *(_BYTE *)(buf + 128) == 1 ) /*0xffc368cc*/
      {
        for ( j = 0; j < 6u; ++j ) /*0xffc368ce*/
        {
          if ( (i != i_1 || j) && n32[351 * i + 255790 + 39 * j] == 1 ) /*0xffc368f1*/
          {
            if ( !n12 ) /*0xffc368f5*/
            {
              i = 4; /*0xffc3690e*/
              break; /*0xffc3690e*/
            }
            bufa[6 * i + j] += 2; /*0xffc368fe*/
            --n12; /*0xffc36903*/
          }
        }
      }
    }
  }
  while ( n12 ); /*0xffc36919*/
  v9 = 0; /*0xffc36923*/
  v10 = 0; /*0xffc36925*/
  n6 = 6; /*0xffc3692d*/
  n32a = 6; /*0xffc3692e*/
  *(_WORD *)&n32[351 * i_2 + 255745] = 0; /*0xffc36932*/
  do /*0xffc369de*/
  {
    v12 = *(unsigned __int8 *)(buf + 1); /*0xffc3693a*/
    if ( bufa[6 * v12 + v9] ) /*0xffc36943*/
    {
      *(_WORD *)&n32[351 * v12 + 255793 + 39 * v9] = v10; /*0xffc3697f*/
      v13 = *(unsigned __int8 *)(buf + 1); /*0xffc36987*/
      v14 = 9 * v13; /*0xffc36995*/
      v15 = v10 - 1 + ((unsigned __int8)bufa[6 * v13 + v9] << 11); /*0xffc3699c*/
      n6 = n32a; /*0xffc3699e*/
      *(_WORD *)&n32[39 * v9 + 255795 + 39 * v14] = v15; /*0xffc369a7*/
      *(_WORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255747] = v15; /*0xffc369b9*/
      v10 = *(unsigned __int16 *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255795 + 39 * v9] + 1; /*0xffc369d5*/
    }
    else
    {
      *(_WORD *)&n32[351 * v12 + 255793 + 39 * v9] = -1; /*0xffc36957*/
      *(_WORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255795 + 39 * v9] = 0; /*0xffc3696d*/
    }
    ++v9; /*0xffc369d6*/
    n32a = --n6; /*0xffc369da*/
  }
  while ( n6 ); /*0xffc369de*/
  src_1 = src; /*0xffc369e4*/
  bufa_1 = bufa; /*0xffc369e8*/
  v28 = v10; /*0xffc369ec*/
  v18 = n32 + 255745; /*0xffc369f0*/
  n4 = 0; /*0xffc369f6*/
  n32b = bufa; /*0xffc369fa*/
  do /*0xffc36ab1*/
  {
    if ( (_BYTE)n4 != *(_BYTE *)(buf_1 + 1) ) /*0xffc36a01*/
    {
      if ( (*src_1 & 1) != 0 || *(_BYTE *)(buf_1 + 128) == 1 ) /*0xffc36a13*/
      {
        v22 = v28; /*0xffc36a32*/
        v23 = v18 + 50; /*0xffc36a36*/
        *(_WORD *)v18 = v28; /*0xffc36a3b*/
        n6_1 = 6; /*0xffc36a3e*/
        do /*0xffc36a6f*/
        {
          v25 = *bufa_1; /*0xffc36a3f*/
          if ( *bufa_1 ) /*0xffc36a3f*/
          {
            *(v23 - 1) = v22; /*0xffc36a50*/
            v26 = v22 - 1 + (v25 << 11); /*0xffc36a5b*/
            *v23 = v26; /*0xffc36a5d*/
            *((_WORD *)v18 + 1) = v26; /*0xffc36a60*/
            v22 = (unsigned __int16)*v23 + 1; /*0xffc36a67*/
          }
          else
          {
            *(_DWORD *)(v23 - 1) = 0xFFFF; /*0xffc36a45*/
          }
          v23 = (_WORD *)((char *)v23 + 39); /*0xffc36a68*/
          ++bufa_1; /*0xffc36a6b*/
          --n6_1; /*0xffc36a6c*/
        }
        while ( n6_1 ); /*0xffc36a6f*/
        n4 = n4_1; /*0xffc36a74*/
        v28 = v22; /*0xffc36a78*/
        buf_1 = buf; /*0xffc36a7c*/
        if ( *(_WORD *)v18 >= *((_WORD *)v18 + 1) ) /*0xffc36a84*/
          *(_DWORD *)v18 = 0xFFFF; /*0xffc36a86*/
      }
      else
      {
        *(_DWORD *)v18 = 0xFFFF; /*0xffc36a17*/
        v20 = v18 + 50; /*0xffc36a1d*/
        n6_2 = 6; /*0xffc36a20*/
        do /*0xffc36a2e*/
        {
          *(_DWORD *)(v20 - 2) = 0xFFFF; /*0xffc36a21*/
          v20 += 39; /*0xffc36a28*/
          --n6_2; /*0xffc36a2b*/
        }
        while ( n6_2 ); /*0xffc36a2e*/
      }
      bufa_1 = n32b; /*0xffc36a8c*/
      src_1 = src; /*0xffc36a90*/
    }
    LOBYTE(n4) = n4 + 1; /*0xffc36a94*/
    src_1 += 13; /*0xffc36a96*/
    bufa_1 += 6; /*0xffc36a99*/
    n4_1 = n4; /*0xffc36a9c*/
    v18 += 351; /*0xffc36aa0*/
    src = src_1; /*0xffc36aa6*/
    n32b = bufa_1; /*0xffc36aaa*/
  }
  while ( (unsigned __int8)n4 < 4u ); /*0xffc36ab1*/
  return 0; /*0xffc36ab7*/
}

// Function: ProcCommonFunc6AC1 @ 0xffc36ac1 (0x84 bytes)
// Index: 413/2560

int __cdecl ProcCommonFunc6AC1(int n32, _BYTE *src, int buf)
{
  unsigned int v4; // ecx
  int n4; // eax
  unsigned int v6; // ebx
  _DWORD *v7; // edi
  _DWORD *v8; // eax
  int n6; // ebp
  char n32_1; // dl
  int n4_1; // [esp+Ch] [ebp-4h]

  v4 = 0; /*0xffc36acf*/
  n4 = 4; /*0xffc36ad3*/
  v6 = 0; /*0xffc36ad4*/
  n4_1 = 4; /*0xffc36ad6*/
  v7 = (_DWORD *)(n32 + 255817); /*0xffc36ade*/
  do /*0xffc36b1e*/
  {
    if ( (*src & 1) != 0 || *(_BYTE *)(buf + 128) == 1 ) /*0xffc36af1*/
    {
      v8 = v7; /*0xffc36af5*/
      n6 = 6; /*0xffc36af7*/
      do /*0xffc36b08*/
      {
        if ( *v8 != -1 ) /*0xffc36afb*/
        {
          v4 |= *(v8 - 1); /*0xffc36afd*/
          v6 |= *v8; /*0xffc36b00*/
        }
        v8 = (_DWORD *)((char *)v8 + 39); /*0xffc36b02*/
        --n6; /*0xffc36b05*/
      }
      while ( n6 ); /*0xffc36b08*/
      n4 = n4_1; /*0xffc36b0a*/
    }
    src += 13; /*0xffc36b0e*/
    v7 = (_DWORD *)((char *)v7 + 351); /*0xffc36b11*/
    n4_1 = --n4; /*0xffc36b1a*/
  }
  while ( n4 ); /*0xffc36b1e*/
  n32_1 = 0; /*0xffc36b23*/
  if ( !v4 ) /*0xffc36b26*/
  {
    v4 = v6; /*0xffc36b28*/
    n32_1 = 32; /*0xffc36b2a*/
  }
  while ( (v4 & 1) == 0 ) /*0xffc36b38*/
  {
    ++n32_1; /*0xffc36b31*/
    v4 >>= 1; /*0xffc36b33*/
  }
  *(_BYTE *)(buf + 125) = n32_1; /*0xffc36b3e*/
  return 0; /*0xffc36b2c*/
}

// Function: KtiLibAssertCheck @ 0xffc36b45 (0x3d9 bytes)
// Index: 414/2560

int __cdecl KtiLibAssertCheck(char *n32, _BYTE *src, int buf)
{
  int buf_1; // ebp
  __int16 v4; // si
  int n32_1; // esi
  __int64 v6; // rax
  unsigned int v7; // ecx
  unsigned int v8; // ebx
  __int64 v9; // rax
  __int64 v10; // rax
  int v11; // esi
  int n6; // edx
  int v13; // ecx
  char n4; // al
  __int64 v15; // rax
  __int64 v16; // rax
  _BYTE *src_1; // eax
  unsigned __int8 n4_2; // cl
  char *v19; // ebx
  unsigned int v20; // edi
  char v21; // al
  unsigned int v22; // ebp
  char *v23; // esi
  int n6_1; // ecx
  unsigned __int8 n4_1; // al
  __int64 v26; // rax
  __int64 v27; // rax
  __int64 v28; // rax
  _DWORD *v29; // eax
  int n6_3; // edx
  unsigned __int64 v31; // rax
  unsigned __int8 n4_3; // [esp+13h] [ebp-15h]
  __int64 v34; // [esp+14h] [ebp-14h]
  unsigned int v35; // [esp+18h] [ebp-10h]
  int n6_2; // [esp+18h] [ebp-10h]
  unsigned int v37; // [esp+1Ch] [ebp-Ch]
  unsigned int v38; // [esp+20h] [ebp-8h]

  LODWORD(v34) = 0; /*0xffc36b48*/
  buf_1 = buf; /*0xffc36b4f*/
  v4 = *(_WORD *)(buf + 126); /*0xffc36b59*/
  HIDWORD(v34) = *((_DWORD *)n32 + 385); /*0xffc36b63*/
  if ( !HIDWORD(v34) )
  {
    ProcCommonFunc940C(n32, 0xFFu, 0xFFu, 0xFFu, 9u); /*0xffc36b76*/
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2417,
      "FALSE");
    KtiDebugAssert((int)n32, 223, 20); /*0xffc36b9f*/
  }
  if ( !*(_BYTE *)(buf + 50) )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2423,
      "KtiInternalGlobal->TotSadTargets");
    KtiDebugAssert((int)n32, 223, 17); /*0xffc36bd1*/
  }
  if ( (unsigned __int8)n32[351 * *(unsigned __int8 *)(buf + 1) + 255742] > 6u )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2424,
      "host->var.kti.CpuInfo[KtiInternalGlobal->SbspSoc].CpuRes.TotEnabledStacks <= MAX_IIO_STACK");
    KtiDebugAssert((int)n32, 223, 18); /*0xffc36c11*/
  }
  n32_1 = (unsigned __int16)(1 << (2 * v4)); /*0xffc36c22*/
  v6 = RmtFunc6F0D(0x40000000, n32_1 * (unsigned int)(unsigned __int8)n32[351 * *(unsigned __int8 *)(buf + 1) + 255742]); /*0xffc36c42*/
  v7 = v6; /*0xffc36c4b*/
  LODWORD(v6) = 351 * *(unsigned __int8 *)(buf + 1); /*0xffc36c51*/
  *(_DWORD *)&n32[v6 + 255765] = 0; /*0xffc36c5b*/
  v8 = HIDWORD(v34); /*0xffc36c62*/
  *(_DWORD *)&n32[v6 + 255769] = HIDWORD(v34); /*0xffc36c66*/
  v9 = RmtFunc704C(__SPAIR64__(HIDWORD(v6), v7), 1u); /*0xffc36c6d*/
  *(_QWORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255773] = RmtFunc6D63(v34, v9); /*0xffc36c90*/
  v10 = RmtFunc6F0D(0x40000000, n32_1); /*0xffc36c9e*/
  v37 = HIDWORD(v10); /*0xffc36ca6*/
  v38 = v10; /*0xffc36caa*/
  v11 = 0; /*0xffc36cae*/
  n6 = 6; /*0xffc36cb2*/
  HIDWORD(v34) = 6; /*0xffc36cb3*/
  do /*0xffc36d95*/
  {
    v13 = 39 * (v11 + 9 * *(unsigned __int8 *)(buf + 1)); /*0xffc36cc0*/
    n4 = n32[v13 + 255790]; /*0xffc36cc3*/
    if ( (unsigned __int8)n4 < 4u && n4 ) /*0xffc36cd0*/
    {
      *(_DWORD *)&n32[v13 + 255813] = v34; /*0xffc36cdc*/
      *(_DWORD *)&n32[v13 + 255817] = v8; /*0xffc36ce7*/
      v15 = RmtFunc704C(__SPAIR64__(v37, v38), 1u); /*0xffc36cee*/
      *(_QWORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255821 + 39 * v11] = RmtFunc6D63(__SPAIR64__(v8, v34), v15); /*0xffc36d0d*/
      v16 = RmtFunc6D8A(*(_QWORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255821 + 39 * v11], 1u); /*0xffc36d35*/
      v8 = HIDWORD(v16); /*0xffc36d3a*/
      LODWORD(v34) = v16; /*0xffc36d3c*/
      n6 = HIDWORD(v34); /*0xffc36d40*/
    }
    else
    {
      *(_DWORD *)&n32[v13 + 255813] = -1; /*0xffc36d49*/
      *(_DWORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255817 + 39 * v11] = -1; /*0xffc36d5d*/
      *(_DWORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255821 + 39 * v11] = 0; /*0xffc36d71*/
      *(_DWORD *)&n32[351 * *(unsigned __int8 *)(buf + 1) + 255825 + 39 * v11] = 0; /*0xffc36d85*/
    }
    ++v11; /*0xffc36d8d*/
    HIDWORD(v34) = --n6; /*0xffc36d91*/
  }
  while ( n6 ); /*0xffc36d95*/
  src_1 = src; /*0xffc36d9b*/
  n4_2 = 0; /*0xffc36d9f*/
  v35 = v8; /*0xffc36da1*/
  v19 = n32 + 255765; /*0xffc36da5*/
  v20 = v35; /*0xffc36dab*/
  n4_3 = 0; /*0xffc36daf*/
  do /*0xffc36ec2*/
  {
    if ( n4_2 != *(_BYTE *)(buf_1 + 1) ) /*0xffc36db6*/
    {
      v21 = *src_1; /*0xffc36dbc*/
      if ( ((v21 & 1) != 0 || *(_BYTE *)(buf_1 + 128) == 1) && (v21 & 0x60) == 0 ) /*0xffc36dd1*/
      {
        v22 = v34; /*0xffc36dd7*/
        v23 = v19 + 48; /*0xffc36ddb*/
        n6_1 = 6; /*0xffc36de0*/
        *(_DWORD *)v19 = v34; /*0xffc36de1*/
        *((_DWORD *)v19 + 1) = v20; /*0xffc36de3*/
        n6_2 = 6; /*0xffc36de6*/
        do /*0xffc36e69*/
        {
          n4_1 = *(v23 - 23); /*0xffc36dea*/
          if ( n4_1 < 4u && n4_1 ) /*0xffc36df3*/
          {
            *(_DWORD *)v23 = v22; /*0xffc36dfb*/
            *((_DWORD *)v23 + 1) = v20; /*0xffc36e01*/
            v26 = RmtFunc704C(__SPAIR64__(v37, v38), 1u); /*0xffc36e04*/
            *((_QWORD *)v23 + 1) = RmtFunc6D63(__SPAIR64__(v20, v22), v26); /*0xffc36e18*/
            v27 = RmtFunc704C(__SPAIR64__(v37, v38), 1u); /*0xffc36e22*/
            *((_QWORD *)v19 + 1) = RmtFunc6D63(__SPAIR64__(v20, v22), v27); /*0xffc36e30*/
            v28 = RmtFunc6D8A(*((_QWORD *)v23 + 1), 1u); /*0xffc36e3e*/
            n6_1 = n6_2; /*0xffc36e43*/
            v20 = HIDWORD(v28); /*0xffc36e4c*/
            v22 = v28; /*0xffc36e4c*/
          }
          else
          {
            *(_DWORD *)v23 = -1; /*0xffc36e50*/
            *((_DWORD *)v23 + 1) = -1; /*0xffc36e53*/
            *((_DWORD *)v23 + 2) = 0; /*0xffc36e57*/
            *((_DWORD *)v23 + 3) = 0; /*0xffc36e5b*/
          }
          v23 += 39; /*0xffc36e5f*/
          n6_2 = --n6_1; /*0xffc36e65*/
        }
        while ( n6_1 ); /*0xffc36e69*/
        n4_2 = n4_3; /*0xffc36e6f*/
        LODWORD(v34) = v22; /*0xffc36e73*/
        buf_1 = buf; /*0xffc36e77*/
      }
      else
      {
        *((_DWORD *)v19 + 2) = 0; /*0xffc36e7d*/
        v29 = v19 + 52; /*0xffc36e81*/
        *((_DWORD *)v19 + 3) = 0; /*0xffc36e87*/
        *(_DWORD *)v19 = -1; /*0xffc36e8d*/
        *((_DWORD *)v19 + 1) = -1; /*0xffc36e8f*/
        n6_3 = 6; /*0xffc36e92*/
        do /*0xffc36ea6*/
        {
          v29[1] = 0; /*0xffc36e93*/
          v29[2] = 0; /*0xffc36e97*/
          *(v29 - 1) = -1; /*0xffc36e9b*/
          *v29 = -1; /*0xffc36e9e*/
          v29 = (_DWORD *)((char *)v29 + 39); /*0xffc36ea0*/
          --n6_3; /*0xffc36ea3*/
        }
        while ( n6_3 ); /*0xffc36ea6*/
      }
      src_1 = src; /*0xffc36ea8*/
    }
    ++n4_2; /*0xffc36eac*/
    src_1 += 13; /*0xffc36eae*/
    v19 += 351; /*0xffc36eb1*/
    n4_3 = n4_2; /*0xffc36eb7*/
    src = src_1; /*0xffc36ebb*/
  }
  while ( n4_2 < 4u ); /*0xffc36ec2*/
  v31 = RmtFunc704C(__SPAIR64__(v20, v34), 1u); /*0xffc36ecf*/
  if ( (unsigned int)RmtFunc6F34(v31, 46) )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2500,
      "MaxMmiohSizeCheck.lo == 0");
    KtiDebugAssert((int)n32, 223, 19); /*0xffc36f0c*/
  }
  return 0; /*0xffc36f14*/
}

// Function: ProcCommonFunc6F1E @ 0xffc36f1e (0x6e bytes)
// Index: 415/2560

int __cdecl ProcCommonFunc6F1E(int n32, _BYTE *src, int buf)
{
  char v4; // dl
  unsigned int v6; // ecx
  int n4; // eax
  _DWORD *v8; // edi
  _DWORD *v9; // eax
  int n6; // ebp
  int bufa; // [esp+18h] [ebp+Ch]

  v4 = 0; /*0xffc36f23*/
  v6 = 0; /*0xffc36f2a*/
  n4 = 4; /*0xffc36f33*/
  v8 = (_DWORD *)(n32 + 255805); /*0xffc36f34*/
  bufa = 4; /*0xffc36f3a*/
  do /*0xffc36f75*/
  {
    if ( (*src & 1) != 0 || *(_BYTE *)(buf + 128) == 1 ) /*0xffc36f4b*/
    {
      v9 = v8; /*0xffc36f4f*/
      n6 = 6; /*0xffc36f51*/
      do /*0xffc36f5f*/
      {
        if ( *v9 != -1 ) /*0xffc36f55*/
          v6 |= *v9; /*0xffc36f57*/
        v9 = (_DWORD *)((char *)v9 + 39); /*0xffc36f59*/
        --n6; /*0xffc36f5c*/
      }
      while ( n6 ); /*0xffc36f5f*/
      n4 = bufa; /*0xffc36f61*/
    }
    src += 13; /*0xffc36f65*/
    v8 = (_DWORD *)((char *)v8 + 351); /*0xffc36f68*/
    bufa = --n4; /*0xffc36f71*/
  }
  while ( n4 ); /*0xffc36f75*/
  while ( (v6 & 1) == 0 ) /*0xffc36f81*/
  {
    ++v4; /*0xffc36f7a*/
    v6 >>= 1; /*0xffc36f7c*/
  }
  *(_BYTE *)(buf + 124) = v4; /*0xffc36f85*/
  return 0; /*0xffc36f83*/
}

// Function: ProcCommonFunc6F8C @ 0xffc36f8c (0x2bf bytes)
// Index: 416/2560

int __cdecl ProcCommonFunc6F8C(_DWORD *n32, _BYTE *src, int buf, unsigned __int8 n4)
{
  int v5; // ebx
  int buf_1; // ebp
  unsigned __int16 v7; // dx
  int v8; // ecx
  int v9; // eax
  int n5; // esi
  int v11; // ecx
  int v12; // eax
  unsigned __int8 n4_1; // dl
  _BYTE *src_1; // esi
  unsigned __int8 n4_3; // bl
  int *v16; // edi
  int *v17; // edx
  int n6; // ebp
  unsigned __int8 n4_2; // al
  _DWORD *v20; // eax
  int n6_1; // edx
  _DWORD *n32a; // [esp+14h] [ebp+4h]
  unsigned int n4a; // [esp+20h] [ebp+10h]
  int n4c; // [esp+20h] [ebp+10h]
  int n4b; // [esp+20h] [ebp+10h]

  v5 = 1; /*0xffc36fa2*/
  if ( (unsigned int)(-67108864 - n32[382] - n32[381]) >> 26 < n4 )
  {
    KtiDebugPrint(255, 255, 255, 219, 1, (int)n32); /*0xffc36fc4*/
    RcAssertPrint(n32, 1u, (int)"\n Invalid MMCFG Base Supplied. Insufficient MMIOL space. "); /*0xffc36fd0*/
    RcAssertPrint(n32, 1u, (int)"\n Each CPU must be allocated at least 64MB of MMIOL space"); /*0xffc36fdc*/
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2291,
      "FALSE");
    KtiDebugAssert((int)n32, 219, 1); /*0xffc37002*/
  }
  n32a = (_DWORD *)(n32[381] + n32[382]); /*0xffc3701d*/
  n4a = (unsigned int)(-67108864 - (_DWORD)n32a) >> 22; /*0xffc37024*/
  buf_1 = buf; /*0xffc37028*/
  if ( !*(_BYTE *)(buf + 50) )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2301,
      "KtiInternalGlobal->TotSadTargets");
    KtiDebugAssert((int)n32, 223, 15); /*0xffc37051*/
  }
  if ( *((_BYTE *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 255742) > 6u )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      2302,
      "host->var.kti.CpuInfo[KtiInternalGlobal->SbspSoc].CpuRes.TotEnabledStacks <= MAX_IIO_STACK");
    KtiDebugAssert((int)n32, 223, 16); /*0xffc3708c*/
  }
  v7 = (unsigned __int16)n4a % *(unsigned __int8 *)(buf + 50); /*0xffc370a1*/
  v8 = 351 * *(unsigned __int8 *)(buf + 1); /*0xffc370aa*/
  n4c = (unsigned __int16)((unsigned __int16)n4a / *(unsigned __int8 *)(buf + 50)); /*0xffc370b0*/
  v9 = n4c * *((unsigned __int8 *)n32 + v8 + 255742); /*0xffc370c1*/
  *(_DWORD *)((char *)n32 + v8 + 255757) = n32a; /*0xffc370c8*/
  *(_DWORD *)((char *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 255761) = (char *)&n32a[0x100000 * (v7 + v9) - 1] + 3; /*0xffc370e3*/
  *(_DWORD *)((char *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 255805) = n32a; /*0xffc370f7*/
  n5 = 5; /*0xffc37113*/
  *(_DWORD *)((char *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 255809) = (char *)&n32a[0x100000 * (v7 + n4c) - 1] + 3; /*0xffc37114*/
  v11 = *(_DWORD *)((char *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 255809) + 1; /*0xffc37130*/
  n4b = (n4c << 22) - 1; /*0xffc37135*/
  do /*0xffc371a9*/
  {
    v12 = 39 * (v5 + 9 * *(unsigned __int8 *)(buf + 1)); /*0xffc37142*/
    n4_1 = *((_BYTE *)n32 + v12 + 255790); /*0xffc37145*/
    if ( n4_1 < 4u && n4_1 ) /*0xffc37153*/
    {
      *(_DWORD *)((char *)n32 + v12 + 255805) = v11; /*0xffc37155*/
      *(_DWORD *)((char *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 39 * v5 + 255809) = n4b + v11; /*0xffc3716c*/
      v11 = *(_DWORD *)((char *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 39 * v5 + 255809) + 1; /*0xffc37186*/
    }
    else
    {
      *(_DWORD *)((char *)n32 + v12 + 255805) = -1; /*0xffc37189*/
      *(_DWORD *)((char *)n32 + 351 * *(unsigned __int8 *)(buf + 1) + 39 * v5 + 255809) = 0; /*0xffc3719d*/
    }
    ++v5; /*0xffc371a5*/
    --n5; /*0xffc371a6*/
  }
  while ( n5 ); /*0xffc371a9*/
  src_1 = src; /*0xffc371ab*/
  n4_3 = 0; /*0xffc371af*/
  v16 = (_DWORD *)((char *)n32 + 255757); /*0xffc371b1*/
  do /*0xffc3723e*/
  {
    if ( n4_3 != *(_BYTE *)(buf_1 + 1) ) /*0xffc371ba*/
    {
      if ( ((*src_1 & 1) != 0 || *(_BYTE *)(buf_1 + 128) == 1) && (*src_1 & 0x60) == 0 ) /*0xffc371cd*/
      {
        v17 = v16 + 12; /*0xffc371d3*/
        *v16 = v11; /*0xffc371d8*/
        n6 = 6; /*0xffc371da*/
        do /*0xffc37204*/
        {
          n4_2 = *((_BYTE *)v17 - 15); /*0xffc371db*/
          if ( n4_2 < 4u && n4_2 ) /*0xffc371e4*/
          {
            *v17 = v11; /*0xffc371e9*/
            v17[1] = n4b + v11; /*0xffc371eb*/
            v16[1] = n4b + v11; /*0xffc371ee*/
            v11 = v17[1] + 1; /*0xffc371f4*/
          }
          else
          {
            *v17 = -1; /*0xffc371f7*/
            v17[1] = 0; /*0xffc371fa*/
          }
          v17 = (int *)((char *)v17 + 39); /*0xffc371fe*/
          --n6; /*0xffc37201*/
        }
        while ( n6 ); /*0xffc37204*/
        buf_1 = buf; /*0xffc37206*/
        src_1 = src; /*0xffc3720a*/
      }
      else
      {
        *v16 = -1; /*0xffc37210*/
        v20 = v16 + 13; /*0xffc37213*/
        v16[1] = 0; /*0xffc37216*/
        n6_1 = 6; /*0xffc3721c*/
        do /*0xffc3722a*/
        {
          *(v20 - 1) = -1; /*0xffc3721d*/
          *v20 = 0; /*0xffc37221*/
          v20 = (_DWORD *)((char *)v20 + 39); /*0xffc37224*/
          --n6_1; /*0xffc37227*/
        }
        while ( n6_1 ); /*0xffc3722a*/
      }
    }
    ++n4_3; /*0xffc3722c*/
    src_1 += 13; /*0xffc3722e*/
    v16 = (int *)((char *)v16 + 351); /*0xffc37231*/
    src = src_1; /*0xffc37237*/
  }
  while ( n4_3 < 4u ); /*0xffc3723e*/
  return 0; /*0xffc37244*/
}

// Function: ProcCommonFunc724B @ 0xffc3724b (0x4f bytes)
// Index: 417/2560

char __cdecl ProcCommonFunc724B(int __return_address, int n4, int buf, unsigned __int8 a4)
{
  unsigned __int8 v4; // cl
  unsigned __int8 v5; // dl
  unsigned int v6; // eax

  v4 = 0; /*0xffc3724f*/
  v5 = *(_BYTE *)(__return_address + 255496); /*0xffc37254*/
  if ( !v5 ) /*0xffc3725c*/
    return 0; /*0xffc37290*/
  while ( 1 ) /*0xffc37274*/
  {
    v6 = *(_DWORD *)(13 * a4 + 4 * v4 + n4 + 1); /*0xffc37274*/
    if ( (v6 & 1) != 0 && (v6 & 0x30) == 0 && ((v6 >> 1) & 7) == *(_BYTE *)(buf + 1) ) /*0xffc37288*/
      break; /*0xffc37288*/
    if ( ++v4 >= v5 ) /*0xffc3728e*/
      return 0; /*0xffc3728e*/
  }
  return 1; /*0xffc37292*/
}

// Function: ProcCommonFunc729A @ 0xffc3729a (0x344 bytes)
// Index: 418/2560

int __cdecl ProcCommonFunc729A(int n32, _BYTE *src, int buf)
{
  __int16 v3; // ax
  __int64 v4; // rax
  _BYTE *srca_1; // esi
  char *v6; // edi
  int n4; // ebp
  unsigned __int8 n4_1; // al
  int n4_2; // edi
  unsigned int v10; // ecx
  _BYTE *src_2; // esi
  _BYTE *srca_2; // edx
  unsigned __int8 n4_4; // al
  _BYTE *src_3; // ecx
  unsigned int srca_5; // edx
  unsigned int src_5; // ebx
  unsigned int *v18; // eax
  int n4_5; // ecx
  char v20; // cl
  char *srca_6; // esi
  int n4_6; // ebx
  unsigned int srca_4[75]; // [esp-11Ch] [ebp-5C0h] BYREF
  unsigned __int8 n4_7; // [esp+13h] [ebp-491h]
  int n4_3; // [esp+14h] [ebp-490h]
  _BYTE *src_4; // [esp+18h] [ebp-48Ch]
  _BYTE *srca_3; // [esp+1Ch] [ebp-488h]
  _BYTE src_1[21]; // [esp+20h] [ebp-484h] BYREF
  _BYTE srca[16]; // [esp+38h] [ebp-46Ch] BYREF
  _DWORD v30[279]; // [esp+48h] [ebp-45Ch] BYREF

  srca_3 = *(_BYTE **)(n32 + 1524); /*0xffc372b7*/
  src_4 = *(_BYTE **)(n32 + 1532); /*0xffc372c1*/
  *(_DWORD *)&src_1[4] = *(_DWORD *)(buf + 100); /*0xffc372c8*/
  src_1[8] = *(_BYTE *)(buf + 1); /*0xffc372cf*/
  *(_DWORD *)&src_1[9] = *(_DWORD *)(n32 + 1528); /*0xffc372d9*/
  v3 = *(_WORD *)(buf + 126); /*0xffc372dd*/
  *(_DWORD *)src_1 = 1132; /*0xffc372e2*/
  LODWORD(v4) = RmtFunc6EA8(1, 2 * v3 + 30); /*0xffc372f6*/
  *(_QWORD *)&src_1[13] = v4; /*0xffc372fe*/
  srca_1 = srca; /*0xffc3730c*/
  n4_3 = n32 + 255741; /*0xffc37310*/
  v6 = (char *)(n32 + 255741); /*0xffc37314*/
  n4 = 4; /*0xffc37318*/
  do /*0xffc37337*/
  {
    AutoGenFunc8E72((int)srca_1, v6, 283); /*0xffc37320*/
    v6 += 351; /*0xffc37328*/
    srca_1 += 283; /*0xffc3732e*/
    --n4; /*0xffc37334*/
  }
  while ( n4 ); /*0xffc37337*/
  qmemcpy(&srca_4[65], src_1, 0x14u); /*0xffc37349*/
  KtiFunc7785(n32, srca, srca_4[65], srca_4[66], srca_4[67], srca_4[68], srca_4[69], src_1[20]); /*0xffc3734e*/
  n4_1 = 0; /*0xffc3735d*/
  n4_7 = 0; /*0xffc3735f*/
  while ( !AutoGenFunc8E45((int)&srca[283 * n4_1], (char *)(n32 + 351 * n4_1 + 255741), 283) ) /*0xffc37390*/
  {
    n4_1 = n4_7 + 1; /*0xffc37396*/
    n4_7 = n4_1; /*0xffc37398*/
    if ( n4_1 >= 4u ) /*0xffc3739e*/
      return 0; /*0xffc3739e*/
  }
  n4_2 = 4; /*0xffc373ac*/
  RcAssertPrint((_BYTE *)n32, 4u, (int)"\n  OEM Overriding Resource Allocation \n"); /*0xffc373af*/
  v10 = *(_DWORD *)(n32 + 1532); /*0xffc373b4*/
  if ( *(_DWORD *)(n32 + 1524) < v10 && v10 != *(_DWORD *)((char *)v30 + 283 * *(unsigned __int8 *)(buf + 1)) ) /*0xffc373d7*/
  {
    RcAssertPrint((_BYTE *)n32, 4u, (int)"\nOEM Resource map MMIOL Base does not match setup variable\n"); /*0xffc373e4*/
    RcAssertPrint((_BYTE *)n32, 4u, (int)"This usually indicates MMCFG base or MMCFG size has changed\n"); /*0xffc373f0*/
    src_2 = src; /*0xffc373f5*/
    goto LABEL_10; /*0xffc373f5*/
  }
  src_2 = src; /*0xffc374bd*/
  if ( ProcCommonFunc776D(n32, src, buf, srca)
    || ProcCommonFunc7AB0((_BYTE *)n32, src, buf, srca)
    || ProcCommonFuncB7AC((_BYTE *)n32, src, (unsigned __int8 *)buf, srca)
    || ProcCommonFunc7DF9((_BYTE *)n32, src, buf, srca)
    || ProcCommonFuncBB4B((_BYTE *)n32, src, buf, srca) )
  {
LABEL_10:
    RcAssertPrint((_BYTE *)n32, 2u, (int)"\n OEM Resource Map is invalid. Using default resource map"); /*0xffc373ff*/
    RcAssertPrint((_BYTE *)n32, 4u, (int)"\nThe following OEM Defined CPU Resource map will be discarded: ");
    ProcCommonFuncA134((_BYTE *)n32); /*0xffc37419*/
    srca_2 = srca; /*0xffc37421*/
    n4_4 = 0; /*0xffc37425*/
    srca_3 = srca; /*0xffc37427*/
    src_3 = src_2; /*0xffc3742b*/
    LOBYTE(n4_3) = 0; /*0xffc3742d*/
    src_4 = src_2; /*0xffc37431*/
    do /*0xffc37497*/
    {
      if ( (*src_3 & 1) != 0 || *(_BYTE *)(buf + 128) == 1 ) /*0xffc37441*/
      {
        qmemcpy(srca_4, srca_2, 0x11Bu); /*0xffc37457*/
        ProcCommonFuncA01D( /*0xffc37464*/
          (_BYTE *)n32,
          n4_3,
          src,
          srca_4[0],
          srca_4[1],
          srca_4[2],
          srca_4[3],
          srca_4[4],
          srca_4[5],
          srca_4[6],
          srca_4[7],
          srca_4[8],
          srca_4[9],
          srca_4[10],
          srca_4[11],
          srca_4[12],
          srca_4[13],
          srca_4[14]);
        n4_4 = n4_3; /*0xffc37469*/
        src_3 = src_4; /*0xffc37476*/
        srca_2 = srca_3; /*0xffc3747a*/
      }
      ++n4_4; /*0xffc3747e*/
      src_3 += 13; /*0xffc37480*/
      srca_2 += 283; /*0xffc37483*/
      LOBYTE(n4_3) = n4_4; /*0xffc37489*/
      src_4 = src_3; /*0xffc3748d*/
      srca_3 = srca_2; /*0xffc37491*/
    }
    while ( n4_4 < 4u ); /*0xffc37497*/
    ProcCommonFunc940C((_BYTE *)n32, 0xFFu, 0, 0, 0xDBu); /*0xffc374a8*/
    return 0; /*0xffc374a8*/
  }
  srca_5 = (unsigned int)srca_3; /*0xffc37540*/
  if ( srca_3 != *(_BYTE **)((char *)&v30[6] + 283 * *(unsigned __int8 *)(buf + 1)) ) /*0xffc3754e*/
    srca_5 = *(_DWORD *)((char *)&v30[6] + 283 * *(unsigned __int8 *)(buf + 1)); /*0xffc37550*/
  src_5 = (unsigned int)src_4; /*0xffc37554*/
  v18 = v30; /*0xffc37558*/
  n4_5 = 4; /*0xffc3755c*/
  do /*0xffc3757d*/
  {
    if ( ((*src_2 & 1) != 0 || *(_BYTE *)(buf + 128) == 1) && src_5 > *v18 ) /*0xffc3756e*/
      src_5 = *v18; /*0xffc37570*/
    src_2 += 13; /*0xffc37572*/
    v18 = (unsigned int *)((char *)v18 + 283); /*0xffc37575*/
    --n4_5; /*0xffc3757a*/
  }
  while ( n4_5 ); /*0xffc3757d*/
  if ( src_5 >= srca_5 ) /*0xffc37583*/
  {
    *(_BYTE *)(buf + 133) = 0; /*0xffc37595*/
    v20 = 64 - (srca_5 >> 26); /*0xffc3759f*/
  }
  else
  {
    *(_BYTE *)(buf + 133) = 1; /*0xffc37588*/
    v20 = 64 - (src_5 >> 26); /*0xffc3758f*/
  }
  srca_6 = srca; /*0xffc375a8*/
  *(_BYTE *)(n32 + 1557) = v20; /*0xffc375ac*/
  n4_6 = n4_3; /*0xffc375b2*/
  *(_DWORD *)(buf + 129) = srca_5; /*0xffc375b6*/
  do /*0xffc375d7*/
  {
    AutoGenFunc8E72(n4_6, srca_6, 283); /*0xffc375c4*/
    srca_6 += 283; /*0xffc375cc*/
    n4_6 += 351; /*0xffc375ce*/
    --n4_2; /*0xffc375d4*/
  }
  while ( n4_2 ); /*0xffc375d7*/
  return 0; /*0xffc374b0*/
}

// Function: ProcCommonFunc75DE @ 0xffc375de (0x18f bytes)
// Index: 419/2560

int __cdecl ProcCommonFunc75DE(_BYTE *__return_address, _BYTE *n3, int buf)
{
  char n8; // cl
  char v4; // di
  int v5; // ebp
  char v6; // dl
  int n3_1; // ebx
  unsigned __int8 n4_1; // bl
  _BYTE *n3_2; // ecx
  int v10; // ebp
  int v11; // edi
  int v12; // eax
  unsigned __int8 i_1; // bh
  int v14; // eax
  int v16; // [esp+10h] [ebp-18h]
  int n4; // [esp+14h] [ebp-14h]
  int v18; // [esp+14h] [ebp-14h]
  unsigned __int8 i; // [esp+1Ch] [ebp-Ch]
  unsigned int v20; // [esp+20h] [ebp-8h]
  unsigned __int8 n4_2; // [esp+20h] [ebp-8h]
  unsigned int v22; // [esp+24h] [ebp-4h]

  v16 = 0; /*0xffc37605*/
  v20 = CpuIoRead((int)__return_address, *(_BYTE *)(buf + 1), 0, 318914728); /*0xffc3760d*/
  n8 = 8; /*0xffc37611*/
  v4 = 0; /*0xffc3761a*/
  v22 = v20 >> 8; /*0xffc3761f*/
  n4 = 4; /*0xffc37623*/
  do /*0xffc37653*/
  {
    v5 = v16; /*0xffc37627*/
    v6 = 0; /*0xffc3762b*/
    n3_1 = 3; /*0xffc3762f*/
    do /*0xffc37645*/
    {
      if ( ((1 << n8) & v20) != 0 ) /*0xffc37637*/
        v5 |= 1 << (v4 + v6); /*0xffc3763c*/
      ++n8; /*0xffc3763f*/
      ++v6; /*0xffc37641*/
      --n3_1; /*0xffc37642*/
    }
    while ( n3_1 ); /*0xffc37645*/
    v4 += 4; /*0xffc37647*/
    v16 = v5; /*0xffc3764a*/
    --n4; /*0xffc3764e*/
  }
  while ( n4 ); /*0xffc37653*/
  n4_1 = 0; /*0xffc37659*/
  n3_2 = n3; /*0xffc3765b*/
  v10 = 0; /*0xffc3765f*/
  v11 = 0; /*0xffc37661*/
  n4_2 = 0; /*0xffc37663*/
  v12 = 0; /*0xffc37667*/
  v18 = 0; /*0xffc37669*/
  do
  {
    if ( (n3_2[v11] & 1) != 0 )
    {
      i_1 = 0; /*0xffc37677*/
      for ( i = 0; i_1 < __return_address[255496]; i = i_1 )
      {
        n3_2 = n3; /*0xffc3769c*/
        if ( ((n3[4 * i_1 + 1 + v11] ^ (unsigned __int8)(v22 >> (v12 + i_1))) & 1) != 0 )
        {
          v14 = ProcCommonFunc8EE7((int)__return_address, n3); /*0xffc376b8*/
          ProcCommonFunc938C(__return_address, v16, v14, 1); /*0xffc376c6*/
          ProcCommonFunc940C(__return_address, n4_2, 0, i, 3u); /*0xffc376d8*/
          RcAssertPrint( /*0xffc376ea*/
            __return_address,
            2u,
            (int)"\n    CPU%u Link%u failed to train. Topology changed across reset!!! ",
            v10,
            i_1);
          *(_BYTE *)(buf + 120) = 1; /*0xffc376f6*/
          if ( __return_address[8401] == 1 )
          {
            RcAssertPrint(
              __return_address,
              1u,
              (int)"\n\n %s: %u   %s ",
              "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
              3882,
              "FALSE");
            KtiDebugAssert((int)__return_address, 220, 10); /*0xffc37727*/
          }
          n3_2 = n3; /*0xffc3772f*/
        }
        v12 = v18; /*0xffc37733*/
        ++i_1; /*0xffc37737*/
      }
    }
    ++n4_1; /*0xffc37749*/
    v12 += 3; /*0xffc3774b*/
    ++v10; /*0xffc3774e*/
    n4_2 = n4_1; /*0xffc3774f*/
    v11 += 13; /*0xffc37753*/
    v18 = v12; /*0xffc37756*/
  }
  while ( n4_1 < 4u );
  return 0; /*0xffc37763*/
}

// Function: ProcCommonFunc776D @ 0xffc3776d (0x343 bytes)
// Index: 420/2560

int __cdecl ProcCommonFunc776D(int n32, _BYTE *src, int buf, _BYTE *srca)
{
  _BYTE *n32_1; // ebp
  unsigned __int8 n4_1; // dl
  int v6; // esi
  unsigned int n0x100; // ebx
  int v9; // ebx
  unsigned __int8 n4; // ch
  int n4_2; // edx
  int v12; // eax
  unsigned __int8 n4_4; // dl
  int n4_6; // ecx
  int v15; // edx
  char n4_8; // [esp+Ch] [ebp-2Ch]
  unsigned __int8 v18; // [esp+Dh] [ebp-2Bh]
  unsigned __int8 v19; // [esp+Eh] [ebp-2Ah]
  unsigned __int8 n4_5; // [esp+Fh] [ebp-29h]
  int v21; // [esp+10h] [ebp-28h]
  int v22; // [esp+14h] [ebp-24h]
  int n32_2; // [esp+18h] [ebp-20h]
  int n4_3; // [esp+1Ch] [ebp-1Ch]
  int v25; // [esp+20h] [ebp-18h]
  int v26; // [esp+24h] [ebp-14h]
  int n255; // [esp+28h] [ebp-10h]
  unsigned __int8 n0x100_1; // [esp+2Ch] [ebp-Ch]
  int n4_7; // [esp+30h] [ebp-8h]
  int v30; // [esp+34h] [ebp-4h]
  char srcb; // [esp+48h] [ebp+10h]

  n32_1 = (_BYTE *)n32; /*0xffc37776*/
  n4_1 = *(_BYTE *)(buf + 1); /*0xffc3777a*/
  v6 = 0; /*0xffc3777e*/
  LOBYTE(v22) = 0; /*0xffc37780*/
  n0x100 = *(_DWORD *)(n32 + 1528) >> 20; /*0xffc3778d*/
  v19 = 0; /*0xffc37790*/
  n4_5 = n4_1; /*0xffc37795*/
  if ( n0x100 < 0x100 ) /*0xffc3779f*/
  {
    n32_2 = 32; /*0xffc377be*/
    n255 = n0x100 - 1; /*0xffc377c6*/
    LOBYTE(n0x100) = 1; /*0xffc377ca*/
  }
  else
  {
    n255 = 255; /*0xffc377a3*/
    n32_2 = *(_DWORD *)(n32 + 1528) >> 23; /*0xffc377ae*/
    n4_1 = *(_BYTE *)(buf + 1); /*0xffc377b2*/
    n0x100 = *(_DWORD *)(n32 + 1528) >> 28; /*0xffc377b6*/
  }
  n0x100_1 = n0x100; /*0xffc377da*/
  v30 = 283 * n4_1; /*0xffc377de*/
  if ( (unsigned int)(*(_DWORD *)(n32 + 1528) + *(_DWORD *)&srca[v30 + 40] - 1) > 0xFBFFFFFF ) /*0xffc377ee*/
  {
    RcAssertPrint((_BYTE *)n32, 4u, (int)"\nMMCFG Limit is too high\n", 0); /*0xffc377fa*/
    n4_1 = n4_5; /*0xffc377ff*/
    v6 = -1; /*0xffc37806*/
  }
  LOBYTE(v9) = 0; /*0xffc37809*/
  n4 = 0; /*0xffc3780d*/
  srcb = 0; /*0xffc3780f*/
  while ( (_BYTE)v9 ) /*0xffc37815*/
  {
    if ( n4 != n4_1 ) /*0xffc37821*/
    {
      n32_1 = (_BYTE *)n32; /*0xffc37835*/
      if ( ((src[13 * n4] & 1) != 0 || *(_BYTE *)(buf + 128)) && (((unsigned __int8)v9 >> srca[283 * n4]) & 1) == 0 ) /*0xffc3785c*/
        goto LABEL_13; /*0xffc3785c*/
    }
    srcb = ++n4; /*0xffc37a50*/
LABEL_43:
    n4_1 = n4_5; /*0xffc37a54*/
    if ( n4 >= 4u ) /*0xffc37a5b*/
      goto LABEL_44; /*0xffc37a5b*/
  }
  n4 = n4_1; /*0xffc37817*/
  srcb = n4_1; /*0xffc37819*/
LABEL_13:
  v25 = 0; /*0xffc37862*/
  n4_2 = n4; /*0xffc37867*/
  v12 = 283 * n4; /*0xffc3786a*/
  n4_3 = n4; /*0xffc37870*/
  v21 = v12; /*0xffc37874*/
  v18 = srca[v12]; /*0xffc3787b*/
  if ( v18 > v19 ) /*0xffc37883*/
    v19 = srca[v12]; /*0xffc37885*/
  if ( *(_DWORD *)&srca[v12 + 44] ) /*0xffc37889*/
  {
    RcAssertPrint(n32_1, 4u, (int)"\nSocket %d MMCFG Base is above 4GB\n", n4); /*0xffc37899*/
    v12 = v21; /*0xffc3789e*/
    n4_2 = n4_3; /*0xffc378a5*/
    v6 = -1; /*0xffc378a9*/
  }
  if ( (*(_DWORD *)&srca[v12 + 40] & 0xFFFFFFF) != 0 ) /*0xffc378b4*/
  {
    RcAssertPrint(n32_1, 4u, (int)"\nSocket %d MMCFG Base is not 256MB aligned\n", n4_2); /*0xffc378bf*/
    v12 = v21; /*0xffc378c4*/
    v6 = -1; /*0xffc378cb*/
  }
  if ( srca[v12 + 2] ) /*0xffc378ce*/
  {
    RcAssertPrint(n32_1, 4u, (int)"Socket %d is 1st in segment %d, but does not start with bus 0", n4_3, v18); /*0xffc378e7*/
    v6 = -1; /*0xffc378ef*/
  }
  n4_4 = 0; /*0xffc378f2*/
  n4_8 = 0; /*0xffc378f4*/
  do /*0xffc379ea*/
  {
    n4_6 = n4_4; /*0xffc378fc*/
    n4_7 = n4_4; /*0xffc37902*/
    if ( (src[13 * n4_4] & 1) != 0 || *(_BYTE *)(buf + 128) == 1 ) /*0xffc3791b*/
    {
      v15 = 283 * n4_4; /*0xffc37925*/
      v26 = 283 * n4_6; /*0xffc3792b*/
      if ( srca[283 * n4_6] == v18 ) /*0xffc37932*/
      {
        if ( v25 == (unsigned __int8)srca[v15 + 2] ) /*0xffc37941*/
        {
          v25 = (unsigned __int8)srca[v15 + 3] + 1; /*0xffc37949*/
        }
        else
        {
          RcAssertPrint( /*0xffc3795e*/
            n32_1,
            4u,
            (int)"\nSocket %d first numbered bus is not the next available in segment %d\n",
            n4_6,
            v18);
          v15 = v26; /*0xffc37963*/
          v6 = -1; /*0xffc3796a*/
        }
        if ( (unsigned __int8)srca[v15 + 3] - (unsigned __int8)srca[v15 + 2] < (unsigned __int8)(n32_2 - 1) ) /*0xffc37984*/
        {
          RcAssertPrint(n32_1, 4u, (int)"%d buses must be assigned to Socket %d", n32_2, n4_7); /*0xffc37996*/
          v15 = v26; /*0xffc3799b*/
          v6 = -1; /*0xffc379a2*/
        }
        if ( !ProcCommonFunc9180( /*0xffc379b5*/
                *(_DWORD *)&srca[v21 + 40],
                *(_DWORD *)&srca[v21 + 44],
                *(_DWORD *)&srca[v15 + 40],
                *(_DWORD *)&srca[v15 + 44]) )
        {
          RcAssertPrint(n32_1, 4u, (int)"\nSocket %d MMCFG Base does not match others in this segment\n", n4_3); /*0xffc379cd*/
          v6 = -1; /*0xffc379d5*/
        }
      }
      n4_4 = n4_8; /*0xffc379d8*/
    }
    if ( v6 == -1 ) /*0xffc379df*/
      break; /*0xffc379df*/
    n4_8 = ++n4_4; /*0xffc379e3*/
  }
  while ( n4_4 < 4u ); /*0xffc379ea*/
  v9 = v22; /*0xffc379f4*/
  if ( v25 - 1 != n255 ) /*0xffc379fd*/
  {
    RcAssertPrint(n32_1, 4u, (int)"\nSegment %d has incomplete bus assignments\n", v18); /*0xffc37a0d*/
    v6 = -1; /*0xffc37a15*/
  }
  if ( (_BYTE)v22 ) /*0xffc37a1a*/
  {
    v9 = (unsigned __int8)v22 | (1 << srca[v21]); /*0xffc37a3a*/
    n4 = srcb + 1; /*0xffc37a3d*/
  }
  else
  {
    LOBYTE(v9) = 1 << srca[v30]; /*0xffc37a25*/
    n4 = 0; /*0xffc37a27*/
  }
  srcb = n4; /*0xffc37a3f*/
  v22 = v9; /*0xffc37a43*/
  if ( v6 != -1 ) /*0xffc37a4a*/
    goto LABEL_43; /*0xffc37a4a*/
LABEL_44:
  if ( n0x100_1 == 1 ) /*0xffc37a69*/
  {
    if ( v19 ) /*0xffc37a70*/
    {
      RcAssertPrint(n32_1, 4u, (int)"We expect exactly 1 segment in resource map, based on MMCFG Size"); /*0xffc37a7a*/
      return -1; /*0xffc37a82*/
    }
  }
  else if ( v19 > n0x100_1 - 1 ) /*0xffc37a91*/
  {
    RcAssertPrint(n32_1, 4u, (int)"We expect up to %d segments in resource map, based on MMCFG Size", n0x100_1); /*0xffc37a9c*/
    return -1; /*0xffc37aa4*/
  }
  return v6; /*0xffc37aa9*/
}

// Function: ProcCommonFunc7AB0 @ 0xffc37ab0 (0x349 bytes)
// Index: 421/2560

int __cdecl ProcCommonFunc7AB0(_BYTE *n32, _BYTE *src, int buf, _BYTE *srca)
{
  unsigned __int8 n4; // al
  int v5; // ebx
  int n4_1; // ebp
  int v7; // edi
  _BYTE *n32_1; // ebp
  int v10; // edi
  int n4_2; // [esp-4h] [ebp-1Ch]
  int v12; // [esp+0h] [ebp-18h]
  int v13; // [esp+4h] [ebp-14h]
  int v14; // [esp+8h] [ebp-10h]
  unsigned __int8 n4_3; // [esp+13h] [ebp-5h]
  bool v16; // [esp+14h] [ebp-4h]
  char v17; // [esp+15h] [ebp-3h]
  char v18; // [esp+16h] [ebp-2h]
  char v19; // [esp+17h] [ebp-1h]

  n4 = 0; /*0xffc37abb*/
  v5 = 0; /*0xffc37abe*/
  n4_3 = 0; /*0xffc37ac0*/
  while ( 1 ) /*0xffc37ac8*/
  {
    n4_1 = n4; /*0xffc37ac8*/
    if ( (src[13 * n4] & 1) != 0 || *(_BYTE *)(buf + 128) == 1 ) /*0xffc37ae3*/
    {
      v10 = 283 * n4; /*0xffc37bd9*/
      if ( srca[v10 + 48] != n32[351 * n4 + 255789] ) /*0xffc37bf0*/
      {
        RcAssertPrint( /*0xffc37bfa*/
          n32,
          4u,
          (int)"\nOEM Socket %d stack present bitmap, 0x%x, does not match known stack present bitmap, 0x%x",
          v12,
          v13,
          v14);
        v5 = -1; /*0xffc37c02*/
      }
      v16 = !*(_WORD *)&srca[v10 + 6] && *(_WORD *)&srca[v10 + 4] == 0xFFFF; /*0xffc37c26*/
      if ( *(_DWORD *)&srca[v10 + 12] || (v17 = 1, *(_DWORD *)&srca[v10 + 8] != -1) ) /*0xffc37c3a*/
        v17 = 0; /*0xffc37c3c*/
      if ( *(_DWORD *)&srca[v10 + 20] || (v18 = 1, *(_DWORD *)&srca[v10 + 16] != -1) ) /*0xffc37c50*/
        v18 = 0; /*0xffc37c52*/
      if ( !ProcCommonFunc9180(*(_DWORD *)&srca[v10 + 32], *(_DWORD *)&srca[v10 + 36], 0, 0) /*0xffc37c78*/
        || (v19 = 1, !ProcCommonFunc9180(*(_DWORD *)&srca[v10 + 24], *(_DWORD *)&srca[v10 + 28], -1, -1)) )
      {
        v19 = 0; /*0xffc37c89*/
      }
      if ( !v16 ) /*0xffc37c93*/
      {
        if ( *(_WORD *)&srca[v10 + 6] < *(_WORD *)&srca[v10 + 4] ) /*0xffc37c9f*/
        {
          RcAssertPrint(n32, 4u, (int)"\nSocket %d IO Limit is less than IO Base\n", n4_1); /*0xffc37cad*/
          v5 = -1; /*0xffc37cb5*/
        }
        if ( (*(unsigned __int16 *)&srca[v10 + 6] - *(unsigned __int16 *)&srca[v10 + 4] + 1) % 2048 ) /*0xffc37cd4*/
        {
          RcAssertPrint(n32, 4u, (int)"\nSocket %d IO range is not a multiple of 2KB\n", n4_1); /*0xffc37ce3*/
          v5 = -1; /*0xffc37ceb*/
        }
      }
      if ( !v17 && *(_DWORD *)&srca[v10 + 12] < *(_DWORD *)&srca[v10 + 8] ) /*0xffc37cfd*/
      {
        RcAssertPrint(n32, 4u, (int)"\nSocket %d IO APIC limit is less than IO APIC base\n", n4_1); /*0xffc37d0b*/
        v5 = -1; /*0xffc37d13*/
      }
      if ( !v18 ) /*0xffc37d1b*/
      {
        if ( *(_DWORD *)&srca[v10 + 20] < *(_DWORD *)&srca[v10 + 16] ) /*0xffc37d25*/
        {
          RcAssertPrint(n32, 4u, (int)"\nSocket %d MMIOL limit is less than MMIOL base\n", n4_1); /*0xffc37d33*/
          v5 = -1; /*0xffc37d3b*/
        }
        if ( (*(_DWORD *)&srca[v10 + 16] & 0x3FFFFF) != 0 ) /*0xffc37d46*/
        {
          RcAssertPrint(n32, 4u, (int)"\nSocket %d MMIOL is not 4MB aligned\n", n4_1); /*0xffc37d54*/
          v5 = -1; /*0xffc37d5c*/
        }
        if ( *(_DWORD *)&srca[v10 + 20] > 0xFBFFFFFF ) /*0xffc37d67*/
        {
          RcAssertPrint(n32, 4u, (int)"\nSocket %d MMIOL limit is too high\n", n4_1); /*0xffc37d75*/
          v5 = -1; /*0xffc37d7d*/
        }
      }
      if ( !v19 ) /*0xffc37d85*/
      {
        if ( !*(_DWORD *)&srca[v10 + 28] ) /*0xffc37d87*/
        {
          RcAssertPrint(n32, 4u, (int)"\nSocket %d MMIOH base is below 4GB\n", n4_1); /*0xffc37d9a*/
          v5 = -1; /*0xffc37da2*/
        }
        if ( ProcCommonFunc919A( /*0xffc37db5*/
               *(_DWORD *)&srca[v10 + 24],
               *(_DWORD *)&srca[v10 + 28],
               *(_DWORD *)&srca[v10 + 32],
               *(_DWORD *)&srca[v10 + 36]) )
        {
          RcAssertPrint(n32, 4u, (int)"\nSocket %d MMIOH Limit is less than MMIOH base\n", n4_1); /*0xffc37dcd*/
          v5 = -1; /*0xffc37dd5*/
        }
      }
      goto LABEL_58; /*0xffc37dd5*/
    }
    v7 = 283 * n4; /*0xffc37ae9*/
    if ( srca[v7 + 2] != 0xFF || srca[v7 + 3] ) /*0xffc37af6*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d has bus resources assigned, but is invalid\n", n4); /*0xffc37b09*/
      v5 = -1; /*0xffc37b11*/
    }
    if ( *(_WORD *)&srca[v7 + 4] != 0xFFFF || *(_WORD *)&srca[v7 + 6] ) /*0xffc37b22*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d has IO resources assigned, but is invalid\n", n4_1); /*0xffc37b35*/
      v5 = -1; /*0xffc37b3d*/
    }
    if ( *(_DWORD *)&srca[v7 + 8] != -1 || *(_DWORD *)&srca[v7 + 12] ) /*0xffc37b49*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d has IoApic resources assigned, but is invalid\n", n4_1); /*0xffc37b5b*/
      v5 = -1; /*0xffc37b63*/
    }
    if ( *(_DWORD *)&srca[v7 + 16] == -1 && !*(_DWORD *)&srca[v7 + 20] ) /*0xffc37b73*/
    {
      n32_1 = n32; /*0xffc37b91*/
    }
    else
    {
      n4_2 = n4_1; /*0xffc37b75*/
      n32_1 = n32; /*0xffc37b76*/
      RcAssertPrint(n32, 4u, (int)"\nSocket %d has MMIOL resources assigned, but is invalid\n", n4_2); /*0xffc37b82*/
      v5 = -1; /*0xffc37b8a*/
    }
    if ( *(_DWORD *)&srca[v7 + 24] != -1 /*0xffc37ba9*/
      || *(_DWORD *)&srca[v7 + 28] != -1
      || *(_DWORD *)&srca[v7 + 32]
      || *(_DWORD *)&srca[v7 + 36] )
    {
      break; /*0xffc37ba9*/
    }
LABEL_58:
    if ( !v5 ) /*0xffc37ddc*/
    {
      n4 = n4_3 + 1; /*0xffc37de6*/
      n4_3 = n4; /*0xffc37de8*/
      if ( n4 < 4u ) /*0xffc37dee*/
        continue; /*0xffc37dee*/
    }
    return v5; /*0xffc37dee*/
  }
  RcAssertPrint(n32_1, 4u, (int)"\nSocket %d has MMIOH resources assigned, but is invalid\n", n4_3); /*0xffc37bc1*/
  return -1; /*0xffc37bcc*/
}

// Function: ProcCommonFunc7DF9 @ 0xffc37df9 (0x3d5 bytes)
// Index: 422/2560

int __cdecl ProcCommonFunc7DF9(_BYTE *n32, _BYTE *src, int buf, _BYTE *srca)
{
  int buf_1; // edi
  int v5; // ebx
  __int64 v6; // rax
  __int64 v7; // rax
  unsigned __int8 n4; // cl
  _BYTE *src_1; // edx
  int n4_1; // ebp
  int v11; // ecx
  unsigned __int8 n3_1; // al
  int v13; // edi
  int v14; // ecx
  __int64 v15; // rax
  __int64 v16; // rax
  unsigned __int8 n3; // [esp+12h] [ebp-16h]
  char n4_2; // [esp+13h] [ebp-15h]
  char v20; // [esp+14h] [ebp-14h]
  char v21; // [esp+15h] [ebp-13h]
  char v22; // [esp+16h] [ebp-12h]
  bool v23; // [esp+17h] [ebp-11h]
  int n3_2; // [esp+18h] [ebp-10h]
  int v25; // [esp+1Ch] [ebp-Ch]
  unsigned int v26; // [esp+20h] [ebp-8h]
  unsigned int v27; // [esp+24h] [ebp-4h]

  buf_1 = buf; /*0xffc37e00*/
  v5 = 0; /*0xffc37e06*/
  LODWORD(v6) = RmtFunc6EA8(1, 2 * *(_BYTE *)(buf + 126) + 30); /*0xffc37e17*/
  v7 = RmtFunc704C(v6, 1u); /*0xffc37e20*/
  n4 = 0; /*0xffc37e2c*/
  v26 = HIDWORD(v7); /*0xffc37e2e*/
  src_1 = src; /*0xffc37e32*/
  v27 = v7; /*0xffc37e36*/
  n4_2 = 0; /*0xffc37e3a*/
  while ( 1 ) /*0xffc37e3e*/
  {
    n4_1 = n4; /*0xffc37e3e*/
    if ( (src_1[13 * n4] & 1) == 0 && *(_BYTE *)(buf_1 + 128) != 1 ) /*0xffc37e51*/
      goto LABEL_53; /*0xffc37e51*/
    v11 = 283 * n4; /*0xffc37e57*/
    n3_1 = 0; /*0xffc37e5d*/
    n3 = 0; /*0xffc37e5f*/
    v25 = 283 * n4_1; /*0xffc37e63*/
    if ( srca[283 * n4_1 + 1] ) /*0xffc37e67*/
      break; /*0xffc37e67*/
LABEL_52:
    n4 = n4_2; /*0xffc381ac*/
LABEL_53:
    n4_2 = ++n4; /*0xffc381b7*/
    if ( n4 >= 4u ) /*0xffc381be*/
      return v5; /*0xffc381be*/
  }
  while ( 1 ) /*0xffc37e77*/
  {
    n3_2 = n3_1; /*0xffc37e77*/
    v13 = v11 + 39 * n3_1; /*0xffc37e7b*/
    if ( *(_WORD *)&srca[v13 + 54] || (v20 = 1, *(_WORD *)&srca[v13 + 52] != 0xFFFF) ) /*0xffc37e95*/
      v20 = 0; /*0xffc37e97*/
    if ( *(_DWORD *)&srca[v13 + 60] || (v21 = 1, *(_DWORD *)&srca[v13 + 56] != -1) ) /*0xffc37eab*/
      v21 = 0; /*0xffc37ead*/
    if ( *(_DWORD *)&srca[v13 + 68] || (v22 = 1, *(_DWORD *)&srca[v13 + 64] != -1) ) /*0xffc37ec1*/
      v22 = 0; /*0xffc37ec3*/
    v23 = ProcCommonFunc9180(*(_DWORD *)&srca[v13 + 80], *(_DWORD *)&srca[v13 + 84], 0, 0) /*0xffc37ef5*/
       && ProcCommonFunc9180(*(_DWORD *)&srca[v13 + 72], *(_DWORD *)&srca[v13 + 76], -1, -1);
    if ( n3 <= 3u && srca[v13 + 51] < srca[v13 + 50] ) /*0xffc37f11*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d does not have 1 or more buses assigned\n", n4_1, n3_2); /*0xffc37f23*/
      v5 = -1; /*0xffc37f2b*/
    }
    v14 = 283 * n4_1; /*0xffc37f2e*/
    if ( *(_WORD *)&srca[v13 + 52] < *(_WORD *)&srca[v25 + 4] ) /*0xffc37f3c*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d IO Base is below socket's IO Range\n", n4_1, n3_2); /*0xffc37f4e*/
      v14 = 283 * n4_1; /*0xffc37f53*/
      v5 = -1; /*0xffc37f5a*/
    }
    if ( *(_DWORD *)&srca[v13 + 56] < *(_DWORD *)&srca[v14 + 8] ) /*0xffc37f65*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d IO APIC Base is below socket's IO APIC Range\n", n4_1, n3_2); /*0xffc37f77*/
      v14 = 283 * n4_1; /*0xffc37f7c*/
      v5 = -1; /*0xffc37f83*/
    }
    if ( *(_DWORD *)&srca[v13 + 64] < *(_DWORD *)&srca[v14 + 16] ) /*0xffc37f8e*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d MMIOL Base is below socket's MMIOL Range\n", n4_1, n3_2); /*0xffc37fa0*/
      v5 = -1; /*0xffc37fa8*/
    }
    if ( ProcCommonFunc919A( /*0xffc37fdf*/
           *(_DWORD *)&srca[v25 + 24],
           *(_DWORD *)&srca[v25 + 28],
           *(_DWORD *)&srca[v13 + 72],
           *(_DWORD *)&srca[v13 + 76])
      && !ProcCommonFunc9180(
            *(_DWORD *)&srca[v25 + 24],
            *(_DWORD *)&srca[v25 + 28],
            *(_DWORD *)&srca[v13 + 72],
            *(_DWORD *)&srca[v13 + 76]) )
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d MMIOH Base is below socket's MMIOH Range\n", n4_1, n3_2); /*0xffc37ffb*/
      v5 = -1; /*0xffc38003*/
    }
    if ( !v20 && *(_WORD *)&srca[v13 + 54] < *(_WORD *)&srca[v13 + 52] ) /*0xffc38017*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d IO Limit < IO Base\n", n4_1, n3_2); /*0xffc38029*/
      v5 = -1; /*0xffc38031*/
    }
    if ( !v21 && *(_DWORD *)&srca[v13 + 60] < *(_DWORD *)&srca[v13 + 56] ) /*0xffc38043*/
    {
      RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d IO APIC Limit < IO APIC Base\n", n4_1, n3_2); /*0xffc38055*/
      v5 = -1; /*0xffc3805d*/
    }
    if ( !v22 ) /*0xffc38065*/
    {
      if ( *(_DWORD *)&srca[v13 + 68] < *(_DWORD *)&srca[v13 + 64] ) /*0xffc3806f*/
      {
        RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d MMIOL Limit < MMIOL Base\n", n4_1, n3_2); /*0xffc38081*/
        v5 = -1; /*0xffc38089*/
      }
      if ( (*(_DWORD *)&srca[v13 + 64] & 0x3FFFFF) != 0 && *(_DWORD *)&srca[v13 + 64] != -1 ) /*0xffc3809b*/
      {
        RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d MMIOL is not 4MB aligned\n", n4_1, n3_2); /*0xffc380ad*/
        v5 = -1; /*0xffc380b5*/
      }
    }
    if ( !v23 ) /*0xffc380bd*/
    {
      if ( ProcCommonFunc919A( /*0xffc380ef*/
             *(_DWORD *)&srca[v13 + 72],
             *(_DWORD *)&srca[v13 + 76],
             *(_DWORD *)&srca[v13 + 80],
             *(_DWORD *)&srca[v13 + 84])
        && !ProcCommonFunc9180(
              *(_DWORD *)&srca[v13 + 72],
              *(_DWORD *)&srca[v13 + 76],
              *(_DWORD *)&srca[v13 + 80],
              *(_DWORD *)&srca[v13 + 84]) )
      {
        RcAssertPrint(n32, 4u, (int)"\nSocket %d Stack %d MMIOH Limit < MMIOH Base\n", n4_1, n3_2); /*0xffc3810b*/
        v5 = -1; /*0xffc38113*/
      }
      v15 = RmtFunc7025(*(_QWORD *)&srca[v13 + 80], *(_QWORD *)&srca[v13 + 72]); /*0xffc38126*/
      if ( ProcCommonFunc919A(v27, v26, v15, HIDWORD(v15)) ) /*0xffc38135*/
      {
        v16 = RmtFunc7025(*(_QWORD *)&srca[v13 + 80], *(_QWORD *)&srca[v13 + 72]); /*0xffc38151*/
        if ( !ProcCommonFunc9180(v27, v26, v16, SHIDWORD(v16)) ) /*0xffc38160*/
        {
          RcAssertPrint( /*0xffc3817c*/
            n32,
            4u,
            (int)"\nSocket %d Stack %d MMIOH resources are less than the granularity\n",
            n4_1,
            n3_2);
          v5 = -1; /*0xffc38184*/
        }
      }
    }
    if ( v5 == -1 ) /*0xffc3818a*/
      return v5; /*0xffc381c4*/
    v11 = 283 * n4_1; /*0xffc38190*/
    n3_1 = n3 + 1; /*0xffc38194*/
    n3 = n3_1; /*0xffc38196*/
    if ( n3_1 >= srca[v25 + 1] ) /*0xffc3819e*/
    {
      buf_1 = buf; /*0xffc381a4*/
      src_1 = src; /*0xffc381a8*/
      goto LABEL_52; /*0xffc381a8*/
    }
  }
}

// Function: ProcCommonFunc81CE @ 0xffc381ce (0xa4 bytes)
// Index: 423/2560

bool __cdecl ProcCommonFunc81CE(_BYTE *__return_address, int a2, int a3)
{
  int n15; // ebx
  int v4; // ecx
  int n4; // esi
  unsigned __int8 v6; // dl

  LOBYTE(n15) = 0; /*0xffc381d5*/
  if ( !a2 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      5003,
      "(Ring1 != NULL)");
    KtiDebugAssert((int)__return_address, 223, 65); /*0xffc38204*/
  }
  if ( !a3 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      5004,
      "(Ring2 != NULL)");
    KtiDebugAssert((int)__return_address, 223, 66); /*0xffc38238*/
  }
  v4 = 0; /*0xffc38242*/
  n4 = 4; /*0xffc38244*/
  do /*0xffc38265*/
  {
    v6 = 0; /*0xffc38248*/
    while ( *(_BYTE *)(v4 + a2) != *(_BYTE *)(v6 + a3) ) /*0xffc38250*/
    {
      if ( ++v6 >= 4u ) /*0xffc38257*/
        goto LABEL_11; /*0xffc38257*/
    }
    n15 = (unsigned __int8)n15 | (1 << v4); /*0xffc3825e*/
LABEL_11:
    ++v4; /*0xffc38261*/
    --n4; /*0xffc38262*/
  }
  while ( n4 ); /*0xffc38265*/
  return (_BYTE)n15 == 15; /*0xffc38267*/
}

// Function: ProcCommonFunc8272 @ 0xffc38272 (0x2f bytes)
// Index: 424/2560

int __cdecl ProcCommonFunc8272(char i, unsigned __int8 ia, char a3, int *a4)
{
  *a4 = (ia << (2 * (a3 + 8 * (i & 1)))) | *a4 & ~(3 << (2 * (a3 + 8 * (i & 1)))); /*0xffc3829d*/
  return 0; /*0xffc3829f*/
}

// Function: ProcCommonFunc82A1 @ 0xffc382a1 (0x2f3 bytes)
// Index: 425/2560

int __usercall ProcCommonFunc82A1@<eax>(int n4@<eax>, _BYTE *n32, _BYTE *src, int buf)
{
  int buf_1; // esi
  _BYTE *src_1; // edx
  _BYTE *v6; // ebp
  int n4_2; // eax
  unsigned __int8 n4_4; // cl
  unsigned int v9; // eax
  unsigned int v10; // eax
  unsigned int dst[70]; // [esp-11Ch] [ebp-138h] BYREF
  __int16 v12; // [esp-4h] [ebp-20h]
  char v13; // [esp-2h] [ebp-1Eh]
  int n4_1; // [esp+10h] [ebp-Ch]
  int n4_3; // [esp+14h] [ebp-8h]
  _BYTE *src_2; // [esp+18h] [ebp-4h]

  buf_1 = buf; /*0xffc382ab*/
  if ( *(_BYTE *)(buf + 128) == 1 ) /*0xffc382b7*/
  {
    LOBYTE(n4) = n32[8321] != 0; /*0xffc382c0*/
    n4 = 4 * n4 + 4; /*0xffc382c3*/
  }
  else
  {
    LOBYTE(n4) = 4; /*0xffc382cc*/
  }
  n4_1 = n4; /*0xffc382ce*/
  if ( (unsigned __int8)n4 > 4u )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      5984,
      "(TmpTotCpu <= MAX_SOCKET)");
    KtiDebugAssert((int)n32, 223, 69); /*0xffc382fb*/
  }
  RcAssertPrint(n32, 4u, (int)aCpuResourceAll); /*0xffc3830b*/
  ProcCommonFuncA134(n32); /*0xffc38311*/
  src_1 = src; /*0xffc38316*/
  v6 = n32 + 255745; /*0xffc3831a*/
  n4_2 = n4_1; /*0xffc38320*/
  n4_4 = 0; /*0xffc38327*/
  src_2 = src; /*0xffc38329*/
  LOBYTE(n4_3) = 0; /*0xffc3832d*/
  do
  {
    if ( (*src_1 & 1) != 0 || *(_BYTE *)(buf_1 + 128) == 1 )
    {
      if ( (*(v6 - 2) & 0x1F) != 0 )
      {
        RcAssertPrint(
          n32,
          1u,
          (int)"\n\n %s: %u   %s ",
          "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
          5992,
          aHostVarKtiCpui_0);
        KtiDebugAssert((int)n32, 223, 70); /*0xffc3836a*/
      }
      if ( ((*(v6 - 1) + 1) & 0x1F) != 0 )
      {
        RcAssertPrint(
          n32,
          1u,
          (int)"\n\n %s: %u   %s ",
          "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
          5993,
          aHostVarKtiCpui_1);
        KtiDebugAssert((int)n32, 223, 71); /*0xffc38397*/
      }
      if ( *(_WORD *)v6 < *((_WORD *)v6 + 1) )
      {
        if ( (*(_WORD *)v6 & 0x7FF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            5995,
            aHostVarKtiCpui_2);
          KtiDebugAssert((int)n32, 223, 72); /*0xffc383cc*/
        }
        if ( ((*((unsigned __int16 *)v6 + 1) + 1) & 0x7FF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            5996,
            aHostVarKtiCpui_3);
          KtiDebugAssert((int)n32, 223, 73); /*0xffc383fc*/
        }
      }
      v9 = *((_DWORD *)v6 + 1); /*0xffc38404*/
      if ( v9 < *((_DWORD *)v6 + 2) )
      {
        if ( (v9 & 0x7FFF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            5999,
            aHostVarKtiCpui_4);
          KtiDebugAssert((int)n32, 223, 74); /*0xffc3842f*/
        }
        if ( ((*((_DWORD *)v6 + 2) + 1) & 0x7FFF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            6000,
            aHostVarKtiCpui_5);
          KtiDebugAssert((int)n32, 223, 75); /*0xffc3845e*/
        }
      }
      v10 = *((_DWORD *)v6 + 3); /*0xffc38466*/
      if ( v10 < *((_DWORD *)v6 + 4) )
      {
        if ( (v10 & 0x3FFFFF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            6003,
            aHostVarKtiCpui_6);
          KtiDebugAssert((int)n32, 223, 76); /*0xffc38491*/
        }
        if ( ((*((_DWORD *)v6 + 4) + 1) & 0x3FFFFF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            6004,
            aHostVarKtiCpui_7);
          KtiDebugAssert((int)n32, 223, 77); /*0xffc384c0*/
        }
      }
      if ( *((_DWORD *)v6 + 6) < *((_DWORD *)v6 + 8) )
      {
        if ( (*((_DWORD *)v6 + 5) & 0x3FFFFFFF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            6007,
            aHostVarKtiCpui_8);
          KtiDebugAssert((int)n32, 223, 78); /*0xffc384f5*/
        }
        if ( ((*((_DWORD *)v6 + 7) + 1) & 0x3FFFFFFF) != 0 )
        {
          RcAssertPrint(
            n32,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            6008,
            aHostVarKtiCpui_9);
          KtiDebugAssert((int)n32, 223, 79); /*0xffc38524*/
        }
      }
      qmemcpy(dst, v6 - 4, sizeof(dst)); /*0xffc38541*/
      v12 = *((_WORD *)v6 + 138); /*0xffc3854b*/
      v13 = v6[278]; /*0xffc3854d*/
      ProcCommonFuncA01D( /*0xffc3854e*/
        n32,
        n4_3,
        src,
        dst[0],
        dst[1],
        dst[2],
        dst[3],
        dst[4],
        dst[5],
        dst[6],
        dst[7],
        dst[8],
        dst[9],
        dst[10],
        dst[11],
        dst[12],
        dst[13],
        dst[14]);
      n4_2 = n4_1; /*0xffc38553*/
      n4_4 = n4_3; /*0xffc38560*/
      buf_1 = buf; /*0xffc38569*/
      src_1 = src_2; /*0xffc3856d*/
    }
    ++n4_4; /*0xffc38571*/
    src_1 += 13; /*0xffc38573*/
    v6 += 351; /*0xffc38576*/
    LOBYTE(n4_3) = n4_4; /*0xffc3857c*/
    src_2 = src_1; /*0xffc38580*/
  }
  while ( n4_4 < (unsigned __int8)n4_2 );
  return n4_2; /*0xffc3858c*/
}

// Function: ProcCommonFunc8594 @ 0xffc38594 (0xf4 bytes)
// Index: 426/2560

bool __cdecl ProcCommonFunc8594(_BYTE *__return_address, int n4, _DWORD *p_p_i, _BYTE *a4)
{
  unsigned __int8 v4; // dl
  unsigned __int8 v5; // cl
  int v6; // edi
  _BYTE *v7; // esi

  if ( !n4 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4371,
      "(CpuData != NULL)");
    KtiDebugAssert((int)__return_address, 223, 29); /*0xffc385c9*/
  }
  if ( !p_p_i )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4372,
      "(Parent != NULL)");
    KtiDebugAssert((int)__return_address, 223, 30); /*0xffc385f9*/
  }
  if ( !a4 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4373,
      "(Child != NULL)");
    KtiDebugAssert((int)__return_address, 223, 31); /*0xffc3862d*/
  }
  v4 = 0; /*0xffc38637*/
  if ( (*p_p_i & 0x30) != 0 ) /*0xffc3863b*/
    return 0; /*0xffc3863b*/
  v5 = __return_address[255496]; /*0xffc3863d*/
  if ( !v5 ) /*0xffc38645*/
    return 0; /*0xffc38645*/
  v6 = v5; /*0xffc3864f*/
  v7 = (_BYTE *)(13 * ((*p_p_i >> 1) & 7) + n4 + 1); /*0xffc38655*/
  do /*0xffc38676*/
  {
    if ( (*v7 & 1) != 0 && ((*v7 ^ *a4) & 0xE) == 0 && ((*v7 ^ *a4) & 0x30) == 0 ) /*0xffc3866c*/
      ++v4; /*0xffc3866e*/
    v7 += 4; /*0xffc38670*/
    --v6; /*0xffc38673*/
  }
  while ( v6 ); /*0xffc38676*/
  return v4 > 1u; /*0xffc38681*/
}

// Function: ProcCommonFunc8688 @ 0xffc38688 (0x49 bytes)
// Index: 427/2560

int __cdecl ProcCommonFunc8688(int __return_address, unsigned __int8 n4, char *a3, char *a4)
{
  char v4; // bl
  int v5; // esi
  char v6; // cl
  int n28; // eax

  v4 = 0; /*0xffc3868f*/
  v5 = CpuIoRead(__return_address, n4, 0, 67322012) & 0xFFFFFFF; /*0xffc386a4*/
  v6 = 0; /*0xffc386aa*/
  n28 = 28; /*0xffc386ae*/
  do /*0xffc386be*/
  {
    if ( ((1 << v6) & v5) != 0 ) /*0xffc386b6*/
      ++v4; /*0xffc386b8*/
    ++v6; /*0xffc386ba*/
    --n28; /*0xffc386bb*/
  }
  while ( n28 ); /*0xffc386be*/
  *a3 = v4; /*0xffc386c4*/
  *(_DWORD *)a4 = v5; /*0xffc386ca*/
  return 0; /*0xffc386ce*/
}

// Function: ProcCommonFunc86D1 @ 0xffc386d1 (0x101 bytes)
// Index: 428/2560

char __cdecl ProcCommonFunc86D1(_BYTE *a1, int a2, _DWORD *a3, _BYTE *a4)
{
  int v4; // ebx
  unsigned __int8 v5; // dh
  unsigned __int8 v6; // dl
  int v7; // eax

  v4 = a2; /*0xffc386d2*/
  if ( !a2 )
  {
    RcAssertPrint(
      a1,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4538,
      "(CpuData != NULL)");
    KtiDebugAssert((int)a1, 223, 38); /*0xffc38705*/
  }
  if ( !a3 )
  {
    RcAssertPrint(
      a1,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4539,
      "(Parent != NULL)");
    KtiDebugAssert((int)a1, 223, 39); /*0xffc38736*/
  }
  if ( !a4 )
  {
    RcAssertPrint(
      a1,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4540,
      "(Child != NULL)");
    KtiDebugAssert((int)a1, 223, 40); /*0xffc3876a*/
  }
  if ( (*a3 & 0x30) != 0 ) /*0xffc38777*/
    return -1; /*0xffc38777*/
  v5 = a1[255496]; /*0xffc38779*/
  v6 = 0; /*0xffc3877f*/
  if ( !v5 ) /*0xffc38783*/
    return -1; /*0xffc387cd*/
  while ( 1 ) /*0xffc38793*/
  {
    v7 = *(_DWORD *)(13 * ((*a3 >> 1) & 7) + 4 * v6 + v4 + 1); /*0xffc38793*/
    if ( (v7 & 0x401) != 1 || (v7 & 0x800) != 0 ) /*0xffc387a9*/
      goto LABEL_14; /*0xffc387a9*/
    if ( (((unsigned __int8)v7 ^ *a4) & 0xE) == 0 && (((unsigned __int8)v7 ^ *a4) & 0x30) == 0 ) /*0xffc387bc*/
      return v6; /*0xffc387ca*/
    v4 = a2; /*0xffc387be*/
LABEL_14:
    if ( ++v6 >= v5 ) /*0xffc387c6*/
      return -1; /*0xffc387c6*/
  }
}

// Function: ProcCommonFunc87D2 @ 0xffc387d2 (0x5c bytes)
// Index: 429/2560

int __cdecl ProcCommonFunc87D2(int __return_address, int buf, unsigned __int8 n4)
{
  if ( (*(_BYTE *)(n4 + __return_address + 255497) & 0x10) != 0 ) /*0xffc387e7*/
  {
    if ( ProcCommonFunc9160(__return_address, n4) ) /*0xffc387ef*/
      *(_BYTE *)(351 * n4 + __return_address + 255724) = 2; /*0xffc38801*/
    else
      *(_BYTE *)(351 * n4 + __return_address + 255724) = 1; /*0xffc38811*/
  }
  else
  {
    *(_BYTE *)(351 * n4 + __return_address + 255724) = 0; /*0xffc38821*/
  }
  return 0; /*0xffc38829*/
}

// Function: ProcCommonFunc882E @ 0xffc3882e (0x20e bytes)
// Index: 430/2560

int __cdecl ProcCommonFunc882E(
        _BYTE *__return_address,
        int n4,
        _BYTE *p_p_i,
        _DWORD *a4,
        unsigned __int8 *ia,
        unsigned __int8 *a6,
        unsigned __int8 *p_p_p_i)
{
  unsigned __int8 *ia_1; // edx
  _DWORD *p_p_i_1; // eax
  unsigned __int8 i; // bl
  unsigned int v11; // eax
  int v13; // [esp+10h] [ebp-4h]
  unsigned __int8 *v14; // [esp+2Ch] [ebp+18h]

  if ( !n4 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4477,
      "(CpuData != NULL)");
    KtiDebugAssert((int)__return_address, 223, 32); /*0xffc38866*/
  }
  if ( !p_p_i )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4478,
      "(Node1 != NULL)");
    KtiDebugAssert((int)__return_address, 223, 33); /*0xffc38890*/
  }
  if ( !a4 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4479,
      "(Node2 != NULL)");
    KtiDebugAssert((int)__return_address, 223, 34); /*0xffc388ba*/
  }
  if ( !ia )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4480,
      "(Port1 != NULL)");
    KtiDebugAssert((int)__return_address, 223, 35); /*0xffc388e4*/
  }
  if ( !a6 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4481,
      "(Port2 != NULL)");
    KtiDebugAssert((int)__return_address, 223, 36); /*0xffc38913*/
  }
  if ( !p_p_p_i )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4482,
      "(Port3 != NULL)");
    KtiDebugAssert((int)__return_address, 223, 37); /*0xffc38943*/
  }
  ia_1 = ia; /*0xffc3894b*/
  p_p_i_1 = p_p_i; /*0xffc3894f*/
  *ia = -1; /*0xffc38953*/
  *a6 = -1; /*0xffc38956*/
  *p_p_p_i = -1; /*0xffc3895a*/
  if ( (*p_p_i & 0x30) == 0 )
  {
    for ( i = 0; i < __return_address[255496]; ++i )
    {
      v13 = (*p_p_i_1 >> 1) & 7; /*0xffc3897e*/
      v11 = *(_DWORD *)(n4 + 13 * v13 + 4 * i + 1); /*0xffc38989*/
      if ( (v11 & 1) != 0 )
      {
        v14 = (unsigned __int8 *)((*a4 >> 1) & 7); /*0xffc389a4*/
        if ( (unsigned __int8 *)((v11 >> 1) & 7) == v14 && (((unsigned __int8)v11 ^ (unsigned __int8)*a4) & 0x30) == 0 )
        {
          if ( *ia_1 == 0xFF )
          {
            *ia_1 = i; /*0xffc389c5*/
          }
          else if ( *a6 == 0xFF )
          {
            *a6 = i; /*0xffc389cf*/
          }
          else if ( *p_p_p_i == 0xFF )
          {
            *p_p_p_i = i; /*0xffc389d9*/
          }
          else
          {
            RcAssertPrint( /*0xffc389ed*/
              __return_address,
              1u,
              (int)"\n CPU %u has more than three links to CPU %u. Topology not supported ",
              v13,
              v14);
            RcAssertPrint(
              __return_address,
              1u,
              (int)"\n\n %s: %u   %s ",
              "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
              4506,
              "FALSE");
            KtiDebugAssert((int)__return_address, 220, 9); /*0xffc38a16*/
            ia_1 = ia; /*0xffc38a1b*/
          }
        }
      }
      p_p_i_1 = p_p_i; /*0xffc38a22*/
    }
  }
  return 0; /*0xffc38a34*/
}

// Function: ProcCommonFunc8A3C @ 0xffc38a3c (0x96 bytes)
// Index: 431/2560

int __cdecl ProcCommonFunc8A3C(int __return_address, unsigned __int8 n4, _BYTE *a3)
{
  unsigned __int8 n4_1; // bp
  unsigned __int8 n6; // bl
  char v5; // di
  __int16 v6; // ax
  int v7; // edx
  int v9; // [esp+10h] [ebp-8h]
  unsigned __int8 n6_1; // [esp+14h] [ebp-4h]

  n4_1 = n4; /*0xffc38a40*/
  n6 = 0; /*0xffc38a4b*/
  v9 = 0; /*0xffc38a4e*/
  v5 = 0; /*0xffc38a52*/
  n6_1 = 0; /*0xffc38a54*/
  do /*0xffc38aa6*/
  {
    v6 = CpuIoRead(__return_address, n4_1, n6_1, 285220864); /*0xffc38a63*/
    v7 = v9; /*0xffc38a68*/
    if ( v6 != -1 ) /*0xffc38a77*/
    {
      LOBYTE(v7) = v9 + 1; /*0xffc38a7d*/
      n4_1 = n4; /*0xffc38a7f*/
      v9 = v7; /*0xffc38a86*/
      *(_BYTE *)(n4 + __return_address + 255497) |= 1 << v5; /*0xffc38a95*/
    }
    ++n6; /*0xffc38a9c*/
    ++v5; /*0xffc38a9e*/
    n6_1 = n6; /*0xffc38a9f*/
  }
  while ( n6 < 6u ); /*0xffc38aa6*/
  *(_BYTE *)(351 * n4 + __return_address + 255789) = *(_BYTE *)(n4 + __return_address + 255497); /*0xffc38abd*/
  *a3 = v7; /*0xffc38acb*/
  return 0; /*0xffc38ab5*/
}

// Function: ProcCommonFunc8AD2 @ 0xffc38ad2 (0x4e bytes)
// Index: 432/2560

int __cdecl ProcCommonFunc8AD2(int __return_address, unsigned __int8 n4, _BYTE *a3)
{
  unsigned __int8 n3; // bl
  __int16 v4; // ax
  int v5; // ecx
  unsigned __int8 v7; // [esp+4h] [ebp-8h]
  int v8; // [esp+8h] [ebp-4h]

  n3 = 0; /*0xffc38ada*/
  v8 = 0; /*0xffc38adc*/
  v7 = 0; /*0xffc38adf*/
  do /*0xffc38b12*/
  {
    v4 = CpuIoRead(__return_address, n4, v7, 151003136); /*0xffc38af0*/
    v5 = v8; /*0xffc38b00*/
    if ( v4 != -1 ) /*0xffc38b03*/
    {
      LOBYTE(v5) = v8 + 1; /*0xffc38b05*/
      v8 = v5; /*0xffc38b07*/
    }
    v7 = ++n3; /*0xffc38b0c*/
  }
  while ( n3 < 3u ); /*0xffc38b12*/
  *a3 = v5; /*0xffc38b18*/
  return 0; /*0xffc38b17*/
}

// Function: ProcCommonFunc8B20 @ 0xffc38b20 (0x13 bytes)
// Index: 433/2560

int __cdecl ProcCommonFunc8B20(int __return_address, int a2, _BYTE *a3)
{
  *a3 = *(_BYTE *)(__return_address + 453660); /*0xffc38b2e*/
  return 0; /*0xffc38b32*/
}

// Function: ProcCommonFunc8B33 @ 0xffc38b33 (0x4e bytes)
// Index: 434/2560

int __cdecl ProcCommonFunc8B33(int __return_address, unsigned __int8 n4, _BYTE *p_i)
{
  unsigned __int8 n2; // bl
  __int16 v4; // ax
  int v5; // ecx
  unsigned __int8 v7; // [esp+4h] [ebp-8h]
  int v8; // [esp+8h] [ebp-4h]

  n2 = 0; /*0xffc38b3b*/
  v8 = 0; /*0xffc38b3d*/
  v7 = 0; /*0xffc38b40*/
  do /*0xffc38b73*/
  {
    v4 = CpuIoRead(__return_address, n4, v7, 100671488); /*0xffc38b51*/
    v5 = v8; /*0xffc38b61*/
    if ( v4 != -1 ) /*0xffc38b64*/
    {
      LOBYTE(v5) = v8 + 1; /*0xffc38b66*/
      v8 = v5; /*0xffc38b68*/
    }
    v7 = ++n2; /*0xffc38b6d*/
  }
  while ( n2 < 2u ); /*0xffc38b73*/
  *p_i = v5; /*0xffc38b79*/
  return 0; /*0xffc38b78*/
}

// Function: ProcCommonFunc8B81 @ 0xffc38b81 (0xb9 bytes)
// Index: 435/2560

int __cdecl ProcCommonFunc8B81(int __return_address, unsigned __int8 n4, int buf)
{
  unsigned __int8 n4_1; // dl
  unsigned __int8 n5; // bl
  char v5; // di
  __int16 v6; // ax
  char v7; // cl
  unsigned __int8 v8; // dl
  char v9; // bl
  char v10; // cl
  int n5_1; // esi
  char v13; // [esp+13h] [ebp-5h]
  unsigned __int8 n5_2; // [esp+14h] [ebp-4h]

  n4_1 = n4; /*0xffc38b83*/
  n5 = 0; /*0xffc38b8e*/
  v13 = 0; /*0xffc38b91*/
  v5 = 0; /*0xffc38b95*/
  n5_2 = 0; /*0xffc38b97*/
  do /*0xffc38beb*/
  {
    v6 = CpuIoRead(__return_address, n4_1, n5_2, 201334784); /*0xffc38ba6*/
    n4_1 = n4; /*0xffc38bab*/
    if ( v6 == -1 ) /*0xffc38bba*/
    {
      v7 = v13; /*0xffc38bdd*/
    }
    else
    {
      *(_BYTE *)(n4 + __return_address + 255501) |= 1 << v5; /*0xffc38bca*/
      v7 = ++v13; /*0xffc38bd5*/
    }
    ++n5; /*0xffc38be1*/
    ++v5; /*0xffc38be3*/
    n5_2 = n5; /*0xffc38be4*/
  }
  while ( n5 < 5u ); /*0xffc38beb*/
  *(_BYTE *)(351 * n4 + __return_address + 255717) = v7; /*0xffc38bfc*/
  v8 = *(_BYTE *)(n4 + __return_address + 255501) & (*(_BYTE *)(n4 + __return_address + 255497) >> 1); /*0xffc38c0c*/
  v9 = 0; /*0xffc38c13*/
  *(_BYTE *)(n4 + buf + 42) = v8; /*0xffc38c15*/
  v10 = 0; /*0xffc38c19*/
  n5_1 = 5; /*0xffc38c1b*/
  do /*0xffc38c2b*/
  {
    if ( ((unsigned __int8)(1 << v10) & v8) != 0 ) /*0xffc38c23*/
      ++v9; /*0xffc38c25*/
    ++v10; /*0xffc38c27*/
    --n5_1; /*0xffc38c28*/
  }
  while ( n5_1 ); /*0xffc38c2b*/
  *(_BYTE *)(n4 + buf + 46) = v9; /*0xffc38c2d*/
  return 0; /*0xffc38c33*/
}

// Function: ProcCommonFunc8C3A @ 0xffc38c3a (0x4e bytes)
// Index: 436/2560

int __cdecl ProcCommonFunc8C3A(int __return_address, unsigned __int8 n4, _BYTE *a3)
{
  unsigned __int8 n2; // bl
  __int16 v4; // ax
  int v5; // ecx
  unsigned __int8 v7; // [esp+4h] [ebp-8h]
  int v8; // [esp+8h] [ebp-4h]

  n2 = 0; /*0xffc38c42*/
  v8 = 0; /*0xffc38c44*/
  v7 = 0; /*0xffc38c47*/
  do /*0xffc38c7a*/
  {
    v4 = CpuIoRead(__return_address, n4, v7, 167780352); /*0xffc38c58*/
    v5 = v8; /*0xffc38c68*/
    if ( v4 != -1 ) /*0xffc38c6b*/
    {
      LOBYTE(v5) = v8 + 1; /*0xffc38c6d*/
      v8 = v5; /*0xffc38c6f*/
    }
    v7 = ++n2; /*0xffc38c74*/
  }
  while ( n2 < 2u ); /*0xffc38c7a*/
  *a3 = v5; /*0xffc38c80*/
  return 0; /*0xffc38c7f*/
}

// Function: ProcCommonFunc8C88 @ 0xffc38c88 (0xf3 bytes)
// Index: 437/2560

int __cdecl ProcCommonFunc8C88(_BYTE *__return_address, int n216, _DWORD *p_i, _DWORD *a4)
{
  int v4; // eax

  if ( !n216 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4623,
      "(TopologyTree != NULL)");
    KtiDebugAssert((int)__return_address, 223, 44); /*0xffc38cbd*/
  }
  if ( !a4 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4624,
      "(Parent != NULL)");
    KtiDebugAssert((int)__return_address, 223, 45); /*0xffc38ced*/
  }
  if ( !p_i )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4625,
      "(Child != NULL)");
    KtiDebugAssert((int)__return_address, 223, 46); /*0xffc38d21*/
  }
  v4 = *(_DWORD *)(n216 + 4 * ((*p_i >> 19) & 0x7F)); /*0xffc38d32*/
  *a4 = v4; /*0xffc38d35*/
  if ( (v4 & 1) == 0 )
  {
    RcAssertPrint(__return_address, 1u, (int)"\n\n Parent Node not found."); /*0xffc38d43*/
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4630,
      "FALSE");
    KtiDebugAssert((int)__return_address, 223, 47); /*0xffc38d6c*/
  }
  return 0; /*0xffc38d74*/
}

// Function: ProcCommonFunc8D7B @ 0xffc38d7b (0x14a bytes)
// Index: 438/2560

int __cdecl ProcCommonFunc8D7B(_BYTE *__return_address, unsigned __int8 n4, int buf)
{
  int v5; // edx
  char *v6; // ecx
  int v7; // ecx
  int v8; // ecx
  int v9; // ecx
  int v10; // ecx
  int v11; // ecx
  char v12; // al
  char v14; // [esp+10h] [ebp+8h]
  unsigned int n4a; // [esp+14h] [ebp+Ch]

  n4a = CpuIoRead((int)__return_address, n4, 0, 67321988); /*0xffc38d9d*/
  v14 = CpuIoRead((int)__return_address, n4, 0, 67321992); /*0xffc38dae*/
  v5 = CpuIoRead((int)__return_address, n4, 0, 67322008); /*0xffc38db9*/
  if ( __return_address[246412] || __return_address[246424] >= 3u ) /*0xffc38dcb*/
  {
    v7 = (n4a >> 6) & 1; /*0xffc38e12*/
    if ( (n4a & 0x80u) != 0 ) /*0xffc38e17*/
      v7 |= 2u; /*0xffc38e19*/
    if ( (v5 & 0x10000000) != 0 ) /*0xffc38e22*/
      v7 |= 4u; /*0xffc38e24*/
    if ( !v7 ) /*0xffc38e2a*/
    {
      v6 = (char *)(buf + n4 + 6); /*0xffc38ea4*/
      *v6 = 0; /*0xffc38ea6*/
      goto LABEL_26; /*0xffc38ea6*/
    }
    v8 = v7 - 1; /*0xffc38e2c*/
    if ( !v8 ) /*0xffc38e2f*/
    {
LABEL_23:
      v6 = (char *)(buf + n4 + 6); /*0xffc38e8b*/
LABEL_24:
      *v6 = 4; /*0xffc38e96*/
      goto LABEL_26; /*0xffc38e99*/
    }
    v9 = v8 - 2; /*0xffc38e32*/
    if ( v9 ) /*0xffc38e35*/
    {
      v10 = v9 - 2; /*0xffc38e3b*/
      if ( v10 ) /*0xffc38e3e*/
      {
        v11 = v10 - 1; /*0xffc38e40*/
        if ( v11 ) /*0xffc38e43*/
        {
          if ( v11 == 1 ) /*0xffc38e4b*/
          {
            v6 = (char *)(buf + n4 + 6); /*0xffc38e5a*/
            *v6 = 5; /*0xffc38e5c*/
          }
          else
          {
            v6 = (char *)(buf + n4 + 6); /*0xffc38e50*/
            *v6 = 7; /*0xffc38e52*/
          }
        }
        else
        {
          v6 = (char *)(buf + n4 + 6); /*0xffc38e67*/
          *v6 = 3; /*0xffc38e69*/
        }
      }
      else
      {
        v6 = (char *)(buf + n4 + 6); /*0xffc38e74*/
        *v6 = 2; /*0xffc38e76*/
      }
      goto LABEL_26; /*0xffc38e55*/
    }
LABEL_22:
    v6 = (char *)(buf + n4 + 6); /*0xffc38e7b*/
    *v6 = 6; /*0xffc38e86*/
    goto LABEL_26; /*0xffc38e89*/
  }
  if ( (v14 & 0x40) != 0 ) /*0xffc38dd1*/
    goto LABEL_22; /*0xffc38dd1*/
  if ( (n4a & 0x38) != 0 ) /*0xffc38ddc*/
    goto LABEL_23; /*0xffc38ddc*/
  v6 = (char *)(n4 + buf + 6); /*0xffc38deb*/
  *v6 = 1; /*0xffc38ded*/
  if ( (__return_address[246408] & 4) != 0 && (n4a & 4) != 0 ) /*0xffc38dff*/
    goto LABEL_24; /*0xffc38dff*/
LABEL_26:
  v12 = *v6; /*0xffc38ea9*/
  if ( __return_address[257191] > (unsigned __int8)*v6 ) /*0xffc38eb1*/
  {
    __return_address[257191] = v12; /*0xffc38eb3*/
    __return_address[255602] = v12; /*0xffc38eb9*/
  }
  return 0; /*0xffc38ebf*/
}

// Function: ProcCommonFunc8EC5 @ 0xffc38ec5 (0x22 bytes)
// Index: 439/2560

int __cdecl ProcCommonFunc8EC5(int __return_address, unsigned __int8 n4, _BYTE *a3)
{
  *a3 = CpuIoRead(__return_address, n4, 0, 67321988) & 3; /*0xffc38ee2*/
  return 0; /*0xffc38ee6*/
}

// Function: ProcCommonFunc8EE7 @ 0xffc38ee7 (0x5e bytes)
// Index: 440/2560

int __cdecl ProcCommonFunc8EE7(int __return_address, _BYTE *n3)
{
  int v3; // edx
  char v4; // si
  int n4; // ebp
  int v6; // eax
  _BYTE *v7; // edi
  char v8; // bl
  int v10; // [esp+10h] [ebp-4h]

  v3 = 0; /*0xffc38eec*/
  v4 = 0; /*0xffc38ef4*/
  n4 = 4; /*0xffc38ef6*/
  do /*0xffc38f3b*/
  {
    if ( (*n3 & 1) != 0 ) /*0xffc38efa*/
    {
      LOBYTE(v6) = *(_BYTE *)(__return_address + 255496); /*0xffc38f00*/
      if ( (_BYTE)v6 ) /*0xffc38f08*/
      {
        v6 = (unsigned __int8)v6; /*0xffc38f0a*/
        v7 = n3 + 1; /*0xffc38f0d*/
        v8 = 0; /*0xffc38f10*/
        v10 = (unsigned __int8)v6; /*0xffc38f12*/
        do /*0xffc38f30*/
        {
          if ( (*v7 & 1) != 0 ) /*0xffc38f19*/
          {
            v3 |= 1 << (v4 + v8); /*0xffc38f1e*/
            v6 = v10; /*0xffc38f21*/
          }
          ++v8; /*0xffc38f25*/
          v7 += 4; /*0xffc38f26*/
          v10 = --v6; /*0xffc38f2c*/
        }
        while ( v6 ); /*0xffc38f30*/
      }
    }
    n3 += 13; /*0xffc38f32*/
    v4 += 4; /*0xffc38f35*/
    --n4; /*0xffc38f38*/
  }
  while ( n4 ); /*0xffc38f3b*/
  return v3; /*0xffc38f3d*/
}

// Function: ProcCommonFunc8F45 @ 0xffc38f45 (0x1d3 bytes)
// Index: 441/2560

int __cdecl ProcCommonFunc8F45(int __return_address, _BYTE *n4)
{
  _BYTE *n4_1; // ebp
  unsigned __int8 n4_2; // bl
  int v4; // edi
  int v5; // ebp
  int n8; // edi
  unsigned __int8 n4_3; // [esp+10h] [ebp-74h]
  int v9; // [esp+14h] [ebp-70h]
  int v10; // [esp+18h] [ebp-6Ch]
  int v11; // [esp+1Ch] [ebp-68h]
  int v12; // [esp+20h] [ebp-64h]
  _DWORD v13[8]; // [esp+24h] [ebp-60h]
  _DWORD v14[8]; // [esp+44h] [ebp-40h]
  _DWORD v15[8]; // [esp+64h] [ebp-20h]

  n4_1 = n4; /*0xffc38f4a*/
  n4_2 = 0; /*0xffc38f51*/
  v4 = 0; /*0xffc38f5c*/
  v13[0] = 67518656; /*0xffc38f5e*/
  v13[1] = 67518660; /*0xffc38f66*/
  v13[2] = 67518664; /*0xffc38f6e*/
  v13[3] = 67518668; /*0xffc38f76*/
  v13[4] = 67518672; /*0xffc38f7e*/
  v13[5] = 67518676; /*0xffc38f86*/
  v13[6] = 67518680; /*0xffc38f8e*/
  v13[7] = 67518684; /*0xffc38f96*/
  v14[0] = 318914948; /*0xffc38f9e*/
  v14[1] = 318914952; /*0xffc38fa6*/
  v14[2] = 318914956; /*0xffc38fae*/
  v14[3] = 318914960; /*0xffc38fb6*/
  v14[4] = 318914964; /*0xffc38fbe*/
  v14[5] = 318914968; /*0xffc38fc6*/
  v14[6] = 318914972; /*0xffc38fce*/
  v14[7] = 318914976; /*0xffc38fd6*/
  v15[0] = 84033936; /*0xffc38fde*/
  v15[1] = 84033940; /*0xffc38fe6*/
  v15[2] = 84033944; /*0xffc38fee*/
  v15[3] = 84033948; /*0xffc38ff6*/
  v15[4] = 84033952; /*0xffc38ffe*/
  v15[5] = 84033956; /*0xffc39006*/
  v15[6] = 84033960; /*0xffc3900e*/
  v15[7] = 84033964; /*0xffc39016*/
  n4_3 = 0; /*0xffc39021*/
  v9 = 0; /*0xffc39025*/
  do /*0xffc39108*/
  {
    if ( (*n4_1 & 1) != 0 && (*(_BYTE *)(v4 + __return_address + 255497) & 4) != 0 ) /*0xffc3903b*/
    {
      v10 = CpuIoRead(__return_address, n4_3, 0, 67518656) | 0xFF; /*0xffc39065*/
      v11 = CpuIoRead(__return_address, n4_3, 0, 318914948) | 0xFF; /*0xffc3907c*/
      v12 = CpuIoRead(__return_address, n4_3, 0, 84033936) | 0xFF; /*0xffc3908a*/
      v5 = 0; /*0xffc3908e*/
      n8 = 8; /*0xffc39092*/
      do /*0xffc390db*/
      {
        CpuIoCfgWrite(__return_address, n4_3, 0, v13[v5], v10); /*0xffc390a2*/
        CpuIoCfgWrite(__return_address, n4_3, 0, v14[v5], v11); /*0xffc390b6*/
        CpuIoCfgWrite(__return_address, n4_3, 0, v15[v5++], v12); /*0xffc390cd*/
        --n8; /*0xffc390d8*/
      }
      while ( n8 ); /*0xffc390db*/
      v4 = v9; /*0xffc390dd*/
      n4_1 = n4; /*0xffc390e1*/
      *(_BYTE *)(v9 + __return_address + 255497) &= ~0x10u; /*0xffc390e8*/
    }
    ++n4_2; /*0xffc390f0*/
    n4_1 += 13; /*0xffc390f2*/
    ++v4; /*0xffc390f5*/
    n4_3 = n4_2; /*0xffc390f6*/
    v9 = v4; /*0xffc390fa*/
    n4 = n4_1; /*0xffc390fe*/
  }
  while ( n4_2 < 4u ); /*0xffc39108*/
  return 0; /*0xffc3910e*/
}

// Function: ProcCommonFunc9118 @ 0xffc39118 (0x48 bytes)
// Index: 442/2560

bool __cdecl ProcCommonFunc9118(int __return_address, unsigned __int8 n4)
{
  char v2; // bl
  __int16 v3; // ax

  v2 = CpuIoRead(__return_address, n4, 0, 67321988); /*0xffc39138*/
  v3 = CpuIoRead(__return_address, n4, 0, 67322008); /*0xffc3913e*/
  return (v2 & 0x38) == 0x10 && (v3 & 0x600) == 0x600; /*0xffc3914c*/
}

// Function: ProcCommonFunc9160 @ 0xffc39160 (0x20 bytes)
// Index: 443/2560

bool __cdecl ProcCommonFunc9160(int __return_address, unsigned __int8 n4)
{
  return (CpuIoRead(__return_address, n4, 0, 67321988) & 0x38) == 24; /*0xffc3917f*/
}

// Function: ProcCommonFunc9180 @ 0xffc39180 (0x1a bytes)
// Index: 444/2560

bool __cdecl ProcCommonFunc9180(int a1, int a2, int a3, int a4)
{
  return a2 == a4 && a1 == a3; /*0xffc39196*/
}

// Function: ProcCommonFunc919A @ 0xffc3919a (0x21 bytes)
// Index: 445/2560

bool __cdecl ProcCommonFunc919A(unsigned int a1, unsigned int a2, unsigned int a3, unsigned int a4)
{
  if ( a2 > a4 ) /*0xffc391a3*/
    return 1; /*0xffc391a5*/
  if ( a2 >= a4 ) /*0xffc391a9*/
    return a1 >= a3; /*0xffc391b7*/
  return 0; /*0xffc391a7*/
}

// Function: KtiDebugAssert @ 0xffc391bb (0x27 bytes)
// Index: 446/2560

void __cdecl KtiDebugAssert(int a1, int a2, int a3)
{
  int v3; // ecx
  char v4; // [esp+1h] [ebp-1h] BYREF

  v4 = HIBYTE(v3); /*0xffc391be*/
  KtiFunc7B40(a1, a2, a3, &v4); /*0xffc391cc*/
  v4 = 1; /*0xffc391d4*/
  while ( 1 ) /*0xffc391d8*/
    ; /*0xffc391d8*/
}

// Function: KtiDebugPrint @ 0xffc391e2 (0x55 bytes)
// Index: 447/2560

int __cdecl KtiDebugPrint(int a1, int a2, int a3, int a4, int a5, int a6)
{
  AutoGenFuncC04(a1, a2, a3, a4, a5, a6); /*0xffc391f9*/
  return KtiFunc4541(a6, a4, a5, a3 & 7 | (unsigned __int16)(8 * (a2 & 3 | (4 * (unsigned __int8)a1)))); /*0xffc39234*/
}

// Function: ProcCommonFunc9237 @ 0xffc39237 (0x14b bytes)
// Index: 448/2560

int __cdecl ProcCommonFunc9237(int n32, int src, int buf, int srca)
{
  unsigned __int8 v5; // bl
  __int16 v6; // ax
  __int64 n0x40000000; // rax
  __int64 bufa_1; // rax
  unsigned int v9; // edi
  int src_1; // edx
  char v11; // al
  __int64 v12; // rax
  __int64 v13; // rax
  unsigned __int8 v14; // cl
  __int64 v15; // rax
  unsigned __int8 v17; // [esp+10h] [ebp-14h]
  __int64 v18; // [esp+14h] [ebp-10h]
  __int64 v19; // [esp+1Ch] [ebp-8h]
  int bufa; // [esp+30h] [ebp+Ch]

  v5 = 0; /*0xffc39240*/
  v17 = 0; /*0xffc39244*/
  v6 = *(_WORD *)(buf + 126); /*0xffc39248*/
  v18 = 0; /*0xffc3924c*/
  v19 = 0; /*0xffc39254*/
  LODWORD(n0x40000000) = RmtFunc6EA8(1, 2 * v6 + 30); /*0xffc39267*/
  bufa_1 = RmtFunc6F0D(n0x40000000, 32); /*0xffc39270*/
  v9 = HIDWORD(bufa_1); /*0xffc3927e*/
  bufa = bufa_1; /*0xffc39280*/
  if ( *(_BYTE *)(buf + 99) == 2 ) /*0xffc39284*/
  {
    src_1 = src; /*0xffc3928e*/
    do /*0xffc392e9*/
    {
      v11 = *(_BYTE *)(13 * v5 + src_1); /*0xffc39298*/
      if ( (v11 & 1) != 0 && (v11 & 0x60) == 0 ) /*0xffc392a1*/
      {
        v12 = RmtFunc7025(*(_QWORD *)(283 * v5 + srca + 32), *(_QWORD *)(283 * v5 + srca + 24)); /*0xffc392bb*/
        v13 = RmtFunc6D8A(v12, 1u); /*0xffc392c5*/
        v14 = v17++; /*0xffc392ca*/
        *((_DWORD *)&v18 + 2 * v14 + 1) = HIDWORD(v13); /*0xffc392d8*/
        src_1 = src; /*0xffc392dc*/
        *((_DWORD *)&v18 + 2 * v14) = v13; /*0xffc392e0*/
      }
      ++v5; /*0xffc392e4*/
    }
    while ( v5 < *(_BYTE *)(buf + 99) ); /*0xffc392e9*/
    v15 = RmtFunc6D63(v18, v19); /*0xffc392fb*/
    if ( ProcCommonFunc919A(v15, HIDWORD(v15), bufa, v9) ) /*0xffc39308*/
    {
      if ( !ProcCommonFunc919A(bufa, v9, v18, HIDWORD(v18)) && !ProcCommonFunc9180(bufa, v9, v18, SHIDWORD(v18)) /*0xffc39360*/
        || !ProcCommonFunc919A(bufa, v9, v19, HIDWORD(v19)) && !ProcCommonFunc9180(bufa, v9, v19, SHIDWORD(v19)) )
      {
        return -1; /*0xffc3936f*/
      }
      *(_BYTE *)(buf + 134) = 1; /*0xffc39371*/
    }
  }
  return 0; /*0xffc3937a*/
}

// Function: ProcCommonFunc9382 @ 0xffc39382 (0x5 bytes)
// Index: 449/2560

// attributes: thunk
unsigned __int8 __cdecl ProcCommonFunc9382(int a1, unsigned int i)
{
  return KtiFunc8C4(a1, i);
}

// Function: ProcCommonFunc9387 @ 0xffc39387 (0x5 bytes)
// Index: 450/2560

// attributes: thunk
char __cdecl ProcCommonFunc9387(int __return_address, unsigned __int8 n4, char a3, char a4)
{
  return AutoGenFunc9177(__return_address, n4, a3, a4);
}

// Function: ProcCommonFunc938C @ 0xffc3938c (0x80 bytes)
// Index: 451/2560

int __cdecl ProcCommonFunc938C(_BYTE *__return_address, int a2, int a3, int n3)
{
  int n21; // [esp+4h] [ebp-18h] BYREF
  __int16 n22; // [esp+8h] [ebp-14h]
  int v7; // [esp+Ah] [ebp-12h]
  int n3_1; // [esp+Eh] [ebp-Eh]
  int v9; // [esp+12h] [ebp-Ah]
  int v10; // [esp+16h] [ebp-6h]

  n22 = 22; /*0xffc39399*/
  v9 = a2; /*0xffc393a0*/
  v10 = a3; /*0xffc393ab*/
  n21 = 21; /*0xffc393b4*/
  v7 = 1; /*0xffc393bb*/
  n3_1 = n3; /*0xffc393c2*/
  RcAssertPrint(__return_address, 2u, (int)"\n\n**** KTI Topology Change Logged ****"); /*0xffc393c5*/
  RcAssertPrint(__return_address, 2u, (int)"\nTopology before degrade: 0x%08x", a2);
  RcAssertPrint(__return_address, 2u, (int)"\nTopology after degrade:  0x%08x", a3);
  RcAssertPrint(__return_address, 2u, (int)"\nDegrade reason code   :  0x%x\n", n3);
  return KtiFunc7B13((int)__return_address, (int)&n21); /*0xffc39407*/
}

// Function: ProcCommonFunc940C @ 0xffc3940c (0xd9 bytes)
// Index: 452/2560

int __cdecl ProcCommonFunc940C(
        _BYTE *a1,
        unsigned __int8 a2,
        unsigned __int8 a3,
        unsigned __int8 a4,
        unsigned __int8 a5)
{
  int n6; // [esp+Ch] [ebp-14h] BYREF
  __int16 n17; // [esp+10h] [ebp-10h]
  int v8; // [esp+12h] [ebp-Eh]
  unsigned __int8 v9; // [esp+16h] [ebp-Ah]
  unsigned __int8 v10; // [esp+17h] [ebp-9h]
  unsigned __int8 v11; // [esp+18h] [ebp-8h]
  char v12; // [esp+19h] [ebp-7h]
  unsigned __int8 v13; // [esp+1Ah] [ebp-6h]
  unsigned __int8 v14; // [esp+1Bh] [ebp-5h]
  unsigned __int8 v15; // [esp+1Ch] [ebp-4h]

  n17 = 17; /*0xffc39421*/
  v9 = a1[246771]; /*0xffc3942b*/
  v10 = a1[246770]; /*0xffc3943b*/
  v14 = a3; /*0xffc39442*/
  n6 = 6; /*0xffc3944a*/
  v8 = 1; /*0xffc39451*/
  v11 = a5; /*0xffc39458*/
  v12 = -1; /*0xffc3945b*/
  v13 = a2; /*0xffc3945f*/
  v15 = a4; /*0xffc39462*/
  RcAssertPrint(a1, 2u, (int)"\n\n**** KTI Warning ****"); /*0xffc39465*/
  RcAssertPrint(a1, 2u, (int)"\nWarning code:         0x%02x", a5);
  RcAssertPrint(a1, 2u, (int)"\nMajor Checkpoint:     0x%02x", v9);
  RcAssertPrint(a1, 2u, (int)"\nMinor Checkpoint:     0x%02x", v10);
  RcAssertPrint(a1, 2u, (int)"\nAffected Socket mask: 0x%02x", a2);
  RcAssertPrint(a1, 2u, (int)"\nSocketType:           0x%02x", a3);
  RcAssertPrint(a1, 2u, (int)"\nAffected port mask:   0x%02x\n\n", a4);
  return KtiFunc7B13((int)a1, (int)&n6); /*0xffc394de*/
}

// Function: ProcCommonFunc94E5 @ 0xffc394e5 (0x5 bytes)
// Index: 453/2560

// attributes: thunk
int __cdecl ProcCommonFunc94E5(_BYTE *a1, unsigned __int16 n3320, unsigned int a3)
{
  return KtiFunc10BE(a1, n3320, a3);
}

// Function: ProcCommonFunc94EA @ 0xffc394ea (0x3d bytes)
// Index: 454/2560

int __cdecl ProcCommonFunc94EA(int __return_address, int n4, int buf, unsigned __int8 n4a, unsigned __int8 n2)
{
  char v5; // bl

  v5 = 0; /*0xffc394eb*/
  while ( (CpuIoRead(__return_address, n4a, n2, 151077164) & 1) != 0 ) /*0xffc39508*/
  {
    KtiFunc8C4(__return_address, 0x64u); /*0xffc39510*/
    if ( (unsigned __int8)++v5 > 5u ) /*0xffc3951c*/
      return -1; /*0xffc39522*/
  }
  return 0; /*0xffc39521*/
}

// Function: ProcCommonFunc9527 @ 0xffc39527 (0xec bytes)
// Index: 455/2560

unsigned int __cdecl ProcCommonFunc9527(
        _BYTE *__return_address,
        unsigned __int8 n4,
        unsigned __int8 n2,
        char n0x14,
        char n28)
{
  int n5000; // edi
  int v7; // eax
  _BYTE *v9; // [esp+10h] [ebp+4h]

  if ( (__return_address[246408] & 4) == 0 )
  {
    n5000 = 0; /*0xffc39544*/
    while ( 1 ) /*0xffc3954e*/
    {
      v7 = CpuIoRead((int)__return_address, n4, n2, 151144504); /*0xffc3954e*/
      v9 = (_BYTE *)v7; /*0xffc39556*/
      if ( (v7 & 1) == 0 ) /*0xffc3955c*/
        break; /*0xffc3955c*/
      KtiFunc8C4((int)__return_address, 0xAu); /*0xffc39561*/
      if ( (unsigned int)++n5000 >= 0x1388 ) /*0xffc3956f*/
      {
        v7 = (int)v9; /*0xffc39571*/
        break; /*0xffc39571*/
      }
    }
    if ( n5000 == 5000 )
    {
      RcAssertPrint(__return_address, 1u, (int)aErrIarReadForS, n4, n2, (unsigned __int8)n28, v7); /*0xffc39599*/
      RcAssertPrint(
        __return_address,
        1u,
        (int)"\n\n %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
        5345,
        "FALSE");
      KtiDebugAssert((int)__return_address, 221, n4 | 0x90); /*0xffc395c8*/
    }
  }
  CpuIoCfgWrite((int)__return_address, n4, n2, 151144504, (16 * (n0x14 & 0x3F | ((n28 & 0x3F) << 6))) | 2); /*0xffc395f8*/
  return (unsigned int)CpuIoRead((int)__return_address, n4, n2, 151144504) >> 24; /*0xffc3960f*/
}

// Function: j_CpuIoWrite @ 0xffc39613 (0x5 bytes)
// Index: 456/2560

// attributes: thunk
int __cdecl j_CpuIoWrite(int a1, unsigned __int8 a2, unsigned __int8 a3, int a4)
{
  return CpuIoRead(a1, a2, a3, a4);
}

// Function: ProcCommonFunc9618 @ 0xffc39618 (0xf1 bytes)
// Index: 457/2560

int __cdecl ProcCommonFunc9618(
        _BYTE *a1,
        unsigned __int8 a2,
        unsigned __int8 a3,
        char a4,
        unsigned __int8 a5,
        unsigned __int8 a6)
{
  int n5000; // edi
  int v8; // eax
  int v10; // [esp+Ch] [ebp+4h]

  if ( (a1[246408] & 4) == 0 )
  {
    n5000 = 0; /*0xffc39635*/
    while ( 1 ) /*0xffc3963f*/
    {
      v8 = CpuIoRead((int)a1, a2, a3, 151144504); /*0xffc3963f*/
      v10 = v8; /*0xffc39647*/
      if ( (v8 & 1) == 0 ) /*0xffc3964d*/
        break; /*0xffc3964d*/
      KtiFunc8C4((int)a1, 0xAu); /*0xffc39652*/
      if ( (unsigned int)++n5000 >= 0x1388 ) /*0xffc39661*/
      {
        v8 = v10; /*0xffc39663*/
        break; /*0xffc39663*/
      }
    }
    if ( n5000 == 5000 )
    {
      RcAssertPrint(a1, 1u, (int)aErrIarWriteFor, a2, a3, a5, a6, 5000, v8); /*0xffc39696*/
      RcAssertPrint(
        a1,
        1u,
        (int)"\n\n %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
        5408,
        "FALSE");
      KtiDebugAssert((int)a1, 221, a2 | 0x90); /*0xffc396c5*/
    }
  }
  return CpuIoCfgWrite((int)a1, a2, a3, 151144504, (16 * (a4 & 0x3F | (((a6 << 6) | a5 & 0x3F) << 6))) | 3); /*0xffc39706*/
}

// Function: ProcCommonFunc9709 @ 0xffc39709 (0xfb bytes)
// Index: 458/2560

int __cdecl ProcCommonFunc9709(
        _BYTE *__return_address,
        unsigned __int8 n4,
        char n2,
        _WORD *n7,
        int a5,
        char a6,
        __int16 a7)
{
  bool v7; // zf
  int v8; // ebx
  unsigned int i; // edi
  _WORD *n7a; // [esp+18h] [ebp+10h]

  v7 = (_BYTE)n7 == 4; /*0xffc39715*/
  n7a = (_WORD *)((_BYTE)n7 != 4 ? 151208556 : 151144708);
  v8 = !v7 ? 151208552 : 151144704;
  if ( (__return_address[246408] & 4) == 0 )
  {
    for ( i = 0; i < 0x1388; ++i ) /*0xffc39747*/
    {
      if ( (CpuIoRead((int)__return_address, n4, n2, v8) & 1) == 0 ) /*0xffc39762*/
        break; /*0xffc39762*/
      KtiFunc8C4((int)__return_address, 0xAu); /*0xffc39767*/
    }
    if ( i == 5000 )
    {
      RcAssertPrint(__return_address, 8u, (int)aCheckLbcPerIou); /*0xffc39781*/
      RcAssertPrint(
        __return_address,
        1u,
        (int)"\n\n %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
        5486,
        "FALSE");
      KtiDebugAssert((int)__return_address, 221, n4 | 0x80); /*0xffc397b2*/
    }
  }
  CpuIoCfgWrite((int)__return_address, n4, n2, (int)n7a, 2 * (a7 & 0x3FFF)); /*0xffc397d3*/
  return CpuIoCfgWrite((int)__return_address, n4, n2, v8, (8 * ((a5 << 7) | a6 & 0x7F)) | 5); /*0xffc39801*/
}

// Function: j_PciCfgWrite_0 @ 0xffc39804 (0x5 bytes)
// Index: 459/2560

// attributes: thunk
int __cdecl j_PciCfgWrite_0(int a1, unsigned __int8 a2, unsigned __int8 a3, int a4, int a5)
{
  return CpuIoCfgWrite(a1, a2, a3, a4, a5);
}

// Function: ProcCommonFunc9809 @ 0xffc39809 (0xcd bytes)
// Index: 460/2560

unsigned __int8 __cdecl ProcCommonFunc9809(_BYTE *__return_address, unsigned __int8 *n4)
{
  int v3; // ebp
  unsigned __int8 i_1; // al
  bool v5; // zf
  const char *PGA; // eax
  unsigned __int8 i; // bl
  unsigned int v8; // ecx
  const char *PGA_1; // edx
  int n4_1; // [esp+10h] [ebp-8h]

  RcAssertPrint(__return_address, 8u, (int)"\n\n\nLink Exchange Parameter"); /*0xffc3981b*/
  RcAssertPrint(__return_address, 8u, (int)"\n-----------------------"); /*0xffc39828*/
  v3 = 0; /*0xffc39834*/
  n4_1 = 4; /*0xffc39836*/
  do
  {
    i_1 = *n4; /*0xffc3983e*/
    if ( (*n4 & 1) != 0 )
    {
      v5 = (i_1 & 0x60) == 32; /*0xffc39846*/
      PGA = "PGA"; /*0xffc39848*/
      if ( !v5 ) /*0xffc3984d*/
        PGA = "CPU"; /*0xffc3984f*/
      i_1 = RcAssertPrint(__return_address, 8u, (int)"\n%s%u ", PGA, v3); /*0xffc3985e*/
      for ( i = 0; i < __return_address[255496]; ++i )
      {
        i_1 = i; /*0xffc39870*/
        v8 = *(_DWORD *)&n4[4 * i + 1]; /*0xffc39877*/
        if ( (v8 & 1) != 0 )
        {
          PGA_1 = "PGA"; /*0xffc39882*/
          if ( (v8 & 0x30) != 0x10 ) /*0xffc3988b*/
            PGA_1 = "CPU"; /*0xffc3988d*/
          i_1 = RcAssertPrint(
                  __return_address,
                  8u,
                  (int)": LEP%u(%u:%s%u) ",
                  i,
                  (v8 >> 6) & 0xF,
                  PGA_1,
                  (*(_DWORD *)&n4[4 * i + 1] >> 1) & 7);
        }
      }
    }
    ++v3; /*0xffc398c0*/
    n4 += 13; /*0xffc398c1*/
    --n4_1; /*0xffc398c4*/
  }
  while ( n4_1 );
  return i_1; /*0xffc398cf*/
}

// Function: ProcCommonFunc98D6 @ 0xffc398d6 (0xa4 bytes)
// Index: 461/2560

char __cdecl ProcCommonFunc98D6(_BYTE *__return_address, int a2, _BYTE *p_n66588417)
{
  unsigned __int8 v3; // cl
  int v4; // ebx

  if ( !a2 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4781,
      "(Tree != NULL)");
    KtiDebugAssert((int)__return_address, 223, 55); /*0xffc3990c*/
  }
  if ( !p_n66588417 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4782,
      "(SearchNode != NULL)");
    KtiDebugAssert((int)__return_address, 223, 56); /*0xffc39942*/
  }
  v3 = 0; /*0xffc3994a*/
  while ( 1 ) /*0xffc3994f*/
  {
    v4 = *(_DWORD *)(a2 + 4 * v3); /*0xffc3994f*/
    if ( (v4 & 1) == 0 ) /*0xffc39955*/
      return 0; /*0xffc39975*/
    if ( (((unsigned __int8)v4 ^ *p_n66588417) & 0xE) == 0 /*0xffc39967*/
      && (((unsigned __int8)v4 ^ (unsigned __int8)*(_DWORD *)p_n66588417) & 0x30) == 0 )
    {
      break; /*0xffc39967*/
    }
    if ( ++v3 >= 6u ) /*0xffc3996e*/
      return 0; /*0xffc3996e*/
  }
  return 1; /*0xffc39972*/
}

// Function: ProcCommonFunc997A @ 0xffc3997a (0xba bytes)
// Index: 462/2560

char __cdecl ProcCommonFunc997A(_BYTE *__return_address, int n216, int *a3)
{
  unsigned __int8 v3; // cl
  int v4; // ebx
  int v5; // edx

  if ( !n216 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4735,
      "(Tree != NULL)");
    KtiDebugAssert((int)__return_address, 223, 53); /*0xffc399b0*/
  }
  if ( !a3 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4736,
      "(SearchNode != NULL)");
    KtiDebugAssert((int)__return_address, 223, 54); /*0xffc399e6*/
  }
  v3 = 0; /*0xffc399ee*/
  while ( 1 ) /*0xffc399f3*/
  {
    v4 = *(_DWORD *)(n216 + 4 * v3); /*0xffc399f3*/
    if ( (v4 & 1) == 0 ) /*0xffc399f9*/
      return 0; /*0xffc39a2f*/
    v5 = *a3; /*0xffc399fb*/
    if ( (((unsigned __int8)v4 ^ *(_BYTE *)a3) & 0xE) == 0 /*0xffc39a21*/
      && (((unsigned __int8)v4 ^ (unsigned __int8)v5) & 0x30) == 0
      && ((v4 ^ v5) & 0xF000) == 0
      && ((v4 ^ v5) & 0xF00) == 0 )
    {
      break; /*0xffc39a21*/
    }
    if ( ++v3 >= 6u ) /*0xffc39a28*/
      return 0; /*0xffc39a28*/
  }
  return 1; /*0xffc39a2c*/
}

// Function: ProcCommonFunc9A34 @ 0xffc39a34 (0x4a8 bytes)
// Index: 463/2560

int __cdecl ProcCommonFunc9A34(_BYTE *__return_address, int n4, int buf, unsigned __int8 n4a)
{
  unsigned __int8 n4a_1; // al
  _BYTE *__return_address_1; // ebx
  int n4a_2; // edi
  bool v7; // al
  unsigned __int8 n4a_4; // al
  unsigned int p_n4_1; // edi
  unsigned int v10; // esi
  int v11; // eax
  int n3; // edi
  bool v13; // zf
  int n3_1; // esi
  int buf_1; // ebp
  unsigned __int8 n2_2; // al
  int v17; // ecx
  unsigned int v18; // edx
  unsigned int p_n4_2; // eax
  unsigned int v20; // edi
  unsigned int p_n4_3; // eax
  const char *PGA; // edx
  int p_n4_4; // esi
  int v24; // edx
  unsigned int v25; // ecx
  unsigned int v26; // ecx
  char n4a_5; // dl
  unsigned int p_n4_5; // eax
  int v29; // esi
  unsigned __int8 n2_3; // al
  bool v31; // cf
  char n2_1; // [esp+Bh] [ebp-19h]
  unsigned __int8 n2; // [esp+Ch] [ebp-18h]
  unsigned int p_n4; // [esp+10h] [ebp-14h] BYREF
  int n4a_3; // [esp+14h] [ebp-10h]
  unsigned int v37; // [esp+18h] [ebp-Ch] BYREF
  int v38;... [9037 chars total]

// Function: ProcCommonFunc9EDC @ 0xffc39edc (0xd5 bytes)
// Index: 464/2560

int __cdecl ProcCommonFunc9EDC(_BYTE *__return_address, int n4, int buf, unsigned __int8 a4)
{
  int v4; // esi
  unsigned __int8 n4_1; // bl
  int v7; // [esp-4h] [ebp-18h]
  unsigned int v8; // [esp+24h] [ebp+10h]
  unsigned int v9; // [esp+24h] [ebp+10h]

  v4 = a4; /*0xffc39ee0*/
  v7 = a4; /*0xffc39eea*/
  v8 = (((a4 - 2) & 0xF) << 16) | 0x200; /*0xffc39f00*/
  n4_1 = BYTE2(v8) & 0xF; /*0xffc39f0a*/
  RcAssertPrint(__return_address, 4u, (int)"\n   PGA%u Link Exchange\n", v7); /*0xffc39f0d*/
  v9 = v8 >> 8; /*0xffc39f1d*/
  RcAssertPrint(__return_address, 4u, (int)"   LEP%u(%u,CPU%u)", 0, v9 & 0x1F, n4_1); /*0xffc39f33*/
  if ( n4_1 >= 4u /*0xffc39f5c*/
    || (__return_address[18 * v4 + 8328] & 1) != 0
    || (__return_address[18 * n4_1 + 8328 + 2 * (v9 & 0x1F)] & 1) != 0 )
  {
    *(_DWORD *)(13 * v4 + n4 + 1) &= ~1u; /*0xffc39f94*/
  }
  else
  {
    *(_DWORD *)(13 * v4 + n4 + 1) = (2 * (n4_1 & 7)) /*0xffc39f87*/
                                  | *(_DWORD *)(13 * v4 + n4 + 1) & 0xFFFFFC01
                                  | ((unsigned __int8)v9 << 6)
                                  | 1;
  }
  RcAssertPrint(__return_address, 4u, (int)"\n"); /*0xffc39fa1*/
  return 0; /*0xffc39fab*/
}

// Function: ProcCommonFunc9FB1 @ 0xffc39fb1 (0x6c bytes)
// Index: 465/2560

int __cdecl ProcCommonFunc9FB1(_BYTE *__return_address, char *n3, int buf)
{
  int v3; // edi
  int v4; // eax

  v3 = ProcCommonFunc8EE7((int)__return_address, n3); /*0xffc39fc8*/
  if ( __return_address[8304] == 1 && __return_address[1561] == 1 && __return_address[257105] == 1 ) /*0xffc39fe3*/
  {
    __return_address[257105] = 0; /*0xffc39fe8*/
    ProcCommonFunc1C43((int)__return_address, n3, buf); /*0xffc39ff3*/
    v4 = ProcCommonFunc8EE7((int)__return_address, n3); /*0xffc3a004*/
    ProcCommonFunc938C(__return_address, v3, v4, 3); /*0xffc3a00f*/
  }
  return 0; /*0xffc3a017*/
}

// Function: ProcCommonFuncA01D @ 0xffc3a01d (0x117 bytes)
// Index: 466/2560

unsigned __int8 __cdecl ProcCommonFuncA01D(
        _BYTE *n32,
        unsigned __int8 n4,
        _BYTE *src,
        unsigned int a4,
        unsigned int a5,
        int a6,
        int a7,
        int a8,
        int a9,
        int a10,
        int a11,
        int a12,
        int a13,
        int a14,
        int a15,
        unsigned __int8 a16,
        int a17,
        char a18)
{
  const char *PGA; // edx
  char *v19; // esi
  int v20; // ebx
  int n6; // ebp

  PGA = "PGA"; /*0xffc3a021*/
  if ( (src[13 * n4] & 0x60) != 0x20 ) /*0xffc3a039*/
    PGA = "CPU"; /*0xffc3a03b*/
  RcAssertPrint( /*0xffc3a07b*/
    n32,
    4u,
    (int)"\n%s%u  |  %1u  | 0x%02X - 0x%02X | 0x%04X - 0x%04X | 0x%08X - 0x%08X ",
    PGA,
    n4,
    (unsigned __int8)a4,
    BYTE2(a4),
    HIBYTE(a4),
    (unsigned __int16)a5,
    HIWORD(a5),
    a6,
    a7);
  RcAssertPrint( /*0xffc3a0a9*/
    n32,
    4u,
    (int)"| 0x%08X - 0x%08X | 0x%08X %08X - 0x%08X %08X |  0x%02X  |",
    a8,
    a9,
    a11,
    a10,
    a13,
    a12,
    a16);
  v19 = &a18; /*0xffc3a0b1*/
  v20 = 0; /*0xffc3a0b5*/
  n6 = 6; /*0xffc3a0b9*/
  do /*0xffc3a11d*/
  {
    RcAssertPrint(n32, 4u, (int)"\n "); /*0xffc3a0c2*/
    RcAssertPrint( /*0xffc3a0ef*/
      n32,
      4u,
      (int)"Stk%1d |  %1u  | 0x%02X - 0x%02X | 0x%04X - 0x%04X | 0x%08X - 0x%08X ",
      v20,
      (unsigned __int8)a4,
      (unsigned __int8)*(v19 - 6),
      (unsigned __int8)*(v19 - 5),
      *((unsigned __int16 *)v19 - 2),
      *((unsigned __int16 *)v19 - 1),
      *(_DWORD *)v19,
      *((_DWORD *)v19 + 1));
    RcAssertPrint( /*0xffc3a10e*/
      n32,
      4u,
      (int)"| 0x%08X - 0x%08X | 0x%08X %08X - 0x%08X %08X |        |",
      *((_DWORD *)v19 + 2),
      *((_DWORD *)v19 + 3),
      *((_DWORD *)v19 + 5),
      *((_DWORD *)v19 + 4),
      *((_DWORD *)v19 + 7),
      *((_DWORD *)v19 + 6));
    v19 += 39; /*0xffc3a116*/
    ++v20; /*0xffc3a119*/
    --n6; /*0xffc3a11a*/
  }
  while ( n6 ); /*0xffc3a11d*/
  return RcAssertPrint(n32, 4u, (int)"\n"); /*0xffc3a12f*/
}

// Function: ProcCommonFuncA134 @ 0xffc3a134 (0x33 bytes)
// Index: 467/2560

unsigned __int8 __cdecl ProcCommonFuncA134(_BYTE *n32)
{
  RcAssertPrint( /*0xffc3a141*/
    n32,
    8u,
    (int)"\n"
         "---------------------------------------------------------------------------------------------------------------"
         "--------------------------------------");
  RcAssertPrint( /*0xffc3a151*/
    n32,
    8u,
    (int)"\n"
         "      | Seg |    Bus      |        Io       |          IoApic         |          Mmiol          |              "
         "     Mmioh                   | StkBmp |");
  return RcAssertPrint( /*0xffc3a165*/
           n32,
           8u,
           (int)"\n"
                "--------------------------------------------------------------------------------------------------------"
                "---------------------------------------------");
}

// Function: ProcCommonFuncA167 @ 0xffc3a167 (0x189 bytes)
// Index: 468/2560

int __cdecl ProcCommonFuncA167(_BYTE *__return_address, int n4)
{
  unsigned __int8 n4_1; // bh
  int v3; // edx
  int v4; // esi
  unsigned __int8 v5; // cl
  unsigned __int8 v6; // al
  unsigned __int8 v7; // bl
  bool v8; // zf
  _BYTE *__return_address_1; // eax
  unsigned int v10; // edx
  char v12; // [esp+13h] [ebp-21h]
  int v13; // [esp+14h] [ebp-20h]
  int v14; // [esp+18h] [ebp-1Ch]
  int v15; // [esp+1Ch] [ebp-18h]
  unsigned __int8 v16; // [esp+24h] [ebp-10h]
  unsigned __int8 n4_2; // [esp+28h] [ebp-Ch]
  unsigned int v18; // [esp+2Ch] [ebp-8h]
  int v19; // [esp+2Ch] [ebp-8h]
  int v20; // [esp+30h] [ebp-4h]

  n4_1 = 0; /*0xffc3a170*/
  v3 = 0; /*0xffc3a173*/
  n4_2 = 0; /*0xffc3a175*/
  v13 = 0; /*0xffc3a17a*/
  v4 = 0; /*0xffc3a17e*/
  do /*0xffc3a2e0*/
  {
    if ( (*(_BYTE *)(v4 + n4) & 1) != 0 ) /*0xffc3a184*/
    {
      v5 = 0; /*0xffc3a18e*/
      v12 = 0; /*0xffc3a190*/
      v6 = __return_address[255496]; /*0xffc3a194*/
      if ( v6 ) /*0xffc3a19c*/
      {
        do /*0xffc3a2c5*/
        {
          v14 = v5; /*0xffc3a1a5*/
          if ( (*(_BYTE *)(v4 + 4 * v5 + n4 + 1) & 1) != 0 ) /*0xffc3a1b1*/
          {
            v7 = 0; /*0xffc3a1b7*/
            v8 = v6 == 0; /*0xffc3a1b9*/
            __return_address_1 = __return_address; /*0xffc3a1bb*/
            v16 = 0; /*0xffc3a1bf*/
            if ( !v8 ) /*0xffc3a1c3*/
            {
              do /*0xffc3a2ab*/
              {
                if ( v7 != v5 ) /*0xffc3a1cb*/
                {
                  v20 = v4 + 4 * v7; /*0xffc3a1db*/
                  v10 = *(_DWORD *)(v20 + n4 + 1); /*0xffc3a1df*/
                  if ( (v10 & 1) != 0 ) /*0xffc3a1e6*/
                  {
                    v15 = (v10 >> 1) & 7; /*0xffc3a1f3*/
                    v18 = *(_DWORD *)(v4 + 4 * v14 + n4 + 1); /*0xffc3a202*/
                    if ( ((v18 >> 1) & 7) == v15 && (((unsigned __int8)v18 ^ (unsigned __int8)v10) & 0x30) == 0 ) /*0xffc3a21d*/
                    {
                      v19 = (v10 >> 6) & 0xF; /*0xffc3a235*/
                      ProcCommonFunc940C(__return_address, n4_2, 0, v16, 5u); /*0xffc3a239*/
                      RcAssertPrint( /*0xffc3a27a*/
                        __return_address,
                        2u,
                        (int)"\n"
                             "  CPU%u has more than one link (%u, %u) connecting to CPU%u (%u, %u).   Disabling link CPU%"
                             "uP%u <-> CPU%uP%u. ",
                        v13,
                        v14,
                        v7,
                        v15,
                        (*(_DWORD *)(v4 + 4 * v14 + n4 + 1) >> 6) & 0xF,
                        v19,
                        v13,
                        v7,
                        v15,
                        v19);
                      v5 = v12; /*0xffc3a286*/
                      *(_DWORD *)(v20 + n4 + 1) &= ~1u; /*0xffc3a28a*/
                      *(_DWORD *)(n4 + 13 * v15 + 4 * v19 + 1) &= ~1u; /*0xffc3a296*/
                    }
                    __return_address_1 = __return_address; /*0xffc3a29b*/
                  }
                }
                v16 = ++v7; /*0xffc3a2a1*/
              }
              while ( v7 < __return_address_1[255496] ); /*0xffc3a2ab*/
            }
          }
          else
          {
            __return_address_1 = __return_address; /*0xffc3a2b3*/
          }
          v6 = __return_address_1[255496]; /*0xffc3a2b7*/
          v12 = ++v5; /*0xffc3a2bf*/
        }
        while ( v5 < v6 ); /*0xffc3a2c5*/
        v3 = v13; /*0xffc3a2cb*/
      }
    }
    ++n4_1; /*0xffc3a2cf*/
    v4 += 13; /*0xffc3a2d1*/
    ++v3; /*0xffc3a2d4*/
    n4_2 = n4_1; /*0xffc3a2d5*/
    v13 = v3; /*0xffc3a2d9*/
  }
  while ( n4_1 < 4u ); /*0xffc3a2e0*/
  return 0; /*0xffc3a2e6*/
}

// Function: ProcCommonFuncA2F0 @ 0xffc3a2f0 (0x103 bytes)
// Index: 469/2560

unsigned __int8 __cdecl ProcCommonFuncA2F0(_BYTE *__return_address, int n4)
{
  _DWORD *v2; // ecx
  unsigned __int8 n4_6; // bl
  int v4; // ebp
  _BYTE *n4_1; // edi
  _BYTE *n4_3; // eax
  unsigned __int8 n4_5; // bh
  int v8; // ebp
  int v9; // ecx
  _DWORD *v11; // [esp+10h] [ebp-14h]
  int n4_4; // [esp+14h] [ebp-10h]
  int v13; // [esp+18h] [ebp-Ch]
  int v14; // [esp+1Ch] [ebp-8h]
  int n4_2; // [esp+20h] [ebp-4h]

  v2 = (_DWORD *)(n4 + 172); /*0xffc3a2fe*/
  n4_6 = 0; /*0xffc3a305*/
  v11 = (_DWORD *)(n4 + 172); /*0xffc3a307*/
  v4 = 0; /*0xffc3a30b*/
  n4_1 = (_BYTE *)n4; /*0xffc3a30d*/
  v14 = 0; /*0xffc3a30f*/
  n4_2 = n4; /*0xffc3a313*/
  do /*0xffc3a3d5*/
  {
    if ( (*n4_1 & 1) != 0 && (*n4_1 & 0x60) == 0 ) /*0xffc3a323*/
    {
      RcAssertPrint(__return_address, 8u, (int)"\n\n\nCPU %1u Routing Table", v4); /*0xffc3a332*/
      RcAssertPrint(__return_address, 8u, (int)"\n-------------------"); /*0xffc3a33f*/
      RcAssertPrint(__return_address, 8u, (int)"\nDestSocket  Port"); /*0xffc3a34c*/
      n4_3 = (_BYTE *)n4; /*0xffc3a351*/
      n4_5 = 0; /*0xffc3a35c*/
      v8 = 0; /*0xffc3a35e*/
      n4_4 = n4; /*0xffc3a360*/
      v9 = 0; /*0xffc3a364*/
      v13 = 0; /*0xffc3a366*/
      do /*0xffc3a3af*/
      {
        if ( (*n4_3 & 1) != 0 && (*n4_3 & 0x60) == 0 && n4_5 != n4_6 ) /*0xffc3a378*/
        {
          RcAssertPrint(__return_address, 8u, (int)"\n   CPU%1u       %1u", v8, (*v11 >> v9) & 3); /*0xffc3a38b*/
          n4_3 = (_BYTE *)n4_4; /*0xffc3a390*/
          v9 = v13; /*0xffc3a397*/
        }
        ++n4_5; /*0xffc3a39b*/
        n4_3 += 13; /*0xffc3a39d*/
        v9 += 2; /*0xffc3a3a0*/
        n4_4 = (int)n4_3; /*0xffc3a3a3*/
        ++v8; /*0xffc3a3a7*/
        v13 = v9; /*0xffc3a3a8*/
      }
      while ( n4_5 < 4u ); /*0xffc3a3af*/
      n4_1 = (_BYTE *)n4_2; /*0xffc3a3b1*/
      v4 = v14; /*0xffc3a3b5*/
      v2 = v11; /*0xffc3a3b9*/
    }
    ++n4_6; /*0xffc3a3bd*/
    n4_1 += 13; /*0xffc3a3bf*/
    ++v4; /*0xffc3a3c2*/
    n4_2 = (int)n4_1; /*0xffc3a3c3*/
    v2 += 14; /*0xffc3a3c7*/
    v14 = v4; /*0xffc3a3ca*/
    v11 = v2; /*0xffc3a3ce*/
  }
  while ( n4_6 < 4u ); /*0xffc3a3d5*/
  return RcAssertPrint(__return_address, 8u, (int)"\n\n"); /*0xffc3a3eb*/
}

// Function: ProcCommonFuncA3F3 @ 0xffc3a3f3 (0x131 bytes)
// Index: 470/2560

int __cdecl ProcCommonFuncA3F3(_BYTE *__return_address, char *n4, int buf)
{
  char *n4_1; // eax
  char v4; // cl
  int n4_2; // edx
  int v6; // edi
  char *v7; // ebx
  char v8; // al
  unsigned __int8 v9; // ch
  int v10; // ebp
  char *v11; // eax
  unsigned int v12; // eax
  char v14; // [esp+Fh] [ebp-5h]
  int n4_3; // [esp+10h] [ebp-4h]

  n4_1 = n4; /*0xffc3a3f5*/
  v4 = 0; /*0xffc3a3f9*/
  n4_2 = 4; /*0xffc3a404*/
  v6 = 0; /*0xffc3a405*/
  n4_3 = 4; /*0xffc3a407*/
  v7 = n4 + 76; /*0xffc3a40b*/
  do /*0xffc3a4c7*/
  {
    v8 = *n4_1; /*0xffc3a40f*/
    if ( (v8 & 1) == 0 || (v8 & 0x60) != 0 ) /*0xffc3a41b*/
      goto LABEL_17; /*0xffc3a41b*/
    v9 = 0; /*0xffc3a425*/
    v14 = 0; /*0xffc3a42a*/
    v10 = *(_DWORD *)(buf + 100); /*0xffc3a42e*/
    if ( (*v7 & 1) == 0 ) /*0xffc3a431*/
      goto LABEL_15; /*0xffc3a431*/
    v11 = v7; /*0xffc3a433*/
    while ( 1 ) /*0xffc3a435*/
    {
      v12 = *(_DWORD *)v11; /*0xffc3a435*/
      if ( (v12 & 0x30) != 0 ) /*0xffc3a43c*/
      {
        if ( (v12 & 0x30) != 0x10 ) /*0xffc3a44f*/
        {
          RcAssertPrint(__return_address, 1u, (int)"\n Invalid Socket Type found in CPU%u Topology Tree!!! ", v6); /*0xffc3a45a*/
          v9 = v14; /*0xffc3a45f*/
          v4 = 1; /*0xffc3a466*/
        }
        goto LABEL_11; /*0xffc3a466*/
      }
      if ( !v10 ) /*0xffc3a440*/
        break; /*0xffc3a440*/
      _bittestandreset(&v10, (v12 >> 1) & 7); /*0xffc3a447*/
LABEL_11:
      v14 = ++v9; /*0xffc3a46d*/
      v11 = &v7[4 * v9]; /*0xffc3a471*/
      if ( (*v11 & 1) == 0 ) /*0xffc3a477*/
        goto LABEL_14; /*0xffc3a477*/
    }
    RcAssertPrint(__return_address, 1u, (int)"\n CPU%u not found in CPU%u Topology Tree!!! ", v9, v6); /*0xffc3a488*/
    v4 = 1; /*0xffc3a490*/
LABEL_14:
    n4_2 = n4_3; /*0xffc3a492*/
LABEL_15:
    if ( v10 ) /*0xffc3a498*/
    {
      RcAssertPrint(__return_address, 1u, (int)"\n One or more CPUs not found in CPU%u Topology Tree!!! ", v6); /*0xffc3a4a3*/
      n4_2 = n4_3; /*0xffc3a4a8*/
      v4 = 1; /*0xffc3a4af*/
    }
LABEL_17:
    ++v6; /*0xffc3a4b1*/
    n4_1 = n4 + 13; /*0xffc3a4b6*/
    v7 += 24; /*0xffc3a4b9*/
    --n4_2; /*0xffc3a4bc*/
    n4 += 13; /*0xffc3a4bf*/
    n4_3 = n4_2; /*0xffc3a4c3*/
  }
  while ( n4_2 ); /*0xffc3a4c7*/
  if ( v4 == 1 )
  {
    RcAssertPrint(__return_address, 1u, (int)"\n Topology Discovery Failed!!!\n"); /*0xffc3a4dc*/
    if ( __return_address[257257] == 1 ) /*0xffc3a4ea*/
      return -1; /*0xffc3a4ef*/
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      3956,
      "FALSE");
    KtiDebugAssert((int)__return_address, 218, 6); /*0xffc3a514*/
  }
  return 0; /*0xffc3a51e*/
}

// Function: ProcCommonFuncA524 @ 0xffc3a524 (0xf9 bytes)
// Index: 471/2560

int __cdecl ProcCommonFuncA524(_BYTE *__return_address, int n4)
{
  int v2; // ebx
  int n4_1; // ecx
  int v4; // edi
  unsigned __int8 v5; // al
  int v6; // edx
  int v7; // eax
  unsigned int v8; // ecx
  unsigned __int8 v9; // cl
  unsigned int v10; // ecx
  unsigned __int8 v12; // [esp+13h] [ebp-9h]
  int n4_2; // [esp+14h] [ebp-8h]
  int v14; // [esp+18h] [ebp-4h]

  v2 = 0; /*0xffc3a52d*/
  n4_1 = 4; /*0xffc3a537*/
  v4 = 0; /*0xffc3a538*/
  n4_2 = 4; /*0xffc3a53a*/
  do
  {
    if ( (*(_BYTE *)(v4 + n4) & 1) != 0 )
    {
      v5 = 0; /*0xffc3a548*/
      v12 = 0; /*0xffc3a54a*/
      if ( __return_address[255496] )
      {
        do
        {
          v6 = v5; /*0xffc3a55a*/
          v7 = v4 + 4 * v5; /*0xffc3a55d*/
          v8 = *(_DWORD *)(v7 + n4 + 1); /*0xffc3a560*/
          if ( (v8 & 1) != 0 )
          {
            v9 = (v8 >> 6) & 0xF; /*0xffc3a570*/
            v14 = 13 * ((*(_DWORD *)(v7 + n4 + 1) >> 1) & 7); /*0xffc3a57b*/
            if ( (*(_BYTE *)(v14 + n4) & 1) == 0
              || (v10 = *(_DWORD *)(v14 + 4 * v9 + n4 + 1), (v10 & 1) == 0)
              || ((v10 >> 1) & 7) != v2
              || ((v10 >> 6) & 0xF) != v6 )
            {
              RcAssertPrint( /*0xffc3a5b7*/
                __return_address,
                1u,
                (int)"\n CPU%u Port%u has incosistent LEP with Peer socket. Topology Not Supported ",
                v2,
                v6);
              RcAssertPrint(
                __return_address,
                1u,
                (int)"\n\n %s: %u   %s ",
                "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
                3998,
                "FALSE");
              KtiDebugAssert((int)__return_address, 223, 27); /*0xffc3a5e0*/
            }
          }
          v5 = v12 + 1; /*0xffc3a5ec*/
          v12 = v5; /*0xffc3a5ee*/
        }
        while ( v5 < __return_address[255496] );
        n4_1 = n4_2; /*0xffc3a5fe*/
      }
    }
    ++v2; /*0xffc3a602*/
    v4 += 13; /*0xffc3a603*/
    n4_2 = --n4_1; /*0xffc3a609*/
  }
  while ( n4_1 );
  return 0; /*0xffc3a613*/
}

// Function: ProcCommonFuncA61D @ 0xffc3a61d (0x1b bytes)
// Index: 472/2560

int __cdecl ProcCommonFuncA61D(_BYTE *a1, int a2, int a3, int a4)
{
  DimmConfigPerSocket(a1, a2, a3, a4); /*0xffc3a62d*/
  return 0; /*0xffc3a637*/
}

// Function: ProcCommonFuncA638 @ 0xffc3a638 (0xab bytes)
// Index: 473/2560

char __cdecl ProcCommonFuncA638(_BYTE *__return_address, int a2, _BYTE *p_i)
{
  unsigned __int8 v3; // dl
  int v4; // ecx

  if ( !a2 )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4955,
      "(Tree != NULL)");
    KtiDebugAssert((int)__return_address, 223, 63); /*0xffc3a66d*/
  }
  if ( !p_i )
  {
    RcAssertPrint(
      __return_address,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      4956,
      "(SearchNode != NULL)");
    KtiDebugAssert((int)__return_address, 223, 64); /*0xffc3a69d*/
  }
  v3 = 0; /*0xffc3a6a5*/
  while ( 1 ) /*0xffc3a6af*/
  {
    v4 = *(_DWORD *)(a2 + 4 * v3); /*0xffc3a6af*/
    if ( (v4 & 1) == 0 ) /*0xffc3a6b5*/
      return 0; /*0xffc3a6de*/
    if ( (((unsigned __int8)v4 ^ *p_i) & 0xE) == 0 /*0xffc3a6cf*/
      && (((unsigned __int8)v4 ^ (unsigned __int8)*(_DWORD *)p_i) & 0x30) == 0
      && (*(_DWORD *)(a2 + 4 * v3) & 0xF000u) < (*(_DWORD *)p_i & 0xF000u) )
    {
      break; /*0xffc3a6cf*/
    }
    if ( ++v3 >= 6u ) /*0xffc3a6d6*/
      return 0; /*0xffc3a6d6*/
  }
  return 1; /*0xffc3a6da*/
}

// Function: ProcCommonFuncA6E3 @ 0xffc3a6e3 (0x272 bytes)
// Index: 474/2560

int __cdecl ProcCommonFuncA6E3(_BYTE *__return_address, int n4, int buf, unsigned __int8 n4a, unsigned __int8 n2)
{
  int v6; // esi
  int v7; // edi
  int v8; // esi
  int v9; // esi
  int v10; // edx
  int v11; // eax
  int v13; // eax
  int v14; // [esp+14h] [ebp-Ch]
  _BYTE *n15; // [esp+24h] [ebp+4h]

  v6 = CpuIoRead((int)__return_address, n4a, n2, 151077204); /*0xffc3a709*/
  n15 = (_BYTE *)CpuIoRead((int)__return_address, n4a, n2, 151077200); /*0xffc3a71e*/
  v7 = CpuIoRead((int)__return_address, n4a, n2, 151011520); /*0xffc3a731*/
  v14 = CpuIoRead((int)__return_address, n4a, n2, 151011476); /*0xffc3a73c*/
  if ( !__return_address[257173] )
  {
    RcAssertPrint(__return_address, 4u, (int)"\n Socket%u Link %u", n4a, n2); /*0xffc3a76b*/
    RcAssertPrint(__return_address, 4u, (int)"\n KtiReutPhPss = 0x%08X, KtiReutPhCss = 0x%08X", v6, n15); /*0xffc3a77d*/
    v8 = BYTE1(v6); /*0xffc3a78f*/
    RcAssertPrint( /*0xffc3a79b*/
      __return_address,
      4u,
      (int)"\n KtiReutPhPss.Bits.s_rx_state_p = %x, KtiReutPhCss.Bits.s_tx_state = %x",
      v8,
      (unsigned __int8)n15);
    RcAssertPrint(__return_address, 4u, (int)"\n KtiCrErrCnt = 0x%08X", v7); /*0xffc3a7a9*/
    RcAssertPrint(__return_address, 4u, (int)"\n Lep0=%x", v14); /*0xffc3a7bd*/
    if ( !v8 || (unsigned __int8)n15 == 15 || (unsigned __int8)n15 == 14 )
    {
      if ( (CpuIoRead((int)__return_address, n4a, n2, 151011616) & 0xFu) < 2 ) /*0xffc3a938*/
        return 0; /*0xffc3a91c*/
      RcAssertPrint(__return_address, 4u, (int)"\n\n"); /*0xffc3a942*/
    }
    else
    {
      v9 = CpuIoRead((int)__return_address, n4a, n2, 151011476); /*0xffc3a7f2*/
      RcAssertPrint(__return_address, 4u, (int)"\n Upi Slow Mode Phy failure, Lep: %x", v9);
      RcAssertPrint(__return_address, 4u, (int)"\n WaSlowModeWaCpl: %x", *(_DWORD *)(buf + 216));
      v10 = *(_DWORD *)(buf + 216); /*0xffc3a81a*/
      if ( ((1 << ((BYTE1(v9) & 0x1F) + 4 * (BYTE2(v9) & 0xF))) & v10) == 0 ) /*0xffc3a83b*/
      {
        *(_DWORD *)(buf + 216) = v10 | (1 << (n2 + 4 * n4a)); /*0xffc3a858*/
        RcAssertPrint(__return_address, 4u, (int)"\n\n Socket%u Link %u failed in slow mode", n4a, n2); /*0xffc3a85e*/
        RcAssertPrint(__return_address, 4u, (int)"\n WaSlowModeWaCpl = 0x%08X", *(_DWORD *)(buf + 216)); /*0xffc3a870*/
        if ( !ProcCommonFunc5D00(__return_address, n4, buf, n4a, n2) ) /*0xffc3a883*/
        {
          v11 = CpuIoRead((int)__return_address, *(_BYTE *)(buf + 1), 0, 318914740); /*0xffc3a8a3*/
          CpuIoCfgWrite((int)__return_address, *(_BYTE *)(buf + 1), 0, 318914740, v11 | 0x400000); /*0xffc3a8b7*/
          RcAssertPrint(__return_address, 4u, (int)"\n IGNORE \n"); /*0xffc3a8c3*/
          return 3; /*0xffc3a8ce*/
        }
        v13 = CpuIoRead((int)__return_address, n4a, n2, 151011476); /*0xffc3a8de*/
        if ( ((1 << ((BYTE1(v13) & 0x1F) + 4 * (BYTE2(v13) & 0xF))) & *(_DWORD *)(buf + 216)) != 0 ) /*0xffc3a902*/
        {
          RcAssertPrint(__return_address, 4u, (int)"\n PeerPort was applied WA, need warm reset\n"); /*0xffc3a90b*/
          *(_BYTE *)(buf + 215) = 1; /*0xffc3a913*/
        }
        return 0; /*0xffc3a913*/
      }
    }
  }
  return -1; /*0xffc3a94d*/
}

// Function: ProcCommonFuncA955 @ 0xffc3a955 (0x1f1 bytes)
// Index: 475/2560

int __cdecl ProcCommonFuncA955(_BYTE *__return_address, int n4, int buf, unsigned __int8 n4a, unsigned __int8 n2)
{
  unsigned int v6; // edi
  unsigned int v7; // ecx
  int n3; // eax
  int v9; // edx
  int v11; // [esp-18h] [ebp-3Ch]
  unsigned int n0x20; // [esp+10h] [ebp-14h]
  int v13; // [esp+18h] [ebp-Ch]
  unsigned __int8 v14; // [esp+20h] [ebp-4h]
  unsigned int v15; // [esp+28h] [ebp+4h]
  unsigned __int8 v16; // [esp+28h] [ebp+4h]

  if ( __return_address[257173] ) /*0xffc3a960*/
    return -1; /*0xffc3a960*/
  v6 = CpuIoRead((int)__return_address, n4a, n2, 151011468); /*0xffc3a988*/
  v13 = CpuIoRead((int)__return_address, n4a, n2, 151143056); /*0xffc3a9a2*/
  n0x20 = CpuIoRead((int)__return_address, n4a, n2, 151011592); /*0xffc3a9b5*/
  v15 = CpuIoRead((int)__return_address, n4a, n2, 151011476); /*0xffc3a9c2*/
  RcAssertPrint(__return_address, 4u, (int)"\n Socket%u Link %u", n4a, n2); /*0xffc3a9e0*/
  RcAssertPrint(__return_address, 4u, (int)"\n KtiLs = 0x%08X, KtiAckCnt = 0x%08X, KtiCtrTxPf = 0x%08X", v6, v13, n0x20); /*0xffc3a9f3*/
  v7 = (v15 >> 8) & 0xFFFFFF1F; /*0xffc3aa09*/
  v16 = BYTE2(v15) & 0xF; /*0xffc3aa0f*/
  v14 = v7; /*0xffc3aa13*/
  n3 = (v6 >> 8) & 3; /*0xffc3aa1e*/
  if ( (n3 == 3 || !n3) && (v6 & 0x1C00) != 0x1000 && ((BYTE2(v13) & 0x7F) != (_BYTE)v6 || n0x20 >= 0x20) ) /*0xffc3aa4f*/
    return -1; /*0xffc3ab3b*/
  RcAssertPrint(__return_address, 4u, (int)"\n Socket%u Link %u has LL issue. We need to reset", n4a, n2); /*0xffc3aa63*/
  v11 = *(_DWORD *)(buf + 216); /*0xffc3aa6c*/
  *(_BYTE *)(buf + 215) = 1; /*0xffc3aa72*/
  RcAssertPrint(__return_address, 4u, (int)"\n WaSlowModeWaCpl = 0x%08X", v11); /*0xffc3aa81*/
  v9 = *(_DWORD *)(buf + 216); /*0xffc3aa86*/
  if ( ((1 << (n2 + 4 * n4a)) & v9) != 0 ) /*0xffc3aa9f*/
  {
    RcAssertPrint(__return_address, 4u, (int)"\n WA previously applied to Socket%u Link %u", n4a, n2); /*0xffc3aaab*/
  }
  else if ( ((1 << (v14 + 4 * v16)) & v9) != 0 ) /*0xffc3aadb*/
  {
    RcAssertPrint(__return_address, 4u, (int)"\n WA previously applied to peer Socket%u Link %u", v16, v14); /*0xffc3aaea*/
  }
  else
  {
    *(_DWORD *)(buf + 216) = v9 | (1 << (n2 + 4 * n4a)); /*0xffc3ab02*/
    RcAssertPrint(__return_address, 4u, (int)"\n\n Socket%u Link %u failed LL in slow mode/n", n4a, n2); /*0xffc3ab08*/
    RcAssertPrint(__return_address, 4u, (int)"\n WaSlowModeWaCpl = 0x%08X", *(_DWORD *)(buf + 216)); /*0xffc3ab1b*/
    ProcCommonFunc5D00(__return_address, n4, buf, n4a, n2); /*0xffc3ab2e*/
  }
  return 3; /*0xffc3ab3e*/
}

// Function: ProcCommonFuncAB46 @ 0xffc3ab46 (0x10d bytes)
// Index: 476/2560

int __cdecl ProcCommonFuncAB46(
        _BYTE *__return_address,
        int n4,
        int buf,
        unsigned __int8 n4a,
        unsigned __int8 n2,
        unsigned int *a6,
        unsigned int *p_n4,
        _BYTE **p___return_address)
{
  int n3; // eax
  int n3_1; // ebx
  int v10; // eax
  int v11; // eax

  AutoGenFuncAE56((int)__return_address); /*0xffc3ab4f*/
  n3 = ProcCommonFuncA6E3(__return_address, n4, buf, n4a, n2); /*0xffc3ab66*/
  n3_1 = n3; /*0xffc3ab6b*/
  if ( n3 ) /*0xffc3ab72*/
  {
    if ( n3 == 3 ) /*0xffc3ab90*/
    {
      RcAssertPrint(__return_address, 4u, (int)"\n   Link ignored"); /*0xffc3ab9a*/
      *p_n4 = 0; /*0xffc3aba6*/
    }
  }
  else
  {
    *(_BYTE *)p___return_address = 0; /*0xffc3ab81*/
    RcAssertPrint(__return_address, 4u, (int)"\n   UseKtiPcSts = %u", p___return_address); /*0xffc3ab83*/
  }
  v10 = CpuIoRead((int)__return_address, n4a, n2, 151011468); /*0xffc3abb7*/
  *a6 = v10; /*0xffc3abc9*/
  RcAssertPrint(__return_address, 4u, (int)"\n Ktils=%x", v10); /*0xffc3abcc*/
  if ( *a6 && n3_1 != 3 && ProcCommonFuncA955(__return_address, n4, buf, n4a, n2) == 3 ) /*0xffc3abf8*/
  {
    RcAssertPrint(__return_address, 4u, (int)"\n   Link ignored"); /*0xffc3ac02*/
    *p_n4 = 0; /*0xffc3ac0e*/
    *a6 = 0; /*0xffc3ac11*/
  }
  v11 = CpuIoRead((int)__return_address, *(_BYTE *)(buf + 1), 0, 318783612); /*0xffc3ac29*/
  CpuIoCfgWrite((int)__return_address, *(_BYTE *)(buf + 1), 0, 318783612, v11 | *(_DWORD *)(buf + 216)); /*0xffc3ac40*/
  return AutoGenFuncAE62((int)__return_address); /*0xffc3ac4e*/
}

// Function: ProcCommonFuncAC53 @ 0xffc3ac53 (0x99 bytes)
// Index: 477/2560

int __cdecl ProcCommonFuncAC53(int __return_address, int n4)
{
  unsigned __int8 n4_1; // bl
  int v3; // edi
  unsigned __int8 i_1; // bh
  int result; // eax
  unsigned __int8 i; // [esp+10h] [ebp-8h]
  unsigned __int8 n4_2; // [esp+14h] [ebp-4h]

  n4_1 = 0; /*0xffc3ac5b*/
  n4_2 = 0; /*0xffc3ac63*/
  v3 = 0; /*0xffc3ac67*/
  do /*0xffc3ace3*/
  {
    i_1 = 0; /*0xffc3ac69*/
    for ( i = 0; i_1 < *(_BYTE *)(__return_address + 255496); i = i_1 ) /*0xffc3ac6f*/
    {
      result = v3 + 4 * i_1; /*0xffc3ac7a*/
      if ( (*(_BYTE *)(result + n4 + 1) & 1) != 0 ) /*0xffc3ac82*/
      {
        CpuIoCfgWrite(__return_address, n4_2, i, 151011496, 0); /*0xffc3ac94*/
        CpuIoCfgWrite(__return_address, n4_2, i, 151011500, 0); /*0xffc3aca9*/
        result = CpuIoCfgWrite(__return_address, n4_2, i, 151011520, 0x7FFFFFFF); /*0xffc3acc1*/
      }
      ++i_1; /*0xffc3acc9*/
    }
    ++n4_1; /*0xffc3acd7*/
    v3 += 13; /*0xffc3acd9*/
    n4_2 = n4_1; /*0xffc3acdc*/
  }
  while ( n4_1 < 4u ); /*0xffc3ace3*/
  return result; /*0xffc3ace5*/
}

// Function: ProcCommonFuncACEC @ 0xffc3acec (0x28 bytes)
// Index: 478/2560

bool __cdecl ProcCommonFuncACEC(int a1, int a2)
{
  return (CpuIoRead(a1, *(_BYTE *)(a2 + 1), 0, 318914724) & 0x20) != 0; /*0xffc3ad12*/
}

// Function: ProcCommonFuncAD14 @ 0xffc3ad14 (0x38 bytes)
// Index: 479/2560

bool __cdecl ProcCommonFuncAD14(int __return_address, int n4, int buf, unsigned __int8 a4)
{
  return (*(_BYTE *)(13 * a4 + n4) & 0x60) == 0 /*0xffc3ad48*/
      && (unsigned __int16)CpuIoRead(__return_address, a4, 0, 318914752) == 760;
}

// Function: ProcCommonFuncAD4C @ 0xffc3ad4c (0x379 bytes)
// Index: 480/2560

char *__cdecl ProcCommonFuncAD4C(_BYTE *__return_address, char *CPU, unsigned int *a3)
{
  char *CPU_1; // eax
  unsigned int *v4; // esi
  int v5; // ebp
  int n4; // ecx
  char v7; // al
  unsigned __int8 v8; // bl
  unsigned int *v9; // eax
  unsigned int v10; // edx
  char *CPU_4; // ebx
  char *CPU_5; // eax
  unsigned int *v13; // ebp
  int n4_3; // ecx
  char v15; // al
  unsigned int *v16; // esi
  bool v17; // bh
  unsigned int CPU_8; // eax
  unsigned __int8 n8; // bl
  unsigned int CPU_7; // esi
  char v21; // al
  int n8_1; // ecx
  unsigned __int8 v23; // bl
  int v24; // eax
  unsigned __int8 CPU_10; // bl
  unsigned int CPU_11; // eax
  const char *TX; // edx
  char v28; // [esp+12h] [ebp-1Eh]
  bool v29; // [esp+13h] [ebp-1Dh]
  int n4_2; // [esp+14h] [ebp-1Ch]
  unsigned int CPU_9; // [esp+14h] [ebp-1Ch]
  int n4_1; // [esp+18h] [ebp-18h]
  char *CPU_3; // [esp+1Ch] [ebp-14h] BYREF
  char *CPU_6; // [esp+20h] [ebp-10h]
  unsigned int CPU_2; // [esp+24h] [ebp-Ch] BYREF
  _BYTE buf[8]; // [esp+28h] [ebp-8h] BYREF

  CPU_1 = CPU; /*0xffc3ad4f*/
  v4 = a3; /*0xffc3ad56*/
  v5 = 0; /*0xffc3ad5a*/
  n4 = 4; /*0xffc3ad63*/
  CPU_2 = (unsigned int)CPU; /*0xffc3ad64*/
  n4_1 = 4; /*0xffc3ad68*/
  n4_2 = 4; /*0xffc3ad6c*/
  do /*0xffc3ae7c*/
  {
    v7 = *CPU_1; /*0xffc3ad70*/
    if ( (v7 & 1) != 0 && (v7 & 0x60) == 0 ) /*0xffc3ad7c*/
    {
      RcAssertPrint(__return_address, 8u, (int)"\n\nCPU%u Topology Tree", v5); /*0xffc3ad8b*/
      RcAssertPrint(__return_address, 8u, (int)"\n-------------------"); /*0xffc3ad98*/
      RcAssertPrint(__return_address, 8u, (int)"\nIndex  Socket  ParentSocket  ParentPort  ParentIndex  Hop"); /*0xffc3ada5*/
      v8 = 0; /*0xffc3adad*/
      if ( (*(_BYTE *)v4 & 1) != 0 ) /*0xffc3adb2*/
      {
        CPU_6 = 0; /*0xffc3adb8*/
        v9 = v4; /*0xffc3adbd*/
        do /*0xffc3ae5c*/
        {
          if ( v8 ) /*0xffc3adc1*/
          {
            v10 = *v9; /*0xffc3adf4*/
            CPU_3 = "CPU"; /*0xffc3adf6*/
            if ( (v10 & 0x30) != 0 ) /*0xffc3ae01*/
              CPU_3 = "PGA"; /*0xffc3ae03*/
            RcAssertPrint( /*0xffc3ae45*/
              __return_address,
              8u,
              (int)"\n %02u     %s%u      CPU%u           %02u          %02u        %1u",
              CPU_6,
              CPU_3,
              (v10 >> 1) & 7,
              (v4[(v10 >> 19) & 0x7F] >> 1) & 7,
              (v10 >> 8) & 0xF,
              (v10 >> 19) & 0x7F,
              (unsigned __int16)v10 >> 12);
          }
          else
          {
            RcAssertPrint( /*0xffc3adea*/
              __return_address,
              8u,
              (int)"\n %02u     CPU%u      %s           %s          %s        %1u",
              0,
              (*v4 >> 1) & 7,
              " -- ",
              "--",
              "--",
              (unsigned __int8)HIBYTE(*(_WORD *)v4) >> 4);
          }
          CPU_6 = (char *)++v8; /*0xffc3ae52*/
          v9 = &v4[v8]; /*0xffc3ae56*/
        }
        while ( (*(_BYTE *)v9 & 1) != 0 ); /*0xffc3ae5c*/
      }
      n4 = n4_2; /*0xffc3ae62*/
    }
    ++v5; /*0xffc3ae6a*/
    CPU_1 = (char *)(CPU_2 + 13); /*0xffc3ae6b*/
    v4 += 6; /*0xffc3ae6e*/
    --n4; /*0xffc3ae71*/
    CPU_2 += 13; /*0xffc3ae74*/
    n4_2 = n4; /*0xffc3ae78*/
  }
  while ( n4 ); /*0xffc3ae7c*/
  CPU_4 = CPU; /*0xffc3ae82*/
  CPU_5 = CPU; /*0xffc3ae86*/
  v13 = a3; /*0xffc3ae88*/
  CPU_6 = CPU; /*0xffc3ae8e*/
  n4_3 = 4; /*0xffc3ae92*/
  do
  {
    v15 = *CPU_5; /*0xffc3ae93*/
    if ( (v15 & 1) != 0 && (v15 & 0x60) == 0 )
    {
      RcAssertPrint(__return_address, 8u, (int)"\n"); /*0xffc3aead*/
      v16 = v13 + 1; /*0xffc3aeb5*/
      v28 = 1; /*0xffc3aec0*/
      v17 = (CPU_4[13 * ((*v13 >> 1) & 7)] & 0x10) != 0; /*0xffc3aece*/
      v29 = v17; /*0xffc3aed1*/
      while ( (*(_BYTE *)v16 & 1) != 0 )
      {
        memset_save_flags(buf, 36, 8u); /*0xffc3aee7*/
        CPU_8 = *v16; /*0xffc3aeec*/
        n8 = 0; /*0xffc3aef1*/
        CPU_9 = CPU_8; /*0xffc3aef3*/
        CPU_2 = *v16; /*0xffc3aef7*/
        if ( (CPU_8 & 0xF000) == 0 ) /*0xffc3af00*/
          goto LABEL_25; /*0xffc3af00*/
        do
        {
          if ( n8 >= 8u )
          {
            RcAssertPrint(
              __return_address,
              1u,
              (int)"\nERR_SW_CHECK: 0x%X!!!!  Invalid value. Index2: 0x%X is greater or equal to (MAX_SOCKET * 2): 0x%X",
              81,
              n8,
              8);
            RcAssertPrint(
              __return_address,
              1u,
              (int)"\n\n %s: %u   %s ",
              "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
              4110,
              "FALSE");
            KtiDebugAssert((int)__return_address, 223, 81); /*0xffc3af48*/
            CPU_8 = CPU_9; /*0xffc3af4d*/
          }
          CPU_3 = (char *)v13[(CPU_8 >> 19) & 0x7F]; /*0xffc3af67*/
          CPU_7 = (unsigned int)CPU_3; /*0xffc3af5a*/
          v21 = ProcCommonFunc86D1(__return_address, (int)CPU, &CPU_3, &CPU_2); /*0xffc3af71*/
          n8_1 = n8; /*0xffc3af8f*/
          v23 = n8 + 1; /*0xffc3af92*/
          buf[n8_1] = BYTE1(CPU_9) & 0xF | (16 * ((CPU_9 >> 1) & 7)); /*0xffc3af94*/
          LOBYTE(n8_1) = v21 | (16 * ((CPU_7 >> 1) & 7)); /*0xffc3afa2*/
          v24 = v23; /*0xffc3afa4*/
          n8 = v23 + 1; /*0xffc3afa7*/
          buf[v24] = n8_1; /*0xffc3afa9*/
          CPU_8 = CPU_7; /*0xffc3afad*/
          CPU_9 = CPU_7; /*0xffc3afaf*/
          CPU_2 = CPU_7; /*0xffc3afb3*/
        }
        while ( (CPU_7 & 0xF000) != 0 );
        v17 = v29; /*0xffc3afc3*/
        if ( n8 > 8u )
        {
          RcAssertPrint(
            __return_address,
            1u,
            (int)"\n\n %s: %u   %s ",
            "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
            4125,
            "FALSE");
          KtiDebugAssert((int)__return_address, 223, 28); /*0xffc3aff0*/
        }
        else
        {
LABEL_25:
          RcAssertPrint(__return_address, 8u, (int)"\n"); /*0xffc3b005*/
          CPU_10 = n8 - 1; /*0xffc3b00d*/
          if ( CPU_10 ) /*0xffc3b010*/
          {
            CPU_11 = CPU_10; /*0xffc3b012*/
            CPU_2 = CPU_10; /*0xffc3b018*/
            do /*0xffc3b057*/
            {
              TX = "TX"; /*0xffc3b01c*/
              if ( (CPU_11 & 1) == 0 ) /*0xffc3b023*/
                TX = "RX"; /*0xffc3b025*/
              RcAssertPrint( /*0xffc3b043*/
                __return_address,
                8u,
                (int)"\"S%u P%u VN%u %s\" -> ",
                (unsigned __int8)buf[CPU_11] >> 4,
                buf[CPU_11] & 0xF,
                v17,
                TX);
              CPU_11 = --CPU_2; /*0xffc3b04f*/
              --CPU_10; /*0xffc3b054*/
            }
            while ( CPU_10 ); /*0xffc3b057*/
          }
          RcAssertPrint( /*0xffc3b077*/
            __return_address,
            8u,
            (int)"\"S%u P%u VN%u RX\";",
            (unsigned __int8)buf[CPU_10] >> 4,
            buf[CPU_10] & 0xF,
            v17);
        }
        v16 = &v13[(unsigned __int8)++v28]; /*0xffc3b093*/
      }
      n4_3 = n4_1; /*0xffc3b09a*/
      CPU_4 = CPU; /*0xffc3b09e*/
    }
    v13 += 6; /*0xffc3b0a6*/
    CPU_5 = CPU_6 + 13; /*0xffc3b0a9*/
    --n4_3; /*0xffc3b0ac*/
    CPU_6 += 13; /*0xffc3b0af*/
    n4_1 = n4_3; /*0xffc3b0b3*/
  }
  while ( n4_3 );
  return CPU_5; /*0xffc3b0bd*/
}

// Function: ProcCommonFuncB0C5 @ 0xffc3b0c5 (0x5 bytes)
// Index: 481/2560

char __cdecl ProcCommonFuncB0C5(int __return_address, char a2)
{
  return a2; /*0xffc3b0c9*/
}

// Function: CpuInitB0CA @ 0xffc3b0ca (0x49e bytes)
// Index: 482/2560

unsigned __int8 __cdecl CpuInitB0CA(_BYTE *__return_address, _BYTE *n4, unsigned __int8 n4a, int n4_13)
{
  unsigned __int8 n4_12; // al
  _BYTE *n4_1; // edi
  int *v6; // esi
  unsigned __int8 n4_2; // al
  _BYTE *n4_3; // edi
  int *v9; // esi
  unsigned __int8 n4_4; // al
  _BYTE *n4_5; // edi
  unsigned __int8 n4_6; // al
  _BYTE *n4_7; // ebp
  int *v14; // edi
  unsigned __int8 n4_8; // al
  unsigned __int8 v16; // dl
  _BYTE *n4_9; // edi
  unsigned int *p_buf; // esi
  unsigned int buf_1; // ebx
  int n4_10; // ebp
  int v21; // ecx
  char v22; // al
  unsigned __int8 i; // dl
  _BYTE *n4_11; // ebp
  int *p_buf_1; // edi
  __int64 v26; // rax
  int v27; // esi
  int v28; // eax
  __int64 v29; // rax
  int v30; // esi
  __int64 v31; // [esp-1Ch] [ebp-70h]
  __int64 v32; // [esp-14h] [ebp-68h]
  int n4_16; // [esp+4h] [ebp-50h]
  unsigned __int8 n4_14; // [esp+4h] [ebp-50h]
  unsigned __int8 n4_15; // [esp+4h] [ebp-50h]
  unsigned __int8 n4_17; // [esp+4h] [ebp-50h]
  unsigned __int8 n4_18; // [esp+4h] [ebp-50h]
  unsigned int v38; // [esp+8h] [ebp-4Ch]
  int v39; // [esp+10h] [ebp-44h]
  int buf; // [esp+14h] [ebp-40h] BYREF
  _DWORD v41[7]; // [esp+18h] [ebp-3Ch] BYREF
  int buf_; // [esp+34h] [ebp-20h] BYREF
  _DWORD v43[7]; // [esp+38h] [ebp-1Ch] BYREF
  char v44; // [esp+64h] [ebp+10h]

  n4_12 = n4_13; /*0xffc3b0cd*/
  v38 = 0; /*0xffc3b0e3*/
  if ( *(_BYTE *)(n4_13 + 214) != 1 && __return_address[257257] != 1 ) /*0xffc3b0f0*/
    return n4_12; /*0xffc3b0f0*/
  LOBYTE(v39) = *(_BYTE *)(n4_13 + 1); /*0xffc3b0fd*/
  v44 = -1; /*0xffc3b107*/
  memset_save_flags(&buf, 0, 0x20u); /*0xffc3b10c*/
  memset_save_flags(&buf_, 0, 0x20u); /*0xffc3b11a*/
  n4_1 = n4; /*0xffc3b11f*/
  v6 = v43; /*0xffc3b123*/
  n4_2 = 0; /*0xffc3b12a*/
  n4_14 = 0; /*0xffc3b12c*/
  do /*0xffc3b171*/
  {
    if ( (*n4_1 & 1) != 0 ) /*0xffc3b133*/
    {
      *(v6 - 1) = CpuIoRead((int)__return_address, n4_14, 0, 67387616); /*0xffc3b151*/
      *v6 = CpuIoRead((int)__return_address, n4_14, 0, 67387620); /*0xffc3b15a*/
      n4_2 = n4_14; /*0xffc3b15f*/
    }
    ++n4_2; /*0xffc3b163*/
    n4_1 += 13; /*0xffc3b165*/
    v6 += 2; /*0xffc3b168*/
    n4_14 = n4_2; /*0xffc3b16b*/
  }
  while ( n4_2 < 4u ); /*0xffc3b171*/
  ProcCommonFuncA61D(__return_address, v39, 143, 1); /*0xffc3b182*/
  KtiFunc8C4((int)__return_address, 0x14u); /*0xffc3b18a*/
  ProcCommonFuncA61D(__return_address, v39, 143, 0); /*0xffc3b195*/
  if ( __return_address[257257] ) /*0xffc3b19d*/
  {
    if ( n4a < 4u ) /*0xffc3b493*/
    {
      v41[2 * (unsigned __int8)v39 - 1] = CpuIoRead((int)__return_address, v39, 0, 67387616); /*0xffc3b4e0*/
      v41[2 * (unsigned __int8)v39] = CpuIoRead((int)__return_address, v39, 0, 67387620); /*0xffc3b4ee*/
      v41[2 * n4a - 1] = CpuIoRead((int)__return_address, n4a, 0, 67387616); /*0xffc3b515*/
      v28 = CpuIoRead((int)__return_address, n4a, 0, 67387620); /*0xffc3b519*/
      v41[2 * n4a] = v28; /*0xffc3b521*/
      HIDWORD(v32) = v28; /*0xffc3b525*/
      LODWORD(v32) = v41[2 * n4a - 1]; /*0xffc3b526*/
      HIDWORD(v31) = v41[2 * (unsigned __int8)v39]; /*0xffc3b52a*/
      LODWORD(v31) = v41[2 * (unsigned __int8)v39 - 1]; /*0xffc3b52e*/
      v29 = RmtFunc7025(v31, v32); /*0xffc3b532*/
      v30 = HIDWORD(v29); /*0xffc3b541*/
      CpuIoCfgWrite((int)__return_address, n4a, 0, 67387624, v29); /*0xffc3b543*/
      return CpuIoCfgWrite((int)__return_address, n4a, 0, 67387628, v30 | 0x80000000); /*0xffc3b558*/
    }
    else
    {
      RcAssertPrint(__return_address, 2u, (int)aWarningCannotS, n4a, 4); /*0xffc3b4a3*/
      return ProcCommonFunc940C(__return_address, n4a, 0, 0xFFu, 0x11u); /*0xffc3b4b9*/
    }
  }
  n4_3 = n4; /*0xffc3b1aa*/
  v9 = v41; /*0xffc3b1ae*/
  n4_4 = 0; /*0xffc3b1b2*/
  n4_15 = 0; /*0xffc3b1b4*/
  do /*0xffc3b1f9*/
  {
    if ( (*n4_3 & 1) != 0 ) /*0xffc3b1bb*/
    {
      *(v9 - 1) = CpuIoRead((int)__return_address, n4_15, 0, 67387616); /*0xffc3b1d9*/
      *v9 = CpuIoRead((int)__return_address, n4_15, 0, 67387620); /*0xffc3b1e2*/
      n4_4 = n4_15; /*0xffc3b1e7*/
    }
    ++n4_4; /*0xffc3b1eb*/
    n4_3 += 13; /*0xffc3b1ed*/
    v9 += 2; /*0xffc3b1f0*/
    n4_15 = n4_4; /*0xffc3b1f3*/
  }
  while ( n4_4 < 4u ); /*0xffc3b1f9*/
  if ( v41[2 * (unsigned __int8)v39 - 1] == v43[2 * (unsigned __int8)v39 - 1] /*0xffc3b216*/
    && v41[2 * (unsigned __int8)v39] == v43[2 * (unsigned __int8)v39] )
  {
    n4_5 = n4; /*0xffc3b21c*/
    n4_6 = 0; /*0xffc3b220*/
    LOBYTE(n4_16) = 0; /*0xffc3b222*/
    do /*0xffc3b256*/
    {
      if ( (*n4_5 & 1) != 0 ) /*0xffc3b229*/
      {
        ProcCommonFuncA61D(__return_address, n4_16, 143, 0); /*0xffc3b237*/
        KtiFunc8C4((int)__return_address, 0x14u); /*0xffc3b23f*/
        n4_6 = n4_16; /*0xffc3b244*/
      }
      ++n4_6; /*0xffc3b24b*/
      n4_5 += 13; /*0xffc3b24d*/
      LOBYTE(n4_16) = n4_6; /*0xffc3b250*/
    }
    while ( n4_6 < 4u ); /*0xffc3b256*/
    ProcCommonFuncA61D(__return_address, v39, 143, 1); /*0xffc3b262*/
    KtiFunc8C4((int)__return_address, 0x14u); /*0xffc3b26a*/
    ProcCommonFuncA61D(__return_address, v39, 143, 0); /*0xffc3b274*/
    n4_7 = n4; /*0xffc3b279*/
    v14 = v41; /*0xffc3b280*/
    n4_8 = 0; /*0xffc3b287*/
    n4_17 = 0; /*0xffc3b289*/
    do /*0xffc3b2cf*/
    {
      if ( (*n4_7 & 1) != 0 ) /*0xffc3b291*/
      {
        *(v14 - 1) = CpuIoRead((int)__return_address, n4_17, 0, 67387616); /*0xffc3b2af*/
        *v14 = CpuIoRead((int)__return_address, n4_17, 0, 67387620); /*0xffc3b2b8*/
        n4_8 = n4_17; /*0xffc3b2bd*/
      }
      ++n4_8; /*0xffc3b2c1*/
      n4_7 += 13; /*0xffc3b2c3*/
      v14 += 2; /*0xffc3b2c6*/
      n4_17 = n4_8; /*0xffc3b2c9*/
    }
    while ( n4_8 < 4u ); /*0xffc3b2cf*/
    if ( v41[2 * (unsigned __int8)v39 - 1] == v43[2 * (unsigned __int8)v39 - 1] /*0xffc3b2e3*/
      && v41[2 * (unsigned __int8)v39] == v43[2 * (unsigned __int8)v39] )
    {
      RcAssertPrint(__return_address, 2u, (int)aWarningTscSync); /*0xffc3b2ea*/
    }
    else
    {
      v16 = 0; /*0xffc3b2f3*/
      while ( (n4[13 * v16] & 1) == 0 || v41[2 * v16 - 1] != v43[2 * v16 - 1] || v41[2 * v16] != v43[2 * v16] ) /*0xffc3b313*/
      {
        if ( ++v16 >= 4u ) /*0xffc3b31a*/
          goto LABEL_30; /*0xffc3b31a*/
      }
LABEL_40:
      RcAssertPrint(__return_address, 2u, (int)aWarningThisSys); /*0xffc3b38a*/
    }
    return ProcCommonFunc940C(__return_address, 0xFFu, 0xFFu, 0xFFu, 0x11u); /*0xffc3b3aa*/
  }
  for ( i = 0; i < 4u; ++i ) /*0xffc3b35f*/
  {
    if ( (n4[13 * i] & 1) != 0 && v41[2 * i - 1] == v43[2 * i - 1] && v41[2 * i] == v43[2 * i] ) /*0xffc3b37f*/
      goto LABEL_40; /*0xffc3b37f*/
  }
LABEL_30:
  n4_9 = n4; /*0xffc3b31c*/
  p_buf = (unsigned int *)&buf; /*0xffc3b320*/
  buf_1 = 0; /*0xffc3b324*/
  n4_10 = 4; /*0xffc3b32a*/
  do
  {
    if ( (*n4_9 & 1) != 0 )
    {
      if ( ProcCommonFunc919A(*p_buf, p_buf[1], buf_1, v38) ) /*0xffc3b33e*/
      {
        v21 = p_buf[1]; /*0xffc3b34a*/
        v22 = 0; /*0xffc3b34d*/
        buf_1 = *p_buf; /*0xffc3b34f*/
        v38 = v21; /*0xffc3b351*/
        v44 = 0; /*0xffc3b355*/
        goto LABEL_45; /*0xffc3b359*/
      }
      v22 = ProcCommonFunc9180(*p_buf, p_buf[1], buf_1, v38) ? v44 : 0;
      v44 = v22; /*0xffc3b3c9*/
    }
    else
    {
      v22 = v44; /*0xffc3b3cf*/
    }
    v21 = v38; /*0xffc3b3d3*/
LABEL_45:
    n4_9 += 13; /*0xffc3b3d7*/
    p_buf += 2; /*0xffc3b3da*/
    --n4_10; /*0xffc3b3dd*/
  }
  while ( n4_10 );
  if ( v22 == -1 ) /*0xffc3b3f0*/
    return RcAssertPrint(__return_address, 4u, (int)aAllTscSnapshot); /*0xffc3b3fa*/
  n4_11 = n4; /*0xffc3b407*/
  p_buf_1 = &buf; /*0xffc3b40b*/
  n4_12 = 0; /*0xffc3b40f*/
  n4_18 = 0; /*0xffc3b411*/
  do /*0xffc3b486*/
  {
    if ( (*n4_11 & 1) != 0 ) /*0xffc3b419*/
    {
      if ( !ProcCommonFunc9180(*p_buf_1, p_buf_1[1], buf_1, v21) ) /*0xffc3b426*/
      {
        v26 = RmtFunc7025(__SPAIR64__(v38, buf_1), *(_QWORD *)p_buf_1); /*0xffc3b43c*/
        v27 = HIDWORD(v26); /*0xffc3b44d*/
        CpuIoCfgWrite((int)__return_address, n4_18, 0, 67387624, v26); /*0xffc3b450*/
        CpuIoCfgWrite((int)__return_address, n4_18, 0, 67387628, v27 | 0x80000000); /*0xffc3b468*/
      }
      n4_12 = n4_18; /*0xffc3b470*/
    }
    v21 = v38; /*0xffc3b474*/
    ++n4_12; /*0xffc3b478*/
    n4_11 += 13; /*0xffc3b47a*/
    n4_18 = n4_12; /*0xffc3b47d*/
    p_buf_1 += 2; /*0xffc3b481*/
  }
  while ( n4_12 < 4u ); /*0xffc3b486*/
  return n4_12; /*0xffc3b563*/
}

// Function: ProcCommonFuncB568 @ 0xffc3b568 (0x3e bytes)
// Index: 483/2560

int __cdecl ProcCommonFuncB568(int __return_address, _BYTE *n4, int buf)
{
  char v4; // si
  int n4_1; // edi
  int v6; // eax

  v4 = 0; /*0xffc3b574*/
  n4_1 = 4; /*0xffc3b576*/
  do /*0xffc3b594*/
  {
    if ( (*n4 & 1) != 0 && (*n4 & 0x60) == 0 ) /*0xffc3b57f*/
    {
      v6 = *(_DWORD *)(buf + 100); /*0xffc3b581*/
      ++*(_BYTE *)(buf + 99); /*0xffc3b584*/
      *(_DWORD *)(buf + 100) = v6 | (1 << v4); /*0xffc3b58a*/
    }
    ++v4; /*0xffc3b58d*/
    n4 += 13; /*0xffc3b58e*/
    --n4_1; /*0xffc3b591*/
  }
  while ( n4_1 ); /*0xffc3b594*/
  *(_DWORD *)(__return_address + 246468) = *(_DWORD *)(buf + 100); /*0xffc3b59f*/
  return __return_address; /*0xffc3b59d*/
}

// Function: ProcCommonFuncB5A6 @ 0xffc3b5a6 (0xb0 bytes)
// Index: 484/2560

int __cdecl ProcCommonFuncB5A6(_BYTE *n32, _BYTE *src, int buf, unsigned __int8 n4)
{
  _BYTE *src_1; // ecx
  _BYTE *v5; // edx
  int n4_1; // ebp
  int v7; // edi
  _BYTE *v8; // ebx
  int n6; // ebp
  char n2; // al
  int n4a; // [esp+18h] [ebp+10h]

  if ( n4 > 4u )
  {
    RcAssertPrint(
      n32,
      1u,
      (int)"\n\n %s: %u   %s ",
      "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
      1605,
      "(TmpTotCpu <= MAX_SOCKET)");
    KtiDebugAssert((int)n32, 223, 9); /*0xffc3b5d9*/
  }
  if ( n4 ) /*0xffc3b5e3*/
  {
    src_1 = src; /*0xffc3b5e5*/
    v5 = n32 + 255790; /*0xffc3b5e9*/
    n4_1 = n4; /*0xffc3b5f0*/
    n4a = n4; /*0xffc3b5f4*/
    do /*0xffc3b64d*/
    {
      if ( (*src_1 & 1) == 0 ) /*0xffc3b5fb*/
      {
        v7 = 0; /*0xffc3b601*/
        v8 = v5; /*0xffc3b605*/
        n6 = 6; /*0xffc3b607*/
        do /*0xffc3b62f*/
        {
          n2 = n32[351 * *(unsigned __int8 *)(buf + 1) + 255790 + 39 * v7]; /*0xffc3b614*/
          *v8 = n2; /*0xffc3b61b*/
          if ( n2 == 1 || n2 == 2 ) /*0xffc3b623*/
            ++*(_BYTE *)(buf + 50); /*0xffc3b625*/
          ++v7; /*0xffc3b628*/
          v8 += 39; /*0xffc3b629*/
          --n6; /*0xffc3b62c*/
        }
        while ( n6 ); /*0xffc3b62f*/
        src_1 = src; /*0xffc3b631*/
        n4_1 = n4a; /*0xffc3b635*/
      }
      src_1 += 13; /*0xffc3b639*/
      v5 += 351; /*0xffc3b63c*/
      --n4_1; /*0xffc3b642*/
      src = src_1; /*0xffc3b645*/
      n4a = n4_1; /*0xffc3b649*/
    }
    while ( n4_1 ); /*0xffc3b64d*/
  }
  return 0; /*0xffc3b651*/
}

// Function: ProcCommonFuncB656 @ 0xffc3b656 (0x156 bytes)
// Index: 485/2560

void __cdecl ProcCommonFuncB656(_BYTE *__return_address, _BYTE *n4, int buf)
{
  int v4; // ebx
  unsigned __int8 bufa_1; // bl
  char v6; // bp
  int v7; // eax
  int v8; // eax
  unsigned __int8 bufa; // [esp+14h] [ebp+Ch]

  if ( *(_BYTE *)(buf + 215) )
  {
    v4 = CpuIoRead((int)__return_address, *(_BYTE *)(buf + 1), 0, 318914748); /*0xffc3b688*/
    if ( (v4 & 0xF) == 7 )
    {
      RcAssertPrint(
        __return_address,
        1u,
        (int)"\n\n %s: %u   %s ",
        "e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\Chip\\Kti\\KtiLib.c",
        817,
        "FALSE");
      KtiDebugAssert((int)__return_address, 218, 7); /*0xffc3b6bb*/
    }
    CpuIoCfgWrite((int)__return_address, *(_BYTE *)(buf + 1), 0, 318914748, v4 + 1); /*0xffc3b6d0*/
    ProcCommonFuncB568((int)__return_address, n4, buf); /*0xffc3b6db*/
    bufa_1 = 0; /*0xffc3b6e0*/
    bufa = 0; /*0xffc3b6e5*/
    v6 = 0; /*0xffc3b6e9*/
    do /*0xffc3b72a*/
    {
      if ( ((1 << v6) & *(_DWORD *)(buf + 100)) != 0 ) /*0xffc3b6f5*/
      {
        v7 = CpuIoRead((int)__return_address, bufa, 0, 318914748); /*0xffc3b703*/
        CpuIoCfgWrite((int)__return_address, bufa, 0, 318914748, v7 & 0xFFFFFFEF); /*0xffc3b718*/
      }
      ++bufa_1; /*0xffc3b720*/
      ++v6; /*0xffc3b722*/
      bufa = bufa_1; /*0xffc3b723*/
    }
    while ( bufa_1 < 4u ); /*0xffc3b72a*/
    v8 = CpuIoRead((int)__return_address, *(_BYTE *)(buf + 1), 0, 318914740); /*0xffc3b740*/
    CpuIoCfgWrite((int)__return_address, *(_BYTE *)(buf + 1), 0, 318914740, v8 & 0xFFBFFFFF); /*0xffc3b754*/
    RcAssertPrint(__return_address, 4u, (int)"\n SlowModeWa requested reset\n"); /*0xffc3b761*/
    KtiFunc786B((int)__return_address, 2); /*0xffc3b769*/
  }
  if ( !__return_address[257173] ) /*0xffc3b773*/
  {
    if ( CpuIoRead((int)__return_address, *(_BYTE *)(buf + 1), 0, 318783612) ) /*0xffc3b78f*/
      ProcCommonFuncAC53((int)__return_address, (int)n4); /*0xffc3b7a1*/
  }
}

// Function: ProcCommonFuncB7AC @ 0xffc3b7ac (0x39f bytes)
// Index: 486/2560

int __cdecl ProcCommonFuncB7AC(_BYTE *n32, _BYTE *src, unsigned __int8 *buf, _BYTE *srca)
{
  unsigned __int8 *buf_1; // ecx
  int v6; // ebp
  int v7; // eax
  unsigned int v8; // esi
  unsigned int v9; // edx
  unsigned __int8 srcb_1; // al
  int v11; // edi
  int v12; // edx
  bool v13; // zf
  unsigned int v14; // edx
  unsigned int v15; // edx
  __int64 v16; // kr00_8
  _BYTE *srcc_1; // edx
  _BYTE *n32_1; // esi
  __int64 v19; // rax
  int v20; // eax
  unsigned int v21; // ecx
  unsigned int v22; // edx
  char v24; // [esp+11h] [ebp-23h]
  char v25; // [esp+12h] [ebp-22h]
  char v26; // [esp+13h] [ebp-21h]
  unsigned __int64 v27; // [esp+14h] [ebp-20h]
  int v28; // [esp+1Ch] [ebp-18h]
  int n0x10000; // [esp+20h] [ebp-14h]
  int v30; // [esp+24h] [ebp-10h]
  int v31; // [esp+28h] [ebp-Ch]
  unsigned __int8 srcb_2; // [esp+30h] [ebp-4h]
  int v33; // [esp+30h] [ebp-4h]
  unsigned __int8 srcb; // [esp+44h] [ebp+10h]
  _BYTE *srcc; // [esp+44h] [ebp+10h]

  buf_1 = buf; /*0xffc3b7af*/
  v6 = 0; /*0xffc3b7bd*/
  v7 = 283 * buf[1]; /*0xffc3b7bf*/
  LOBYTE(v28) = 0; /*0xffc3b7c7*/
  v8 = *(_DWORD *)&srca[v7 + 28]; /*0xffc3b7d1*/
  n0x10000 = *(unsigned __int16 *)&srca[v7 + 4]; /*0xffc3b7d5*/
  v31 = *(_DWORD *)&srca[v7 + 8]; /*0xffc3b7dd*/
  v30 = *(_DWORD *)&srca[v7 + 16]; /*0xffc3b7e5*/
  v9 = *(_DWORD *)&srca[v7 + 24]; /*0xffc3b7e9*/
  srcb_1 = 0; /*0xffc3b7ed*/
  v27 = __PAIR64__(v8, v9); /*0xffc3b7ef*/
  srcb = 0; /*0xffc3b7f7*/
  do /*0xffc3b9c2*/
  {
    if ( (_BYTE)v28 ) /*0xffc3b800*/
    {
      if ( srcb_1 == buf_1[1] ) /*0xffc3b80e*/
        goto LABEL_40; /*0xffc3b80e*/
    }
    else
    {
      srcb_1 = buf_1[1]; /*0xffc3b802*/
      srcb = srcb_1; /*0xffc3b805*/
    }
    srcb_2 = srcb_1; /*0xffc3b81e*/
    if ( (src[13 * srcb_1] & 1) == 0 && buf_1[128] != 1 ) /*0xffc3b82f*/
    {
      srcb_1 = srcb; /*0xffc3b9b2*/
LABEL_40:
      v14 = v27; /*0xffc3b9b6*/
      goto LABEL_41; /*0xffc3b9b6*/
    }
    v11 = 283 * srcb_1; /*0xffc3b835*/
    if ( *(_DWORD *)&srca[v11 + 12] || (v24 = 1, *(_DWORD *)&srca[v11 + 8] != -1) ) /*0xffc3b86b*/
      v24 = 0; /*0xffc3b86d*/
    if ( *(_DWORD *)&srca[v11 + 20] || (v25 = 1, *(_DWORD *)&srca[v11 + 16] != -1) ) /*0xffc3b881*/
      v25 = 0; /*0xffc3b883*/
    if ( *(_DWORD *)&srca[v11 + 32] /*0xffc3b8a4*/
      || *(_DWORD *)&srca[v11 + 36]
      || *(_DWORD *)&srca[v11 + 28] != -1
      || (v26 = 1, *(_DWORD *)&srca[v11 + 24] != -1) )
    {
      v26 = 0; /*0xffc3b8a6*/
    }
    if ( *(_DWORD *)&srca[v11 + 4] != 0xFFFF ) /*0xffc3b8b0*/
    {
      if ( n0x10000 == *(unsigned __int16 *)&srca[v11 + 4] ) /*0xffc3b8bb*/
      {
        n0x10000 = *(unsigned __int16 *)&srca[v11 + 6] + 1; /*0xffc3b8c0*/
      }
      else
      {
        v6 = -1; /*0xffc3b8ce*/
        RcAssertPrint(n32, 4u, (int)"\nIO resources are assigned to sockets out-of-order!\n"); /*0xffc3b8d1*/
      }
    }
    if ( !v24 ) /*0xffc3b8de*/
    {
      if ( v31 == *(_DWORD *)&srca[v11 + 8] ) /*0xffc3b8e8*/
      {
        v31 = *(_DWORD *)&srca[v11 + 12] + 1; /*0xffc3b8ef*/
      }
      else
      {
        v6 = -1; /*0xffc3b8fd*/
        RcAssertPrint(n32, 4u, (int)"\nIO APIC resources are assigned to sockets out-of-order!\n"); /*0xffc3b900*/
      }
    }
    if ( !v25 ) /*0xffc3b90d*/
    {
      if ( v30 == *(_DWORD *)&srca[v11 + 16] ) /*0xffc3b917*/
      {
        v30 = *(_DWORD *)&srca[v11 + 20] + 1; /*0xffc3b91e*/
      }
      else
      {
        v6 = -1; /*0xffc3b92c*/
        RcAssertPrint(n32, 4u, (int)"\nMMIOL Resources are assigned to sockets out-of-order!\n"); /*0xffc3b92f*/
      }
    }
    if ( v26 ) /*0xffc3b93c*/
      goto LABEL_35; /*0xffc3b93c*/
    if ( !ProcCommonFunc9180(v27, SHIDWORD(v27), *(_DWORD *)&srca[v11 + 24], *(_DWORD *)&srca[v11 + 28]) ) /*0xffc3b958*/
    {
      v6 = -1; /*0xffc3b97e*/
      RcAssertPrint(n32, 4u, (int)"\nMMIOH Ranges are assigned to sockets out-of-order!\n"); /*0xffc3b981*/
LABEL_35:
      v8 = HIDWORD(v27); /*0xffc3b989*/
LABEL_36:
      v14 = v27; /*0xffc3b98d*/
      goto LABEL_37; /*0xffc3b98d*/
    }
    v12 = *(_DWORD *)&srca[v11 + 32]; /*0xffc3b95a*/
    v8 = *(_DWORD *)&srca[v11 + 36]; /*0xffc3b95e*/
    v13 = v12 == -1; /*0xffc3b962*/
    v14 = v12 + 1; /*0xffc3b962*/
    v27 = __PAIR64__(v8, v14); /*0xffc3b969*/
    if ( v13 ) /*0xffc3b96d*/
    {
      HIDWORD(v27) = ++v8; /*0xffc3b970*/
      goto LABEL_36; /*0xffc3b974*/
    }
LABEL_37:
    v28 = (unsigned __int8)v28 | (1 << srcb_2); /*0xffc3b991*/
    if ( v6 == -1 ) /*0xffc3b9a6*/
      break; /*0xffc3b9a6*/
    buf_1 = buf; /*0xffc3b9a8*/
    srcb_1 = srcb; /*0xffc3b9ac*/
LABEL_41:
    srcb = ++srcb_1; /*0xffc3b9bc*/
  }
  while ( srcb_1 < 4u ); /*0xffc3b9c2*/
  v15 = v14 - 1; /*0xffc3b9c8*/
  LODWORD(v27) = v15; /*0xffc3b9c9*/
  if ( v15 == -1 ) /*0xffc3b9d0*/
    HIDWORD(v27) = --v8; /*0xffc3b9d3*/
  v16 = RmtFunc7025(__SPAIR64__(v8, v15), *(_QWORD *)&srca[283 * buf[1] + 24]); /*0xffc3b9f6*/
  v33 = RmtFunc6EA8(1, 2 * buf[126] + 30); /*0xffc3ba14*/
  srcc = srcc_1; /*0xffc3ba18*/
  if ( !v6 ) /*0xffc3ba1e*/
  {
    if ( n0x10000 != 0x10000 && *(_WORD *)&srca[283 * buf[1] + 4] != 0xFFFF ) /*0xffc3ba46*/
    {
      RcAssertPrint(n32, 4u, (int)"\nIO Range is less than 64KB!\n"); /*0xffc3ba53*/
      v6 = -1; /*0xffc3ba5b*/
    }
    if ( (unsigned int)RmtFunc6F34(v27, 46) ) /*0xffc3ba68*/
    {
      RcAssertPrint(n32, 4u, (int)"\nMMIOH upper limit is too high! only %d address lines allowed\n", 46); /*0xffc3ba81*/
      v6 = -1; /*0xffc3ba89*/
    }
    if ( buf[99] == 2 ) /*0xffc3ba94*/
    {
      n32_1 = n32; /*0xffc3ba96*/
      if ( ProcCommonFunc9237((int)n32, (int)src, (int)buf, (int)srca) == -1 ) /*0xffc3baac*/
      {
        RcAssertPrint(n32, 4u, (int)"\nMMIOH resources are more than can be covered by non-interleaved decoders\n"); /*0xffc3bab3*/
        goto LABEL_55; /*0xffc3bab3*/
      }
    }
    else
    {
      v19 = RmtFunc6F0D(__SPAIR64__((unsigned int)srcc, v33), 32); /*0xffc3babf*/
      n32_1 = n32; /*0xffc3bacd*/
      if ( ProcCommonFunc919A(v16, HIDWORD(v16), v19, HIDWORD(v19)) ) /*0xffc3bac8*/
      {
        RcAssertPrint(n32, 4u, (int)"\nMMIOH upper limit is too high! only allow up to 32*MmiohGranularity of MMIOH\n"); /*0xffc3bae0*/
LABEL_55:
        v6 = -1; /*0xffc3bae5*/
      }
    }
    v20 = 283 * buf[1]; /*0xffc3baf3*/
    v21 = *(_DWORD *)&srca[v20 + 16]; /*0xffc3baf9*/
    v22 = *(_DWORD *)&srca[v20 + 40]; /*0xffc3bafd*/
    if ( v21 > v22 && v22 + *((_DWORD *)n32_1 + 382) > v21 ) /*0xffc3bb0f*/
    {
      RcAssertPrint(n32_1, 4u, (int)"\nMMCFG limit extends into MMIOL range\n"); /*0xffc3bb19*/
      v6 = -1; /*0xffc3bb21*/
    }
    if ( v30 != -67108864 ) /*0xffc3bb2c*/
    {
      RcAssertPrint(n32_1, 4u, (int)"\nMMIO hole exists between MMIOL Limit and 4GB-64MB!\n"); /*0xffc3bb36*/
      return -1; /*0xffc3bb3e*/
    }
  }
  return v6; /*0xffc3bb41*/
}

// Function: ProcCommonFuncBB4B @ 0xffc3bb4b (0x507 bytes)
// Index: 487/2560

int __cdecl ProcCommonFuncBB4B(_BYTE *n32, _BYTE *src, int buf, _BYTE *srca)
{
  _BYTE *srca_1; // esi
  unsigned __int8 n4; // al
  int v6; // ebp
  int n4_1; // ebx
  char v8; // al
  char n32_2; // al
  int v10; // edx
  unsigned __int8 n6_1; // cl
  int v12; // edi
  char v13; // al
  int v14; // eax
  int v15; // edx
  bool v16; // zf
  int v17; // ecx
  int v18; // eax
  unsigned __int8 n6; // cl
  int v20; // edi
  _BYTE *n32_1; // edx
  int v22; // edi
  unsigned __int8 n6_3; // [esp+11h] [ebp-27h]
  char v25; // [esp+12h] [ebp-26h]
  char v26; // [esp+12h] [ebp-26h]
  unsigned __int8 n6_2; // [esp+12h] [ebp-26h]
  char v28; // [esp+13h] [ebp-25h]
  char v29; // [esp+14h] [ebp-24h]
  char v30; // [esp+15h] [ebp-23h]
  bool v31; // [esp+16h] [ebp-22h]
  unsigned __int8 n4_2; // [esp+17h] [ebp-21h]
  int v33; // [esp+18h] [ebp-20h]
  int v34; // [esp+1Ch] [ebp-1Ch]
  int v35; // [esp+20h] [ebp-18h]
  int v36; // [esp+20h] [ebp-18h]
  int v37; // [esp+24h] [ebp-14h]
  int v38; // ... [9955 chars total]

// Function: ProcCommonFuncC052 @ 0xffc3c052 (0x136 bytes)
// Index: 488/2560

unsigned __int8 __cdecl ProcCommonFuncC052(int __return_address, int n4)
{
  int __return_address_1; // esi
  unsigned __int8 *v3; // ebp
  unsigned __int8 v4; // al
  int v5; // ecx
  unsigned __int8 n6; // al
  int v7; // [esp+10h] [ebp-18h]
  int n2; // [esp+14h] [ebp-14h]
  int v9; // [esp+18h] [ebp-10h]
  int CpuCount; // [esp+1Ch] [ebp-Ch]
  int v11; // [esp+20h] [ebp-8h] BYREF
  int v12; // [esp+24h] [ebp-4h] BYREF

  __return_address_1 = __return_address; /*0xffc3c05c*/
  v9 = 0; /*0xffc3c068*/
  LOBYTE(n2) = 0; /*0xffc3c06f*/
  v3 = (unsigned __int8 *)(GetSocketInfo(__return_address, n4) + 3); /*0xffc3c074*/
  do /*0xffc3c17a*/
  {
    CpuCount = GetCpuCount(__return_address_1, n4, n2); /*0xffc3c083*/
    v4 = 0; /*0xffc3c08a*/
    for ( LOBYTE(v7) = 0; v4 < *v3; LOBYTE(v7) = v4 ) /*0xffc3c090*/
    {
      v5 = 1379 * v4; /*0xffc3c0a0*/
      if ( *(_BYTE *)(v5 + CpuCount) ) /*0xffc3c0a6*/
      {
        __return_address_1 = __return_address; /*0xffc3c0bd*/
        if ( *(_BYTE *)(v5 + CpuCount + 107) ) /*0xffc3c0b8*/
        {
          if ( *(_WORD *)(__return_address + 50813 * (unsigned __int8)n4 + 2 * (v4 + v9) + 58741) < 0x114u ) /*0xffc3c0e5*/
          {
            DebugPrint(__return_address, 3, n4, n2, v7, 255, 255, 255, "Please upgrade FW to 1.14 FIS or greater\n"); /*0xffc3c148*/
          }
          else
          {
            ProcCommonFuncE302(__return_address, n4, n2, v7, &v12, &v11); /*0xffc3c0f8*/
            if ( (v11 & 0xC) == 8 ) /*0xffc3c108*/
            {
              DebugPrint( /*0xffc3c120*/
                __return_address,
                3,
                n4,
                n2,
                v7,
                255,
                255,
                255,
                "Training did not complete on previous boot. Mapping out channel\n");
              KtiFunc8A8E(__return_address, n4, n2); /*0xffc3c128*/
            }
          }
          v4 = v7; /*0xffc3c150*/
        }
      }
      ++v4; /*0xffc3c154*/
    }
    v3 += 7688; /*0xffc3c167*/
    v9 += 2; /*0xffc3c16d*/
    n6 = n2 + 1; /*0xffc3c172*/
    LOBYTE(n2) = n6; /*0xffc3c174*/
  }
  while ( n6 < 6u ); /*0xffc3c17a*/
  return n6; /*0xffc3c180*/
}

// Function: ProcCommonFuncC188 @ 0xffc3c188 (0xab bytes)
// Index: 489/2560

int __cdecl ProcCommonFuncC188(
        unsigned __int8 *n6,
        int n4,
        int n6a,
        int n2,
        _WORD *a5,
        _WORD *p_i,
        _DWORD *a7,
        _BYTE *p_n5,
        char *a9)
{
  int v9; // esi
  __int16 v10; // edx^2
  int v11; // eax
  _DWORD buf[32]; // [esp+8h] [ebp-100h] BYREF
  _DWORD buf_1[2]; // [esp+88h] [ebp-80h] BYREF
  char v15; // [esp+90h] [ebp-78h]

  KtiFunc7D83(buf, 0, 0x80u); /*0xffc3c1a2*/
  KtiFunc7D83(buf_1, 0, 0x80u); /*0xffc3c1ae*/
  DebugPrint( /*0xffc3c1d6*/
    (int)n6,
    3,
    n4,
    n6a,
    n2,
    255,
    255,
    255,
    "Calling Check Long Operation Status for dimm %d on channel %d\n",
    (unsigned __int8)n2,
    (unsigned __int8)n6a);
  v9 = ProcCommonFuncCCA8(n6, n4, n6a, n2, buf, buf_1, 1032, a9); /*0xffc3c200*/
  if ( !v9 ) /*0xffc3c207*/
  {
    v10 = HIWORD(buf_1[0]); /*0xffc3c20c*/
    v11 = buf_1[1]; /*0xffc3c20f*/
    *a5 = buf_1[0]; /*0xffc3c212*/
    *p_i = v10; /*0xffc3c21b*/
    *a7 = v11; /*0xffc3c221*/
    *p_n5 = v15; /*0xffc3c229*/
  }
  return v9; /*0xffc3c22d*/
}

// Function: ProcCommonFuncC233 @ 0xffc3c233 (0x9a bytes)
// Index: 490/2560

char __cdecl ProcCommonFuncC233(int n0x80000, unsigned int a2, bool *p_n2)
{
  char v3; // dl
  unsigned int v4; // eax

  v3 = 1; /*0xffc3c23b*/
  if ( n0x80000 != 196608 ) /*0xffc3c241*/
  {
    if ( n0x80000 == 0x40000 ) /*0xffc3c248*/
    {
      v4 = a2 >> 18; /*0xffc3c2aa*/
    }
    else
    {
      if ( n0x80000 == 0x80000 ) /*0xffc3c24f*/
      {
        v4 = a2 >> 19; /*0xffc3c2a2*/
        return v4 & 1; /*0xffc3c2a5*/
      }
      if ( n0x80000 == 0x100000 ) /*0xffc3c256*/
      {
        if ( a2 == -1 ) /*0xffc3c294*/
          return v3; /*0xffc3c294*/
        v4 = a2 >> 20; /*0xffc3c296*/
      }
      else
      {
        if ( n0x80000 != 0x800000 ) /*0xffc3c25d*/
        {
          if ( n0x80000 == 402653184 ) /*0xffc3c266*/
          {
            if ( (a2 & 0x18000000) == 0x18000000 ) /*0xffc3c26f*/
            {
              return 0; /*0xffc3c271*/
            }
            else if ( (a2 & 0x18000000) == 0x10000000 ) /*0xffc3c27a*/
            {
              v3 = 0; /*0xffc3c27f*/
              *p_n2 = 2; /*0xffc3c281*/
            }
          }
          return v3; /*0xffc3c273*/
        }
        v4 = a2 >> 23; /*0xffc3c289*/
      }
    }
    LOBYTE(v4) = ~(_BYTE)v4; /*0xffc3c299*/
    return v4 & 1; /*0xffc3c29d*/
  }
  if ( (a2 & 0x1030000) != 0 ) /*0xffc3c2b6*/
  {
    v3 = 0; /*0xffc3c2bb*/
    *p_n2 = (a2 & 0x1020000) != 0; /*0xffc3c2c7*/
  }
  return v3; /*0xffc3c2cb*/
}

// Function: ProcCommonFuncC2CD @ 0xffc3c2cd (0x80 bytes)
// Index: 491/2560

int __cdecl ProcCommonFuncC2CD(
        unsigned __int8 *__return_address,
        int n4,
        int n6,
        unsigned __int8 n2,
        unsigned int n84033584a,
        int *a6)
{
  int v7[2]; // [esp+Ch] [ebp-8h] BYREF

  v7[0] = 0; /*0xffc3c2e9*/
  v7[1] = 0; /*0xffc3c2ef*/
  MailBoxFuncF235(__return_address, n4, n6, n2, n84033584a, 0, 1u, v7); /*0xffc3c2f7*/
  MailBoxFunc2B5B((int)__return_address, n4); /*0xffc3c2fe*/
  MailBoxFuncDA23((int)__return_address, n4, 1 << n6); /*0xffc3c30b*/
  CpgcChannelInit(__return_address, n4, 1 << n6); /*0xffc3c313*/
  *a6 = MiscConfigCheck(__return_address, n4, n6, 184567128); /*0xffc3c337*/
  a6[1] = MiscConfigCheck(__return_address, n4, n6, 184567132); /*0xffc3c341*/
  return 0; /*0xffc3c346*/
}

// Function: ProcCommonFuncC34D @ 0xffc3c34d (0x50 bytes)
// Index: 492/2560

int __cdecl ProcCommonFuncC34D(
        unsigned __int8 *__return_address,
        int n4,
        int n6a,
        char n2,
        unsigned int n84033584a,
        int *a6)
{
  MailBoxFuncF235(__return_address, n4, n6a, n2, n84033584a, 1, 1, a6); /*0xffc3c368*/
  MailBoxFunc2B5B((int)__return_address, n4); /*0xffc3c373*/
  MailBoxFuncDA23((int)__return_address, n4, 1 << n6a); /*0xffc3c384*/
  CpgcChannelInit((int)__return_address, n4, 1 << n6a); /*0xffc3c390*/
  return 0; /*0xffc3c39a*/
}

// Function: ProcCommonFuncC39D @ 0xffc3c39d (0x50 bytes)
// Index: 493/2560

int __cdecl ProcCommonFuncC39D(int __return_address, unsigned __int8 n2)
{
  int result; // eax
  unsigned __int8 n6; // bl
  int v4; // esi
  unsigned __int8 n6_1; // [esp+8h] [ebp-4h]

  result = GetSocketInfo(__return_address, n2); /*0xffc3c3a9*/
  n6 = 0; /*0xffc3c3af*/
  v4 = result; /*0xffc3c3b1*/
  n6_1 = 0; /*0xffc3c3b4*/
  do /*0xffc3c3e5*/
  {
    if ( *(_BYTE *)v4 ) /*0xffc3c3b7*/
    {
      *(_DWORD *)(v4 + 7497) = 1; /*0xffc3c3bf*/
      result = GetCpuCount(__return_address, n2, n6_1); /*0xffc3c3cf*/
    }
    ++n6; /*0xffc3c3d7*/
    v4 += 7688; /*0xffc3c3d9*/
    n6_1 = n6; /*0xffc3c3df*/
  }
  while ( n6 < 6u ); /*0xffc3c3e5*/
  return result; /*0xffc3c3e7*/
}

// Function: ProcCommonFuncC3ED @ 0xffc3c3ed (0x34 bytes)
// Index: 494/2560

int __cdecl ProcCommonFuncC3ED(unsigned __int8 *n6, int n4, int n6a, int n2, unsigned __int8 *p_n20)
{
  _DWORD buf[32]; // [esp+0h] [ebp-100h] BYREF
  _DWORD buf_1[32]; // [esp+80h] [ebp-80h] BYREF

  return ProcCommonFuncCCA8(n6, n4, n6a, n2, buf, buf_1, 2823, (char *)p_n20); /*0xffc3c41d*/
}

// Function: ProcCommonFuncC421 @ 0xffc3c421 (0x23e bytes)
// Index: 495/2560

int __cdecl ProcCommonFuncC421(unsigned __int8 *n6, int n4, char n4a)
{
  int SocketInfo; // eax
  int n128; // edi
  unsigned __int8 *v5; // ebp
  int CpuCount; // edx
  unsigned __int8 n2_2; // al
  int v8; // ecx
  bool v9; // zf
  int n128_1; // eax
  unsigned __int8 *v11; // ebp
  int v12; // edx
  unsigned __int8 n2_3; // al
  int v14; // ecx
  int n2; // [esp+13h] [ebp-91h]
  int n2_1; // [esp+17h] [ebp-8Dh]
  char v18; // [esp+1Bh] [ebp-89h] BYREF
  unsigned __int8 *v19; // [esp+1Ch] [ebp-88h]
  int CpuCount_1; // [esp+20h] [ebp-84h]
  _DWORD buf[32]; // [esp+24h] [ebp-80h] BYREF

  SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc3c43b*/
  memset(buf, 0, sizeof(buf)); /*0xffc3c44d*/
  switch ( n4a ) /*0xffc3c459*/
  {
    case 1: /*0xffc3c459*/
      n128 = 128; /*0xffc3c45b*/
      break;
    case 2: /*0xffc3c459*/
      n128 = n6[48704 * (unsigned __int8)n4 + 307390]; /*0xffc3c470*/
      break;
    case 3: /*0xffc3c459*/
      n128 = 256; /*0xffc3c47f*/
      break;
    default:
      n128 = 768; /*0xffc3c486*/
      if ( n4a != 4 ) /*0xffc3c48e*/
        n128 = buf[0]; /*0xffc3c490*/
      break;
  }
  v5 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc3c494*/
  LOBYTE(n2) = 0; /*0xffc3c497*/
  v19 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc3c49c*/
  do /*0xffc3c597*/
  {
    CpuCount = GetCpuCount((int)n6, n4, n2); /*0xffc3c4ab*/
    n2_2 = 0; /*0xffc3c4b0*/
    CpuCount_1 = CpuCount; /*0xffc3c4b2*/
    for ( LOBYTE(n2_1) = 0; n2_2 < *v5; LOBYTE(n2_1) = n2_2 ) /*0xffc3c4ba*/
    {
      v8 = 1379 * n2_2; /*0xffc3c4c6*/
      if ( *(_BYTE *)(v8 + CpuCount) && *(_BYTE *)(v8 + CpuCount + 107) ) /*0xffc3c4d6*/
      {
        v9 = *(v5 - 3) == 0; /*0xffc3c4e1*/
        n128_1 = n128; /*0xffc3c4e5*/
        buf[0] = n128; /*0xffc3c4e7*/
        if ( v9 ) /*0xffc3c4eb*/
        {
          n128_1 = 512; /*0xffc3c4ed*/
          *(v5 - 2) = 1; /*0xffc3c4f2*/
          buf[0] = 512; /*0xffc3c4f6*/
        }
        else
        {
          *(v5 - 2) = 0; /*0xffc3c4fc*/
        }
        DebugPrint((int)n6, 3, n4, n2, n2_1, 255, 255, 255, "DDRT IO Init inputPayload[0] = %x\n", n128_1); /*0xffc3c51a*/
        if ( ProcCommonFuncD0B2(n6, n4, n2, n2_1, buf, 1543) ) /*0xffc3c533*/
          KtiFunc8A8E((int)n6, n4, n2); /*0xffc3c545*/
        DebugPrint((int)n6, 2, n4, n2, n2_1, 255, 255, 255, "NVMCTL NVMDIMM IO Init started\n"); /*0xffc3c566*/
        n2_2 = n2_1; /*0xffc3c56b*/
        CpuCount = CpuCount_1; /*0xffc3c572*/
      }
      ++n2_2; /*0xffc3c576*/
    }
    v5 += 7688; /*0xffc3c589*/
    LOBYTE(n2) = n2 + 1; /*0xffc3c591*/
  }
  while ( (unsigned __int8)n2 < 6u ); /*0xffc3c597*/
  v11 = v19; /*0xffc3c59d*/
  LOBYTE(n2) = 0; /*0xffc3c5a1*/
  do /*0xffc3c64c*/
  {
    v12 = GetCpuCount((int)n6, n4, n2); /*0xffc3c5b2*/
    n2_3 = 0; /*0xffc3c5b7*/
    v19 = (unsigned __int8 *)v12; /*0xffc3c5b9*/
    for ( LOBYTE(n2_1) = 0; n2_3 < *v11; LOBYTE(n2_1) = n2_3 ) /*0xffc3c5c1*/
    {
      v14 = 1379 * n2_3; /*0xffc3c5c9*/
      if ( *(_BYTE *)(v14 + v12) && *(_BYTE *)(v14 + v12 + 107) ) /*0xffc3c5d5*/
      {
        if ( ProcCommonFuncCE02(n6, n4, n2, n2_1, buf, 1543, &v18) ) /*0xffc3c5f2*/
          KtiFunc8A8E((int)n6, n4, n2); /*0xffc3c601*/
        DebugPrint((int)n6, 2, n4, n2, n2_1, 255, 255, 255, "NVMCTL NVMDIMM IO Init completed\n"); /*0xffc3c61f*/
        n2_3 = n2_1; /*0xffc3c624*/
        v12 = (int)v19; /*0xffc3c62b*/
      }
      ++n2_3; /*0xffc3c62f*/
    }
    v11 += 7688; /*0xffc3c63e*/
    LOBYTE(n2) = n2 + 1; /*0xffc3c646*/
  }
  while ( (unsigned __int8)n2 < 6u ); /*0xffc3c64c*/
  return 0; /*0xffc3c652*/
}

// Function: ProcCommonFn_FFC3C65F @ 0xffc3c65f (0x49a bytes)
// Index: 496/2560

int __cdecl ProcCommonFn_FFC3C65F(int __return_address, int n4, int n6, int a4, char n2, char a6, unsigned __int16 *a7)
{
  int __return_address_1; // esi
  unsigned __int16 *v8; // ecx
  unsigned __int16 *v9; // ecx
  unsigned int v11; // [esp+10h] [ebp-4h]
  unsigned int v12; // [esp+10h] [ebp-4h]
  unsigned __int16 *v13; // [esp+2Ch] [ebp+18h]
  unsigned __int16 *v14; // [esp+2Ch] [ebp+18h]

  __return_address_1 = __return_address; /*0xffc3c670*/
  DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "FnvDisplayErrorLog Starts \n"); /*0xffc3c687*/
  if ( a6 == 1 ) /*0xffc3c695*/
  {
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Display Error Log Information \n"); /*0xffc3c6ae*/
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "MaxLogEntries = 0x%x \n", *a7); /*0xffc3c6d1*/
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "CurrentSequenceNumber = 0x%x \n", a7[1]); /*0xffc3c6f4*/
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "OldestSequenceNumber = 0x%x \n", a7[2]); /*0xffc3c714*/
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "OldestEntryTimestamp.lo = 0x%x \n", *(_DWORD *)(a7 + 3)); /*0xffc3c735*/
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "OldestEntryTimestamp.hi = 0x%x \n", *(_DWORD *)(a7 + 5)); /*0xffc3c753*/
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "NewestEntryTimestamp.lo = 0x%x \n", *(_DWORD *)(a7 + 7)); /*0xffc3c774*/
    __return_address_1 = __return_address; /*0xffc3c77c*/
    DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "NewestEntryTimestamp.hi = 0x%x \n", *(_DWORD *)(a7 + 9)); /*0xffc3c793*/
  }
  else if ( !a6 ) /*0xffc3c7a2*/
  {
    if ( n2 ) /*0xffc3c7ae*/
    {
      if ( n2 == 1 ) /*0xffc3c980*/
      {
        DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Display Thermal Error Log Entries \n"); /*0xffc3c999*/
        v12 = 0; /*0xffc3c9a4*/
        if ( *a7 ) /*0xffc3c9ac*/
        {
          v9 = a7 + 5; /*0xffc3c9b5*/
          v14 = a7 + 5; /*0xffc3c9b8*/
          do /*0xffc3cad2*/
          {
            DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "SysTimestamp.lo = 0x%x \n", *((_DWORD *)v9 - 2)); /*0xffc3c9d2*/
            DebugPrint( /*0xffc3c9f1*/
              __return_address,
              2,
              n4,
              n6,
              a4,
              255,
              255,
              255,
              "SysTimestamp.hi = 0x%x \n",
              *((_DWORD *)v14 - 1));
            DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Temperature = 0x%x \n", *(_DWORD *)v14 & 0x7FFF); /*0xffc3ca18*/
            DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Sign = 0x%x \n", (*(_DWORD *)v14 >> 15) & 1); /*0xffc3ca3d*/
            DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Reported = 0x%x \n", v14[1] & 7); /*0xffc3ca64*/
            DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "TempType = 0x%x \n", (*(_DWORD *)v14 >> 19) & 3); /*0xffc3ca89*/
            DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "SequenceNumber = 0x%x \n", v14[2]); /*0xffc3caad*/
            v9 = v14 + 8; /*0xffc3cac2*/
            ++v12; /*0xffc3cac5*/
            v14 += 8; /*0xffc3cacc*/
          }
          while ( v12 < *a7 ); /*0xffc3cad2*/
        }
      }
    }
    else
    {
      DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Display Media Error Log Entries \n"); /*0xffc3c7c7*/
      v11 = 0; /*0xffc3c7d2*/
      if ( *a7 ) /*0xffc3c7da*/
      {
        v8 = a7 + 5; /*0xffc3c7e3*/
        v13 = a7 + 5; /*0xffc3c7e6*/
        do /*0xffc3c973*/
        {
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "SysTimeStamp.lo = 0x%x \n", *((_DWORD *)v8 - 2)); /*0xffc3c800*/
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "SysTimeStamp.hi = 0x%x \n", *((_DWORD *)v13 - 1)); /*0xffc3c81f*/
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Dpa.lo = 0x%x \n", *(_DWORD *)v13); /*0xffc3c840*/
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Dpa.hi = 0x%x \n", *((_DWORD *)v13 + 1)); /*0xffc3c85f*/
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Pda.lo = 0x%x \n", *((_DWORD *)v13 + 2)); /*0xffc3c881*/
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Pda.hi = 0x%x \n", *((_DWORD *)v13 + 3)); /*0xffc3c8a0*/
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "Range = 0x%x \n", *((unsigned __int8 *)v13 + 16)); /*0xffc3c8c4*/
          DebugPrint( /*0xffc3c8e5*/
            __return_address,
            2,
            n4,
            n6,
            a4,
            255,
            255,
            255,
            "ErrorType = 0x%x \n",
            *((unsigned __int8 *)v13 + 17));
          DebugPrint( /*0xffc3c909*/
            __return_address,
            2,
            n4,
            n6,
            a4,
            255,
            255,
            255,
            "ErrorFlags = 0x%x \n",
            *((unsigned __int8 *)v13 + 18));
          DebugPrint( /*0xffc3c92a*/
            __return_address,
            2,
            n4,
            n6,
            a4,
            255,
            255,
            255,
            "TransactionType = 0x%x \n",
            *((unsigned __int8 *)v13 + 19));
          DebugPrint(__return_address, 2, n4, n6, a4, 255, 255, 255, "SequenceNumber = 0x%x \n", v13[10]); /*0xffc3c94e*/
          v8 = v13 + 16; /*0xffc3c963*/
          ++v11; /*0xffc3c966*/
          v13 += 16; /*0xffc3c96d*/
        }
        while ( v11 < *a7 ); /*0xffc3c973*/
      }
    }
  }
  return DebugPrint(__return_address_1, 2, n4, n6, a4, 255, 255, 255, "FnvDisplayErrorLog Ends \n"); /*0xffc3caf3*/
}

// Function: ProcCommonFuncCAF9 @ 0xffc3caf9 (0x72 bytes)
// Index: 497/2560

int __cdecl ProcCommonFuncCAF9(
        int __return_address,
        int n2,
        int n6,
        int a4,
        char n2a,
        char a6,
        char a7,
        __int16 a8,
        __int16 a9,
        int *a10,
        char *a11)
{
  char buf; // [esp+0h] [ebp-80h] BYREF
  __int16 v13; // [esp+1h] [ebp-7Fh]
  __int16 v14; // [esp+3h] [ebp-7Dh]

  memset_save_flags(&buf, 0, 0x80u); /*0xffc3cb0d*/
  v13 = a8; /*0xffc3cb40*/
  v14 = a9; /*0xffc3cb48*/
  buf = a6 & 1 | buf & 0xF0 | (2 * (n2a & 1 | (2 * (a7 & 1)))); /*0xffc3cb53*/
  return ProcCommonFuncCCA8(__return_address, n2, n6, a4, &buf, a10, 1288, a11); /*0xffc3cb67*/
}

// Function: ProcCommonFn_FFC3CB6B @ 0xffc3cb6b (0x13d bytes)
// Index: 498/2560

int __cdecl ProcCommonFn_FFC3CB6B(int __return_address, int n4, int n6, int a4, char SocketInfo, char a6)
{
  int v6; // ebx
  unsigned __int16 v7; // si
  unsigned __int16 v8; // cx
  unsigned __int16 v10[64]; // [esp+8h] [ebp-A4h] BYREF
  _BYTE buf[35]; // [esp+88h] [ebp-24h] BYREF
  char v12; // [esp+10Bh] [ebp+5Fh] BYREF

  memset_save_flags(buf, 0, 0x80u); /*0xffc3cb83*/
  buf[4] = 0; /*0xffc3cba6*/
  *(_DWORD *)buf = a6 & 1 | buf[0] & 0xF4 | (unsigned __int8)(2 * (SocketInfo & 1 | 2)); /*0xffc3cbb8*/
  v6 = ProcCommonFuncCCA8(__return_address, n4, n6, a4, buf, v10, 1288, &v12); /*0xffc3cbcf*/
  if ( !v6 ) /*0xffc3cbd6*/
  {
    v7 = 1; /*0xffc3cbe6*/
    ProcCommonFn_FFC3C65F(__return_address, n4, n6, a4, SocketInfo, 1, v10); /*0xffc3cbf5*/
    if ( (*(_BYTE *)(__return_address + 246408) & 4) == 0 ) /*0xffc3cc04*/
    {
      v8 = v10[1]; /*0xffc3cc0a*/
      do /*0xffc3cc47*/
      {
        if ( v7 >= v10[0] || v8 == v10[2] ) /*0xffc3cc38*/
          break; /*0xffc3cc38*/
        --v8; /*0xffc3cc3a*/
        ++v7; /*0xffc3cc3c*/
        if ( !v8 ) /*0xffc3cc40*/
          v8 = -1; /*0xffc3cc42*/
      }
      while ( v7 < (unsigned __int16)(4 * (SocketInfo != 0) + 3) ); /*0xffc3cc47*/
      buf[0] &= ~4u; /*0xffc3cc49*/
      *(_WORD *)&buf[1] = v8; /*0xffc3cc5c*/
      *(_WORD *)&buf[3] = v7; /*0xffc3cc64*/
      v6 = ProcCommonFuncCCA8(__return_address, n4, n6, a4, buf, v10, 1288, &v12); /*0xffc3cc78*/
      if ( !v6 ) /*0xffc3cc7f*/
        ProcCommonFn_FFC3C65F(__return_address, n4, n6, a4, SocketInfo, 0, v10); /*0xffc3cc96*/
    }
  }
  return v6; /*0xffc3cca3*/
}

// Function: ProcCommonFuncCCA8 @ 0xffc3cca8 (0x15a bytes)
// Index: 499/2560

int __cdecl ProcCommonFuncCCA8(
        unsigned __int8 *n6,
        int n4,
        int n6a,
        int n2,
        _DWORD *buf,
        _DWORD *buf_1,
        int n1543,
        char *a8)
{
  int v8; // esi
  unsigned __int16 i; // ax
  char p_n5; // [esp+12h] [ebp-Eh] BYREF
  char v12; // [esp+13h] [ebp-Dh] BYREF
  unsigned __int16 p_i; // [esp+14h] [ebp-Ch] BYREF
  __int16 v14; // [esp+18h] [ebp-8h] BYREF
  int v15; // [esp+1Ch] [ebp-4h] BYREF

  DebugPrint((int)n6, 2, n4, n6a, n2, 255, 255, 255, "NVMCTL Sending command.  Opcode = %x\n", n1543); /*0xffc3ccd5*/
  v8 = ProcCommonFuncD0B2(n6, n4, n6a, n2, buf, n1543); /*0xffc3ccee*/
  if ( !v8 ) /*0xffc3ccf5*/
  {
    v8 = ProcCommonFuncCE02(n6, n4, n6a, n2, buf_1, n1543, a8); /*0xffc3cd13*/
    if ( v8 == 1 && *a8 == 5 && !ProcCommonFuncC188(n6, n4, n6a, n2, &v14, &p_i, &v15, &p_n5, &v12) ) /*0xffc3cd4e*/
    {
      for ( i = p_i; p_i < 0x100u; i = p_i ) /*0xffc3cd6b*/
      {
        if ( p_n5 != 5 ) /*0xffc3cd75*/
          break; /*0xffc3cd75*/
        DebugPrint((int)n6, 3, n4, n6a, n2, 255, 255, 255, "NVMCTL Long Operation in progress. %x %% Complete\n", i); /*0xffc3cd8c*/
        KtiFunc8C4((int)n6, 1000000 * v15); /*0xffc3cd9b*/
        ProcCommonFuncC188(n6, n4, n6a, n2, &v14, &p_i, &v15, &p_n5, &v12); /*0xffc3cdc0*/
      }
      return ProcCommonFuncCCA8(n6, n4, n6a, n2, buf, buf_1, n1543, a8); /*0xffc3cdf6*/
    }
  }
  return v8; /*0xffc3cdf8*/
}

// Function: ProcCommonFuncCE02 @ 0xffc3ce02 (0x2b0 bytes)