HalpDmaLinkContiguousTranslations

__int64 __fastcall HalpDmaLinkContiguousTranslations(__int64 a1, unsigned int a2, unsigned int a3){
  __int64 v4; 
  _QWORD *v5; 
  __int64 v6; 
  __int64 v7; 
  __int64 v8; 
  unsigned int v9; 
  __int64 v10; 
  __int64 v11; 
  __int64 v12; 
  __int64 v14; 
  v14 = 0i64;
  v4 = HalpDmaIndexToTranslationEntry(a1, a2, &v14);
  v5 = (_QWORD *)v14;
  v6 = v4;
  v7 = 0i64;
  v8 = *(_QWORD *)(v14 + 16);
  v9 = *(_DWORD *)(v14 + 8);
  v10 = (v4 - v8) / 72;
  v11 = v8 + 72i64 * (unsigned int)v10;
  if( a3 )
  {
    v12 = a3;
    do
    {
      if( (unsigned int)v10 >= v9 )
      {
        v5 = (_QWORD *)*v5;
        LODWORD(v10) = 0;
        v11 = v5[2];
      }
      if( v7 )
        *(_QWORD *)(v7 + 8) = v11;
      v7 = v11;
      LODWORD(v10) = v10 + 1;
      v11 += 72i64;
      --v12;
    }
    while( v12 );
  }
  return v6;
}

Referenced by:

HalpDmaAllocateContiguousPagesFromContiguousPoolAtHighLevelV2
HalpDmaAllocateContiguousPagesFromContiguousPoolAtHighLevelV3
HalpDmaAllocateContiguousPagesFromContiguousPoolV2
HalpDmaAllocateContiguousPagesFromContiguousPoolV3