ROSA Hardware DB

Hardware database of ROSA Linux
   
Username: Password:

    Home Probe your PC About
Tested PCs PC Types
   
  
DeclaredDeclared by the kernel
ApprovalWorks for some users,
need approval
WorksWorks for all, approved
FailedFailed to run for all

Probe #b8520f8f5e of ASUS X71SL

Log: acpidump_decoded


Intel ACPI Component Architecture
ACPI Binary Table Extraction Utility version 20141107-64 [Apr  6 2015]
Copyright (c) 2000 - 2014 Intel Corporation


Signature  Length      Revision   OemId    OemTableId   OemRevision CompilerId CompilerRevision

   RSDP                          "ACPIAM"
   RSDT   0x0000004C     0x01    "_ASUS_"  "Notebook"   0x20080924    "MSFT"     0x00000097
   DSDT   0x000094EF     0x01    "X71SL "  "X71SL001"   0x00000001    "INTL"     0x20051117
   FACS   0x00000040
   FACP   0x00000084     0x01    "092408"  "FACP1052"   0x20080924    "MSFT"     0x00000097
   APIC   0x0000005C     0x01    "092408"  "APIC1052"   0x20080924    "MSFT"     0x00000097
   MCFG   0x0000003C     0x01    "092408"  "OEMMCFG "   0x20080924    "MSFT"     0x00000097
   SLIC   0x00000176     0x01    "_ASUS_"  "Notebook"   0x20080924    "MSFT"     0x00000097
   ECDT   0x00000055     0x01    "092408"  "OEMECDT "   0x20080924    "MSFT"     0x00000097
   DBGP   0x00000034     0x01    "092408"  "DBGP1052"   0x20080924    "MSFT"     0x00000097
   BOOT   0x00000028     0x01    "092408"  "BOOT1052"   0x20080924    "MSFT"     0x00000097
   OEMB   0x00000071     0x01    "092408"  "OEMB1052"   0x20080924    "MSFT"     0x00000097
   HPET   0x00000038     0x01    "092408"  "OEMHPET "   0x20080924    "MSFT"     0x00000097
   SSDT   0x000004E6     0x01    "PmRef "  "CpuPm   "   0x00003000    "INTL"     0x20051117
   SSDT   0x000001C0     0x01    "PmRef "  "Cpu0Ist "   0x00003000    "INTL"     0x20051117
   SSDT   0x000006D9     0x01    "PmRef "  "Cpu0Cst "   0x00003001    "INTL"     0x20051117
   SSDT   0x000000C8     0x01    "PmRef "  "Cpu1Ist "   0x00003000    "INTL"     0x20051117
   SSDT   0x00000085     0x01    "PmRef "  "Cpu1Cst "   0x00003000    "INTL"     0x20051117

Found 18 ACPI tables

APIC
----
[000h 0000   4]                    Signature : "APIC"    [Multiple APIC Description Table (MADT)]
[004h 0004   4]                 Table Length : 0000005C
[008h 0008   1]                     Revision : 01
[009h 0009   1]                     Checksum : 47
[00Ah 0010   6]                       Oem ID : "092408"
[010h 0016   8]                 Oem Table ID : "APIC1052"
[018h 0024   4]                 Oem Revision : 20080924
[01Ch 0028   4]              Asl Compiler ID : "MSFT"
[020h 0032   4]        Asl Compiler Revision : 00000097

[024h 0036   4]           Local Apic Address : FEE00000
[028h 0040   4]        Flags (decoded below) : 00000001
                         PC-AT Compatibility : 1

[02Ch 0044   1]                Subtable Type : 00 [Processor Local APIC]
[02Dh 0045   1]                       Length : 08
[02Eh 0046   1]                 Processor ID : 01
[02Fh 0047   1]                Local Apic ID : 00
[030h 0048   4]        Flags (decoded below) : 00000001
                           Processor Enabled : 1

[034h 0052   1]                Subtable Type : 00 [Processor Local APIC]
[035h 0053   1]                       Length : 08
[036h 0054   1]                 Processor ID : 02
[037h 0055   1]                Local Apic ID : 01
[038h 0056   4]        Flags (decoded below) : 00000001
                           Processor Enabled : 1

[03Ch 0060   1]                Subtable Type : 01 [I/O APIC]
[03Dh 0061   1]                       Length : 0C
[03Eh 0062   1]                  I/O Apic ID : 02
[03Fh 0063   1]                     Reserved : 00
[040h 0064   4]                      Address : FEC00000
[044h 0068   4]                    Interrupt : 00000000

[048h 0072   1]                Subtable Type : 02 [Interrupt Source Override]
[049h 0073   1]                       Length : 0A
[04Ah 0074   1]                          Bus : 00
[04Bh 0075   1]                       Source : 00
[04Ch 0076   4]                    Interrupt : 00000002
[050h 0080   2]        Flags (decoded below) : 0000
                                    Polarity : 0
                                Trigger Mode : 0

[052h 0082   1]                Subtable Type : 02 [Interrupt Source Override]
[053h 0083   1]                       Length : 0A
[054h 0084   1]                          Bus : 00
[055h 0085   1]                       Source : 09
[056h 0086   4]                    Interrupt : 00000009
[05Ah 0090   2]        Flags (decoded below) : 000F
                                    Polarity : 3
                                Trigger Mode : 3

Raw Table Data: Length 92 (0x5C)

  0000: 41 50 49 43 5C 00 00 00 01 47 30 39 32 34 30 38  APIC\....G092408
  0010: 41 50 49 43 31 30 35 32 24 09 08 20 4D 53 46 54  APIC1052$.. MSFT
  0020: 97 00 00 00 00 00 E0 FE 01 00 00 00 00 08 01 00  ................
  0030: 01 00 00 00 00 08 02 01 01 00 00 00 01 0C 02 00  ................
  0040: 00 00 C0 FE 00 00 00 00 02 0A 00 00 02 00 00 00  ................
  0050: 00 00 02 0A 00 09 09 00 00 00 0F 00              ............


BOOT
----
[000h 0000   4]                    Signature : "BOOT"    [Simple Boot Flag Table]
[004h 0004   4]                 Table Length : 00000028
[008h 0008   1]                     Revision : 01
[009h 0009   1]                     Checksum : D9
[00Ah 0010   6]                       Oem ID : "092408"
[010h 0016   8]                 Oem Table ID : "BOOT1052"
[018h 0024   4]                 Oem Revision : 20080924
[01Ch 0028   4]              Asl Compiler ID : "MSFT"
[020h 0032   4]        Asl Compiler Revision : 00000097

[024h 0036   1]          Boot Register Index : 71
[025h 0037   3]                     Reserved : 000000

Raw Table Data: Length 40 (0x28)

  0000: 42 4F 4F 54 28 00 00 00 01 D9 30 39 32 34 30 38  BOOT(.....092408
  0010: 42 4F 4F 54 31 30 35 32 24 09 08 20 4D 53 46 54  BOOT1052$.. MSFT
  0020: 97 00 00 00 71 00 00 00                          ....q...


DBGP
----
[000h 0000   4]                    Signature : "DBGP"    [Debug Port table]
[004h 0004   4]                 Table Length : 00000034
[008h 0008   1]                     Revision : 01
[009h 0009   1]                     Checksum : 68
[00Ah 0010   6]                       Oem ID : "092408"
[010h 0016   8]                 Oem Table ID : "DBGP1052"
[018h 0024   4]                 Oem Revision : 20080924
[01Ch 0028   4]              Asl Compiler ID : "MSFT"
[020h 0032   4]        Asl Compiler Revision : 00000097

[024h 0036   1]               Interface Type : 00
[025h 0037   3]                     Reserved : 000000

[028h 0040  12]          Debug Port Register : [Generic Address Structure]
[028h 0040   1]                     Space ID : 01 [SystemIO]
[029h 0041   1]                    Bit Width : 08
[02Ah 0042   1]                   Bit Offset : 00
[02Bh 0043   1]         Encoded Access Width : 00 [Undefined/Legacy]
[02Ch 0044   8]                      Address : 00000000000003F8


Raw Table Data: Length 52 (0x34)

  0000: 44 42 47 50 34 00 00 00 01 68 30 39 32 34 30 38  DBGP4....h092408
  0010: 44 42 47 50 31 30 35 32 24 09 08 20 4D 53 46 54  DBGP1052$.. MSFT
  0020: 97 00 00 00 00 00 00 00 01 08 00 00 F8 03 00 00  ................
  0030: 00 00 00 00                                      ....


DSDT
----
DefinitionBlock ("dsdt.aml", "DSDT", 1, "X71SL", "X71SL001", 0x00000001)
{
    Scope (_SB)
    {
        Name (ATKP, Zero)
        Device (ATKD)
        {
            Name (_HID, "ATK0100")  // _HID: Hardware ID
            Name (_UID, 0x01010100)  // _UID: Unique ID
            Method (INIT, 1, NotSerialized)
            {
                ATKP = One
                Return (MNAM) /* \MNAM */
            }

            Method (BSTS, 0, NotSerialized)
            {
                Local0 = IKFG /* \IKFG */
                Local0 |= (IKF2 << 0x08)
                If (ACPF)
                {
                    Local0 &= 0xFF7F
                }

                Return (Local0)
            }

            Method (MLED, 1, NotSerialized)
            {
                OMLD (Arg0)
            }

            Method (TMPR, 0, NotSerialized)
            {
                Local0 = \_TZ.RTMP ()
                Local1 = \_TZ.RFAN (Zero)
                Local1 <<= 0x10
                Local0 = (\_TZ.KELV (Local0) + Local1)
                Local2 = Zero
                If (TENA)
                {
                    Local2 = TDTY /* \TDTY */
                }
                Else
                {
                    Local3 = HKTH ()
                    If ((Local3 != 0xFFFF))
                    {
                        Local2 = Local3
                    }
                }

                Local2 <<= 0x18
                Local0 += Local2
                Local3 = \_TZ.RFSE ()
                Local3 <<= 0x1C
                Local0 += Local3
                Return (Local0)
            }

            Method (SFUN, 0, NotSerialized)
            {
                Local0 = 0x37
                Local0 |= 0x40
                Local0 |= 0x0800
                Local0 |= 0x1000
                Local0 |= 0x00020000
                Return (Local0)
            }

            Method (OSVR, 1, NotSerialized)
            {
            }

            Method (GPLV, 0, NotSerialized)
            {
                Return (LBTN) /* \LBTN */
            }

            Method (SPLV, 1, NotSerialized)
            {
                LBTN = Arg0
                ^^PCI0.SBRG.EC0.STBR ()
            }

            Method (WLED, 1, NotSerialized)
            {
                WRST = Arg0
                OWLD (Arg0)
            }

            Method (BLED, 1, NotSerialized)
            {
                BRST = Arg0
                OBTD (Arg0)
            }

            Method (TLED, 1, NotSerialized)
            {
                If (Arg0)
                {
                    ^^PCI0.SBRG.EC0.SPIN (0x16, Zero)
                }
                Else
                {
                    ^^PCI0.SBRG.EC0.SPIN (0x16, One)
                }
            }

            Method (RSTS, 0, NotSerialized)
            {
                Return (ORST ())
            }

            Method (SDSP, 1, NotSerialized)
            {
                If (NATK ())
                {
                    SWHG (Arg0)
                }
            }

            Method (GPID, 0, NotSerialized)
            {
                Return (LCDR) /* \LCDR */
            }

            Method (HWRS, 0, NotSerialized)
            {
                Return (OHWR ())
            }

            Method (GLCD, 0, NotSerialized)
            {
                Return (LCDV) /* \LCDV */
            }

            Name (WAPF, Zero)
            Method (CWAP, 1, NotSerialized)
            {
                WAPF |= Arg0 /* \_SB_.ATKD.WAPF */
                OWAP (Arg0)
                Return (One)
            }

            Name (PCDV, Zero)
            Method (WDOG, 1, NotSerialized)
            {
                If ((Arg0 == Zero))
                {
                    PCDV = PTIM /* \PTIM */
                    Return (0x3C)
                }

                If ((Arg0 == One))
                {
                    If (^^LID._LID ())
                    {
                        PCDV = PTIM /* \PTIM */
                        Return (One)
                    }

                    If ((\_TZ.RLTM () < PTMP))
                    {
                        PCDV = PTIM /* \PTIM */
                        Return (One)
                    }

                    PCDV--
                    If ((PCDV == Zero))
                    {
                        PCDV = PTIM /* \PTIM */
                        Notify (ATKD, 0x6D) // Reserved
                    }

                    Return (One)
                }

                Return (Zero)
            }

            Method (QMOD, 1, NotSerialized)
            {
                If ((Arg0 == Zero))
                {
                    Return (One)
                }

                If ((Arg0 == One))
                {
                    Local0 = (QFAN << 0x10)
                    Local0 += 0x98B6
                    ECRW (Local0)
                }

                If ((Arg0 == 0x02))
                {
                    ECRW (0x00FF98B6)
                }

                Return (One)
            }

            Method (ANVI, 1, Serialized)
            {
                Local0 = ASMI (Arg0)
                Return (Local0)
            }

            Method (PSTC, 1, Serialized)
            {
                If ((Arg0 == Zero))
                {
                    Return (PSTN) /* \PSTN */
                }

                If (ACPF)
                {
                    Local0 = (PSTN >> 0x08)
                }
                Else
                {
                    Local0 = (PSTN & 0xFF)
                }

                If ((Arg0 > Local0))
                {
                    Return (Ones)
                }

                SLMT = Arg0
                If (!ACPS ())
                {
                    If (((^^PCI0.SBRG.EC0.RRAM (0x06C1) == 0x31) || (^^PCI0.SBRG.EC0.RRAM (0x06C1) == 0x41)))
                    {
                        SLMT = One
                    }
                }

                Notify (\_PR.P001, 0x80) // Performance Capability Change
                If ((CPUN >= 0x02))
                {
                    Notify (\_PR.P002, 0x80) // Performance Capability Change
                }

                Return (Zero)
            }

            Method (HKEY, 0, NotSerialized)
            {
                Local0 = ^^PCI0.SBRG.EC0.CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
            }

            Method (KBFT, 1, NotSerialized)
            {
                ^^PCI0.SBRG.EC0.HKEN = Arg0
                Return (Zero)
            }

            Method (SMBB, 1, Serialized)
            {
                Local0 = (Arg0 >> 0x10)
                Local0 &= 0xFF
                Local1 = (Arg0 >> 0x18)
                Local2 = (Arg0 & 0xFF)
                If ((Local1 & One))
                {
                    Return (RBYT (Local1, Local0))
                }
                Else
                {
                    Return (WBYT (Local1, Local0, Local2))
                }
            }

            Method (SMBW, 1, Serialized)
            {
                Local0 = (Arg0 >> 0x10)
                Local0 &= 0xFF
                Local1 = (Arg0 >> 0x18)
                Local2 = (Arg0 & 0xFF)
                If ((Local1 & One))
                {
                    Return (RWRD (Local1, Local0))
                }
                Else
                {
                    Return (WWRD (Local1, Local0, Local2))
                }
            }

            Method (SMBK, 1, Serialized)
            {
                Local0 = (Arg0 >> 0x08)
                Local0 &= 0xFF
                If (Local0)
                {
                    Local0 = (Arg0 >> 0x10)
                    Local0 &= 0xFF
                    Local1 = (Arg0 >> 0x18)
                    Local1 &= 0xFF
                    Local3 = (Arg0 & 0x0F)
                    If ((Local1 & One))
                    {
                        RBLK (Local1, Local0, Local3)
                    }
                    Else
                    {
                        WBLK (Local1, Local0, Local3)
                    }

                    Return (Zero)
                }
                Else
                {
                    Local2 = (Arg0 >> 0x10)
                    Local2 &= 0xFF
                    Local1 = (Arg0 >> 0x18)
                    If ((Local1 & One))
                    {
                        Return (DerefOf (Index (RBUF, Local2)))
                    }
                    Else
                    {
                        Local1 = (Arg0 & 0xFF)
                        Index (RBUF, Local2) = Local1
                        Return (Zero)
                    }
                }
            }

            Method (ECRW, 1, Serialized)
            {
                Local0 = (Arg0 >> 0x18)
                Local0 &= 0xFF
                Local1 = (Arg0 >> 0x10)
                Local1 &= 0xFF
                Local2 = (Arg0 >> 0x08)
                Local2 &= 0xFF
                Local3 = (Arg0 & 0xFF)
                If ((Acquire (^^PCI0.SBRG.EC0.MUEC, 0xFFFF) != Zero))
                {
                    Return (Ones)
                }

                ^^PCI0.SBRG.EC0.CDT3 = Local0
                ^^PCI0.SBRG.EC0.CDT2 = Local1
                ^^PCI0.SBRG.EC0.CDT1 = Local2
                ^^PCI0.SBRG.EC0.CMD1 = Local3
                Local0 = 0x05
                While ((Local0 && ^^PCI0.SBRG.EC0.CMD1))
                {
                    Sleep (One)
                    Local0--
                }

                Local0 = ^^PCI0.SBRG.EC0.CDT3 /* \_SB_.PCI0.SBRG.EC0_.CDT3 */
                Local1 = ^^PCI0.SBRG.EC0.CDT2 /* \_SB_.PCI0.SBRG.EC0_.CDT2 */
                Local2 = ^^PCI0.SBRG.EC0.CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                Local3 = ^^PCI0.SBRG.EC0.CMD1 /* \_SB_.PCI0.SBRG.EC0_.CMD1 */
                Release (^^PCI0.SBRG.EC0.MUEC)
                Local0 <<= 0x08
                Local0 |= Local1
                Local0 <<= 0x08
                Local0 |= Local2
                Local0 <<= 0x08
                Local0 |= Local3
                Return (Local0)
            }
        }
    }

    Scope (_SB.ATKD)
    {
        Method (PRCT, 4, NotSerialized)
        {
            If ((Arg1 != 0x31))
            {
                Return (0xFF)
            }

            OperationRegion (FM31, SystemMemory, Arg0, 0x08)
            Field (FM31, DWordAcc, NoLock, Preserve)
            {
                Offset (0x06), 
                SM31,   8, 
                EM31,   8
            }

            Local0 = One
            If ((Arg2 == Zero))
            {
                Local0 = G31V (Arg0, Arg3)
            }

            If ((Arg2 == One))
            {
                Local0 = PDMK (Arg0, Arg3)
            }

            If (Local0)
            {
                EM31 = Local0
                SM31 |= 0x02
            }

            SM31 |= 0x80
            Return (Zero)
        }

        Method (G31V, 2, NotSerialized)
        {
            If ((Arg1 < 0x0C))
            {
                Return (0x02)
            }

            OperationRegion (\F310, SystemMemory, Arg0, Arg1)
            Field (F310, DWordAcc, NoLock, Preserve)
            {
                Offset (0x08), 
                SVER,   16, 
                MVER,   16
            }

            MVER = Zero
            SVER = Zero
            Return (Zero)
        }

        Method (PDMK, 2, NotSerialized)
        {
            OperationRegion (\F301, SystemMemory, Arg0, Arg1)
            Field (F301, DWordAcc, NoLock, Preserve)
            {
                Offset (0x06), 
                SF31,   8, 
                EF31,   8
            }

            SF31 = One
            BSMI (Arg0)
            If ((SF31 == One))
            {
                EF31 = One
                SF31 = 0x82
            }

            Return (Zero)
        }

        Method (ATIF, 1, NotSerialized)
        {
            Local0 = Package (0x07)
                {
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero
                }
            Index (Local0, 0x02) = 0x019C1601
            Index (Local0, 0x03) = 0x007F0000
            Return (Local0)
        }
    }

    Scope (_PR)
    {
        Processor (P001, 0x01, 0x00000810, 0x06) {}
        Alias (P001, CPU1)
    }

    Scope (_PR)
    {
        Processor (P002, 0x02, 0x00000810, 0x06) {}
        Alias (P002, CPU2)
    }

    Method (WDTS, 1, NotSerialized)
    {
        If ((Arg0 == 0x03))
        {
            TRAP (0x46)
        }

        If ((Arg0 == 0x04))
        {
            If (DTSE)
            {
                TRAP (0x47)
            }

            Notify (\_TZ.THRM, 0x80) // Thermal Status Change
        }
    }

    Method (TRAP, 1, NotSerialized)
    {
        SMIF = Arg0
        SMCM = DTSS /* \DTSS */
    }

    Scope (_SB)
    {
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            If (DTSE)
            {
                TRAP (0x47)
            }
        }
    }

    Scope (_GPE)
    {
        Method (_L00, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
        {
            ODTS ()
            Notify (\_TZ.THRM, 0x80) // Thermal Status Change
        }
    }

    Name (DP80, 0x80)
    Name (DP90, 0x90)
    Name (DTSS, 0x5A)
    Name (APIC, One)
    Name (PMBS, 0x0800)
    Name (PMLN, 0x0100)
    Name (GPBS, Zero)
    Name (GPLN, Zero)
    Name (SMBS, 0x0C00)
    Name (SMBL, 0x80)
    Name (RP0F, One)
    Name (RP1F, Zero)
    Name (RP2F, Zero)
    Name (RP3F, Zero)
    Name (RP4F, Zero)
    Name (RP5F, Zero)
    Name (PCIB, 0xE0000000)
    Name (PCIL, 0x10000000)
    Name (MBLF, 0x0A)
    Name (HPIO, 0x025E)
    OperationRegion (BIOS, SystemMemory, 0xBFFCE064, 0xFF)
    Field (BIOS, ByteAcc, NoLock, Preserve)
    {
        SS1,    1, 
        SS2,    1, 
        SS3,    1, 
        SS4,    1, 
        Offset (0x01), 
        IOST,   16, 
        TOPM,   32, 
        ROMS,   32, 
        MG1B,   32, 
        MG1L,   32, 
        MG2B,   32, 
        MG2L,   32, 
        Offset (0x1C), 
        DMAX,   8, 
        HPTA,   32, 
        CPB0,   32, 
        CPB1,   32, 
        CPB2,   32, 
        CPB3,   32, 
        ASSB,   8, 
        AOTB,   8, 
        AAXB,   32, 
        SMIF,   8, 
        DTSE,   8, 
        DTS1,   8, 
        DTS2,   8, 
        MPEN,   8, 
        TPMF,   8, 
        MG3B,   32, 
        MG3L,   32, 
        MH1B,   32, 
        MH1L,   32
    }

    Method (RRIO, 4, NotSerialized)
    {
        Debug = "RRIO"
    }

    Method (RDMA, 3, NotSerialized)
    {
        Debug = "rDMA"
    }

    Name (PICM, Zero)
    Method (_PIC, 1, NotSerialized)  // _PIC: Interrupt Model
    {
        If (Arg0)
        {
            DIAG (0xAA)
        }
        Else
        {
            DIAG (0xAC)
        }

        PICM = Arg0
    }

    Name (OSVR, Ones)
    Method (OSFL, 0, NotSerialized)
    {
        If ((OSVR != Ones))
        {
            Return (OSVR) /* \OSVR */
        }

        If ((PICM == Zero))
        {
            DBG8 = 0xAC
        }

        OSVR = One
        If (CondRefOf (_OSI, Local1))
        {
            If (_OSI ("Windows 2000"))
            {
                OSVR = 0x04
            }

            If (_OSI ("Windows 2001"))
            {
                OSVR = Zero
            }

            If (_OSI ("Windows 2001 SP1"))
            {
                OSVR = Zero
            }

            If (_OSI ("Windows 2001 SP2"))
            {
                OSVR = Zero
            }

            If (_OSI ("Windows 2001.1"))
            {
                OSVR = Zero
            }

            If (_OSI ("Windows 2001.1 SP1"))
            {
                OSVR = Zero
            }

            If (_OSI ("Windows 2006"))
            {
                OSVR = Zero
            }
        }
        Else
        {
            If (MCTH (_OS, "Microsoft Windows NT"))
            {
                OSVR = 0x04
            }
            Else
            {
                If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
                {
                    OSVR = 0x02
                }

                If (MCTH (_OS, "Linux"))
                {
                    OSVR = 0x03
                }
            }
        }

        Return (OSVR) /* \OSVR */
    }

    Method (MCTH, 2, NotSerialized)
    {
        If ((SizeOf (Arg0) < SizeOf (Arg1)))
        {
            Return (Zero)
        }

        Local0 = (SizeOf (Arg0) + One)
        Name (BUF0, Buffer (Local0) {})
        Name (BUF1, Buffer (Local0) {})
        BUF0 = Arg0
        BUF1 = Arg1
        While (Local0)
        {
            Local0--
            If ((DerefOf (Index (BUF0, Local0)) != DerefOf (Index (BUF1, Local0
                ))))
            {
                Return (Zero)
            }
        }

        Return (One)
    }

    Name (PRWP, Package (0x02)
    {
        Zero, 
        Zero
    })
    Method (GPRW, 2, NotSerialized)
    {
        Index (PRWP, Zero) = Arg0
        Local0 = (SS1 << One)
        Local0 |= (SS2 << 0x02)
        Local0 |= (SS3 << 0x03)
        Local0 |= (SS4 << 0x04)
        If (((One << Arg1) & Local0))
        {
            Index (PRWP, One) = Arg1
        }
        Else
        {
            Local0 >>= One
            If (((OSFL () == One) || (OSFL () == 0x02)))
            {
                FindSetLeftBit (Local0, Index (PRWP, One))
            }
            Else
            {
                FindSetRightBit (Local0, Index (PRWP, One))
            }
        }

        Return (PRWP) /* \PRWP */
    }

    Name (WAKP, Package (0x02)
    {
        Zero, 
        Zero
    })
    OperationRegion (DEB0, SystemIO, DP80, One)
    Field (DEB0, ByteAcc, NoLock, Preserve)
    {
        DBG8,   8
    }

    OperationRegion (DEB1, SystemIO, DP90, 0x02)
    Field (DEB1, WordAcc, NoLock, Preserve)
    {
        DBG9,   16
    }

    Scope (_SB)
    {
        Name (PR00, Package (0x1C)
        {
            Package (0x04)
            {
                0x0002FFFF, 
                Zero, 
                LNKA, 
                Zero
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                One, 
                LNKB, 
                Zero
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x02, 
                LNKC, 
                Zero
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x03, 
                LNKD, 
                Zero
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                Zero, 
                LNKE, 
                Zero
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                One, 
                LNKF, 
                Zero
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x02, 
                LNKG, 
                Zero
            }, 

            Package (0x04)
            {
                0x0004FFFF, 
                Zero, 
                LNKD, 
                Zero
            }, 

            Package (0x04)
            {
                0x000FFFFF, 
                Zero, 
                LNKC, 
                Zero
            }, 

            Package (0x04)
            {
                0x0005FFFF, 
                Zero, 
                LNKB, 
                Zero
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                Zero, 
                LNKA, 
                Zero
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                One, 
                LNKB, 
                Zero
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x02, 
                LNKC, 
                Zero
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x03, 
                LNKD, 
                Zero
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                Zero, 
                LNKA, 
                Zero
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                One, 
                LNKB, 
                Zero
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x02, 
                LNKC, 
                Zero
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x03, 
                LNKD, 
                Zero
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                Zero, 
                LNKA, 
                Zero
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                One, 
                LNKB, 
                Zero
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                0x02, 
                LNKC, 
                Zero
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                0x03, 
                LNKD, 
                Zero
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                Zero, 
                LNKA, 
                Zero
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                One, 
                LNKB, 
                Zero
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                0x02, 
                LNKC, 
                Zero
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                0x03, 
                LNKD, 
                Zero
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                Zero, 
                LNKA, 
                Zero
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                One, 
                LNKB, 
                Zero
            }
        })
        Name (AR00, Package (0x1C)
        {
            Package (0x04)
            {
                0x0002FFFF, 
                Zero, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                One, 
                Zero, 
                0x11
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x02, 
                Zero, 
                0x12
            }, 

            Package (0x04)
            {
                0x0002FFFF, 
                0x03, 
                Zero, 
                0x13
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                Zero, 
                Zero, 
                0x14
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                One, 
                Zero, 
                0x15
            }, 

            Package (0x04)
            {
                0x0003FFFF, 
                0x02, 
                Zero, 
                0x16
            }, 

            Package (0x04)
            {
                0x0004FFFF, 
                Zero, 
                Zero, 
                0x13
            }, 

            Package (0x04)
            {
                0x000FFFFF, 
                Zero, 
                Zero, 
                0x12
            }, 

            Package (0x04)
            {
                0x0005FFFF, 
                Zero, 
                Zero, 
                0x11
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                Zero, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                One, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x02, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x0001FFFF, 
                0x03, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                Zero, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                One, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x02, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x001FFFFF, 
                0x03, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                Zero, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                One, 
                Zero, 
                0x11
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                0x02, 
                Zero, 
                0x12
            }, 

            Package (0x04)
            {
                0x0006FFFF, 
                0x03, 
                Zero, 
                0x13
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                Zero, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                One, 
                Zero, 
                0x11
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                0x02, 
                Zero, 
                0x12
            }, 

            Package (0x04)
            {
                0x0007FFFF, 
                0x03, 
                Zero, 
                0x13
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                Zero, 
                Zero, 
                0x10
            }, 

            Package (0x04)
            {
                0x000DFFFF, 
                One, 
                Zero, 
                0x11
            }
        })
        Name (PR01, Package (0x01)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                LNKA, 
                Zero
            }
        })
        Name (AR01, Package (0x01)
        {
            Package (0x04)
            {
                0xFFFF, 
                Zero, 
                Zero, 
                0x10
            }
        })
        Name (PRSA, ResourceTemplate ()
        {
            IRQ (Level, ActiveLow, Shared, )
                {3,4,5,7,10,11,12,14,15}
        })
        Alias (PRSA, PRSB)
        Alias (PRSA, PRSC)
        Alias (PRSA, PRSD)
        Alias (PRSA, PRSE)
        Alias (PRSA, PRSF)
        Alias (PRSA, PRSG)
        Alias (PRSA, PRSH)
        Device (PCI0)
        {
            Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
            Name (_ADR, Zero)  // _ADR: Address
            Method (^BN00, 0, NotSerialized)
            {
                Return (Zero)
            }

            Method (_BBN, 0, NotSerialized)  // _BBN: BIOS Bus Number
            {
                Return (BN00 ())
            }

            Name (_UID, Zero)  // _UID: Unique ID
            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
            {
                If (PICM)
                {
                    Return (AR00) /* \_SB_.AR00 */
                }

                Return (PR00) /* \_SB_.PR00 */
            }

            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x09, 0x04))
            }

            Method (NPTS, 1, NotSerialized)
            {
            }

            Method (NWAK, 1, NotSerialized)
            {
            }

            OperationRegion (HBI3, PCI_Config, 0x50, One)
            Field (HBI3, ByteAcc, NoLock, Preserve)
            {
                DF1,    8
            }

            OperationRegion (HHZI, PCI_Config, 0x53, One)
            Field (HHZI, ByteAcc, NoLock, Preserve)
            {
                DF2,    8
            }

            OperationRegion (HCT2, PCI_Config, 0x56, One)
            Field (HCT2, ByteAcc, NoLock, Preserve)
            {
                    ,   5, 
                GUI,    1, 
                Offset (0x01)
            }

            Device (SBRG)
            {
                Name (_ADR, 0x00020000)  // _ADR: Address
                Method (SPTS, 1, NotSerialized)
                {
                    TMTR = Zero
                    P40 |= 0x41
                    P42 |= 0x41
                }

                Method (SWAK, 1, NotSerialized)
                {
                    If ((Arg0 == One))
                    {
                        RTCE &= RTC1 /* \_SB_.PCI0.SBRG.RTC1 */
                        If (RTCE)
                        {
                            DBG8 = 0xC1
                        }
                        Else
                        {
                            Notify (PWRB, 0x02) // Device Wake
                            Sleep (0x0294)
                        }
                    }

                    If ((Arg0 == 0x03))
                    {
                        If (RTC3)
                        {
                            DBG8 = 0xC3
                        }
                        Else
                        {
                            Notify (PWRB, 0x02) // Device Wake
                            Sleep (0x0294)
                        }
                    }

                    If ((Arg0 == 0x04))
                    {
                        Notify (PWRB, 0x02) // Device Wake
                    }

                    P42 |= 0x21
                    Local0 = (Arg0 | 0xA0)
                    P48 = Local0
                }

                OperationRegion (PR10, SystemIO, 0x0810, One)
                Field (PR10, ByteAcc, NoLock, Preserve)
                {
                        ,   4, 
                    TMTR,   1, 
                    Offset (0x01)
                }

                OperationRegion (PR40, SystemIO, 0x0840, One)
                Field (PR40, ByteAcc, NoLock, Preserve)
                {
                    P40,    8
                }

                OperationRegion (PR42, SystemIO, 0x0842, One)
                Field (PR42, ByteAcc, NoLock, Preserve)
                {
                    P42,    8
                }

                OperationRegion (PR48, SystemIO, 0x0848, One)
                Field (PR48, ByteAcc, NoLock, Preserve)
                {
                    P48,    8
                }

                OperationRegion (S1WK, SystemIO, 0x0800, 0x02)
                Field (S1WK, ByteAcc, NoLock, Preserve)
                {
                        ,   10, 
                    RTC1,   1
                }

                OperationRegion (PP49, SystemIO, 0x0849, One)
                Field (PP49, ByteAcc, NoLock, Preserve)
                {
                    Offset (0x00), 
                    RTCE,   1
                }

                OperationRegion (S3WK, SystemIO, 0x0860, 0x02)
                Field (S3WK, ByteAcc, NoLock, Preserve)
                {
                        ,   14, 
                    RTC3,   1
                }

                Device (PIC)
                {
                    Name (_HID, EisaId ("PNP0000") /* 8259-compatible Programmable Interrupt Controller */)  // _HID: Hardware ID
                    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        IO (Decode16,
                            0x0020,             // Range Minimum
                            0x0020,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00A0,             // Range Minimum
                            0x00A0,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                        IRQNoFlags ()
                            {2}
                    })
                }

                Device (DMAD)
                {
                    Name (_HID, EisaId ("PNP0200") /* PC-class DMA Controller */)  // _HID: Hardware ID
                    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        DMA (Compatibility, BusMaster, Transfer8, )
                            {4}
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x0081,             // Range Minimum
                            0x0081,             // Range Maximum
                            0x00,               // Alignment
                            0x03,               // Length
                            )
                        IO (Decode16,
                            0x0087,             // Range Minimum
                            0x0087,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0089,             // Range Minimum
                            0x0089,             // Range Maximum
                            0x00,               // Alignment
                            0x03,               // Length
                            )
                        IO (Decode16,
                            0x008F,             // Range Minimum
                            0x008F,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x00C0,             // Range Minimum
                            0x00C0,             // Range Maximum
                            0x00,               // Alignment
                            0x20,               // Length
                            )
                    })
                }

                Device (PS2K)
                {
                    Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard (101/102-key, PS/2 Mouse) */)  // _HID: Hardware ID
                    Name (_CID, EisaId ("PNP030B"))  // _CID: Compatible ID
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        Local0 = (One << 0x0A)
                        If ((IOST & Local0))
                        {
                            Return (0x0F)
                        }

                        Return (Zero)
                    }

                    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        IO (Decode16,
                            0x0060,             // Range Minimum
                            0x0060,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0064,             // Range Minimum
                            0x0064,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IRQNoFlags ()
                            {1}
                    })
                }

                Device (PS2M)
                {
                    Method (_HID, 0, NotSerialized)  // _HID: Hardware ID
                    {
                        Return (0x040A2E4F)
                    }

                    Name (_CID, Package (0x05)  // _CID: Compatible ID
                    {
                        EisaId ("SYN0A00"), 
                        EisaId ("SYN0002"), 
                        EisaId ("PNP0F03") /* Microsoft PS/2-style Mouse */, 
                        EisaId ("PNP0F13") /* PS/2 Mouse */, 
                        EisaId ("PNP0F12")
                    })
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        Local0 = (One << 0x0C)
                        If ((IOST & Local0))
                        {
                            Return (0x0F)
                        }

                        Return (Zero)
                    }

                    Name (CRS1, ResourceTemplate ()
                    {
                        IRQNoFlags ()
                            {12}
                    })
                    Name (CRS2, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0060,             // Range Minimum
                            0x0060,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0064,             // Range Minimum
                            0x0064,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IRQNoFlags ()
                            {12}
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Local0 = (One << 0x0A)
                        If ((IOST & Local0))
                        {
                            Return (CRS1) /* \_SB_.PCI0.SBRG.PS2M.CRS1 */
                        }
                        Else
                        {
                            Return (CRS2) /* \_SB_.PCI0.SBRG.PS2M.CRS2 */
                        }
                    }
                }

                Device (SPKR)
                {
                    Name (_HID, EisaId ("PNP0800") /* Microsoft Sound System Compatible Device */)  // _HID: Hardware ID
                    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        IO (Decode16,
                            0x0061,             // Range Minimum
                            0x0061,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                    })
                }

                Device (COPR)
                {
                    Name (_HID, EisaId ("PNP0C04") /* x87-compatible Floating Point Processing Unit */)  // _HID: Hardware ID
                    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        IO (Decode16,
                            0x00F0,             // Range Minimum
                            0x00F0,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IRQNoFlags ()
                            {13}
                    })
                }

                Device (RMSC)
                {
                    Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
                    Name (_UID, 0x10)  // _UID: Unique ID
                    Name (CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0010,             // Range Minimum
                            0x0010,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x0022,             // Range Minimum
                            0x0022,             // Range Maximum
                            0x00,               // Alignment
                            0x1E,               // Length
                            )
                        IO (Decode16,
                            0x0044,             // Range Minimum
                            0x0044,             // Range Maximum
                            0x00,               // Alignment
                            0x1C,               // Length
                            )
                        IO (Decode16,
                            0x0062,             // Range Minimum
                            0x0062,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0065,             // Range Minimum
                            0x0065,             // Range Maximum
                            0x00,               // Alignment
                            0x0B,               // Length
                            )
                        IO (Decode16,
                            0x0072,             // Range Minimum
                            0x0072,             // Range Maximum
                            0x00,               // Alignment
                            0x0E,               // Length
                            )
                        IO (Decode16,
                            0x0080,             // Range Minimum
                            0x0080,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0084,             // Range Minimum
                            0x0084,             // Range Maximum
                            0x00,               // Alignment
                            0x03,               // Length
                            )
                        IO (Decode16,
                            0x0088,             // Range Minimum
                            0x0088,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x008C,             // Range Minimum
                            0x008C,             // Range Maximum
                            0x00,               // Alignment
                            0x03,               // Length
                            )
                        IO (Decode16,
                            0x0090,             // Range Minimum
                            0x0090,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x00A2,             // Range Minimum
                            0x00A2,             // Range Maximum
                            0x00,               // Alignment
                            0x1E,               // Length
                            )
                        IO (Decode16,
                            0x00E0,             // Range Minimum
                            0x00E0,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x0290,             // Range Minimum
                            0x0290,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                        IO (Decode16,
                            0x0C00,             // Range Minimum
                            0x0C00,             // Range Maximum
                            0x00,               // Alignment
                            0x06,               // Length
                            )
                        IO (Decode16,
                            0x0D00,             // Range Minimum
                            0x0D00,             // Range Maximum
                            0x00,               // Alignment
                            0x06,               // Length
                            )
                        IO (Decode16,
                            0x0480,             // Range Minimum
                            0x0480,             // Range Maximum
                            0x00,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x04D0,             // Range Minimum
                            0x04D0,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y00)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y01)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y02)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x00,               // Length
                            _Y03)
                        IO (Decode16,
                            0x2000,             // Range Minimum
                            0x2000,             // Range Maximum
                            0x00,               // Alignment
                            0xFF,               // Length
                            )
                        Memory32Fixed (ReadOnly,
                            0xFFF80000,         // Address Base
                            0x00080000,         // Address Length
                            )
                        Memory32Fixed (ReadOnly,
                            0xFFB80000,         // Address Base
                            0x00080000,         // Address Length
                            )
                        Memory32 (ReadOnly,
                            0xFFEE0000,         // Range Minimum
                            0xFFEE0000,         // Range Maximum
                            0x00000000,         // Alignment
                            0x00020000,         // Length
                            )
                        Memory32Fixed (ReadOnly,
                            0xFED10000,         // Address Base
                            0x00030000,         // Address Length
                            )
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y00._MIN, PM00)  // _MIN: Minimum Base Address
                        CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y00._MAX, PM01)  // _MAX: Maximum Base Address
                        CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y00._LEN, PM0L)  // _LEN: Length
                        CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y01._MIN, PM10)  // _MIN: Minimum Base Address
                        CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y01._MAX, PM11)  // _MAX: Maximum Base Address
                        CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y01._LEN, PM1L)  // _LEN: Length
                        PM00 = PMBS /* \PMBS */
                        PM01 = PMBS /* \PMBS */
                        If ((PMLN >= 0x0100))
                        {
                            PM0L = (PMLN >> One)
                            PM10 = (PM00 + PM0L) /* \_SB_.PCI0.SBRG.RMSC._CRS.PM0L */
                            PM11 = (PM01 + PM0L) /* \_SB_.PCI0.SBRG.RMSC._CRS.PM0L */
                            PM1L = (PMLN - PM0L) /* \_SB_.PCI0.SBRG.RMSC._CRS.PM0L */
                        }
                        Else
                        {
                            PM0L = PMLN /* \PMLN */
                        }

                        If (SMBS)
                        {
                            CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y02._MIN, SM20)  // _MIN: Minimum Base Address
                            CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y02._MAX, SM21)  // _MAX: Maximum Base Address
                            CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y02._LEN, SM2L)  // _LEN: Length
                            SM20 = SMBS /* \SMBS */
                            SM21 = SMBS /* \SMBS */
                            SM2L = SMBL /* \SMBL */
                        }

                        If (GPBS)
                        {
                            CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y03._MIN, GP30)  // _MIN: Minimum Base Address
                            CreateWordField (CRS, \_SB.PCI0.SBRG.RMSC._Y03._MAX, GP31)  // _MAX: Maximum Base Address
                            CreateByteField (CRS, \_SB.PCI0.SBRG.RMSC._Y03._LEN, GP3L)  // _LEN: Length
                            GP30 = GPBS /* \GPBS */
                            GP31 = GPBS /* \GPBS */
                            GP3L = GPLN /* \GPLN */
                        }

                        Return (CRS) /* \_SB_.PCI0.SBRG.RMSC.CRS_ */
                    }
                }

                Device (HPET)
                {
                    Name (_HID, EisaId ("PNP0103") /* HPET System Timer */)  // _HID: Hardware ID
                    Name (ATT3, ResourceTemplate ()
                    {
                        IRQNoFlags ()
                            {0}
                        IRQNoFlags ()
                            {8}
                        Memory32Fixed (ReadOnly,
                            0xFED00000,         // Address Base
                            0x00000400,         // Address Length
                            )
                    })
                    Name (ATT4, ResourceTemplate ()
                    {
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        If ((HPFL () == One))
                        {
                            Return (ATT4) /* \_SB_.PCI0.SBRG.HPET.ATT4 */
                        }
                        Else
                        {
                            Return (ATT3) /* \_SB_.PCI0.SBRG.HPET.ATT3 */
                        }
                    }

                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If ((HPFL () == One))
                        {
                            Return (0x0A)
                        }
                        Else
                        {
                            Return (0x0F)
                        }
                    }
                }

                Name (HPVR, Ones)
                Method (HPFL, 0, NotSerialized)
                {
                    If ((HPVR != Ones))
                    {
                        Return (HPVR) /* \_SB_.PCI0.SBRG.HPVR */
                    }

                    HPVR = One
                    If (CondRefOf (_OSI, Local1))
                    {
                        If (_OSI ("Windows 2000"))
                        {
                            HPVR = One
                        }

                        If (_OSI ("Windows 2001"))
                        {
                            HPVR = Zero
                        }

                        If (_OSI ("Windows 2001 SP1"))
                        {
                            HPVR = Zero
                        }

                        If (_OSI ("Windows 2001 SP2"))
                        {
                            HPVR = Zero
                        }

                        If (_OSI ("Windows 2001.1"))
                        {
                            HPVR = One
                        }

                        If (_OSI ("Windows 2001.1 SP1"))
                        {
                            HPVR = Zero
                        }

                        If (_OSI ("Windows 2006"))
                        {
                            HPVR = Zero
                        }
                    }
                    Else
                    {
                        If (MCTH (_OS, "Microsoft Windows NT"))
                        {
                            HPVR = One
                        }
                        Else
                        {
                            If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
                            {
                                HPVR = One
                            }

                            If (MCTH (_OS, "Linux"))
                            {
                                HPVR = One
                            }
                        }
                    }

                    Return (HPVR) /* \_SB_.PCI0.SBRG.HPVR */
                }

                Device (TMR)
                {
                    Name (_HID, EisaId ("PNP0100") /* PC-class System Timer */)  // _HID: Hardware ID
                    Name (ATT5, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0040,             // Range Minimum
                            0x0040,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                        IRQNoFlags ()
                            {0}
                    })
                    Name (ATT6, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0040,             // Range Minimum
                            0x0040,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        If ((HPFL () == One))
                        {
                            Return (ATT5) /* \_SB_.PCI0.SBRG.TMR_.ATT5 */
                        }
                        Else
                        {
                            Return (ATT6) /* \_SB_.PCI0.SBRG.TMR_.ATT6 */
                        }
                    }
                }

                Device (RTC0)
                {
                    Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */)  // _HID: Hardware ID
                    Name (ATT0, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                        IRQNoFlags ()
                            {8}
                    })
                    Name (ATT1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x00,               // Alignment
                            0x02,               // Length
                            )
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        If ((HPFL () == One))
                        {
                            Return (ATT0) /* \_SB_.PCI0.SBRG.RTC0.ATT0 */
                        }
                        Else
                        {
                            Return (ATT1) /* \_SB_.PCI0.SBRG.RTC0.ATT1 */
                        }
                    }
                }

                Method (RRIO, 4, NotSerialized)
                {
                }

                Method (RDMA, 3, NotSerialized)
                {
                }

                Device (^PCIE)
                {
                    Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
                    Name (_UID, 0x11)  // _UID: Unique ID
                    Name (CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadOnly,
                            0xE0000000,         // Address Base
                            0x10000000,         // Address Length
                            _Y04)
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        CreateDWordField (CRS, \_SB.PCI0.PCIE._Y04._BAS, BAS1)  // _BAS: Base Address
                        CreateDWordField (CRS, \_SB.PCI0.PCIE._Y04._LEN, LEN1)  // _LEN: Length
                        BAS1 = PCIB /* \PCIB */
                        LEN1 = PCIL /* \PCIL */
                        Return (CRS) /* \_SB_.PCI0.PCIE.CRS_ */
                    }
                }

                Device (OMSC)
                {
                    Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
                    Name (_UID, Zero)  // _UID: Unique ID
                    Name (CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0250,             // Range Minimum
                            0x0253,             // Range Maximum
                            0x01,               // Alignment
                            0x04,               // Length
                            )
                        IO (Decode16,
                            0x0256,             // Range Minimum
                            0x025F,             // Range Maximum
                            0x01,               // Alignment
                            0x0A,               // Length
                            )
                        Memory32Fixed (ReadOnly,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y05)
                        Memory32Fixed (ReadOnly,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y06)
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        If (APIC)
                        {
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y05._LEN, ML01)  // _LEN: Length
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y05._BAS, MB01)  // _BAS: Base Address
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y06._LEN, ML02)  // _LEN: Length
                            CreateDWordField (CRS, \_SB.PCI0.SBRG.OMSC._Y06._BAS, MB02)  // _BAS: Base Address
                            MB01 = 0xFEC00000
                            ML01 = 0x1000
                            MB02 = 0xFEE00000
                            ML02 = 0x1000
                        }

                        Return (CRS) /* \_SB_.PCI0.SBRG.OMSC.CRS_ */
                    }
                }

                Device (^^RMEM)
                {
                    Name (_HID, EisaId ("PNP0C01") /* System Board */)  // _HID: Hardware ID
                    Name (_UID, One)  // _UID: Unique ID
                    Name (CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadWrite,
                            0x00000000,         // Address Base
                            0x000A0000,         // Address Length
                            )
                        Memory32Fixed (ReadOnly,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y07)
                        Memory32Fixed (ReadOnly,
                            0x000E0000,         // Address Base
                            0x00020000,         // Address Length
                            _Y08)
                        Memory32Fixed (ReadWrite,
                            0x00100000,         // Address Base
                            0x00000000,         // Address Length
                            _Y09)
                        Memory32Fixed (ReadOnly,
                            0x00000000,         // Address Base
                            0x00000000,         // Address Length
                            _Y0A)
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        CreateDWordField (CRS, \_SB.RMEM._Y07._BAS, BAS1)  // _BAS: Base Address
                        CreateDWordField (CRS, \_SB.RMEM._Y07._LEN, LEN1)  // _LEN: Length
                        CreateDWordField (CRS, \_SB.RMEM._Y08._BAS, BAS2)  // _BAS: Base Address
                        CreateDWordField (CRS, \_SB.RMEM._Y08._LEN, LEN2)  // _LEN: Length
                        CreateDWordField (CRS, \_SB.RMEM._Y09._LEN, LEN3)  // _LEN: Length
                        CreateDWordField (CRS, \_SB.RMEM._Y0A._BAS, BAS4)  // _BAS: Base Address
                        CreateDWordField (CRS, \_SB.RMEM._Y0A._LEN, LEN4)  // _LEN: Length
                        If (OSFL ()) {}
                        Else
                        {
                            If (MG1B)
                            {
                                If ((MG1B > 0x000C0000))
                                {
                                    BAS1 = 0x000C0000
                                    LEN1 = (MG1B - BAS1) /* \_SB_.RMEM._CRS.BAS1 */
                                }
                            }
                            Else
                            {
                                BAS1 = 0x000C0000
                                LEN1 = 0x00020000
                            }

                            If (Local0 = (MG1B + MG1L) /* \MG1L */)
                            {
                                BAS2 = Local0
                                LEN2 = (0x00100000 - BAS2) /* \_SB_.RMEM._CRS.BAS2 */
                            }
                        }

                        LEN3 = (MG2B - 0x00100000)
                        BAS4 = (MG2B + MG2L) /* \MG2L */
                        LEN4 = (Zero - BAS4) /* \_SB_.RMEM._CRS.BAS4 */
                        Return (CRS) /* \_SB_.RMEM.CRS_ */
                    }
                }
            }

            Device (IDEC)
            {
                Name (_ADR, 0x00020005)  // _ADR: Address
                Name (\FZTF, Buffer (0x07)
                {
                     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF5         /* ....... */
                })
                Name (IO5T, Package (0x03)
                {
                    Package (0x07)
                    {
                        0x78, 
                        0xB4, 
                        0x014A, 
                        0x0186, 
                        0x0258, 
                        0x78, 
                        0x96
                    }, 

                    Package (0x07)
                    {
                        0x06, 
                        0x07, 
                        0x1C, 
                        0x1C, 
                        0x1C, 
                        0x06, 
                        0x07
                    }, 

                    Package (0x07)
                    {
                        0x04, 
                        0x09, 
                        0x03, 
                        0x09, 
                        0x1E, 
                        0x04, 
                        0x06
                    }
                })
                Name (IO6T, Package (0x03)
                {
                    Package (0x07)
                    {
                        0x78, 
                        0xB4, 
                        0x014A, 
                        0x0186, 
                        0x0258, 
                        0x78, 
                        0xB4
                    }, 

                    Package (0x07)
                    {
                        0x09, 
                        0x0A, 
                        0x26, 
                        0x26, 
                        0x26, 
                        0x09, 
                        0x0A
                    }, 

                    Package (0x07)
                    {
                        0x05, 
                        0x0C, 
                        0x04, 
                        0x0C, 
                        0x28, 
                        0x05, 
                        0x0C
                    }
                })
                Name (UM5T, Package (0x06)
                {
                    0x0B, 
                    0x07, 
                    0x05, 
                    0x04, 
                    0x02, 
                    One
                })
                Name (UM6T, Package (0x07)
                {
                    0x0F, 
                    0x0A, 
                    0x07, 
                    0x05, 
                    0x03, 
                    0x02, 
                    One
                })
                Name (PIO5, Package (0x05)
                {
                    0x3A, 
                    0x25, 
                    0x1F, 
                    0x10, 
                    0x0A
                })
                Name (PIO6, Package (0x05)
                {
                    0x4E, 
                    0x32, 
                    0x2A, 
                    0x16, 
                    0x0E
                })
                Name (CRCT, Package (0x07)
                {
                    0x06, 
                    0x04, 
                    0x03, 
                    One, 
                    One, 
                    One, 
                    One
                })
                Name (INTT, Package (0x05)
                {
                    0x02, 
                    0x02, 
                    0x02, 
                    0x04, 
                    0x06
                })
                Name (DMAT, Package (0x05)
                {
                    Zero, 
                    One, 
                    One, 
                    One, 
                    0x02
                })
                Name (RMFL, One)
                OperationRegion (CF40, PCI_Config, 0x40, 0x18)
                Field (CF40, WordAcc, NoLock, Preserve)
                {
                        ,   1, 
                    IOR0,   1, 
                    UDM0,   1, 
                    UM60,   1, 
                    UCT0,   4, 
                    CRC0,   4, 
                    INI0,   4, 
                    ATT0,   6, 
                    Offset (0x03), 
                    RCT0,   6, 
                    Offset (0x04), 
                        ,   1, 
                    IOR1,   1, 
                    UDM1,   1, 
                    UM61,   1, 
                    UCT1,   4, 
                    CRC1,   4, 
                    INI1,   4, 
                    ATT1,   6, 
                    Offset (0x07), 
                    RCT1,   6, 
                    Offset (0x08), 
                        ,   1, 
                    IOR2,   1, 
                    UDM2,   1, 
                    UM62,   1, 
                    UCT2,   4, 
                    CRC2,   4, 
                    INI2,   4, 
                    ATT2,   6, 
                    Offset (0x0B), 
                    RCT2,   6, 
                    Offset (0x0C), 
                        ,   1, 
                    IOR3,   1, 
                    UDM3,   1, 
                    UM63,   1, 
                    UCT3,   4, 
                    CRC3,   4, 
                    INI3,   4, 
                    ATT3,   6, 
                    Offset (0x0F), 
                    RCT3,   6, 
                    Offset (0x10), 
                        ,   1, 
                    CHE0,   1, 
                    Offset (0x12), 
                        ,   1, 
                    CHE1,   1, 
                    Offset (0x14), 
                        ,   30, 
                    REMP,   1, 
                    Offset (0x18)
                }

                Name (IDEP, Buffer (0x14) {})
                CreateDWordField (IDEP, Zero, GTM0)
                CreateDWordField (IDEP, 0x04, GTM1)
                CreateDWordField (IDEP, 0x08, GTM2)
                CreateDWordField (IDEP, 0x0C, GTM3)
                CreateDWordField (IDEP, 0x10, GTM4)
                Device (IDE0)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    Method (_GTM, 0, NotSerialized)  // _GTM: Get Timing Mode
                    {
                        Local0 = Ones
                        Local1 = Ones
                        Local2 = Ones
                        Local3 = Ones
                        Local4 = 0x10
                        RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                        REMP = Zero
                        If (CHE0)
                        {
                            If ((ATT0 != Zero))
                            {
                                Local5 = (RCT0 + One)
                                Local6 = (ATT0 + One)
                                Local5 += Local6
                                Local6 = (UM60 * 0x05)
                                Local7 = (0x14 - Local6)
                                Local0 = (Local5 * Local7)
                                Local0 >>= One
                                If ((Local0 <= 0xB4))
                                {
                                    Local1 = Local0
                                }

                                If (IOR0)
                                {
                                    Local4 |= 0x02
                                }

                                If (UDM0)
                                {
                                    Local5 = (UCT0 + One)
                                    Local6 = (Local5 * Local7)
                                    Local1 = (Local6 >> One)
                                    Local4 |= One
                                }
                            }

                            If ((ATT1 != Zero))
                            {
                                Local5 = (RCT1 + One)
                                Local6 = (ATT1 + One)
                                Local5 += Local6
                                Local6 = (UM61 * 0x05)
                                Local7 = (0x14 - Local6)
                                Local2 = (Local5 * Local7)
                                Local2 >>= One
                                If ((Local2 <= 0xB4))
                                {
                                    Local3 = Local2
                                }

                                If (IOR1)
                                {
                                    Local4 |= 0x08
                                }

                                If (UDM1)
                                {
                                    Local5 = (UCT1 + One)
                                    Local6 = (Local5 * Local7)
                                    Local3 = (Local6 >> One)
                                    Local4 |= 0x04
                                }
                            }
                        }

                        REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                        GTM0 = Local0
                        GTM1 = Local1
                        GTM2 = Local2
                        GTM3 = Local3
                        GTM4 = Local4
                        Return (IDEP) /* \_SB_.PCI0.IDEC.IDEP */
                    }

                    Method (_STM, 3, NotSerialized)  // _STM: Set Timing Mode
                    {
                        IDEP = Arg0
                        Local0 = GTM0 /* \_SB_.PCI0.IDEC.GTM0 */
                        Local1 = GTM1 /* \_SB_.PCI0.IDEC.GTM1 */
                        Local2 = GTM2 /* \_SB_.PCI0.IDEC.GTM2 */
                        Local3 = GTM3 /* \_SB_.PCI0.IDEC.GTM3 */
                        Local4 = GTM4 /* \_SB_.PCI0.IDEC.GTM4 */
                        RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                        REMP = Zero
                        If (((Local1 != Ones) && (Local1 != Zero)))
                        {
                            If ((Local4 & One))
                            {
                                UDM0 = One
                                If ((Local1 < 0x14))
                                {
                                    UM60 = One
                                    UCT0 = One
                                }
                                Else
                                {
                                    UM60 = Zero
                                    Divide (Local1, 0x0A, Local6, Local5)
                                    Local5--
                                    UCT0 = Local5
                                    Local5 = Match (UM5T, MEQ, Local5, MTR, Zero, Zero)
                                    CRC0 = DerefOf (Index (CRCT, Local5))
                                }
                            }
                        }

                        If (((Local0 != Ones) && (Local0 != Zero)))
                        {
                            If (UM60)
                            {
                                Local6 = Match (DerefOf (Index (IO6T, Zero)), MEQ, Local0, MTR, Zero, 
                                    Zero)
                                ATT0 = DerefOf (Index (DerefOf (Index (IO6T, One)), Local6))
                                RCT0 = DerefOf (Index (DerefOf (Index (IO6T, 0x02)), Local6))
                            }
                            Else
                            {
                                Local6 = Match (DerefOf (Index (IO5T, Zero)), MEQ, Local0, MTR, Zero, 
                                    Zero)
                                ATT0 = DerefOf (Index (DerefOf (Index (IO5T, One)), Local6))
                                RCT0 = DerefOf (Index (DerefOf (Index (IO5T, 0x02)), Local6))
                                INI0 = DerefOf (Index (INTT, Local6))
                            }
                        }

                        If (((Local3 != Ones) && (Local3 != Zero)))
                        {
                            If ((Local4 & 0x04))
                            {
                                UDM1 = One
                                If ((Local3 < 0x14))
                                {
                                    UM61 = One
                                    UCT1 = One
                                }
                                Else
                                {
                                    UM61 = Zero
                                    Divide (Local3, 0x0A, Local6, Local5)
                                    Local5--
                                    UCT1 = Local5
                                    Local5 = Match (UM5T, MEQ, Local5, MTR, Zero, Zero)
                                    CRC1 = DerefOf (Index (CRCT, Local5))
                                }
                            }
                        }

                        If (((Local2 != Ones) && (Local2 != Zero)))
                        {
                            If (UM61)
                            {
                                Local6 = Match (DerefOf (Index (IO6T, Zero)), MEQ, Local2, MTR, Zero, 
                                    Zero)
                                ATT1 = DerefOf (Index (DerefOf (Index (IO6T, One)), Local6))
                                RCT1 = DerefOf (Index (DerefOf (Index (IO6T, 0x02)), Local6))
                            }
                            Else
                            {
                                Local6 = Match (DerefOf (Index (IO5T, Zero)), MEQ, Local2, MTR, Zero, 
                                    Zero)
                                ATT1 = DerefOf (Index (DerefOf (Index (IO5T, One)), Local6))
                                RCT1 = DerefOf (Index (DerefOf (Index (IO5T, 0x02)), Local6))
                                INI1 = DerefOf (Index (INTT, Local6))
                            }
                        }

                        REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, Zero)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                            REMP = Zero
                            If ((ATT0 != Zero))
                            {
                                Local5 = (ATT0 + RCT0) /* \_SB_.PCI0.IDEC.RCT0 */
                                If (UM60)
                                {
                                    MODE = Match (PIO6, MEQ, Local5, MTR, Zero, Zero)
                                }
                                Else
                                {
                                    MODE = Match (PIO5, MEQ, Local5, MTR, Zero, Zero)
                                }

                                If (UDM0)
                                {
                                    If (UM60)
                                    {
                                        UMOD = Match (UM6T, MEQ, UCT0, MTR, Zero, Zero)
                                    }
                                    Else
                                    {
                                        UMOD = Match (UM5T, MEQ, UCT0, MTR, Zero, Zero)
                                    }

                                    UMOD |= 0x40
                                }
                                Else
                                {
                                    UMOD = DerefOf (Index (DMAT, MODE))
                                    UMOD |= 0x20
                                }

                                MODE |= 0x08
                            }

                            REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                            Concatenate (Local6, Local7, Local5)
                            Return (Concatenate (Local5, FZTF))
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, One)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                            REMP = Zero
                            If ((ATT1 != Zero))
                            {
                                Local5 = (ATT1 + RCT1) /* \_SB_.PCI0.IDEC.RCT1 */
                                If (UM61)
                                {
                                    MODE = Match (PIO6, MEQ, Local5, MTR, Zero, Zero)
                                }
                                Else
                                {
                                    MODE = Match (PIO5, MEQ, Local5, MTR, Zero, Zero)
                                }

                                If (UDM1)
                                {
                                    If (UM61)
                                    {
                                        UMOD = Match (UM6T, MEQ, UCT1, MTR, Zero, Zero)
                                    }
                                    Else
                                    {
                                        UMOD = Match (UM5T, MEQ, UCT1, MTR, Zero, Zero)
                                    }

                                    UMOD |= 0x40
                                }
                                Else
                                {
                                    UMOD = DerefOf (Index (DMAT, MODE))
                                    UMOD |= 0x20
                                }

                                MODE |= 0x08
                            }

                            REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                            Concatenate (Local6, Local7, Local5)
                            Return (Concatenate (Local5, FZTF))
                        }
                    }
                }

                Device (IDE1)
                {
                    Name (_ADR, One)  // _ADR: Address
                    Method (_GTM, 0, NotSerialized)  // _GTM: Get Timing Mode
                    {
                        If (P06)
                        {
                            Local0 = Ones
                            Local1 = Ones
                            Local2 = Ones
                            Local3 = Ones
                            Local4 = 0x10
                            If (SEXT)
                            {
                                Local0 = DerefOf (Index (PIOT, SMIO))
                                Local1 = DerefOf (Index (UMAT, SMDM))
                                Local2 = DerefOf (Index (PIOT, SSIO))
                                Local3 = DerefOf (Index (UMAT, SSDM))
                                Local4 |= 0x0F
                            }

                            STM0 = Local0
                            STM1 = Local1
                            STM2 = Local2
                            STM3 = Local3
                            STM4 = Local4
                            Return (IDES) /* \_SB_.PCI0.IDEC.IDES */
                        }
                        Else
                        {
                            Local0 = Ones
                            Local1 = Ones
                            Local2 = Ones
                            Local3 = Ones
                            Local4 = 0x10
                            RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                            REMP = Zero
                            If (CHE1)
                            {
                                If ((ATT2 != Zero))
                                {
                                    Local5 = (RCT2 + One)
                                    Local6 = (ATT2 + One)
                                    Local5 += Local6
                                    Local6 = (UM62 * 0x05)
                                    Local7 = (0x14 - Local6)
                                    Local0 = (Local5 * Local7)
                                    Local0 >>= One
                                    If ((Local0 <= 0xB4))
                                    {
                                        Local1 = Local0
                                    }

                                    If (IOR2)
                                    {
                                        Local4 |= 0x02
                                    }

                                    If (UDM2)
                                    {
                                        Local5 = (UCT2 + One)
                                        Local6 = (Local5 * Local7)
                                        Local1 = (Local6 >> One)
                                        Local4 |= One
                                    }
                                }

                                If ((ATT3 != Zero))
                                {
                                    Local5 = (RCT3 + One)
                                    Local6 = (ATT3 + One)
                                    Local5 += Local6
                                    Local6 = (UM63 * 0x05)
                                    Local7 = (0x14 - Local6)
                                    Local2 = (Local5 * Local7)
                                    Local2 >>= One
                                    If ((Local2 <= 0xB4))
                                    {
                                        Local3 = Local2
                                    }

                                    If (IOR3)
                                    {
                                        Local4 |= 0x08
                                    }

                                    If (UDM3)
                                    {
                                        Local5 = (UCT3 + One)
                                        Local6 = (Local5 * Local7)
                                        Local3 = (Local6 >> One)
                                        Local4 |= 0x04
                                    }
                                }
                            }

                            REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                            GTM0 = Local0
                            GTM1 = Local1
                            GTM2 = Local2
                            GTM3 = Local3
                            GTM4 = Local4
                            Return (IDEP) /* \_SB_.PCI0.IDEC.IDEP */
                        }
                    }

                    Method (_STM, 3, NotSerialized)  // _STM: Set Timing Mode
                    {
                        If (P06) {}
                        Else
                        {
                            IDEP = Arg0
                            Local0 = GTM0 /* \_SB_.PCI0.IDEC.GTM0 */
                            Local1 = GTM1 /* \_SB_.PCI0.IDEC.GTM1 */
                            Local2 = GTM2 /* \_SB_.PCI0.IDEC.GTM2 */
                            Local3 = GTM3 /* \_SB_.PCI0.IDEC.GTM3 */
                            Local4 = GTM4 /* \_SB_.PCI0.IDEC.GTM4 */
                            RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                            REMP = Zero
                            If (((Local1 != Ones) && (Local1 != Zero)))
                            {
                                If ((Local4 & One))
                                {
                                    UDM2 = One
                                    If ((Local1 < 0x14))
                                    {
                                        UM62 = One
                                        UCT2 = One
                                    }
                                    Else
                                    {
                                        UM62 = Zero
                                        Divide (Local1, 0x0A, Local6, Local5)
                                        Local5--
                                        UCT2 = Local5
                                        Local5 = Match (UM5T, MEQ, Local5, MTR, Zero, Zero)
                                        CRC2 = DerefOf (Index (CRCT, Local5))
                                    }
                                }
                            }

                            If (((Local0 != Ones) && (Local0 != Zero)))
                            {
                                If (UM62)
                                {
                                    Local6 = Match (DerefOf (Index (IO6T, Zero)), MEQ, Local0, MTR, Zero, 
                                        Zero)
                                    ATT2 = DerefOf (Index (DerefOf (Index (IO6T, One)), Local6))
                                    RCT2 = DerefOf (Index (DerefOf (Index (IO6T, 0x02)), Local6))
                                }
                                Else
                                {
                                    Local6 = Match (DerefOf (Index (IO5T, Zero)), MEQ, Local0, MTR, Zero, 
                                        Zero)
                                    ATT2 = DerefOf (Index (DerefOf (Index (IO5T, One)), Local6))
                                    RCT2 = DerefOf (Index (DerefOf (Index (IO5T, 0x02)), Local6))
                                    INI2 = DerefOf (Index (INTT, Local6))
                                }
                            }

                            If (((Local3 != Ones) && (Local3 != Zero)))
                            {
                                If ((Local4 & 0x04))
                                {
                                    UDM3 = One
                                    If ((Local3 < 0x14))
                                    {
                                        UM63 = One
                                        UCT3 = One
                                    }
                                    Else
                                    {
                                        UM63 = Zero
                                        Divide (Local3, 0x0A, Local6, Local5)
                                        Local5--
                                        UCT3 = Local5
                                        Local5 = Match (UM5T, MEQ, Local5, MTR, Zero, Zero)
                                        CRC3 = DerefOf (Index (CRCT, Local5))
                                    }
                                }
                            }

                            If (((Local2 != Ones) && (Local2 != Zero)))
                            {
                                If (UM63)
                                {
                                    Local6 = Match (DerefOf (Index (IO6T, Zero)), MEQ, Local2, MTR, Zero, 
                                        Zero)
                                    ATT3 = DerefOf (Index (DerefOf (Index (IO6T, One)), Local6))
                                    RCT3 = DerefOf (Index (DerefOf (Index (IO6T, 0x02)), Local6))
                                }
                                Else
                                {
                                    Local6 = Match (DerefOf (Index (IO5T, Zero)), MEQ, Local2, MTR, Zero, 
                                        Zero)
                                    ATT3 = DerefOf (Index (DerefOf (Index (IO5T, One)), Local6))
                                    RCT3 = DerefOf (Index (DerefOf (Index (IO5T, 0x02)), Local6))
                                    INI3 = DerefOf (Index (INTT, Local6))
                                }
                            }

                            REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                        }
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, Zero)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            If (P06)
                            {
                                If (SEXT)
                                {
                                    MODE = SMIO /* \_SB_.PCI0.IDEC.SMIO */
                                    MODE |= 0x08
                                    UMOD = SMDM /* \_SB_.PCI0.IDEC.SMDM */
                                    UMOD |= 0x40
                                }

                                Concatenate (Local6, Local7, Local5)
                                Return (Concatenate (Local5, FZTF))
                            }
                            Else
                            {
                                RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                                REMP = Zero
                                If ((ATT2 != Zero))
                                {
                                    Local5 = (ATT2 + RCT2) /* \_SB_.PCI0.IDEC.RCT2 */
                                    If (UM62)
                                    {
                                        MODE = Match (PIO6, MEQ, Local5, MTR, Zero, Zero)
                                    }
                                    Else
                                    {
                                        MODE = Match (PIO5, MEQ, Local5, MTR, Zero, Zero)
                                    }

                                    If (UDM2)
                                    {
                                        If (UM62)
                                        {
                                            UMOD = Match (UM6T, MEQ, UCT2, MTR, Zero, Zero)
                                        }
                                        Else
                                        {
                                            UMOD = Match (UM5T, MEQ, UCT2, MTR, Zero, Zero)
                                        }

                                        UMOD |= 0x40
                                    }
                                    Else
                                    {
                                        UMOD = DerefOf (Index (DMAT, MODE))
                                        UMOD |= 0x20
                                    }

                                    MODE |= 0x08
                                }

                                REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                                Concatenate (Local6, Local7, Local5)
                                Return (Concatenate (Local5, FZTF))
                            }
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, One)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            If (P06)
                            {
                                If (SEXT)
                                {
                                    MODE = SSIO /* \_SB_.PCI0.IDEC.SSIO */
                                    MODE |= 0x08
                                    UMOD = SSDM /* \_SB_.PCI0.IDEC.SSDM */
                                    UMOD |= 0x40
                                }

                                Concatenate (Local6, Local7, Local5)
                                Return (Concatenate (Local5, FZTF))
                            }
                            Else
                            {
                                RMFL = REMP /* \_SB_.PCI0.IDEC.REMP */
                                REMP = Zero
                                If ((ATT3 != Zero))
                                {
                                    Local5 = (ATT3 + RCT3) /* \_SB_.PCI0.IDEC.RCT3 */
                                    If (UM63)
                                    {
                                        MODE = Match (PIO6, MEQ, Local5, MTR, Zero, Zero)
                                    }
                                    Else
                                    {
                                        MODE = Match (PIO5, MEQ, Local5, MTR, Zero, Zero)
                                    }

                                    If (UDM3)
                                    {
                                        If (UM63)
                                        {
                                            UMOD = Match (UM6T, MEQ, UCT3, MTR, Zero, Zero)
                                        }
                                        Else
                                        {
                                            UMOD = Match (UM5T, MEQ, UCT3, MTR, Zero, Zero)
                                        }

                                        UMOD |= 0x40
                                    }
                                    Else
                                    {
                                        UMOD = DerefOf (Index (DMAT, MODE))
                                        UMOD |= 0x20
                                    }

                                    MODE |= 0x08
                                }

                                REMP = RMFL /* \_SB_.PCI0.IDEC.RMFL */
                                Concatenate (Local6, Local7, Local5)
                                Return (Concatenate (Local5, FZTF))
                            }
                        }
                    }
                }

                Name (PIOT, Package (0x05)
                {
                    0x0258, 
                    0x0186, 
                    0x014A, 
                    0xB4, 
                    0x78
                })
                Name (UMAT, Package (0x07)
                {
                    0x78, 
                    0x50, 
                    0x3C, 
                    0x28, 
                    0x1E, 
                    0x14, 
                    0x0F
                })
                OperationRegion (STMB, PCI_Config, 0x6C, 0x02)
                Field (STMB, ByteAcc, NoLock, Preserve)
                {
                    SMIO,   3, 
                        ,   1, 
                    SMDM,   3, 
                    Offset (0x01), 
                    SSIO,   3, 
                        ,   1, 
                    SSDM,   3, 
                    Offset (0x02)
                }

                OperationRegion (STXT, PCI_Config, 0x52, 0x02)
                Field (STXT, ByteAcc, NoLock, Preserve)
                {
                        ,   1, 
                    SEXT,   1, 
                    Offset (0x02)
                }

                Name (IDES, Buffer (0x14) {})
                CreateDWordField (IDES, Zero, STM0)
                CreateDWordField (IDES, 0x04, STM1)
                CreateDWordField (IDES, 0x08, STM2)
                CreateDWordField (IDES, 0x0C, STM3)
                CreateDWordField (IDES, 0x10, STM4)
                OperationRegion (PR06, SystemIO, 0x0806, One)
                Field (PR06, ByteAcc, NoLock, Preserve)
                {
                    P06,    8
                }
            }

            Device (USB)
            {
                Name (_ADR, 0x00030000)  // _ADR: Address
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (((OSFL () == One) || (OSFL () == 0x02)))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }

                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x0E, 0x03))
                }
            }

            Device (USB2)
            {
                Name (_ADR, 0x00030001)  // _ADR: Address
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (((OSFL () == One) || (OSFL () == 0x02)))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }

                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x04, 0x03))
                }
            }

            Device (EUSB)
            {
                Name (_ADR, 0x00030003)  // _ADR: Address
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (((OSFL () == One) || (OSFL () == 0x02)))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }

                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x07, 0x03))
                }
            }

            Device (MAC)
            {
                Name (_ADR, 0x00040000)  // _ADR: Address
                OperationRegion (GMPG, PCI_Config, 0x45, One)
                Field (GMPG, ByteAcc, NoLock, Preserve)
                {
                    DPME,   1
                }

                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x0C, 0x04))
                }
            }

            Device (HDA)
            {
                Name (_ADR, 0x000F0000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x05, 0x04))
                }
            }

            Device (S184)
            {
                Name (_ADR, 0x00050000)  // _ADR: Address
                Name (PIOT, Package (0x05)
                {
                    0x0258, 
                    0x0186, 
                    0x014A, 
                    0xB4, 
                    0x78
                })
                Name (DMAT, Package (0x07)
                {
                    0x78, 
                    0x50, 
                    0x3C, 
                    0x28, 
                    0x1E, 
                    0x14, 
                    0x0F
                })
                OperationRegion (STMB, PCI_Config, 0x6C, 0x04)
                Field (STMB, ByteAcc, NoLock, Preserve)
                {
                    PMIO,   3, 
                        ,   1, 
                    PMDM,   3, 
                    Offset (0x01), 
                    PSIO,   3, 
                        ,   1, 
                    PSDM,   3, 
                    Offset (0x02), 
                    SMIO,   3, 
                        ,   1, 
                    SMDM,   3, 
                    Offset (0x03), 
                    SSIO,   3, 
                        ,   1, 
                    SSDM,   3, 
                    Offset (0x04)
                }

                OperationRegion (STXT, PCI_Config, 0x50, 0x04)
                Field (STXT, ByteAcc, NoLock, Preserve)
                {
                        ,   1, 
                    PEXT,   1, 
                    Offset (0x02), 
                        ,   1, 
                    SEXT,   1, 
                    Offset (0x04)
                }

                Name (IDES, Buffer (0x14) {})
                CreateDWordField (IDES, Zero, STM0)
                CreateDWordField (IDES, 0x04, STM1)
                CreateDWordField (IDES, 0x08, STM2)
                CreateDWordField (IDES, 0x0C, STM3)
                CreateDWordField (IDES, 0x10, STM4)
                Device (SDE0)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    Method (_GTM, 0, NotSerialized)  // _GTM: Get Timing Mode
                    {
                        Local0 = Ones
                        Local1 = Ones
                        Local2 = Ones
                        Local3 = Ones
                        Local4 = 0x10
                        If (PEXT)
                        {
                            Local0 = DerefOf (Index (PIOT, PMIO))
                            Local1 = DerefOf (Index (DMAT, PMDM))
                            Local2 = DerefOf (Index (PIOT, PSIO))
                            Local3 = DerefOf (Index (DMAT, PSDM))
                            Local4 |= 0x0F
                        }

                        STM0 = Local0
                        STM1 = Local1
                        STM2 = Local2
                        STM3 = Local3
                        STM4 = Local4
                        Return (IDES) /* \_SB_.PCI0.S184.IDES */
                    }

                    Method (_STM, 3, NotSerialized)  // _STM: Set Timing Mode
                    {
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, Zero)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            If (PEXT)
                            {
                                MODE = PMIO /* \_SB_.PCI0.S184.PMIO */
                                MODE |= 0x08
                                UMOD = PMDM /* \_SB_.PCI0.S184.PMDM */
                                UMOD |= 0x40
                            }

                            Concatenate (Local6, Local7, Local5)
                            Return (Concatenate (Local5, FZTF))
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, One)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            If (PEXT)
                            {
                                MODE = PSIO /* \_SB_.PCI0.S184.PSIO */
                                MODE |= 0x08
                                UMOD = PSDM /* \_SB_.PCI0.S184.PSDM */
                                UMOD |= 0x40
                            }

                            Concatenate (Local6, Local7, Local5)
                            Return (Concatenate (Local5, FZTF))
                        }
                    }
                }

                Device (SDE1)
                {
                    Name (_ADR, One)  // _ADR: Address
                    Method (_GTM, 0, NotSerialized)  // _GTM: Get Timing Mode
                    {
                        Local0 = Ones
                        Local1 = Ones
                        Local2 = Ones
                        Local3 = Ones
                        Local4 = 0x10
                        If (SEXT)
                        {
                            Local0 = DerefOf (Index (PIOT, SMIO))
                            Local1 = DerefOf (Index (DMAT, SMDM))
                            Local2 = DerefOf (Index (PIOT, SSIO))
                            Local3 = DerefOf (Index (DMAT, SSDM))
                            Local4 |= 0x0F
                        }

                        STM0 = Local0
                        STM1 = Local1
                        STM2 = Local2
                        STM3 = Local3
                        STM4 = Local4
                        Return (IDES) /* \_SB_.PCI0.S184.IDES */
                    }

                    Method (_STM, 3, NotSerialized)  // _STM: Set Timing Mode
                    {
                    }

                    Device (DRV0)
                    {
                        Name (_ADR, Zero)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            If (SEXT)
                            {
                                MODE = SMIO /* \_SB_.PCI0.S184.SMIO */
                                MODE |= 0x08
                                UMOD = SMDM /* \_SB_.PCI0.S184.SMDM */
                                UMOD |= 0x40
                            }

                            Concatenate (Local6, Local7, Local5)
                            Return (Concatenate (Local5, FZTF))
                        }
                    }

                    Device (DRV1)
                    {
                        Name (_ADR, One)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Local6 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            Local7 = Buffer (0x07)
                                {
                                     0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF         /* ....... */
                                }
                            CreateByteField (Local6, One, MODE)
                            CreateByteField (Local7, One, UMOD)
                            If (SEXT)
                            {
                                MODE = SSIO /* \_SB_.PCI0.S184.SSIO */
                                MODE |= 0x08
                                UMOD = SSDM /* \_SB_.PCI0.S184.SSDM */
                                UMOD |= 0x40
                            }

                            Concatenate (Local6, Local7, Local5)
                            Return (Concatenate (Local5, FZTF))
                        }
                    }
                }

                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x03, 0x04))
                }
            }

            Device (P0P1)
            {
                Name (_ADR, 0x00010000)  // _ADR: Address
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (PICM)
                    {
                        Return (AR01) /* \_SB_.AR01 */
                    }

                    Return (PR01) /* \_SB_.PR01 */
                }

                Device (VGA)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    OperationRegion (VSID, PCI_Config, Zero, 0x04)
                    Field (VSID, ByteAcc, NoLock, Preserve)
                    {
                        REG0,   32
                    }

                    Method (PRST, 0, NotSerialized)
                    {
                        If ((REG0 == Ones))
                        {
                            Return (Zero)
                        }
                        Else
                        {
                            Return (One)
                        }
                    }

                    Name (UPDN, One)
                    Name (NXTD, One)
                    Name (LCDM, One)
                    Name (CRTM, 0x02)
                    Name (TVOM, 0x04)
                    Name (HDMM, 0x10)
                    Name (DONE, Zero)
                    Name (DOSF, One)
                    Name (BRNC, Zero)
                    Method (_INI, 0, NotSerialized)  // _INI: Initialize
                    {
                        GETD ()
                    }

                    Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
                    {
                        DOSF = (Arg0 & 0x03)
                        BRNC = (Arg0 >> 0x02)
                        BRNC &= One
                    }

                    Method (_DOD, 0, NotSerialized)  // _DOD: Display Output Devices
                    {
                        If (((REG0 & 0xFFFF) == 0x1002))
                        {
                            Return (Package (0x03)
                            {
                                0x00010100, 
                                0x0210, 
                                0x00010110
                            })
                        }

                        If (((REG0 & 0xFFFF) == 0x10DE))
                        {
                            Return (Package (0x03)
                            {
                                0x00010100, 
                                0x0121, 
                                0x00010110
                            })
                        }

                        Return (Package (0x03)
                        {
                            0x00010100, 
                            0x0120, 
                            0x00010110
                        })
                    }

                    Device (CRTD)
                    {
                        Name (_ADR, 0x0100)  // _ADR: Address
                        Method (_DCS, 0, NotSerialized)  // _DCS: Display Current Status
                        {
                            Local0 = AVLD /* \AVLD */
                            If (Local0)
                            {
                                If ((Local0 & CRTM))
                                {
                                    Return (0x1F)
                                }
                            }

                            Return (0x1D)
                        }

                        Method (_DGS, 0, NotSerialized)  // _DGS: Display Graphics State
                        {
                            Local0 = (NXTD & CRTM) /* \_SB_.PCI0.P0P1.VGA_.CRTM */
                            If (Local0)
                            {
                                Return (One)
                            }

                            Return (Zero)
                        }

                        Method (_DSS, 1, NotSerialized)  // _DSS: Device Set State
                        {
                            If ((Arg0 & 0x40000000))
                            {
                                If ((Arg0 & 0x80000000))
                                {
                                    DONE = One
                                }
                            }
                        }
                    }

                    Device (HDMI)
                    {
                        Method (_ADR, 0, NotSerialized)  // _ADR: Address
                        {
                            If (((REG0 & 0xFFFF) == 0x1002))
                            {
                                Return (0x0211)
                            }

                            If (((REG0 & 0xFFFF) == 0x10DE))
                            {
                                Return (0x0121)
                            }

                            Return (0x0121)
                        }

                        Method (_DCS, 0, NotSerialized)  // _DCS: Display Current Status
                        {
                            Local0 = AVLD /* \AVLD */
                            If (Local0)
                            {
                                If ((Local0 & HDMM))
                                {
                                    Return (0x1F)
                                }
                            }

                            Return (0x1D)
                        }

                        Method (_DGS, 0, NotSerialized)  // _DGS: Display Graphics State
                        {
                            Local0 = (NXTD & HDMM) /* \_SB_.PCI0.P0P1.VGA_.HDMM */
                            If (Local0)
                            {
                                Return (One)
                            }

                            Return (Zero)
                        }

                        Method (_DSS, 1, NotSerialized)  // _DSS: Device Set State
                        {
                            If ((Arg0 & 0x40000000))
                            {
                                If ((Arg0 & 0x80000000))
                                {
                                    DONE = One
                                }
                            }
                        }
                    }

                    Device (LCDD)
                    {
                        Name (_ADR, 0x0110)  // _ADR: Address
                        Method (_DCS, 0, NotSerialized)  // _DCS: Display Current Status
                        {
                            Local0 = AVLD /* \AVLD */
                            If (Local0)
                            {
                                If ((Local0 & LCDM))
                                {
                                    Return (0x1F)
                                }
                            }

                            Return (0x1D)
                        }

                        Method (_DGS, 0, NotSerialized)  // _DGS: Display Graphics State
                        {
                            Local0 = (NXTD & LCDM) /* \_SB_.PCI0.P0P1.VGA_.LCDM */
                            If (Local0)
                            {
                                Return (One)
                            }

                            Return (Zero)
                        }

                        Method (_DSS, 1, NotSerialized)  // _DSS: Device Set State
                        {
                            If ((Arg0 & 0x40000000))
                            {
                                If ((Arg0 & 0x80000000))
                                {
                                    DONE = One
                                }
                            }
                        }

                        Method (_BCL, 0, NotSerialized)  // _BCL: Brightness Control Levels
                        {
                            Return (Package (0x10)
                            {
                                0x0F, 
                                0x0E, 
                                0x0D, 
                                0x0C, 
                                0x0B, 
                                0x0A, 
                                0x09, 
                                0x08, 
                                0x07, 
                                0x06, 
                                0x05, 
                                0x04, 
                                0x03, 
                                0x02, 
                                One, 
                                Zero
                            })
                        }

                        Name (BCBH, Zero)
                        Method (_BCM, 1, NotSerialized)  // _BCM: Brightness Control Method
                        {
                            If ((OSFG >= OSVT))
                            {
                                LBTN = Arg0
                                ^^^^SBRG.EC0.STBR ()
                                If (ATKP)
                                {
                                    If ((BCBH == One))
                                    {
                                        Notify (ATKD, (LBTN + 0x10))
                                    }

                                    If ((BCBH == 0x02))
                                    {
                                        Notify (ATKD, (LBTN + 0x20))
                                    }
                                }

                                BCBH = Zero
                            }
                        }

                        Method (_BQC, 0, NotSerialized)  // _BQC: Brightness Query Current
                        {
                            Return (LBTN) /* \LBTN */
                        }
                    }

                    Method (SWHD, 1, Serialized)
                    {
                        UPDN = One
                        If ((DOSF & 0x03))
                        {
                            SETD = Arg0
                            ISMI (0x94)
                        }
                        Else
                        {
                            NXTD = Arg0
                            DONE = Zero
                            Notify (VGA, 0x80) // Status Change
                            Local0 = 0x01F4
                            While (Local0)
                            {
                                If (DONE)
                                {
                                    Local0 = Zero
                                }
                                Else
                                {
                                    Sleep (0x0A)
                                    Local0--
                                }
                            }
                        }
                    }

                    Method (GETD, 0, NotSerialized)
                    {
                        ISMI (0x95)
                        Return (ACTD) /* \ACTD */
                    }

                    Method (ADVD, 0, NotSerialized)
                    {
                        If (UPDN)
                        {
                            GETD ()
                            SETD = ACTD /* \ACTD */
                            UPDN = Zero
                        }

                        ISMI (0xA0)
                        NXTD = SETD /* \SETD */
                        Return (SETD) /* \SETD */
                        Return (NXTD) /* \_SB_.PCI0.P0P1.VGA_.NXTD */
                    }

                    Method (NATK, 0, NotSerialized)
                    {
                        Return (One)
                    }

                    Method (UPBL, 0, NotSerialized)
                    {
                        Notify (LCDD, 0x86) // Device-Specific
                    }

                    Method (DWBL, 0, NotSerialized)
                    {
                        Notify (LCDD, 0x87) // Device-Specific
                    }
                }
            }

            Device (NPCE)
            {
                Name (_ADR, 0x001F0000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x09, 0x04))
                }
            }

            Device (P0P2)
            {
                Name (_ADR, 0x00060000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x09, 0x04))
                }

                Device (MPCI)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    OperationRegion (MINP, PCI_Config, Zero, 0x68)
                    Field (MINP, ByteAcc, NoLock, Preserve)
                    {
                        VNUM,   32, 
                        Offset (0x09), 
                        PINF,   8, 
                        SBCC,   8, 
                        BSCC,   8, 
                        Offset (0x2C), 
                        SNUM,   32, 
                        Offset (0x34)
                    }

                    Method (MPDP, 0, NotSerialized)
                    {
                        If ((SNUM == Ones))
                        {
                            Return (Zero)
                        }

                        If ((BSCC != 0x02))
                        {
                            Return (Zero)
                        }

                        Return (One)
                    }
                }
            }

            Device (P0P3)
            {
                Name (_ADR, 0x00070000)  // _ADR: Address
                Name (_HPP, Package (0x04)  // _HPP: Hot Plug Parameters
                {
                    0x08, 
                    0x40, 
                    One, 
                    Zero
                })
                OperationRegion (PCFG, PCI_Config, Zero, 0xFF)
                Field (PCFG, ByteAcc, NoLock, Preserve)
                {
                    Offset (0xEA), 
                        ,   3, 
                    PCHG,   1, 
                        ,   2, 
                    PSTS,   1
                }

                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (GPRW (0x09, 0x04))
                }

                Device (XCRD)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    OperationRegion (NCRD, PCI_Config, Zero, 0x08)
                    Field (NCRD, DWordAcc, NoLock, Preserve)
                    {
                        PVID,   16
                    }

                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If ((PVID == 0xFFFF))
                        {
                            Return (Zero)
                        }
                        Else
                        {
                            Return (0x0F)
                        }
                    }

                    Name (_RMV, Zero)  // _RMV: Removal Status
                }
            }

            Device (P394)
            {
                Name (_ADR, 0x000D0000)  // _ADR: Address
            }
        }
    }

    Scope (_SB.PCI0.SBRG)
    {
        Device (EC0)
        {
            Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */)  // _HID: Hardware ID
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IO (Decode16,
                    0x0062,             // Range Minimum
                    0x0062,             // Range Maximum
                    0x00,               // Alignment
                    0x01,               // Length
                    )
                IO (Decode16,
                    0x0066,             // Range Minimum
                    0x0066,             // Range Maximum
                    0x00,               // Alignment
                    0x01,               // Length
                    )
            })
            Name (_GPE, 0x19)  // _GPE: General Purpose Events
            Mutex (MUEC, 0x00)
            Mutex (ASIO, 0x00)
            Name (ECFL, Ones)
            Method (ECAV, 0, NotSerialized)
            {
                If ((_REV >= 0x02))
                {
                    Return (One)
                }

                If ((SLPN && (SLPT >= 0x04)))
                {
                    Return (Zero)
                }

                If ((ECFL == Ones))
                {
                    Return (Zero)
                }

                Return (ECFL) /* \_SB_.PCI0.SBRG.EC0_.ECFL */
            }

            OperationRegion (ECOR, EmbeddedControl, Zero, 0xFF)
            Field (ECOR, ByteAcc, Lock, Preserve)
            {
                Offset (0x04), 
                CMD1,   8, 
                CDT1,   8, 
                CDT2,   8, 
                CDT3,   8, 
                Offset (0x80), 
                EPWS,   8, 
                EB0S,   8, 
                EB1S,   8, 
                EB0R,   8, 
                EB1R,   8, 
                EPWF,   8, 
                Offset (0x87), 
                EB0T,   8, 
                EB1T,   8, 
                Offset (0x8A), 
                HKEN,   1, 
                Offset (0x93), 
                TAH0,   16, 
                TAH1,   16, 
                TSTP,   8, 
                Offset (0x9C), 
                CDT4,   8, 
                CDT5,   8, 
                Offset (0xA0), 
                ECPU,   8, 
                ECRT,   8, 
                EPSV,   8, 
                EACT,   8, 
                TH1R,   8, 
                TH1L,   8, 
                TH0R,   8, 
                TH0L,   8, 
                Offset (0xB0), 
                B0PN,   16, 
                B0VL,   16, 
                B0RC,   16, 
                B0FC,   16, 
                B0MD,   16, 
                B0ST,   16, 
                B0CC,   16, 
                B0TM,   16, 
                B0C1,   16, 
                B0C2,   16, 
                B0C3,   16, 
                B0C4,   16, 
                Offset (0xD0), 
                B1PN,   16, 
                B1VL,   16, 
                B1RC,   16, 
                B1FC,   16, 
                B1MD,   16, 
                B1ST,   16, 
                B1CC,   16, 
                B1TM,   16, 
                B1C1,   16, 
                B1C2,   16, 
                B1C3,   16, 
                B1C4,   16, 
                Offset (0xF0), 
                B0DC,   16, 
                B0DV,   16, 
                B0SN,   16, 
                Offset (0xF8), 
                B1DC,   16, 
                B1DV,   16, 
                B1SN,   16
            }

            Name (SMBF, Zero)
            OperationRegion (SMBX, EmbeddedControl, 0x18, 0x28)
            Field (SMBX, ByteAcc, NoLock, Preserve)
            {
                PRTC,   8, 
                SSTS,   5, 
                    ,   1, 
                ALFG,   1, 
                CDFG,   1, 
                ADDR,   8, 
                CMDB,   8, 
                BDAT,   256, 
                BCNT,   8, 
                    ,   1, 
                ALAD,   7, 
                ALD0,   8, 
                ALD1,   8
            }

            OperationRegion (SMB2, EmbeddedControl, 0x40, 0x28)
            Field (SMB2, ByteAcc, NoLock, Preserve)
            {
                PRT2,   8, 
                SST2,   5, 
                    ,   1, 
                ALF2,   1, 
                CDF2,   1, 
                ADD2,   8, 
                CMD2,   8, 
                BDA2,   256, 
                BCN2,   8, 
                    ,   1, 
                ALA2,   7, 
                ALR0,   8, 
                ALR1,   8
            }

            Field (SMB2, ByteAcc, NoLock, Preserve)
            {
                Offset (0x04), 
                DA20,   8, 
                DA21,   8
            }

            Field (SMBX, ByteAcc, NoLock, Preserve)
            {
                Offset (0x04), 
                DAT0,   8, 
                DAT1,   8
            }

            Field (SMBX, ByteAcc, NoLock, Preserve)
            {
                Offset (0x04), 
                DT2B,   16
            }

            OperationRegion (NSBS, EmbeddedControl, 0x40, 0x04)
            Field (NSBS, ByteAcc, NoLock, Preserve)
            {
                A2AD,   8, 
                A2D0,   8, 
                A2D1,   8, 
                A3AD,   8
            }

            Method (_INI, 0, NotSerialized)  // _INI: Initialize
            {
                If ((OSFG <= OSME))
                {
                    ECFL = One
                }
            }

            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If ((Arg0 == 0x03))
                {
                    ECFL = Arg1
                }
            }
        }
    }

    Scope (_SB)
    {
        OperationRegion (PCI0.SBRG.PIX0, PCI_Config, 0x41, 0x04)
        OperationRegion (PCI0.SBRG.PIX1, PCI_Config, 0x60, 0x04)
        Field (PCI0.SBRG.PIX0, ByteAcc, NoLock, Preserve)
        {
            PIRA,   8, 
            PIRB,   8, 
            PIRC,   8, 
            PIRD,   8
        }

        Field (PCI0.SBRG.PIX1, ByteAcc, NoLock, Preserve)
        {
            PIRE,   8, 
            PIRF,   8, 
            PIRG,   8, 
            PIRH,   8
        }

        Name (BUFA, ResourceTemplate ()
        {
            IRQ (Level, ActiveLow, Shared, )
                {15}
        })
        Device (LNKA)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, One)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRA & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSA) /* \_SB_.PRSA */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRA |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRA & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRA = Local0
            }
        }

        Device (LNKB)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, 0x02)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRB & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSB) /* \_SB_.PRSB */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRB |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRB & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRB = Local0
            }
        }

        Device (LNKC)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, 0x03)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRC & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSC) /* \_SB_.PRSC */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRC |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRC & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRC = Local0
            }
        }

        Device (LNKD)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, 0x04)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRD & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSD) /* \_SB_.PRSD */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRD |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRD & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRD = Local0
            }
        }

        Device (LNKE)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, 0x05)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRE & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSE) /* \_SB_.PRSE */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRE |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRE & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRE = Local0
            }
        }

        Device (LNKF)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, 0x06)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRF & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSF) /* \_SB_.PRSF */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRF |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRF & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRF = Local0
            }
        }

        Device (LNKG)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, 0x07)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRG & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSG) /* \_SB_.PRSG */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRG |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRG & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRG = Local0
            }
        }

        Device (LNKH)
        {
            Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
            Name (_UID, 0x08)  // _UID: Unique ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Local0 = (PIRH & 0x80)
                If (Local0)
                {
                    Return (0x09)
                }
                Else
                {
                    Return (0x0B)
                }
            }

            Method (_PRS, 0, NotSerialized)  // _PRS: Possible Resource Settings
            {
                Return (PRSH) /* \_SB_.PRSH */
            }

            Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
            {
                PIRH |= 0x80
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                CreateWordField (BUFA, One, IRA0)
                Local0 = (PIRH & 0x0F)
                Local1 = One
                IRA0 = (Local1 << Local0)
                Return (BUFA) /* \_SB_.BUFA */
            }

            Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
            {
                CreateWordField (Arg0, One, IRA)
                FindSetRightBit (IRA, Local0)
                Local0--
                PIRH = Local0
            }
        }
    }

    Scope (_SB)
    {
        Name (XCPD, Zero)
        Name (XNPT, One)
        Name (XCAP, 0x02)
        Name (XDCP, 0x04)
        Name (XDCT, 0x08)
        Name (XDST, 0x0A)
        Name (XLCP, 0x0C)
        Name (XLCT, 0x10)
        Name (XLST, 0x12)
        Name (XSCP, 0x14)
        Name (XSCT, 0x18)
        Name (XSST, 0x1A)
        Name (XRCT, 0x1C)
        Mutex (MUTE, 0x00)
        Method (RBPE, 1, NotSerialized)
        {
            Acquire (MUTE, 0x03E8)
            Local0 = (Arg0 + PCIB) /* \PCIB */
            OperationRegion (PCFG, SystemMemory, Local0, One)
            Field (PCFG, ByteAcc, NoLock, Preserve)
            {
                XCFG,   8
            }

            Release (MUTE)
            Return (XCFG) /* \_SB_.RBPE.XCFG */
        }

        Method (RWPE, 1, NotSerialized)
        {
            Acquire (MUTE, 0x03E8)
            Arg0 &= 0xFFFFFFFE
            Local0 = (Arg0 + PCIB) /* \PCIB */
            OperationRegion (PCFG, SystemMemory, Local0, 0x02)
            Field (PCFG, WordAcc, NoLock, Preserve)
            {
                XCFG,   16
            }

            Release (MUTE)
            Return (XCFG) /* \_SB_.RWPE.XCFG */
        }

        Method (RDPE, 1, NotSerialized)
        {
            Acquire (MUTE, 0x03E8)
            Arg0 &= 0xFFFFFFFC
            Local0 = (Arg0 + PCIB) /* \PCIB */
            OperationRegion (PCFG, SystemMemory, Local0, 0x04)
            Field (PCFG, DWordAcc, NoLock, Preserve)
            {
                XCFG,   32
            }

            Release (MUTE)
            Return (XCFG) /* \_SB_.RDPE.XCFG */
        }

        Method (WBPE, 2, NotSerialized)
        {
            Acquire (MUTE, 0x0FFF)
            Local0 = (Arg0 + PCIB) /* \PCIB */
            OperationRegion (PCFG, SystemMemory, Local0, One)
            Field (PCFG, ByteAcc, NoLock, Preserve)
            {
                XCFG,   8
            }

            XCFG = Arg1
            Release (MUTE)
        }

        Method (WWPE, 2, NotSerialized)
        {
            Acquire (MUTE, 0x03E8)
            Arg0 &= 0xFFFFFFFE
            Local0 = (Arg0 + PCIB) /* \PCIB */
            OperationRegion (PCFG, SystemMemory, Local0, 0x02)
            Field (PCFG, WordAcc, NoLock, Preserve)
            {
                XCFG,   16
            }

            XCFG = Arg1
            Release (MUTE)
        }

        Method (WDPE, 2, NotSerialized)
        {
            Acquire (MUTE, 0x03E8)
            Arg0 &= 0xFFFFFFFC
            Local0 = (Arg0 + PCIB) /* \PCIB */
            OperationRegion (PCFG, SystemMemory, Local0, 0x04)
            Field (PCFG, DWordAcc, NoLock, Preserve)
            {
                XCFG,   32
            }

            XCFG = Arg1
            Release (MUTE)
        }

        Method (RWDP, 3, NotSerialized)
        {
            Acquire (MUTE, 0x03E8)
            Arg0 &= 0xFFFFFFFC
            Local0 = (Arg0 + PCIB) /* \PCIB */
            OperationRegion (PCFG, SystemMemory, Local0, 0x04)
            Field (PCFG, DWordAcc, NoLock, Preserve)
            {
                XCFG,   32
            }

            Local1 = (XCFG & Arg2)
            XCFG = (Local1 | Arg1)
            Release (MUTE)
        }

        Method (RPME, 1, NotSerialized)
        {
            Local0 = (Arg0 + 0x84)
            Local1 = RDPE (Local0)
            If ((Local1 == Ones))
            {
                Return (Zero)
            }
            Else
            {
                If ((Local1 && 0x00010000))
                {
                    WDPE (Local0, (Local1 & 0x00010000))
                    Return (One)
                }

                Return (Zero)
            }
        }
    }

    Scope (_SB.PCI0)
    {
        Name (SUPP, Zero)
        Name (CTRL, Zero)
        Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
        {
            If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */))
            {
                CreateDWordField (Arg3, Zero, CDW1)
                CreateDWordField (Arg3, 0x04, CDW2)
                CreateDWordField (Arg3, 0x08, CDW3)
                SUPP = CDW2 /* \_SB_.PCI0._OSC.CDW2 */
                CTRL = CDW3 /* \_SB_.PCI0._OSC.CDW3 */
                If (((SUPP & 0x16) != 0x16))
                {
                    CTRL &= 0x1E
                }

                CTRL &= 0x1D
                If (~(CDW1 & One))
                {
                    If ((CTRL & One)) {}
                    If ((CTRL & 0x04))
                    {
                        CTRL &= 0xFB
                    }

                    If ((CTRL & 0x10)) {}
                }

                If ((Arg1 != One))
                {
                    CDW1 |= 0x08
                }

                If ((CDW3 != CTRL))
                {
                    CDW1 |= 0x10
                }

                CDW3 = CTRL /* \_SB_.PCI0.CTRL */
                Return (Arg3)
            }
            Else
            {
                CDW1 |= 0x04
                Return (Arg3)
            }
        }
    }

    Scope (_SB.PCI0.SBRG.EC0)
    {
        OperationRegion (ECIO, SystemIO, 0x025C, 0x10)
        Field (ECIO, ByteAcc, Lock, Preserve)
        {
            ECDT,   8, 
            ECCM,   8
        }

        Method (GBTT, 1, Serialized)
        {
            If (ECAV ())
            {
                If ((Arg0 == Zero))
                {
                    Local0 = EB0T /* \_SB_.PCI0.SBRG.EC0_.EB0T */
                }
                Else
                {
                    Local0 = EB1T /* \_SB_.PCI0.SBRG.EC0_.EB1T */
                }
            }
            Else
            {
                Local0 = 0xFF
            }

            Return (Local0)
        }

        Method (WCMD, 1, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    CMD1 = Arg0
                    Release (MUEC)
                }
            }
        }

        Method (DLY0, 1, Serialized)
        {
            If (!ECAV ())
            {
                Return (Ones)
            }

            Local0 = Ones
            If ((Acquire (MUEC, 0xFFFF) == Zero))
            {
                CDT1 = Arg0
                CDT2 = 0x6B
                CDT3 = Zero
                CMD1 = 0xBB
                Local1 = 0x7F
                While ((Local1 && CMD1))
                {
                    Sleep (One)
                    Local1--
                }

                If ((CMD1 == Zero))
                {
                    Local0 = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                }

                Release (MUEC)
            }

            Return (Local0)
        }

        Method (RRAM, 1, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    Local0 = Arg0
                    Local1 = (Local0 & 0xFF)
                    Local0 >>= 0x08
                    Local0 &= 0xFF
                    CDT3 = Local1
                    CDT2 = Local0
                    CDT1 = 0x80
                    CMD1 = 0xB6
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    If ((CMD1 == Zero))
                    {
                        Local0 = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                    }
                    Else
                    {
                        Local0 = Ones
                    }

                    Release (MUEC)
                    Return (Local0)
                }
            }

            Return (Ones)
        }

        Method (WRAM, 2, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    Local0 = Arg0
                    Local1 = (Local0 & 0xFF)
                    Local0 >>= 0x08
                    Local0 &= 0xFF
                    CDT3 = Local1
                    CDT2 = Local0
                    CDT1 = 0x81
                    CDT4 = Arg1
                    CMD1 = 0xB6
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    If ((CMD1 == Zero))
                    {
                        Local0 = One
                    }
                    Else
                    {
                        Local0 = Ones
                    }

                    Release (MUEC)
                    Return (Local0)
                }
            }

            Return (Ones)
        }

        Method (STBR, 0, Serialized)
        {
            Local0 = (VGAF & 0x04)
            If (Local0)
            {
                ISMI (0x9A)
            }
            Else
            {
                If (ACAP ())
                {
                    Local0 = DerefOf (Index (PWAC, LBTN))
                }
                Else
                {
                    Local0 = DerefOf (Index (PWDC, LBTN))
                }

                WBOV (Zero, Local0)
            }
        }

        Method (SBRV, 1, Serialized)
        {
            WBOV (Zero, Arg0)
        }

        Name (DECF, Zero)
        Method (SFNV, 2, Serialized)
        {
            If ((Arg0 == Zero))
            {
                If ((DECF & One))
                {
                    Local0 = RRAM (0x0521)
                    Local0 |= 0x80
                    WRAM (0x0521, Local0)
                }

                If ((DECF & 0x02))
                {
                    Local0 = RRAM (0x0522)
                    Local0 |= 0x80
                    WRAM (0x0522, Local0)
                }

                DECF = Zero
                Return (Zero)
            }

            If ((Arg0 == One))
            {
                Local0 = RRAM (0x0521)
                Local0 &= 0x7F
                WRAM (0x0521, Local0)
                DECF |= One
                WFOV (Zero, Arg1)
                Return (Zero)
            }

            If ((Arg0 == 0x02))
            {
                Local0 = RRAM (0x0522)
                Local0 &= 0x7F
                WRAM (0x0522, Local0)
                DECF |= 0x02
                WFOV (One, Arg1)
                Return (Zero)
            }

            Return (Zero)
        }

        Method (SADC, 2, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    CDT1 = Arg0
                    CDT2 = Arg1
                    CMD1 = 0xC4
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    If ((CMD1 == Zero))
                    {
                        Local0 = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                    }
                    Else
                    {
                        Local0 = Ones
                    }

                    Release (MUEC)
                    Return (Local0)
                }
            }

            Return (Ones)
        }

        Method (SBQH, 3, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    CDT1 = Arg0
                    CDT2 = Arg1
                    CMD1 = Arg2
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    If ((CMD1 == Zero))
                    {
                        Local0 = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                    }
                    Else
                    {
                        Local0 = Ones
                    }

                    Release (MUEC)
                    Return (Local0)
                }
            }

            Return (Ones)
        }

        Method (SPIN, 2, Serialized)
        {
            Local0 = Arg0
            If (Arg1)
            {
                Local0 |= 0x20
            }
            Else
            {
                Local0 |= 0x40
            }

            STC5 (Local0)
            Return (One)
        }

        Method (RPIN, 1, Serialized)
        {
            Local0 = (Arg0 & 0x1F)
            Local1 = STC5 (Local0)
            Return (Local1)
        }

        Method (ST87, 2, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    CDT1 = 0x87
                    CDT2 = Arg0
                    CDT3 = Arg1
                    CMD1 = 0xB6
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    If ((CMD1 == Zero))
                    {
                        Local0 = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                    }
                    Else
                    {
                        Local0 = Ones
                    }

                    Release (MUEC)
                    Return (Local0)
                }
            }

            Return (Ones)
        }

        Method (STC5, 1, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    CDT1 = Arg0
                    CMD1 = 0xC5
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    If ((CMD1 == Zero))
                    {
                        Local0 = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                    }
                    Else
                    {
                        Local0 = Ones
                    }

                    Release (MUEC)
                    Return (Local0)
                }
            }

            Return (Ones)
        }

        Method (RBAT, 2, Serialized)
        {
            If (!ECAV ())
            {
                Return (Ones)
            }

            If ((Acquire (MUEC, 0xFFFF) == Zero))
            {
                Local0 = 0x03
                While (Local0)
                {
                    CDT2 = Arg0
                    Local1 = Arg1
                    Local1 <<= One
                    Local1 += 0xDA
                    CMD1 = Local1
                    Local1 = 0x7F
                    While ((CMD1 && Local1))
                    {
                        Local1--
                        Sleep (One)
                    }

                    If ((CMD1 == Zero))
                    {
                        Local1 = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                        Local0 = Zero
                    }
                    Else
                    {
                        Local1 = Ones
                        Local0--
                    }
                }

                Release (MUEC)
                Return (Local1)
            }

            Return (Ones)
        }

        Method (WBAT, 3, Serialized)
        {
            Local3 = (Arg0 | 0x80)
            If (!ECAV ())
            {
                Return (Ones)
            }

            If ((Acquire (MUEC, 0xFFFF) == Zero))
            {
                Local0 = 0x03
                While (Local0)
                {
                    CDT1 = Arg2
                    CDT2 = Local3
                    Local1 = Arg1
                    Local1 <<= One
                    Local1 += 0xDA
                    CMD1 = Local1
                    Local1 = 0x7F
                    While ((CMD1 && Local1))
                    {
                        Local1--
                        Sleep (One)
                    }
                }

                Release (MUEC)
                Return (Local1)
            }

            Return (Ones)
        }

        Method (FNCT, 2, Serialized)
        {
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    CDT2 = Arg0
                    CDT1 = Arg1
                    CMD1 = 0xC4
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    Release (MUEC)
                }
            }
        }

        Name (WRQK, 0x02)
        Name (RDQK, 0x03)
        Name (SDBT, 0x04)
        Name (RCBT, 0x05)
        Name (WRBT, 0x06)
        Name (RDBT, 0x07)
        Name (WRWD, 0x08)
        Name (RDWD, 0x09)
        Name (WRBL, 0x0A)
        Name (RDBL, 0x0B)
        Name (PCLL, 0x0C)
        Name (GOOD, Zero)
        Name (UKER, 0x07)
        Name (DAER, 0x10)
        Name (CMDN, 0x12)
        Name (UKE2, 0x13)
        Name (DADN, 0x17)
        Name (SBTO, 0x18)
        Name (USPT, 0x19)
        Name (SBBY, 0x1A)
        Method (SWTC, 1, Serialized)
        {
            Local0 = UKER /* \_SB_.PCI0.SBRG.EC0_.UKER */
            Local1 = 0x03
            While ((Local0 && Local1))
            {
                Local2 = 0x23
                While (Local2)
                {
                    If (PRTC)
                    {
                        Sleep (One)
                        Local2--
                    }
                    Else
                    {
                        Local2 = Zero
                        Local0 = SSTS /* \_SB_.PCI0.SBRG.EC0_.SSTS */
                    }
                }

                If (Local0)
                {
                    PRTC = Zero
                    Local1--
                    If (Local1)
                    {
                        Sleep (One)
                        PRTC = Arg0
                    }
                }
            }

            Return (Local0)
        }

        Method (SMBR, 3, Serialized)
        {
            Local0 = Package (0x03)
                {
                    0x07, 
                    Zero, 
                    Zero
                }
            If (!ECAV ())
            {
                Return (Local0)
            }

            If ((Arg0 != RDBL))
            {
                If ((Arg0 != RDWD))
                {
                    If ((Arg0 != RDBT))
                    {
                        If ((Arg0 != RCBT))
                        {
                            If ((Arg0 != RDQK))
                            {
                                Return (Local0)
                            }
                        }
                    }
                }
            }

            If ((Acquire (MUEC, 0xFFFF) == Zero))
            {
                Local1 = PRTC /* \_SB_.PCI0.SBRG.EC0_.PRTC */
                Local2 = Zero
                While ((Local1 != Zero))
                {
                    Stall (0x0A)
                    Local2++
                    If ((Local2 > 0x03E8))
                    {
                        Index (Local0, Zero) = SBBY /* \_SB_.PCI0.SBRG.EC0_.SBBY */
                        Local1 = Zero
                    }
                    Else
                    {
                        Local1 = PRTC /* \_SB_.PCI0.SBRG.EC0_.PRTC */
                    }
                }

                If ((Local2 <= 0x03E8))
                {
                    Local3 = (Arg1 << One)
                    Local3 |= One
                    ADDR = Local3
                    If ((Arg0 != RDQK))
                    {
                        If ((Arg0 != RCBT))
                        {
                            CMDB = Arg2
                        }
                    }

                    BDAT = Zero
                    PRTC = Arg0
                    Index (Local0, Zero) = SWTC (Arg0)
                    If ((DerefOf (Index (Local0, Zero)) == Zero))
                    {
                        If ((Arg0 == RDBL))
                        {
                            Index (Local0, One) = BCNT /* \_SB_.PCI0.SBRG.EC0_.BCNT */
                            Index (Local0, 0x02) = BDAT /* \_SB_.PCI0.SBRG.EC0_.BDAT */
                        }

                        If ((Arg0 == RDWD))
                        {
                            Index (Local0, One) = 0x02
                            Index (Local0, 0x02) = DT2B /* \_SB_.PCI0.SBRG.EC0_.DT2B */
                        }

                        If ((Arg0 == RDBT))
                        {
                            Index (Local0, One) = One
                            Index (Local0, 0x02) = DAT0 /* \_SB_.PCI0.SBRG.EC0_.DAT0 */
                        }

                        If ((Arg0 == RCBT))
                        {
                            Index (Local0, One) = One
                            Index (Local0, 0x02) = DAT0 /* \_SB_.PCI0.SBRG.EC0_.DAT0 */
                        }
                    }
                }

                Release (MUEC)
            }

            Return (Local0)
        }

        Method (SMBW, 5, Serialized)
        {
            Local0 = Package (0x01)
                {
                    0x07
                }
            If (!ECAV ())
            {
                Return (Local0)
            }

            If ((Arg0 != WRBL))
            {
                If ((Arg0 != WRWD))
                {
                    If ((Arg0 != WRBT))
                    {
                        If ((Arg0 != SDBT))
                        {
                            If ((Arg0 != WRQK))
                            {
                                Return (Local0)
                            }
                        }
                    }
                }
            }

            If ((Acquire (MUEC, 0xFFFF) == Zero))
            {
                Local1 = PRTC /* \_SB_.PCI0.SBRG.EC0_.PRTC */
                Local2 = Zero
                While ((Local1 != Zero))
                {
                    Stall (0x0A)
                    Local2++
                    If ((Local2 > 0x03E8))
                    {
                        Index (Local0, Zero) = SBBY /* \_SB_.PCI0.SBRG.EC0_.SBBY */
                        Local1 = Zero
                    }
                    Else
                    {
                        Local1 = PRTC /* \_SB_.PCI0.SBRG.EC0_.PRTC */
                    }
                }

                If ((Local2 <= 0x03E8))
                {
                    BDAT = Zero
                    Local3 = (Arg1 << One)
                    ADDR = Local3
                    If ((Arg0 != WRQK))
                    {
                        If ((Arg0 != SDBT))
                        {
                            CMDB = Arg2
                        }
                    }

                    If ((Arg0 == WRBL))
                    {
                        BCNT = Arg3
                        BDAT = Arg4
                    }

                    If ((Arg0 == WRWD))
                    {
                        DT2B = Arg4
                    }

                    If ((Arg0 == WRBT))
                    {
                        DAT0 = Arg4
                    }

                    If ((Arg0 == SDBT))
                    {
                        DAT0 = Arg4
                    }

                    PRTC = Arg0
                    Index (Local0, Zero) = SWTC (Arg0)
                }

                Release (MUEC)
            }

            Return (Local0)
        }

        Mutex (MUEP, 0x00)
        Method (RBEP, 1, NotSerialized)
        {
            Local1 = 0xFFFF
            If ((Acquire (MUEP, 0xFFFF) == Zero))
            {
                Local3 = RRAM (0x0620)
                Local4 = (Local3 & 0x7F)
                WRAM (0x0620, Local4)
                Local2 = 0x10
                Local1 = 0x10
                While (((Local1 == 0x10) & (Local2 != Zero)))
                {
                    SMBW (WRWD, BADR, Zero, 0x02, 0x0635)
                    SMBW (WRWD, BADR, Zero, 0x02, 0x0606)
                    Local0 = SMBR (RDBT, 0x50, Arg0)
                    Local1 = DerefOf (Index (Local0, Zero))
                    Local2--
                }

                WRAM (0x0620, Local3)
                Local1 <<= 0x08
                Local1 |= DerefOf (Index (Local0, 0x02))
                Release (MUEP)
            }

            Return (Local1)
        }

        Method (WBEP, 2, NotSerialized)
        {
            Local1 = 0xFFFF
            If ((Acquire (MUEP, 0xFFFF) == Zero))
            {
                Local3 = RRAM (0x0620)
                Local4 = (Local3 & 0x7F)
                WRAM (0x0620, Local4)
                Local2 = 0x10
                Local1 = 0x10
                While (((Local1 == 0x10) & (Local2 != Zero)))
                {
                    SMBW (WRWD, BADR, Zero, 0x02, 0x0635)
                    SMBW (WRWD, BADR, Zero, 0x02, 0x0606)
                    Local0 = SMBW (WRBT, 0x50, Arg0, One, Arg1)
                    Local1 = DerefOf (Index (Local0, Zero))
                    Local2--
                }

                WRAM (0x0620, Local3)
                Release (MUEP)
            }

            Return (Local1)
        }

        Method (ECXT, 6, NotSerialized)
        {
            Local1 = Package (0x06)
                {
                    0x10, 
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero
                }
            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    CDT1 = Arg1
                    CDT2 = Arg2
                    CDT3 = Arg3
                    CDT4 = Arg4
                    CDT5 = Arg5
                    CMD1 = Arg0
                    Local0 = 0x7F
                    While ((Local0 && CMD1))
                    {
                        Sleep (One)
                        Local0--
                    }

                    If (Local0)
                    {
                        Index (Local1, Zero) = Zero
                        Index (Local1, One) = CDT1 /* \_SB_.PCI0.SBRG.EC0_.CDT1 */
                        Index (Local1, 0x02) = CDT2 /* \_SB_.PCI0.SBRG.EC0_.CDT2 */
                        Index (Local1, 0x03) = CDT3 /* \_SB_.PCI0.SBRG.EC0_.CDT3 */
                        Index (Local1, 0x04) = CDT4 /* \_SB_.PCI0.SBRG.EC0_.CDT4 */
                        Index (Local1, 0x05) = CDT5 /* \_SB_.PCI0.SBRG.EC0_.CDT5 */
                    }
                    Else
                    {
                        Index (Local1, Zero) = 0x10
                    }

                    Release (MUEC)
                }
            }

            Return (Local1)
        }

        Method (ECSB, 6, NotSerialized)
        {
            Local1 = Package (0x05)
                {
                    0x11, 
                    Zero, 
                    Zero, 
                    Zero, 
                    Zero
                }
            If ((Arg0 > One))
            {
                Return (Local1)
            }

            If (ECAV ())
            {
                If ((Acquire (MUEC, 0xFFFF) == Zero))
                {
                    If ((Arg0 == Zero))
                    {
                        ADDR = Arg2
                        CMDB = Arg3
                        DAT0 = Arg4
                        DAT1 = Arg5
                        PRTC = Arg1
                    }
                    Else
                    {
                        ADD2 = Arg2
                        CMD2 = Arg3
                        DA20 = Arg4
                        DA21 = Arg5
                        PRT2 = Arg1
                    }

                    Local0 = 0x7F
                    While (PRTC)
                    {
                        Sleep (One)
                        Local0--
                    }

                    If (Local0)
                    {
                        If ((Arg0 == Zero))
                        {
                            Local0 = SSTS /* \_SB_.PCI0.SBRG.EC0_.SSTS */
                            Index (Local1, One) = DAT0 /* \_SB_.PCI0.SBRG.EC0_.DAT0 */
                            Index (Local1, 0x02) = DAT1 /* \_SB_.PCI0.SBRG.EC0_.DAT1 */
                            Index (Local1, 0x03) = BCNT /* \_SB_.PCI0.SBRG.EC0_.BCNT */
                            Index (Local1, 0x04) = BDAT /* \_SB_.PCI0.SBRG.EC0_.BDAT */
                        }
                        Else
                        {
                            Local0 = SST2 /* \_SB_.PCI0.SBRG.EC0_.SST2 */
                            Index (Local1, One) = DA20 /* \_SB_.PCI0.SBRG.EC0_.DA20 */
                            Index (Local1, 0x02) = DA21 /* \_SB_.PCI0.SBRG.EC0_.DA21 */
                            Index (Local1, 0x03) = BCN2 /* \_SB_.PCI0.SBRG.EC0_.BCN2 */
                            Index (Local1, 0x04) = BDA2 /* \_SB_.PCI0.SBRG.EC0_.BDA2 */
                        }

                        Local0 &= 0x1F
                        If (Local0)
                        {
                            Local0 += 0x10
                        }

                        Index (Local1, Zero) = Local0
                    }
                    Else
                    {
                        Index (Local1, Zero) = 0x10
                    }

                    Release (MUEC)
                }
            }

            Return (Local1)
        }

        OperationRegion (KAID, SystemIO, 0x025C, One)
        Field (KAID, ByteAcc, NoLock, Preserve)
        {
            AEID,   8
        }

        OperationRegion (KAIC, SystemIO, 0x025D, One)
        Field (KAIC, ByteAcc, NoLock, Preserve)
        {
            AEIC,   8
        }

        Method (WEIE, 0, Serialized)
        {
            Local0 = 0x4000
            Local1 = (AEIC & 0x02)
            While (((Local0 != Zero) && (Local1 == 0x02)))
            {
                Local1 = (AEIC & 0x02)
                Local0--
            }
        }

        Method (WEOF, 0, Serialized)
        {
            Local0 = 0x4000
            Local1 = (AEIC & One)
            While (((Local0 != Zero) && (Local1 == Zero)))
            {
                Local1 = (AEIC & One)
                Local0--
            }
        }

        Method (RFOV, 1, Serialized)
        {
            Local0 = Zero
            If ((Acquire (ASIO, 0xFFFF) == Zero))
            {
                WEIE ()
                AEIC = 0x83
                WEIE ()
                AEID = Arg0
                WEOF ()
                Local0 = AEID /* \_SB_.PCI0.SBRG.EC0_.AEID */
                WEIE ()
                Release (ASIO)
            }

            Return (Local0)
        }

        Method (WFOV, 2, Serialized)
        {
            If ((Acquire (ASIO, 0xFFFF) == Zero))
            {
                WEIE ()
                AEIC = 0x84
                WEIE ()
                AEID = Arg0
                WEIE ()
                AEID = Arg1
                Release (ASIO)
            }
        }

        Method (RBOV, 1, Serialized)
        {
            Local0 = Zero
            If ((Acquire (ASIO, 0xFFFF) == Zero))
            {
                WEIE ()
                AEIC = 0x85
                WEIE ()
                AEID = Arg0
                WEOF ()
                Local0 = AEID /* \_SB_.PCI0.SBRG.EC0_.AEID */
                WEIE ()
                Release (ASIO)
            }

            Return (Local0)
        }

        Method (WBOV, 2, Serialized)
        {
            If ((Acquire (ASIO, 0xFFFF) == Zero))
            {
                WEIE ()
                AEIC = 0x86
                WEIE ()
                AEID = Arg0
                WEIE ()
                AEID = Arg1
                Release (ASIO)
            }
        }

        Method (WMFN, 1, Serialized)
        {
            If ((Acquire (ASIO, 0xFFFF) == Zero))
            {
                WEIE ()
                AEIC = 0x98
                WEIE ()
                AEID = Arg0
                WEIE ()
                Release (ASIO)
            }
        }
    }

    Scope (_SB.PCI0.SBRG.EC0)
    {
        Method (ACPS, 0, Serialized)
        {
            Return ((GPWS () & One))
        }

        Method (DCPS, 1, Serialized)
        {
            Local0 = GPWS ()
            If (Arg0)
            {
                Local0 &= 0x04
            }
            Else
            {
                Local0 &= 0x02
            }

            If (Local0)
            {
                Local0 = One
            }
            Else
            {
                Local0 = Zero
            }

            Return (Local0)
        }

        Method (GPWS, 0, Serialized)
        {
            If (ECAV ())
            {
                Local0 = (EPWS & 0x07)
            }
            Else
            {
                Local0 = Zero
            }

            Return (Local0)
        }

        Method (BCHG, 1, Serialized)
        {
            If (Arg0)
            {
                If (ECAV ())
                {
                    Local0 = EB1S /* \_SB_.PCI0.SBRG.EC0_.EB1S */
                    Local0 &= 0xFF
                    If ((Local0 != 0xFF))
                    {
                        Local0 &= 0x02
                    }
                    Else
                    {
                        Local0 = Zero
                    }
                }
                Else
                {
                    Local0 = Zero
                }

                Return (Local0)
            }
            Else
            {
                If (ECAV ())
                {
                    Local0 = EB0S /* \_SB_.PCI0.SBRG.EC0_.EB0S */
                    Local0 &= 0xFF
                    If ((Local0 != 0xFF))
                    {
                        Local0 &= 0x02
                    }
                    Else
                    {
                        Local0 = Zero
                    }
                }
                Else
                {
                    Local0 = Zero
                }

                Return (Local0)
            }
        }

        Method (BCLE, 1, Serialized)
        {
            If (Arg0)
            {
                If (ECAV ())
                {
                    Local1 = EB1S /* \_SB_.PCI0.SBRG.EC0_.EB1S */
                    Local1 &= 0xFFFF
                    If ((Local1 != 0xFFFF))
                    {
                        Local1 &= 0x16
                        If ((Local1 == 0x04))
                        {
                            Local0 = Zero
                        }
                        Else
                        {
                            If ((Local1 == 0x02))
                            {
                                Local0 = One
                            }
                            Else
                            {
                                If ((Local1 == 0x10))
                                {
                                    Local0 = One
                                }
                            }
                        }
                    }

                    Local0 = Ones
                }
                Else
                {
                    Local0 = Ones
                }

                Return (Local0)
            }
            Else
            {
                If (ECAV ())
                {
                    Local1 = EB0S /* \_SB_.PCI0.SBRG.EC0_.EB0S */
                    Local1 &= 0xFFFF
                    If ((Local1 != 0xFFFF))
                    {
                        Local1 &= 0x16
                        If ((Local1 == 0x04))
                        {
                            Local0 = Zero
                        }
                        Else
                        {
                            If ((Local1 == 0x02))
                            {
                                Local0 = One
                            }
                            Else
                            {
                                If ((Local1 == 0x10))
                                {
                                    Local0 = One
                                }
                            }
                        }
                    }

                    Local0 = Ones
                }
                Else
                {
                    Local0 = Ones
                }

                Return (Local0)
            }
        }

        Method (CHBT, 1, Serialized)
        {
            If (ECAV ())
            {
                Local1 = GBTT (Arg0)
                If ((Local1 == 0xFF))
                {
                    Local0 = Zero
                }
                Else
                {
                    Local0 = (Local1 & 0x10)
                    If (Local0)
                    {
                        Local0 = One
                    }
                }
            }
            Else
            {
                Local0 = DCTP /* \DCTP */
            }

            Return (Local0)
        }

        Method (TACH, 1, NotSerialized)
        {
            If (ECAV ())
            {
                If (Arg0)
                {
                    If ((DECF & 0x02))
                    {
                        Local0 = RRAM (0x1820)
                        Local1 = RRAM (0x1821)
                        Local1 <<= 0x08
                        Local0 += Local1
                    }
                    Else
                    {
                        Local0 = TAH1 /* \_SB_.PCI0.SBRG.EC0_.TAH1 */
                    }
                }
                Else
                {
                    If ((DECF & One))
                    {
                        Local0 = RRAM (0x181E)
                        Local1 = RRAM (0x181F)
                        Local1 <<= 0x08
                        Local0 += Local1
                    }
                    Else
                    {
                        Local0 = TAH0 /* \_SB_.PCI0.SBRG.EC0_.TAH0 */
                    }
                }

                Local0 &= 0xFFFF
                If ((Local0 != Zero))
                {
                    If ((Local0 == 0xFFFF))
                    {
                        Local0 = Zero
                    }
                    Else
                    {
                        Local1 = 0x80
                        Local2 = 0x02
                        Local3 = (Local1 * Local2)
                        Local4 = (Local0 * Local3)
                        Divide (0x03938700, Local4, Local5, Local6)
                        Local6 *= 0x0A
                        Local0 = Local6
                    }
                }
                Else
                {
                    Local0 = Zero
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Name (HKFG, Zero)
        Method (EC0S, 1, NotSerialized)
        {
            If ((Arg0 == 0x03)) {}
            HKFG = HKEN /* \_SB_.PCI0.SBRG.EC0_.HKEN */
        }

        Method (EC0W, 1, NotSerialized)
        {
            If ((Arg0 == 0x03))
            {
                STBR ()
            }

            If ((Arg0 <= 0x04))
            {
                ACPF = ACPS ()
                DCPF = DCPS (Zero)
                Notify (\_PR.P001, 0x80) // Performance Capability Change
                If ((CPUN >= 0x02))
                {
                    Notify (\_PR.P002, 0x80) // Performance Capability Change
                }
            }

            If ((Arg0 >= 0x04))
            {
                HKEN = HKFG /* \_SB_.PCI0.SBRG.EC0_.HKFG */
            }
        }
    }

    Scope (\)
    {
        Name (TSP, 0x0A)
        Name (TC1, 0x02)
        Name (TC2, 0x0A)
    }

    Scope (_TZ)
    {
        Method (KELV, 1, NotSerialized)
        {
            Local0 = (Arg0 & 0xFF)
            If ((Local0 >= 0x80))
            {
                Local0 -= 0x0100
                Local0 *= 0x0A
                Local0 -= 0x0AAC
                Return (Local0)
            }

            Local0 *= 0x0A
            Local0 += 0x0AAC
            Return (Local0)
        }

        Method (CELC, 1, NotSerialized)
        {
            Local0 = (Arg0 - 0x0AAC)
            Divide (Local0, 0x0A, Local1, Local0)
            Return (Local0)
        }

        Name (PLCY, Zero)
        ThermalZone (THRM)
        {
            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                RCRT ()
                Return (KELV (TCRT))
            }

            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Local1 = 0x05
                While (Local1)
                {
                    Local0 = RTMP ()
                    If ((Local0 > TCRT))
                    {
                        Local1--
                    }
                    Else
                    {
                        Local1 = Zero
                    }
                }

                Return (KELV (Local0))
            }

            Method (_PSL, 0, Serialized)  // _PSL: Passive List
            {
                If ((CPUN >= 0x02))
                {
                    Return (Package (0x02)
                    {
                        \_PR.P001, 
                        \_PR.P002
                    })
                }

                Return (Package (0x01)
                {
                    \_PR.P001
                })
            }

            Method (_TSP, 0, NotSerialized)  // _TSP: Thermal Sampling Period
            {
                Local0 = (TSP * 0x0A)
                Return (Local0)
            }

            Method (_TC1, 0, NotSerialized)  // _TC1: Thermal Constant 1
            {
                Return (TC1) /* \TC1_ */
            }

            Method (_TC2, 0, NotSerialized)  // _TC2: Thermal Constant 2
            {
                Return (TC2) /* \TC2_ */
            }

            Method (_PSV, 0, NotSerialized)  // _PSV: Passive Temperature
            {
                RPSV ()
                If (PLCY)
                {
                    Return (KELV (PPSV))
                }
                Else
                {
                    Return (KELV (TPSV))
                }
            }

            Method (_SCP, 1, NotSerialized)  // _SCP: Set Cooling Policy
            {
                PLCY = Zero
                Notify (THRM, 0x81) // Thermal Trip Point Change
            }
        }
    }

    Scope (_TZ)
    {
        Name (ATMP, 0x3C)
        Name (LTMP, 0x3C)
        Name (FANS, Zero)
        Method (RTMP, 0, NotSerialized)
        {
            If (\_SB.PCI0.SBRG.EC0.ECAV ())
            {
                Local0 = \_SB.PCI0.SBRG.EC0.ECPU
                If ((Local0 < 0x80))
                {
                    LTMP = Local0
                }
            }

            Return (LTMP) /* \_TZ_.LTMP */
        }

        Method (RLTM, 0, NotSerialized)
        {
            If (\_SB.PCI0.SBRG.EC0.ECAV ())
            {
                Local0 = \_SB.PCI0.SBRG.EC0.TH0L
                If ((Local0 < 0x80))
                {
                    ATMP = Local0
                }
            }

            Return (ATMP) /* \_TZ_.ATMP */
        }

        Method (RCRT, 0, NotSerialized)
        {
            If (\_SB.PCI0.SBRG.EC0.ECAV ())
            {
                Local0 = \_SB.PCI0.SBRG.EC0.ECRT
                If ((Local0 < 0x80))
                {
                    TCRT = Local0
                }
            }
        }

        Method (RPSV, 0, NotSerialized)
        {
            If (\_SB.PCI0.SBRG.EC0.ECAV ())
            {
                Local0 = \_SB.PCI0.SBRG.EC0.EPSV
                If ((Local0 < 0x80))
                {
                    TPSV = Local0
                }
            }
        }

        Method (RFAN, 1, NotSerialized)
        {
            If (\_SB.PCI0.SBRG.EC0.ECAV ())
            {
                Local0 = \_SB.PCI0.SBRG.EC0.TACH (Arg0)
                Divide (Local0, 0x64, Local1, Local0)
                Local0 += One
                If ((Local0 <= 0x3C))
                {
                    FANS = Local0
                }
                Else
                {
                    Local0 = FANS /* \_TZ_.FANS */
                }
            }
            Else
            {
                Local0 = Zero
            }

            Return (Local0)
        }

        Method (RFSE, 0, NotSerialized)
        {
            If (\_SB.PCI0.SBRG.EC0.ECAV ())
            {
                Local1 = \_SB.PCI0.SBRG.EC0.RFOV (Zero)
                If ((Local1 < 0x80))
                {
                    If ((Local1 < 0x0A))
                    {
                        Local0 = Zero
                    }
                    Else
                    {
                        Local0 = One
                    }
                }
                Else
                {
                    If ((Local1 < 0xF5))
                    {
                        Local0 = 0x02
                    }
                    Else
                    {
                        Local0 = 0x0F
                    }
                }
            }
            Else
            {
                Local0 = Zero
            }

            Return (Local0)
        }

        Method (TCHG, 0, NotSerialized)
        {
        }

        Method (THDL, 0, NotSerialized)
        {
        }

        Method (TMSS, 1, NotSerialized)
        {
        }

        Method (TMSW, 1, NotSerialized)
        {
        }
    }

    Scope (\)
    {
        OperationRegion (PMIO, SystemIO, PMBS, 0x80)
        Field (PMIO, ByteAcc, NoLock, Preserve)
        {
            Offset (0x10), 
                ,   1, 
            TDTY,   3, 
            TENA,   1, 
            Offset (0x2A), 
            TTDT,   3, 
            TTEN,   1, 
            Offset (0x30), 
            G00S,   1, 
            G01S,   1, 
            G02S,   1, 
            G03S,   1, 
            G04S,   1, 
            G05S,   1, 
            G06S,   1, 
            G07S,   1, 
            G08S,   1, 
            G09S,   1, 
            G0AS,   1, 
            G0BS,   1, 
            G0CS,   1, 
            G0DS,   1, 
            G0ES,   1, 
            G0FS,   1, 
            G00E,   1, 
            G01E,   1, 
            G02E,   1, 
            G03E,   1, 
            G04E,   1, 
            G05E,   1, 
            G06E,   1, 
            G07E,   1, 
            G08E,   1, 
            G09E,   1, 
            G0AE,   1, 
            G0BE,   1, 
            G0CE,   1, 
            G0DE,   1, 
            G0EE,   1, 
            G0FE,   1, 
            G00R,   2, 
            G01R,   2, 
            G02R,   2, 
            G03R,   2, 
            G04R,   2, 
            G05R,   2, 
            G06R,   2, 
            G07R,   2, 
            G08R,   2, 
            G09R,   2, 
            G0AR,   2, 
            G0BR,   2, 
            G0CR,   2, 
            G0DR,   2, 
            G0ER,   2, 
            G0FR,   2, 
            Offset (0x3E), 
            GP00,   16, 
                ,   6, 
            SLPS,   1, 
            Offset (0x42), 
                ,   6, 
            SLPE,   1, 
            Offset (0x62), 
            S3CR,   1, 
                ,   11, 
            S3OF,   1, 
            Offset (0x64), 
            GL00,   18
        }

        Method (RGPL, 2, Serialized)
        {
            Local0 = Arg1
            Local1 = Zero
            While (Local0)
            {
                Local1 <<= One
                Local1 |= One
                Local0--
            }

            Local1 <<= Arg0
            Local0 = GL00 /* \GL00 */
            Local0 &= Local1
            Local0 >>= Arg0
            Return (Local0)
        }

        Method (SGPL, 3, Serialized)
        {
            Local0 = Arg1
            Local1 = Zero
            Local2 = Arg2
            While (Local0)
            {
                Local1 <<= One
                Local1 |= One
                Local0--
            }

            Local1 <<= Arg0
            Local1 = ~Local1
            Local2 <<= Arg0
            Local0 = GL00 /* \GL00 */
            Local0 &= Local1
            GL00 = (Local0 | Local2)
        }

        Method (RGPP, 1, Serialized)
        {
            Local0 = (GP00 >> Arg0)
            Local0 &= One
            Return (Local0)
        }

        Method (TGPP, 1, Serialized)
        {
            Local0 = (One << Arg0)
            GP00 ^= Local0
        }

        Method (SGPP, 2, Serialized)
        {
            Local0 = (One << Arg0)
            If (Arg1)
            {
                GP00 |= Local0
            }
            Else
            {
                Local1 = ~Local0
                GP00 &= Local1
            }
        }

        Name (PMEW, Zero)
        Method (SBRS, 1, NotSerialized)
        {
        }

        Method (SBRW, 1, NotSerialized)
        {
            If ((Arg0 == 0x03))
            {
                S3CR = One
                While (S3OF) {}
                S3CR = Zero
            }
        }

        Method (STRP, 1, NotSerialized)
        {
            If (Arg0)
            {
                SLPS = One
                SLPE = One
            }
            Else
            {
                SLPS = One
                SLPT = Zero
            }
        }

        Method (HKTH, 0, Serialized)
        {
            Return (0xFFFF)
        }
    }

    Scope (\)
    {
        OperationRegion (SMB, SystemIO, SMBS, SMBL)
        Field (SMB, ByteAcc, NoLock, Preserve)
        {
            SMB0,   8, 
            SMB1,   8, 
            SMB2,   8, 
            SMB3,   8, 
            SMB4,   8, 
            SMB5,   8, 
            SMB6,   8, 
            SMB7,   8, 
            SMB8,   8, 
            SMB9,   8, 
            SMBA,   8, 
            SMBB,   8, 
            SMBC,   8, 
            SMBD,   8, 
            SMBE,   8, 
            SMBF,   8
        }

        Name (RBUF, Package (0x20) {})
        Method (HBSY, 0, NotSerialized)
        {
            Local0 = 0xFFFF
            While (Local0)
            {
                Local1 = (SMB2 & 0x03)
                If ((Local1 == Zero))
                {
                    Return (Zero)
                }

                Local0--
            }

            Return (One)
        }

        Method (WTSB, 0, NotSerialized)
        {
            Local0 = 0xFFFF
            While (Local0)
            {
                Local0--
                Local1 = (SMB0 & 0x1A)
                If (Local1)
                {
                    Return (One)
                }
            }

            Return (Zero)
        }

        Mutex (P4SM, 0x00)
        Method (SBYT, 2, Serialized)
        {
            If ((Acquire (P4SM, 0xFFFF) != Zero))
            {
                Return (Ones)
            }

            SMB0 = 0xFF
            Local0 = (SMB2 & 0x03)
            If (Local0)
            {
                SMB3 = 0x20
            }

            Local0 = 0x05
            While (Local0)
            {
                If (HBSY ())
                {
                    Local0--
                }
                Else
                {
                    SMB4 = Arg0
                    SMB5 = Arg1
                    SMB3 = 0x11
                    If (WTSB ())
                    {
                        SMB0 = 0xFF
                        Release (P4SM)
                        Return (One)
                    }
                    Else
                    {
                        Local0--
                    }
                }
            }

            SMB0 = 0xFF
            Release (P4SM)
            Return (Ones)
        }

        Method (WBYT, 3, Serialized)
        {
            If ((Acquire (P4SM, 0xFFFF) != Zero))
            {
                Return (Ones)
            }

            SMB0 = 0xFF
            Local0 = (SMB2 & 0x03)
            If (Local0)
            {
                SMB3 = 0x20
            }

            Local0 = 0x05
            While (Local0)
            {
                If (HBSY ())
                {
                    Local0--
                }
                Else
                {
                    SMB4 = Arg0
                    SMB5 = Arg1
                    SMB8 = Arg2
                    SMB3 = 0x12
                    If (WTSB ())
                    {
                        SMB0 = 0xFF
                        Release (P4SM)
                        Return (One)
                    }
                    Else
                    {
                        Local0--
                    }
                }
            }

            SMB0 = 0xFF
            Release (P4SM)
            Return (Ones)
        }

        Method (RWRD, 2, Serialized)
        {
            If ((Acquire (P4SM, 0xFFFF) != Zero))
            {
                Return (Ones)
            }

            SMB0 = 0xFF
            Local0 = (SMB2 & 0x03)
            If (Local0)
            {
                SMB3 = 0x20
            }

            Local0 = 0x05
            While (Local0)
            {
                If (HBSY ())
                {
                    Local0--
                }
                Else
                {
                    SMB4 = (Arg0 | One)
                    SMB5 = Arg1
                    SMB3 = 0x12
                    If (WTSB ())
                    {
                        SMB0 = 0xFF
                        Local1 = SMB9 /* \SMB9 */
                        Local1 <<= 0x08
                        Local1 |= SMB8 /* \SMB8 */
                        Release (P4SM)
                        Return (Local1)
                    }
                    Else
                    {
                        Local0--
                    }
                }
            }

            SMB0 = 0xFF
            Release (P4SM)
            Return (Ones)
        }

        Method (WWRD, 3, Serialized)
        {
            If ((Acquire (P4SM, 0xFFFF) != Zero))
            {
                Return (Ones)
            }

            SMB0 = 0xFF
            Local0 = (SMB2 & 0x03)
            If (Local0)
            {
                SMB3 = 0x20
            }

            Local0 = 0x05
            While (Local0)
            {
                If (HBSY ())
                {
                    Local0--
                }
                Else
                {
                    SMB4 = Arg0
                    SMB5 = Arg1
                    Local1 = (Arg2 & 0xFF)
                    Local2 = (Arg2 >> 0x08)
                    SMB8 = Local1
                    SMB9 = Local2
                    SMB3 = 0x13
                    If (WTSB ())
                    {
                        SMB0 = 0xFF
                        Release (P4SM)
                        Return (One)
                    }
                    Else
                    {
                        Local0--
                    }
                }
            }

            SMB0 = 0xFF
            Release (P4SM)
            Return (Ones)
        }

        Method (RBYT, 2, Serialized)
        {
            If ((Acquire (P4SM, 0xFFFF) != Zero))
            {
                Return (Ones)
            }

            SMB0 = 0xFF
            Local0 = (SMB2 & 0x03)
            If (Local0)
            {
                SMB3 = 0x20
            }

            Local0 = 0x05
            While (Local0)
            {
                If (HBSY ())
                {
                    Local0--
                }
                Else
                {
                    SMB4 = (Arg0 | One)
                    SMB5 = Arg1
                    SMB3 = 0x12
                    If (WTSB ())
                    {
                        SMB0 = 0xFF
                        Release (P4SM)
                        Return (SMB8) /* \SMB8 */
                    }
                    Else
                    {
                        Local0--
                    }
                }
            }

            SMB0 = 0xFF
            Release (P4SM)
            Return (Ones)
        }

        Method (RBLK, 3, Serialized)
        {
            If ((Acquire (P4SM, 0xFFFF) != Zero))
            {
                Return (Ones)
            }

            SMB0 = 0xFF
            Local0 = (SMB2 & 0x03)
            If (Local0)
            {
                SMB3 = 0x20
            }

            Local1 = Zero
            Local0 = 0x05
            While (Local0)
            {
                If (HBSY ())
                {
                    Local0--
                }
                Else
                {
                    SMB4 = (Arg0 | One)
                    SMB5 = Arg2
                    SMB3 = 0x15
                    While (One)
                    {
                        If (WTSB ())
                        {
                            Index (RBUF, Local1) = SMB8 /* \SMB8 */
                            Local1++
                            Index (RBUF, Local1) = SMB9 /* \SMB9 */
                            Local1++
                            Index (RBUF, Local1) = SMBA /* \SMBA */
                            Local1++
                            Index (RBUF, Local1) = SMBB /* \SMBB */
                            Local1++
                            Index (RBUF, Local1) = SMBC /* \SMBC */
                            Local1++
                            Index (RBUF, Local1) = SMBD /* \SMBD */
                            Local1++
                            Index (RBUF, Local1) = SMBE /* \SMBE */
                            Local1++
                            Index (RBUF, Local1) = SMBF /* \SMBF */
                            Local1++
                            If ((Arg1 > 0x08))
                            {
                                Arg1 -= 0x08
                                SMB0 = 0x10
                            }
                            Else
                            {
                                SMB0 = 0xFF
                                Release (P4SM)
                                Return (One)
                            }
                        }
                        Else
                        {
                            Local0--
                        }
                    }
                }
            }

            SMB0 = 0xFF
            Release (P4SM)
            Return (Ones)
        }

        Method (WBLK, 3, Serialized)
        {
            If ((Acquire (P4SM, 0xFFFF) != Zero))
            {
                Return (Ones)
            }

            SMB0 = 0xFF
            Local0 = (SMB2 & 0x03)
            If (Local0)
            {
                SMB3 = 0x20
            }

            Local1 = Zero
            Local0 = 0x05
            While (Local0)
            {
                If (HBSY ())
                {
                    Local0--
                }
                Else
                {
                    SMB8 = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMB9 = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMBA = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMBB = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMBC = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMBD = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMBE = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMBF = DerefOf (Index (RBUF, Local1))
                    Local1++
                    SMB4 = (Arg0 & 0xFE)
                    SMB7 = Arg1
                    SMB5 = Arg2
                    SMB3 = 0x15
                    If (WTSB ())
                    {
                        If ((Arg1 > 0x08))
                        {
                            Arg1 -= 0x08
                        }
                        Else
                        {
                            SMB0 = 0xFF
                            Release (P4SM)
                            Return (One)
                        }
                    }
                    Else
                    {
                        Local0--
                    }

                    While (Local0)
                    {
                        SMB8 = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMB9 = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMBA = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMBB = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMBC = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMBD = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMBE = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMBF = DerefOf (Index (RBUF, Local1))
                        Local1++
                        SMB0 = 0x10
                        If (WTSB ())
                        {
                            If ((Arg1 > 0x08))
                            {
                                Arg1 -= 0x08
                            }
                            Else
                            {
                                SMB0 = 0xFF
                                Release (P4SM)
                                Return (One)
                            }
                        }
                        Else
                        {
                            Local0--
                        }
                    }
                }
            }

            SMB0 = 0xFF
            Release (P4SM)
            Return (Ones)
        }
    }

    Scope (\)
    {
        Method (DIAG, 1, NotSerialized)
        {
            DBG8 = Arg0
        }

        OperationRegion (GPSC, SystemIO, 0x0848, 0x02)
        Field (GPSC, ByteAcc, NoLock, Preserve)
        {
            SMCM,   8, 
            SMST,   8
        }

        Method (ISMI, 1, Serialized)
        {
            SMCM = Arg0
        }

        Method (ASMI, 1, Serialized)
        {
            ALPR = Arg0
            SMCM = 0xA3
            Return (ALPR) /* \ALPR */
        }

        OperationRegion (ECMS, SystemIO, 0x2000, 0x0100)
        Field (ECMS, ByteAcc, Lock, Preserve)
        {
            Offset (0x50), 
            IKFG,   8, 
            FRPN,   16, 
            RAMB,   32, 
            AVOL,   8, 
            LBTN,   8, 
            ERRF,   8, 
            OCLK,   8, 
            WIDE,   1, 
            OVCK,   2, 
            SLPN,   3, 
            ACRD,   1, 
            Offset (0x5C), 
            CPUR,   6, 
            CPUF,   2, 
            LBT2,   8, 
            PCMS,   8, 
            CLKS,   8, 
            CLKL,   8, 
            CLKD,   128, 
            ALSL,   8, 
            ALAE,   1, 
            ALDE,   1, 
            ALSP,   1, 
            Offset (0x73), 
            WLDP,   1, 
            BTDP,   1, 
            WRST,   1, 
            BRST,   1, 
            WRPS,   1, 
            BRPS,   1, 
            Offset (0x74), 
            SYNA,   1, 
            ALPS,   1, 
            Offset (0x75), 
            IKF2,   8, 
            OSPM,   8, 
            TCGF,   8, 
            PPIS,   8, 
            PPIR,   8, 
            UHDB,   8, 
            Offset (0x7C), 
            BTYP,   8
        }

        OperationRegion (RAMW, SystemMemory, RAMB, 0x0100)
        Field (RAMW, AnyAcc, NoLock, Preserve)
        {
            TRTY,   8, 
            FSFN,   8, 
            FSTA,   16, 
            FADR,   32, 
            FSIZ,   16, 
            ACTD,   8, 
            AVLD,   8, 
            SETD,   8, 
            ACPF,   8, 
            DCPF,   8, 
            DCP2,   8, 
            DCTP,   8, 
            CTPY,   8, 
            PADL,   16, 
            CADL,   16, 
            CSTE,   16, 
            NSTE,   16, 
            SSTE,   16, 
            SFUN,   8, 
            TPSV,   8, 
            TAC0,   8, 
            TCRT,   8, 
            TDO1,   8, 
            TDO2,   8, 
            PPSV,   8, 
            PAC0,   8, 
            T0HL,   8, 
            T0LL,   8, 
            T0F1,   8, 
            T0F2,   8, 
            T1HL,   8, 
            T1LL,   8, 
            T1F1,   8, 
            T1F2,   8, 
            T2HL,   8, 
            T2LL,   8, 
            T2F1,   8, 
            T2F2,   8, 
            T3HL,   8, 
            T3LL,   8, 
            T3F1,   8, 
            T3F2,   8, 
            T4HL,   8, 
            T4LL,   8, 
            T4F1,   8, 
            T4F2,   8, 
            T5HL,   8, 
            T5LL,   8, 
            T5F1,   8, 
            T5F2,   8, 
            T6HL,   8, 
            T6LL,   8, 
            T6F1,   8, 
            T6F2,   8, 
            T7HL,   8, 
            T7LL,   8, 
            T7F1,   8, 
            T7F2,   8, 
            SLPT,   8, 
            AIBF,   8, 
            IDES,   8, 
            VGAF,   16, 
            C4CP,   8, 
            LUXS,   8, 
            LUXL,   8, 
            LUXH,   8, 
            LUXF,   8, 
            MNAM,   64, 
            DBR1,   32, 
            DBR2,   32, 
            DBR3,   32, 
            DBR4,   32, 
            LCDV,   32, 
            LCDR,   8, 
            PTIM,   8, 
            PTMP,   8, 
            QFAN,   8, 
            VBIF,   8, 
            BIPA,   32, 
            RTCW,   16, 
            CPUN,   8, 
            ALPR,   32, 
            PSTN,   16, 
            CPUP,   8, 
            GNBF,   32, 
            HDDF,   8
        }

        OperationRegion (DBGM, SystemMemory, 0x000D0000, 0x04)
        Field (DBGM, DWordAcc, NoLock, Preserve)
        {
            DBGG,   32
        }

        Name (OSFG, Zero)
        Name (OS9X, One)
        Name (OS98, 0x02)
        Name (OSME, 0x04)
        Name (OS2K, 0x08)
        Name (OSXP, 0x10)
        Name (OSVT, 0x20)
        Name (SLMT, Zero)
        Method (MSOS, 0, NotSerialized)
        {
            If (CondRefOf (_OSI, Local0))
            {
                If (_OSI ("Windows 2001"))
                {
                    OSFG = OSXP /* \OSXP */
                }

                If (_OSI ("Windows 2001 SP1"))
                {
                    OSFG = OSXP /* \OSXP */
                }

                If (_OSI ("Windows 2001 SP2"))
                {
                    OSFG = OSXP /* \OSXP */
                }

                If (_OSI ("Windows 2006"))
                {
                    OSFG = OSVT /* \OSVT */
                }

                Return (OSFG) /* \OSFG */
            }
            Else
            {
                If (MCTH (_OS, "Microsoft Windows"))
                {
                    OSFG = OS98 /* \OS98 */
                }
                Else
                {
                    If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
                    {
                        OSFG = OSME /* \OSME */
                    }
                    Else
                    {
                        If (MCTH (_OS, "Microsoft Windows NT"))
                        {
                            OSFG = OS2K /* \OS2K */
                        }
                        Else
                        {
                            OSFG = OSXP /* \OSXP */
                        }
                    }
                }
            }

            Return (OSFG) /* \OSFG */
        }

        Method (DBGR, 4, NotSerialized)
        {
            DBR1 = Arg0
            DBR2 = Arg1
            DBR3 = Arg2
            DBR4 = Arg3
            ISMI (0x96)
        }

        Name (ONAM, "ASUSTEK")
        Method (ADVG, 0, NotSerialized)
        {
            If (\_SB.PCI0.P0P1.VGA.PRST ())
            {
                Return (\_SB.PCI0.P0P1.VGA.ADVD ())
            }

            Return (0x03)
        }

        Method (SWHG, 1, Serialized)
        {
            If (\_SB.PCI0.P0P1.VGA.PRST ())
            {
                \_SB.PCI0.P0P1.VGA.SWHD (Arg0)
                Return (One)
            }

            Return (Zero)
        }

        Method (GDOS, 0, NotSerialized)
        {
            If (\_SB.PCI0.P0P1.VGA.PRST ())
            {
                Local0 = \_SB.PCI0.P0P1.VGA.DOSF
                Return (Local0)
            }

            Return (Zero)
        }

        Method (NVGA, 1, NotSerialized)
        {
            Local0 = Arg0
            If (\_SB.PCI0.P0P1.VGA.PRST ())
            {
                Notify (\_SB.PCI0.P0P1.VGA, Local0)
            }
        }

        Method (NATK, 0, NotSerialized)
        {
            If (\_SB.PCI0.P0P1.VGA.PRST ())
            {
                Return (\_SB.PCI0.P0P1.VGA.NATK ())
            }

            Return (One)
        }

        Name (PWAC, Buffer (0x10)
        {
            /* 0000 */  0x15, 0x24, 0x33, 0x42, 0x51, 0x60, 0x6F, 0x7F,  /* .$3BQ`o. */
            /* 0008 */  0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF   /* ........ */
        })
        Name (PWDC, Buffer (0x10)
        {
            /* 0000 */  0x0F, 0x1E, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, 0x78,  /* ..-<KZix */
            /* 0008 */  0x87, 0x96, 0xA5, 0xB4, 0xC3, 0xD2, 0xE1, 0xF0   /* ........ */
        })
    }

    Scope (_SB.PCI0)
    {
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            OSPM = MSOS ()
            If ((OSPM == OSXP))
            {
                ISMI (0xA7)
            }

            If (ACPF)
            {
                SLMT = (PSTN >> 0x08)
            }
            Else
            {
                If (((BTYP == 0x31) || (BTYP == 0x41)))
                {
                    SLMT = One
                }
                Else
                {
                    SLMT = (PSTN & 0xFF)
                }
            }
        }
    }

    Scope (_SB.PCI0)
    {
        Device (AC0)
        {
            Name (_HID, "ACPI0003" /* Power Source Device */)  // _HID: Hardware ID
            Method (_PSR, 0, NotSerialized)  // _PSR: Power Source
            {
                Return (^^SBRG.EC0.ACAP ())
            }

            Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
            {
                PCI0
            })
        }
    }

    Scope (_SB.PCI0.SBRG.EC0)
    {
        Method (ACAP, 0, Serialized)
        {
            Return (ACPF) /* \ACPF */
        }

        Method (_QA0, 0, NotSerialized)  // _Qxx: EC Query
        {
            If (ACPS ())
            {
                ACPF = One
                Local0 = 0x58
                SLMT = (PSTN >> 0x08)
            }
            Else
            {
                ACPF = Zero
                Local0 = 0x57
                SLMT = (PSTN & 0xFF)
            }

            If ((OSFG != OSVT))
            {
                STBR ()
            }

            If (((RRAM (0x06C1) == 0x31) || (RRAM (0x06C1) == 0x41)))
            {
                If (ACPS ())
                {
                    Local1 = PSTN /* \PSTN */
                    Local1 = (PSTN >> 0x08)
                    ^^^^ATKD.PSTC (Local1)
                }
                Else
                {
                    ^^^^ATKD.PSTC (One)
                }
            }

            Notify (AC0, 0x80) // Status Change
            If (ATKP)
            {
                Notify (ATKD, Local0)
            }

            Sleep (0x64)
            Notify (\_PR.P001, 0x80) // Performance Capability Change
            Notify (\_PR.P001, 0x81) // C-State Change
            If ((CPUN >= 0x02))
            {
                Notify (\_PR.P002, 0x80) // Performance Capability Change
                Notify (\_PR.P002, 0x81) // C-State Change
            }

            Sleep (0x0A)
            NBAT (0x80)
        }
    }

    Scope (_SB.PCI0)
    {
        Device (BAT0)
        {
            Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */)  // _HID: Hardware ID
            Name (_UID, Zero)  // _UID: Unique ID
            Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
            {
                PCI0
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (^^SBRG.EC0.BATP (Zero))
                {
                    Return (0x1F)
                }
                Else
                {
                    Return (0x0F)
                }
            }

            Name (LOW2, 0x012C)
            Name (DVOT, 0x0E)
            Name (PUNT, One)
            Name (LFCC, 0x1770)
            Name (NBIF, Package (0x0D)
            {
                Zero, 
                Ones, 
                Ones, 
                One, 
                Ones, 
                Ones, 
                Ones, 
                Ones, 
                Ones, 
                "", 
                "", 
                "", 
                ""
            })
            Name (PBIF, Package (0x0D)
            {
                One, 
                0x1770, 
                0x1770, 
                One, 
                0x39D0, 
                0x0258, 
                0x012C, 
                0x3C, 
                0x3C, 
                "M3N", 
                " ", 
                "LIon", 
                "ASUSTek"
            })
            Name (PBST, Package (0x04)
            {
                Zero, 
                Ones, 
                Ones, 
                Ones
            })
            Method (FBIF, 5, NotSerialized)
            {
                PUNT = Arg0
                Local1 = Arg1
                Local2 = Arg2
                If ((PUNT == Zero))
                {
                    Local1 *= 0x0A
                    Local2 *= 0x0A
                }

                Index (PBIF, Zero) = Arg0
                Index (PBIF, One) = Local1
                Index (PBIF, 0x02) = Local2
                LFCC = Local2
                Index (PBIF, 0x03) = Arg3
                Index (PBIF, 0x04) = Arg4
                Divide (Local1, 0x0A, Local3, Local5)
                Index (PBIF, 0x05) = Local5
                Divide (Local5, 0x0A, Local6, Local5)
                Local6 = (Local5 * 0x03)
                Index (PBIF, 0x06) = Local6
                LOW2 = Local6
                Divide (Local1, 0x64, Local3, Local7)
                Index (PBIF, 0x07) = Local7
                Index (PBIF, 0x08) = Local7
            }

            Method (CBIF, 0, NotSerialized)
            {
                If (PUNT)
                {
                    Local0 = DerefOf (Index (PBIF, 0x04))
                    Local0 += 0x01F4
                    Divide (Local0, 0x03E8, Local1, DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                    Index (PBIF, Zero) = Zero
                    Index (PBIF, One) = (DerefOf (Index (PBIF, One)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                    Index (PBIF, 0x02) = (DerefOf (Index (PBIF, 0x02)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                    Index (PBIF, 0x05) = (DerefOf (Index (PBIF, 0x05)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                    Index (PBIF, 0x06) = (DerefOf (Index (PBIF, 0x06)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                    Index (PBIF, 0x07) = (DerefOf (Index (PBIF, 0x07)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                    Index (PBIF, 0x08) = (DerefOf (Index (PBIF, 0x08)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                }
            }

            Method (_BIF, 0, NotSerialized)  // _BIF: Battery Information
            {
                If (!^^SBRG.EC0.BATP (Zero))
                {
                    Return (NBIF) /* \_SB_.PCI0.BAT0.NBIF */
                }

                If ((^^SBRG.EC0.GBTT (Zero) == 0xFF))
                {
                    Return (NBIF) /* \_SB_.PCI0.BAT0.NBIF */
                }

                BATS (Zero)
                Index (PBIF, 0x09) = ^^SBRG.EC0.BIF9 ()
                Index (PBIF, 0x0C) = ONAM /* \ONAM */
                Local0 = ^^SBRG.EC0.BIF0 ()
                Local1 = ^^SBRG.EC0.BIF1 ()
                Local2 = ^^SBRG.EC0.BIF2 ()
                Local3 = ^^SBRG.EC0.BIF3 ()
                Local4 = ^^SBRG.EC0.BIF4 ()
                BATR ()
                If ((Local0 != Ones))
                {
                    If ((Local1 != Ones))
                    {
                        If ((Local2 != Ones))
                        {
                            If ((Local3 != Ones))
                            {
                                If ((Local4 != Ones))
                                {
                                    FBIF (Local0, Local1, Local2, Local3, Local4)
                                    CBIF ()
                                }
                            }
                        }
                    }
                }

                If ((PUNT == Zero))
                {
                    Local2 *= 0x0A
                }

                LFCC = Local2
                Return (PBIF) /* \_SB_.PCI0.BAT0.PBIF */
            }

            Method (FBST, 4, NotSerialized)
            {
                Local1 = (Arg1 & 0xFFFF)
                Local0 = Zero
                If (^^SBRG.EC0.ACAP ())
                {
                    Local0 = One
                }

                If (Local0)
                {
                    If (CHGS (Zero))
                    {
                        Local0 = 0x02
                    }
                    Else
                    {
                        Local0 = Zero
                    }
                }
                Else
                {
                    Local0 = One
                }

                If ((Local1 >= 0x8000))
                {
                    Local1 -= 0xFFFF
                }

                Local2 = Arg2
                If ((PUNT == Zero))
                {
                    Local1 *= DVOT /* \_SB_.PCI0.BAT0.DVOT */
                    Local2 *= 0x0A
                }

                Local3 = (Local0 & 0x02)
                If (!Local3)
                {
                    Local3 = (LFCC - Local2)
                    Divide (LFCC, 0xC8, Local4, Local5)
                    If ((Local3 < Local5))
                    {
                        Local2 = LFCC /* \_SB_.PCI0.BAT0.LFCC */
                    }
                }
                Else
                {
                    Divide (LFCC, 0xC8, Local4, Local5)
                    Local4 = (LFCC - Local5)
                    If ((Local2 > Local4))
                    {
                        Local2 = Local4
                    }
                }

                If (!^^SBRG.EC0.ACAP ())
                {
                    Divide (Local2, MBLF, Local3, Local4)
                    If ((Local1 < Local4))
                    {
                        Local1 = Local4
                    }
                }

                Index (PBST, Zero) = Local0
                Index (PBST, One) = Local1
                Index (PBST, 0x02) = Local2
                Index (PBST, 0x03) = Arg3
            }

            Method (CBST, 0, NotSerialized)
            {
                If (PUNT)
                {
                    Index (PBST, One) = (DerefOf (Index (PBST, One)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                    Index (PBST, 0x02) = (DerefOf (Index (PBST, 0x02)) * DVOT) /* \_SB_.PCI0.BAT0.DVOT */
                }
            }

            Method (_BST, 0, NotSerialized)  // _BST: Battery Status
            {
                If (!^^SBRG.EC0.BATP (Zero))
                {
                    Index (PBST, Zero) = Zero
                    Index (PBST, One) = Ones
                    Index (PBST, 0x02) = Ones
                    Index (PBST, 0x03) = Ones
                    Return (PBST) /* \_SB_.PCI0.BAT0.PBST */
                }

                If ((^^SBRG.EC0.GBTT (Zero) == 0xFF))
                {
                    Index (PBST, Zero) = Zero
                    Index (PBST, One) = Ones
                    Index (PBST, 0x02) = Ones
                    Index (PBST, 0x03) = Ones
                    Return (PBST) /* \_SB_.PCI0.BAT0.PBST */
                }

                If (MES4)
                {
                    MES4--
                    Return (PBST) /* \_SB_.PCI0.BAT0.PBST */
                }

                BATS (Zero)
                Local0 = ^^SBRG.EC0.BSTS ()
                Local1 = ^^SBRG.EC0.BCRT ()
                Local2 = ^^SBRG.EC0.BRCP ()
                Local3 = ^^SBRG.EC0.BVOT ()
                BATR ()
                If ((Local0 != Ones))
                {
                    If ((Local1 != Ones))
                    {
                        If ((Local2 != Ones))
                        {
                            If ((Local3 != Ones))
                            {
                                FBST (Local0, Local1, Local2, Local3)
                                CBST ()
                            }
                        }
                    }
                }

                Return (PBST) /* \_SB_.PCI0.BAT0.PBST */
            }
        }
    }

    Scope (_SB.PCI0)
    {
        Name (B0CR, Zero)
        Name (B1CR, Zero)
        Method (GGCC, 1, Serialized)
        {
            BATS (Arg0)
            Local0 = ^SBRG.EC0.BCRT ()
            BATR ()
            If ((Local0 == Ones))
            {
                If (Arg0)
                {
                    Local0 = B1CR /* \_SB_.PCI0.B1CR */
                }
                Else
                {
                    Local0 = B0CR /* \_SB_.PCI0.B0CR */
                }
            }

            Local1 = (Local0 & 0x8000)
            If (Local1)
            {
                Local0 = Zero
            }

            If (Arg0)
            {
                B1CR = Local0
            }
            Else
            {
                B0CR = Local0
            }

            Return (Local0)
        }
    }

    Scope (_SB.PCI0.SBRG.EC0)
    {
        Name (BADR, 0x0B)
        Name (CADR, 0x09)
        Name (SADR, 0x0A)
        Method (ALMH, 1, NotSerialized)
        {
            If ((Arg0 == BADR))
            {
                NBAT (0x80)
            }
        }

        Method (BIFW, 1, NotSerialized)
        {
            Local0 = SMBR (RDWD, BADR, Arg0)
            Local1 = DerefOf (Index (Local0, Zero))
            If (Local1)
            {
                Return (Ones)
            }
            Else
            {
                Return (DerefOf (Index (Local0, 0x02)))
            }
        }

        Method (BIF0, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1MD /* \_SB_.PCI0.SBRG.EC0_.B1MD */
                }
                Else
                {
                    Local0 = B0MD /* \_SB_.PCI0.SBRG.EC0_.B0MD */
                }

                If ((Local0 != 0xFFFF))
                {
                    Local1 = (Local0 >> 0x0F)
                    Local1 &= One
                    Local0 = (Local1 ^ One)
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BIF1, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1DC /* \_SB_.PCI0.SBRG.EC0_.B1DC */
                }
                Else
                {
                    Local0 = B0DC /* \_SB_.PCI0.SBRG.EC0_.B0DC */
                }

                Local0 &= 0xFFFF
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BIF2, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1FC /* \_SB_.PCI0.SBRG.EC0_.B1FC */
                }
                Else
                {
                    Local0 = B0FC /* \_SB_.PCI0.SBRG.EC0_.B0FC */
                }

                Local0 &= 0xFFFF
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BIF3, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1MD /* \_SB_.PCI0.SBRG.EC0_.B1MD */
                }
                Else
                {
                    Local0 = B0MD /* \_SB_.PCI0.SBRG.EC0_.B0MD */
                }

                If ((Local0 != 0xFFFF))
                {
                    Local0 >>= 0x09
                    Local0 &= One
                    Local0 ^= One
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BIF4, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1DV /* \_SB_.PCI0.SBRG.EC0_.B1DV */
                }
                Else
                {
                    Local0 = B0DV /* \_SB_.PCI0.SBRG.EC0_.B0DV */
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BIF9, 0, NotSerialized)
        {
            Name (BSTR, Buffer (0x20) {})
            Local0 = SMBR (RDBL, BADR, 0x21)
            If ((DerefOf (Index (Local0, Zero)) != Zero))
            {
                BSTR = MNAM /* \MNAM */
                Index (BSTR, 0x04) = Zero
            }
            Else
            {
                BSTR = DerefOf (Index (Local0, 0x02))
                Index (BSTR, DerefOf (Index (Local0, One))) = Zero
            }

            Return (BSTR) /* \_SB_.PCI0.SBRG.EC0_.BIF9.BSTR */
        }

        Method (BIFA, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1SN /* \_SB_.PCI0.SBRG.EC0_.B1SN */
                }
                Else
                {
                    Local0 = B0SN /* \_SB_.PCI0.SBRG.EC0_.B0SN */
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BSTS, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1ST /* \_SB_.PCI0.SBRG.EC0_.B1ST */
                }
                Else
                {
                    Local0 = B0ST /* \_SB_.PCI0.SBRG.EC0_.B0ST */
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BCRT, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1CC /* \_SB_.PCI0.SBRG.EC0_.B1CC */
                }
                Else
                {
                    Local0 = B0CC /* \_SB_.PCI0.SBRG.EC0_.B0CC */
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BRCP, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1RC /* \_SB_.PCI0.SBRG.EC0_.B1RC */
                }
                Else
                {
                    Local0 = B0RC /* \_SB_.PCI0.SBRG.EC0_.B0RC */
                }

                If ((Local0 == 0xFFFF))
                {
                    Local0 = Ones
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }

        Method (BVOT, 0, NotSerialized)
        {
            If (ECAV ())
            {
                If (BSLF)
                {
                    Local0 = B1VL /* \_SB_.PCI0.SBRG.EC0_.B1VL */
                }
                Else
                {
                    Local0 = B0VL /* \_SB_.PCI0.SBRG.EC0_.B0VL */
                }
            }
            Else
            {
                Local0 = Ones
            }

            Return (Local0)
        }
    }

    Scope (\)
    {
        Method (CHGS, 1, Serialized)
        {
            Local0 = \_SB.PCI0.SBRG.EC0.BCHG (Arg0)
            Return (Local0)
        }

        Name (BSLF, Zero)
        Method (BATS, 1, Serialized)
        {
            If (Arg0)
            {
                BSLF = One
            }
            Else
            {
                BSLF = Zero
            }
        }

        Method (BATR, 0, Serialized)
        {
        }
    }

    Scope (_SB.PCI0.SBRG.EC0)
    {
        Method (_QA1, 0, NotSerialized)  // _Qxx: EC Query
        {
            DCPF = DCPS (Zero)
            If (DCPF)
            {
                Sleep (0x07D0)
            }

            Notify (BAT0, 0x80) // Status Change
            Notify (BAT0, 0x81) // Information Change
        }

        Method (_QA5, 0, NotSerialized)  // _Qxx: EC Query
        {
            If (ATKP)
            {
                Notify (ATKD, 0x6E) // Reserved
            }
            Else
            {
                If (BATP (Zero))
                {
                    Notify (BAT0, 0x80) // Status Change
                }
            }
        }

        Method (_QA3, 0, NotSerialized)  // _Qxx: EC Query
        {
            If (BATP (Zero))
            {
                Local0 = BCLE (Zero)
                If ((Local0 == Zero))
                {
                    Notify (BAT0, 0x81) // Information Change
                }
                Else
                {
                    Notify (BAT0, 0x81) // Information Change
                    Notify (AC0, 0x80) // Status Change
                }
            }
        }

        Method (BATP, 1, Serialized)
        {
            If (Arg0)
            {
                Return (DCP2) /* \DCP2 */
            }
            Else
            {
                Return (DCPF) /* \DCPF */
            }
        }

        Method (NBAT, 1, NotSerialized)
        {
            If (BATP (Zero))
            {
                Notify (BAT0, Arg0)
            }
        }
    }

    Scope (_SB)
    {
        Device (PWRB)
        {
            Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */)  // _HID: Hardware ID
            Name (_UID, 0xAA)  // _UID: Unique ID
            Name (_STA, 0x0B)  // _STA: Status
        }
    }

    Scope (_SB)
    {
        Device (SLPB)
        {
            Name (_HID, EisaId ("PNP0C0E") /* Sleep Button Device */)  // _HID: Hardware ID
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (Package (0x02)
                {
                    0x0B, 
                    0x04
                })
            }
        }
    }

    Scope (\)
    {
        Name (MES4, Zero)
        Method (OEMS, 1, NotSerialized)
        {
            If ((Arg0 == 0x03))
            {
                If ((OSFG <= OSME))
                {
                    WIDE = One
                }
                Else
                {
                    WIDE = Zero
                }
            }

            SBRS (Arg0)
            \_SB.PCI0.SBRG.EC0.EC0S (Arg0)
            SLPN = Arg0
            DIAG ((Arg0 + 0xD0))
            SLPT = Arg0
            If (Arg0)
            {
                STRP (One)
            }

            PRJS (Arg0)
            ISMI (0x9D)
        }

        Method (OEMW, 1, NotSerialized)
        {
            If (\_SB.PCI0.SBRG.EC0.ACPS ())
            {
                SLMT = (PSTN >> 0x08)
            }
            Else
            {
                SLMT = (PSTN & 0xFF)
            }

            ISMI (0x9E)
            If ((OSPM == OSXP))
            {
                ISMI (0xA7)
            }

            SLPT = Zero
            If ((Arg0 <= 0x04))
            {
                Notify (\_PR.P001, 0x80) // Performance Capability Change
                If ((CPUN >= 0x02))
                {
                    Notify (\_PR.P002, 0x80) // Performance Capability Change
                }

                Sleep (0x64)
                Notify (\_PR.P001, 0x81) // C-State Change
                If ((CPUN >= 0x02))
                {
                    Notify (\_PR.P002, 0x81) // C-State Change
                }
            }

            \_SB.PCI0.SBRG.EC0.EC0W (Arg0)
            If ((Arg0 == 0x04))
            {
                If ((OSFG <= OSME))
                {
                    MES4 = 0x02
                }
                Else
                {
                    MES4 = Zero
                }
            }

            SBRW (Arg0)
            If ((Arg0 == 0x04))
            {
                Notify (\_SB.SLPB, 0x02) // Device Wake
            }

            PRJW (Arg0)
            DIAG ((Arg0 + 0xF0))
            \_SB.PCI0.SBRG.EC0.SPIN (0x12, One)
        }
    }

    Scope (_SB.ATKD)
    {
        Method (FSMI, 1, NotSerialized)
        {
            FSFN = Arg0
            Local0 = (Arg0 | 0xA0)
            DIAG (Local0)
            ISMI (0x90)
            Return (FSTA) /* \FSTA */
        }

        Method (FLSH, 1, NotSerialized)
        {
            FSTA = Arg0
            FSMI (Zero)
        }

        Method (FINI, 1, NotSerialized)
        {
            FADR = Arg0
            Return (FSMI (One))
        }

        Method (FERS, 1, NotSerialized)
        {
            FSTA = Arg0
            Return (FSMI (0x02))
        }

        Method (FWRI, 1, NotSerialized)
        {
            FADR = Arg0
            FSIZ = 0x1000
            Return ((0x1000 - FSMI (0x03)))
        }

        Method (FWRP, 0, NotSerialized)
        {
            FSIZ = Zero
            Return ((0x1000 - FSMI (0x03)))
        }

        Method (FEBW, 1, NotSerialized)
        {
            FADR = Arg0
            Return (FSMI (0x04))
        }

        Method (FEBR, 1, NotSerialized)
        {
            FADR = Arg0
            Return (FSMI (0x05))
        }

        Method (FEDW, 0, NotSerialized)
        {
            Return (FSMI (0x06))
        }

        Method (ECSR, 1, NotSerialized)
        {
            FSTA = Arg0
            Return (FSMI (0x07))
        }
    }

    Scope (_SB.ATKD)
    {
        Method (AGFN, 1, Serialized)
        {
            If ((Arg0 == Zero))