HalpIommuFreeDmaDomain

INT64 __fastcall HalpIommuFreeDmaDomain(INT64 a1){
  unsigned int v1; 
  __int64 v4; 
  __int64 v5; 
  __int64 v6; 
  v1 = 0;
  if( !a1 )
    return 0i64;
  if( HalpHvIommu )
  {
    v6 = *(unsigned int *)(a1 + 32);
    BYTE4(v6) = *(_BYTE *)(a1 + 40);
    v1 = ((__int64(__fastcall *)(__int64 *))qword_140C4A2C8)(&v6);
  }
  else
  {
    v4 = *(_QWORD *)(a1 + 24);
    if( v4 )
    {
      HalpIommuCleanupPageTable(*(_QWORD *)(a1 + 24));
      HalpMmAllocCtxFree(v5, v4);
    }
  }
  HalpMmAllocCtxFree(a1, a1);
  return v1;
}

Referenced by:

HalpDmaDereferenceDomainObject
IommuDomainDelete