HalacpiIrqTranslateResourcesIsa

NTSTATUS __stdcall HalacpiIrqTranslateResourcesIsa(
        PVOID Context,
        _CM_PARTIAL_RESOURCE_DESCRIPTOR *Source,
        RESOURCE_TRANSLATION_DIRECTION Direction,
        IO_RESOURCE_DESCRIPTOR *Alternatives,
        DEVICE_OBJECT *PhysicalDeviceObject,
        _CM_PARTIAL_RESOURCE_DESCRIPTOR *Target){
  __int128 v6; 
  _OWORD *v7; 
  char v9; 
  unsigned int v10; 
  UINT64 v12; 
  NTSTATUS result; 
  unsigned int v14; 
  _DWORD *v15; 
  unsigned int v16; 
  int a2; 
  _OWORD *v18; 
  v6 = *(_OWORD *)Source;
  v7 = v18;
  a2 = 0;
  v9 = 0;
  v10 = (unsigned int)Alternatives;
  *v18 = v6;
  *((_DWORD *)v7 + 4) = *((_DWORD *)Source + 4);
  v12 = *((unsigned int *)Source + 2);
  if( (unsigned int)(v12 + 0x100000) <= 0xFFFFE || (unsigned __int8)HalpIsInterruptTypeSecondary(0i64, v12) )
    return 0;
  if( Direction == TranslateChildToParent )
  {
    *((_WORD *)v7 + 2) = *((_WORD *)HalpPicVectorRedirect + 2 * *((unsigned __int16 *)Source + 2));
    *((_DWORD *)v7 + 2) = *((_DWORD *)HalpPicVectorRedirect + *((unsigned int *)Source + 2));
    return 0;
  }
  if( Direction != TranslateParentToChild )
    return 0;
  result = TranslateGlobalVectorToIsaVector(*((unsigned __int16 *)Source + 2), &a2);
  if( result >= 0 )
  {
    *((_WORD *)v7 + 2) = a2;
    result = TranslateGlobalVectorToIsaVector(*((unsigned int *)Source + 2), &a2);
    if( result >= 0 )
    {
      *((_DWORD *)v7 + 2) = a2;
      if( *((_WORD *)v7 + 2) == 9 )
      {
        v14 = 0;
        if( v10 )
        {
          v15 = (_DWORD *)((char *)PhysicalDeviceObject + 12);
          while( 1 )
          {
            v16 = *(v15 - 1);
            if( v16 >= 9 && *v15 <= 9u )
              break;
            if( v16 >= 2 && *v15 <= 2u )
              v9 = 1;
            ++v14;
            v15 += 8;
            if( v14 >= v10 )
              goto LABEL_20;
          }
          v9 = 0;
LABEL_20:
          if( v9 )
          {
            *((_WORD *)v7 + 2) = 2;
            *((_DWORD *)v7 + 2) = 2;
          }
        }
      }
      return 0;
    }
  }
  return result;
}

Referenced by:

No references.