HalpPicSetLineState

VOID __stdcall HalpPicSetLineState(INT64 a1){
  __int64 v1; 
  __int64 v2; 
  __int64 v3; 
  __int64 v4; 
  bool v5; 
  _DWORD *v6; 
  int v7; 
  unsigned __int16 v8; 
  int v9; 
  int v10; 
  int v11; 
  int v12; 

  v3 = v2;
  v4 = v1;
  if( !*(_BYTE *)(v2 + 4) )
  {
    v5 = 0;
    v6 = (_DWORD *)(v1 + 4);
    if( *(_DWORD *)a1 == 45056 )
    {
      v5 = *v6 == 2;
      v7 = 0;
    }
    else
    {
      v7 = 8;
    }
    v8 = READ_PORT_USHORT_PAIR(0x4D0u, 0x4D1u);
    if( *(_DWORD *)(v3 + 8) || v5 )
      v9 = v8 & ~(1 << (v7 + *(_BYTE *)(v4 + 4)));
    else
      v9 = v8 | (1 << (v7 + *(_BYTE *)v6));
    WRITE_PORT_USHORT_PAIR(0x4D0u, 0x4D1u, v9);
    v10 = (unsigned __int16)READ_PORT_USHORT_PAIR(0x21u, 0xA1u);
    HalpIoDelay();
    v11 = v7 + *v6;
    if( (*(_DWORD *)(v3 + 12) & 1) != 0 )
      v12 = v10 & ~(1 << v11);
    else
      v12 = v10 | (1 << v11);
    WRITE_PORT_USHORT_PAIR(0x21u, 0xA1u, v12);
    HalpIoDelay();
  }
}

Referenced by:

No references.