/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20140926-64 [Oct  1 2014]
 * Copyright (c) 2000 - 2014 Intel Corporation
 * 
 * Disassembly of DSDT, Sat Nov 29 08:05:01 2014
 *
 * Original Table Header:
 *     Signature        "DSDT"
 *     Length           0x0000428C (17036)
 *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
 *     Checksum         0x01
 *     OEM ID           "RS690 "
 *     OEM Table ID     "AWRDACPI"
 *     OEM Revision     0x00001000 (4096)
 *     Compiler ID      "MSFT"
 *     Compiler Version 0x03000000 (50331648)
 */
DefinitionBlock ("DSDT.aml", "DSDT", 1, "RS690 ", "AWRDACPI", 0x00001000)
{

    External (LNKA, UnknownObj)
    External (LNKB, UnknownObj)
    External (LNKC, UnknownObj)
    External (LNKD, UnknownObj)

    Scope (\_PR)
    {
        Processor (\_PR.CPU0, 0x00, 0x00004010, 0x06) {}
        Processor (\_PR.CPU1, 0x01, 0x00004010, 0x06) {}
        Processor (\_PR.CPU2, 0x02, 0x00004010, 0x06) {}
        Processor (\_PR.CPU3, 0x03, 0x00004010, 0x06) {}
    }

    Name (\_S0, Package (0x04)  // _S0_: S0 System State
    {
        0x00, 
        0x00, 
        0x00, 
        0x00
    })
    Name (\_S5, Package (0x04)  // _S5_: S5 System State
    {
        0x05, 
        0x05, 
        0x05, 
        0x05
    })
    OperationRegion (\DEBG, SystemIO, 0x80, 0x01)
    Field (\DEBG, ByteAcc, NoLock, Preserve)
    {
        DBG1,   8
    }

    Name (OSTY, Ones)
    OperationRegion (ACMS, SystemIO, 0x72, 0x02)
    Field (ACMS, ByteAcc, NoLock, Preserve)
    {
        ICMS,   8, 
        DCMS,   8
    }

    IndexField (ICMS, DCMS, ByteAcc, NoLock, Preserve)
    {
        Offset (0x01), 
        Offset (0x04), 
        Offset (0x08), 
        BS_A,   32, 
        REV0,   8, 
        REV1,   8
    }

    OperationRegion (ACAF, SystemMemory, BS_A, 0x20)
    Field (ACAF, AnyAcc, NoLock, Preserve)
    {
        OCC0,   1, 
        OCC1,   1, 
        OCC2,   1, 
        OCC3,   1, 
        OCC4,   1, 
        OCC5,   1, 
        OCC6,   1, 
        OCC7,   1, 
        OCC8,   1, 
        OCC9,   1, 
        Offset (0x02), 
        TPMF,   1, 
        STHP,   1, 
        SHPG,   1, 
        OSCF,   1, 
        Offset (0x04), 
        PCIE,   32, 
        HPBS,   32, 
        OCM0,   4, 
        OCM1,   4, 
        OCM2,   4, 
        OCM3,   4, 
        OCM4,   4, 
        OCM5,   4, 
        OCM6,   4, 
        OCM7,   4, 
        OCM8,   4, 
        OCM9,   4, 
        Offset (0x14), 
        P92T,   8
    }

    OperationRegion (CMPT, SystemIO, 0x0C50, 0x03)
    Field (CMPT, ByteAcc, NoLock, Preserve)
    {
        CMID,   8, 
            ,   6, 
        GPCT,   2, 
        GP0I,   1, 
        GP1I,   1, 
        GP2I,   1, 
        GP3I,   1, 
        GP4I,   1, 
        GP5I,   1, 
        GP6I,   1, 
        GP7I,   1
    }

    OperationRegion (PCFG, SystemMemory, PCIE, 0x02000000)
    Field (PCFG, AnyAcc, NoLock, Preserve)
    {
        Offset (0x90024), 
        STB5,   32, 
        Offset (0x98042), 
        PT0D,   1, 
        PT1D,   1, 
        PT2D,   1, 
        PT3D,   1, 
        PT4D,   1, 
        PT5D,   1, 
        PT6D,   1, 
        PT7D,   1, 
        PT8D,   1, 
        PT9D,   1, 
        Offset (0xA0004), 
        SMIE,   1, 
        SMME,   1, 
        Offset (0xA0008), 
        RVID,   8, 
        Offset (0xA0014), 
        SMB1,   32, 
        Offset (0xA0078), 
            ,   14, 
        P92E,   1
    }

    OperationRegion (BAR, SystemMemory, STB5, 0x1000)
    Field (BAR, AnyAcc, NoLock, Preserve)
    {
        Offset (0x120), 
            ,   7, 
        PMBY,   1, 
        Offset (0x128), 
        PMS0,   4, 
        Offset (0x129), 
        PMS1,   4, 
        Offset (0x12C), 
        DET0,   4, 
        Offset (0x130), 
        Offset (0x132), 
        PRC0,   1, 
        Offset (0x1A0), 
            ,   7, 
        SMBY,   1, 
        Offset (0x1A8), 
        SMS0,   4, 
        Offset (0x1A9), 
        SMS1,   4, 
        Offset (0x1AC), 
        DET1,   4, 
        Offset (0x1B0), 
        Offset (0x1B2), 
        PRC1,   1, 
        Offset (0x220), 
            ,   7, 
        PSBY,   1, 
        Offset (0x228), 
        PSS0,   4, 
        Offset (0x229), 
        PSS1,   4, 
        Offset (0x22C), 
        DET2,   4, 
        Offset (0x230), 
        Offset (0x232), 
        PRC2,   1, 
        Offset (0x2A0), 
            ,   7, 
        SSBY,   1, 
        Offset (0x2A8), 
        SSS0,   4, 
        Offset (0x2A9), 
        SSS1,   4, 
        Offset (0x2AC), 
        DET3,   4, 
        Offset (0x2B0), 
        Offset (0x2B2), 
        PRC3,   1
    }

    OperationRegion (PMIO, SystemIO, 0x0CD6, 0x02)
    Field (PMIO, ByteAcc, NoLock, Preserve)
    {
        INPM,   8, 
        DAPM,   8
    }

    IndexField (INPM, DAPM, ByteAcc, NoLock, Preserve)
    {
            ,   1, 
        TM1E,   1, 
        TM2E,   1, 
        Offset (0x01), 
            ,   1, 
        TM1S,   1, 
        TM2S,   1, 
        Offset (0x04), 
            ,   7, 
        SLPS,   1, 
        Offset (0x07), 
            ,   7, 
        CLPS,   1, 
        Offset (0x10), 
            ,   6, 
        PWDE,   1, 
        Offset (0x1C), 
            ,   3, 
        MKME,   1, 
        PI3E,   1, 
        PI2E,   1, 
        PI1E,   1, 
        PI0E,   1, 
            ,   3, 
        MKMS,   1, 
        PI3S,   1, 
        PI2S,   1, 
        PI1S,   1, 
        PI0S,   1, 
        Offset (0x20), 
        P1EB,   16, 
        Offset (0x36), 
            ,   6, 
        GV6P,   1, 
        GV7P,   1, 
            ,   3, 
        GM0P,   1, 
        GM1P,   1, 
        GM2P,   1, 
        GM3P,   1, 
        GM8P,   1, 
            ,   1, 
        GM4P,   1, 
        GM5P,   1, 
            ,   1, 
        GM6P,   1, 
        GM7P,   1, 
        Offset (0x3B), 
        GPX0,   1, 
        GPX4,   1, 
        GPX5,   1, 
        GPX1,   1, 
        GPX6,   1, 
        GPX7,   1, 
        GPX2,   1, 
        GPX3,   1, 
        Offset (0x55), 
        SPRE,   1, 
            ,   1, 
            ,   1, 
        EPNM,   1, 
        DPPF,   1, 
        FNGS,   1, 
        Offset (0x61), 
            ,   7, 
        R617,   1, 
        Offset (0x65), 
            ,   4, 
        RSTU,   1, 
        Offset (0x68), 
            ,   3, 
        TPDE,   1, 
            ,   1, 
        Offset (0x92), 
            ,   7, 
        GV7S,   1, 
        Offset (0x96), 
        GP8I,   1, 
        GP9I,   1, 
        Offset (0x9A), 
            ,   7, 
        HECO,   1, 
        Offset (0xA8), 
        PI4E,   1, 
        PI5E,   1, 
        PI6E,   1, 
        PI7E,   1, 
        Offset (0xA9), 
        PI4S,   1, 
        PI5S,   1, 
        PI6S,   1, 
        PI7S,   1
    }

    OperationRegion (P1E0, SystemIO, P1EB, 0x04)
    Field (P1E0, ByteAcc, NoLock, Preserve)
    {
            ,   14, 
        PEWS,   1, 
        WSTA,   1, 
            ,   14, 
        PEWD,   1
    }

    Method (C_OC, 0, NotSerialized)
    {
        Sleep (0x14)
        Store (0x13, CMID) /* \CMID */
        Store (Zero, GPCT) /* \GPCT */
    }

    Method (U_OC, 2, NotSerialized)
    {
        If (LEqual (OCM0, Arg0))
        {
            Store (Arg1, PT0D) /* \PT0D */
        }

        If (LEqual (OCM1, Arg0))
        {
            Store (Arg1, PT1D) /* \PT1D */
        }

        If (LEqual (OCM2, Arg0))
        {
            Store (Arg1, PT2D) /* \PT2D */
        }

        If (LEqual (OCM3, Arg0))
        {
            Store (Arg1, PT3D) /* \PT3D */
        }

        If (LEqual (OCM4, Arg0))
        {
            Store (Arg1, PT4D) /* \PT4D */
        }

        If (LEqual (OCM5, Arg0))
        {
            Store (Arg1, PT5D) /* \PT5D */
        }

        If (LEqual (OCM6, Arg0))
        {
            Store (Arg1, PT6D) /* \PT6D */
        }

        If (LEqual (OCM7, Arg0))
        {
            Store (Arg1, PT7D) /* \PT7D */
        }

        If (LEqual (OCM8, Arg0))
        {
            Store (Arg1, PT8D) /* \PT8D */
        }

        If (LEqual (OCM9, Arg0))
        {
            Store (Arg1, PT9D) /* \PT9D */
        }
    }

    Method (SPTS, 1, NotSerialized)
    {
        If (LEqual (Arg0, 0x03))
        {
            Store (Zero, RSTU) /* \RSTU */
        }

        Store (One, CLPS) /* \CLPS */
        Store (One, SLPS) /* \SLPS */
        If (LLessEqual (\RVID, 0x13))
        {
            Store (Zero, \PWDE)
        }

        If (LEqual (\P92T, 0x00))
        {
            Store (Zero, \PI0E)
        }

        If (LEqual (\P92T, 0x01))
        {
            Store (Zero, \PI1E)
        }

        If (LEqual (\P92T, 0x02))
        {
            Store (Zero, \PI2E)
        }

        If (LEqual (\P92T, 0x03))
        {
            Store (Zero, \PI3E)
        }

        If (LEqual (\P92T, 0x04))
        {
            Store (Zero, \PI4E)
        }

        If (LEqual (\P92T, 0x05))
        {
            Store (Zero, \PI5E)
        }

        If (LEqual (\P92T, 0x06))
        {
            Store (Zero, \PI6E)
        }

        If (LEqual (\P92T, 0x07))
        {
            Store (Zero, \PI7E)
        }

        If (LLessEqual (\P92T, 0x07))
        {
            Store (One, \P92E)
        }
    }

    Method (SWAK, 1, NotSerialized)
    {
        Store (One, HECO) /* \HECO */
        If (LEqual (Arg0, 0x03))
        {
            Store (One, RSTU) /* \RSTU */
        }

        Store (\PEWS, \PEWS)
        If (LLessEqual (\P92T, 0x07))
        {
            Store (Zero, \P92E)
        }

        If (LEqual (\P92T, 0x00))
        {
            Store (One, \PI0E)
        }

        If (LEqual (\P92T, 0x01))
        {
            Store (One, \PI1E)
        }

        If (LEqual (\P92T, 0x02))
        {
            Store (One, \PI2E)
        }

        If (LEqual (\P92T, 0x03))
        {
            Store (One, \PI3E)
        }

        If (LEqual (\P92T, 0x04))
        {
            Store (One, \PI4E)
        }

        If (LEqual (\P92T, 0x05))
        {
            Store (One, \PI5E)
        }

        If (LEqual (\P92T, 0x06))
        {
            Store (One, \PI6E)
        }

        If (LEqual (\P92T, 0x07))
        {
            Store (One, \PI7E)
        }
    }

    Method (TRMD, 1, NotSerialized)
    {
        Store (Arg0, SPRE) /* \SPRE */
        Store (Arg0, TPDE) /* \TPDE */
    }

    If (OCC0)
    {
        Scope (\_GPE)
        {
            Method (_L13, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP0I, GM0P))
                {
                    Not (GM0P, GM0P) /* \GM0P */
                    \U_OC (0x00, GM0P)
                }
            }
        }
    }

    If (OCC1)
    {
        Scope (\_GPE)
        {
            Method (_L14, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP1I, GM1P))
                {
                    Not (GM1P, GM1P) /* \GM1P */
                    \U_OC (0x01, GM1P)
                }
            }
        }
    }

    If (OCC2)
    {
        Scope (\_GPE)
        {
            Method (_L15, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP2I, GM2P))
                {
                    Not (GM2P, GM2P) /* \GM2P */
                    \U_OC (0x02, GM2P)
                }
            }
        }
    }

    If (OCC3)
    {
        Scope (\_GPE)
        {
            Method (_L16, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP3I, GM3P))
                {
                    Not (GM3P, GM3P) /* \GM3P */
                    \U_OC (0x03, GM3P)
                }
            }
        }
    }

    If (OCC4)
    {
        Scope (\_GPE)
        {
            Method (_L19, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP4I, GM4P))
                {
                    Not (GM4P, GM4P) /* \GM4P */
                    \U_OC (0x04, GM4P)
                }
            }
        }
    }

    If (OCC5)
    {
        Scope (\_GPE)
        {
            Method (_L1A, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP5I, GM5P))
                {
                    Not (GM5P, GM5P) /* \GM5P */
                    \U_OC (0x05, GM5P)
                }
            }
        }
    }

    If (OCC6)
    {
        Scope (\_GPE)
        {
            Method (_L1C, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP6I, GM6P))
                {
                    Not (GV6P, GV6P) /* \GV6P */
                    \U_OC (0x06, GV6P)
                }
            }
        }
    }

    If (OCC7)
    {
        Scope (\_GPE)
        {
            Method (_L1D, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP7I, GM7P))
                {
                    Not (GV7P, GV7P) /* \GV7P */
                    \U_OC (0x07, GV7P)
                }
            }
        }
    }

    If (OCC8)
    {
        Scope (\_GPE)
        {
            Method (_L17, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP8I, GM8P))
                {
                    Not (GM8P, GM8P) /* \GM8P */
                    \U_OC (0x08, GM8P)
                }
            }
        }
    }

    If (OCC9)
    {
        Scope (\_GPE)
        {
            Method (_L0E, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
            {
                \C_OC ()
                If (LEqual (GP9I, 0x00))
                {
                    \U_OC (0x09, 0x01)
                }
            }
        }
    }

    OperationRegion (EXTM, SystemMemory, 0x000FF834, 0x0C)
    Field (EXTM, WordAcc, NoLock, Preserve)
    {
        PCIL,   32, 
        PCIH,   32, 
        AMEM,   32
    }

    OperationRegion (ELCR, SystemIO, 0x04D0, 0x02)
    Field (ELCR, ByteAcc, NoLock, Preserve)
    {
        ELC1,   8, 
        ELC2,   8
    }

    OperationRegion (\P01, SystemIO, 0x4001, 0x01)
    Field (\P01, ByteAcc, NoLock, Preserve)
    {
        P1,     8
    }

    OperationRegion (\PR20, SystemIO, 0x4020, 0x04)
    Field (\PR20, DWordAcc, NoLock, Preserve)
    {
        P20,    32
    }

    Name (OSFX, 0x01)
    Name (OSFL, 0x01)
    Method (STRC, 2, NotSerialized)
    {
        If (LNotEqual (SizeOf (Arg0), SizeOf (Arg1)))
        {
            Return (0x00)
        }

        Add (SizeOf (Arg0), 0x01, Local0)
        Name (BUF0, Buffer (Local0) {})
        Name (BUF1, Buffer (Local0) {})
        Store (Arg0, BUF0) /* \STRC.BUF0 */
        Store (Arg1, BUF1) /* \STRC.BUF1 */
        While (Local0)
        {
            Decrement (Local0)
            If (LNotEqual (DerefOf (Index (BUF0, Local0)), DerefOf (Index (
                BUF1, Local0))))
            {
                Return (Zero)
            }
        }

        Return (One)
    }

    OperationRegion (RTCM, SystemIO, 0x70, 0x02)
    Field (RTCM, ByteAcc, NoLock, Preserve)
    {
        CMIN,   8, 
        CMDA,   8
    }

    IndexField (CMIN, CMDA, ByteAcc, NoLock, Preserve)
    {
        Offset (0x0F), 
        SHUT,   8
    }

    OperationRegion (INFO, SystemMemory, 0x000FF840, 0x01)
    Field (INFO, ByteAcc, NoLock, Preserve)
    {
        KBDI,   1, 
        RTCW,   1, 
        PS2F,   1, 
        IRFL,   2, 
        DISE,   1, 
        SSHU,   1, 
        AWMD,   1
    }

    OperationRegion (BEEP, SystemIO, 0x61, 0x01)
    Field (BEEP, ByteAcc, NoLock, Preserve)
    {
        S1B,    8
    }

    OperationRegion (CONT, SystemIO, 0x40, 0x04)
    Field (CONT, ByteAcc, NoLock, Preserve)
    {
        CNT0,   8, 
        CNT1,   8, 
        CNT2,   8, 
        CTRL,   8
    }

    Method (SPKR, 1, NotSerialized)
    {
        Store (S1B, Local0)
        Store (0xB6, CTRL) /* \CTRL */
        Store (0x55, CNT2) /* \CNT2 */
        Store (0x03, CNT2) /* \CNT2 */
        Store (Arg0, Local2)
        While (LGreater (Local2, 0x00))
        {
            Or (S1B, 0x03, S1B) /* \S1B_ */
            Store (0x5FFF, Local3)
            While (LGreater (Local3, 0x00))
            {
                Decrement (Local3)
            }

            And (S1B, 0xFC, S1B) /* \S1B_ */
            Store (0x0EFF, Local3)
            While (LGreater (Local3, 0x00))
            {
                Decrement (Local3)
            }

            Decrement (Local2)
        }

        Store (Local0, S1B) /* \S1B_ */
    }

    Scope (\)
    {
        Name (PICF, 0x00)
        Method (_PIC, 1, NotSerialized)  // _PIC: Interrupt Model
        {
            Store (Arg0, PICF) /* \PICF */
            If (Arg0)
            {
                \_SB.PCI0.LPC0.DSPI ()
            }
        }
    }

    Scope (\)
    {
        Method (SALD, 1, NotSerialized)
        {
            If (LEqual (Arg0, 0x00))
            {
                Store (0x00, LED1) /* \LED1 */
            }

            If (LEqual (Arg0, 0x00))
            {
                Store (0x00, LED1) /* \LED1 */
            }

            If (LEqual (Arg0, 0x03))
            {
                Store (0x02, LED1) /* \LED1 */
            }

            If (LEqual (Arg0, 0x04))
            {
                Store (0x03, LED1) /* \LED1 */
            }

            If (LEqual (Arg0, 0x05))
            {
                Store (0x03, LED1) /* \LED1 */
            }
        }
    }

    Method (\_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        Or (Arg0, 0xF0, Local0)
        Store (Local0, DBG1) /* \DBG1 */
        SALD (Arg0)
        If (LEqual (Arg0, 0x01)) {}
        If (LEqual (Arg0, 0x03))
        {
            Store (0x05, LED1) /* \LED1 */
        }

        If (LEqual (Arg0, 0x05)) {}
        SPTS (Arg0)
    }

    Method (\_WAK, 1, NotSerialized)  // _WAK: Wake
    {
        Store (0xFF, DBG1) /* \DBG1 */
        If (LEqual (Arg0, 0x04))
        {
            If (LEqual (OSFL, 0x00))
            {
                Store (0x58, SMIP) /* \SMIP */
            }

            If (LEqual (OSFL, 0x02))
            {
                Store (0x57, SMIP) /* \SMIP */
            }

            If (LEqual (OSFL, 0x01))
            {
                Store (0x56, SMIP) /* \SMIP */
            }

            If (LEqual (OSFX, 0x03))
            {
                Store (0x59, SMIP) /* \SMIP */
            }
        }

        SALD (0x00)
        SWAK (Arg0)
        If (LEqual (OSFL, 0x01))
        {
            Notify (\_SB.PWRB, 0x02) // Device Wake
        }
        Else
        {
            If (LEqual (Arg0, 0x01))
            {
                And (P1, 0x04, Local0)
                If (LEqual (Local0, 0x00))
                {
                    Notify (\_SB.PWRB, 0x02) // Device Wake
                }
            }

            If (LEqual (Arg0, 0x03))
            {
                If (LEqual (RTCW, Zero))
                {
                    Notify (\_SB.PWRB, 0x02) // Device Wake
                }
            }
        }

        If (LEqual (Arg0, 0x04))
        {
            Notify (\_SB.PWRB, 0x02) // Device Wake
        }
    }

    Scope (\_SI)
    {
    }

    OperationRegion (TEMM, SystemMemory, 0x000FF810, 0x0C)
    Field (TEMM, WordAcc, NoLock, Preserve)
    {
        TP1H,   16, 
        TP1L,   16, 
        TP2H,   16, 
        TP2L,   16, 
        TRPC,   16, 
        SENF,   16
    }

    OperationRegion (SM00, SystemIO, 0x0B00, 0x08)
    Field (SM00, ByteAcc, NoLock, Preserve)
    {
        HSTS,   8, 
        SLVS,   8, 
        CTLR,   8, 
        CMDR,   8, 
        ADDR,   8, 
        DAT0,   8, 
        DAT1,   8, 
        DAT2,   8
    }

    Method (CSMS, 0, NotSerialized)
    {
        And (HSTS, 0x02, Local0)
        While (LNotEqual (Local0, 0x00))
        {
            Stall (0x01)
            Store (HSTS, HSTS) /* \HSTS */
            And (HSTS, 0x18, Local0)
        }
    }

    Method (SWFS, 0, NotSerialized)
    {
        And (HSTS, 0x01, Local0)
        While (LEqual (Local0, 0x01))
        {
            Stall (0x01)
            And (HSTS, 0x01, Local0)
        }

        Store (0xFF, HSTS) /* \HSTS */
    }

    Method (WBYT, 3, NotSerialized)
    {
        CSMS ()
        Store (Arg2, DAT0) /* \DAT0 */
        Store (Arg0, ADDR) /* \ADDR */
        Store (Arg1, CMDR) /* \CMDR */
        Store (0x48, CTLR) /* \CTLR */
        SWFS ()
        CSMS ()
    }

    Method (WWRD, 4, NotSerialized)
    {
        CSMS ()
        Store (Arg2, DAT0) /* \DAT0 */
        Store (Arg3, DAT1) /* \DAT1 */
        Store (Arg0, ADDR) /* \ADDR */
        Store (Arg1, CMDR) /* \CMDR */
        Store (0x4C, CTLR) /* \CTLR */
        SWFS ()
        CSMS ()
    }

    Method (RBYT, 2, NotSerialized)
    {
        CSMS ()
        Store (Arg1, CMDR) /* \CMDR */
        Or (Arg0, 0x01, ADDR) /* \ADDR */
        Store (0x48, CTLR) /* \CTLR */
        SWFS ()
        Return (DAT0) /* \DAT0 */
        CSMS ()
    }

    Method (RWRD, 2, NotSerialized)
    {
        CSMS ()
        Or (Arg0, 0x01, ADDR) /* \ADDR */
        Store (Arg1, CMDR) /* \CMDR */
        Store (0x4C, CTLR) /* \CTLR */
        SWFS ()
        Store (DAT0, Local0)
        ShiftLeft (DAT1, 0x08, Local1)
        Or (Local0, Local1, Local2)
        Return (Local2)
        CSMS ()
    }

    OperationRegion (IP, SystemIO, 0x0870, 0x02)
    Field (IP, ByteAcc, NoLock, Preserve)
    {
        IND0,   8, 
        DTA0,   8
    }

    Method (STOS, 3, NotSerialized)
    {
        SBYT (0x4F, Arg0)
    }

    Method (STHY, 3, NotSerialized)
    {
        SBYT (0x4F, Arg1)
    }

    Method (RTMP, 0, NotSerialized)
    {
        Store (GBYT (0x27), Local0)
        If (LLess (Local0, 0x80))
        {
            Multiply (Local0, 0x0A, Local0)
            Add (Local0, 0x0AAC, Local0)
        }
        Else
        {
            Subtract (Local0, 0x80, Local0)
            Multiply (Local0, 0x0A, Local0)
            Subtract (0x0AAC, Local0, Local0)
        }

        If (LEqual (SSHU, 0x01))
        {
            Return (0x0C3C)
        }
        Else
        {
            Return (Local0)
        }
    }

    Method (SFAN, 1, NotSerialized)
    {
        And (SENF, 0x02, Local0)
        If (LEqual (Local0, Zero))
        {
            If (LEqual (Arg0, Zero))
            {
                FOFF ()
            }
            Else
            {
                FON ()
            }
        }
    }

    Method (SBYT, 2, NotSerialized)
    {
        Store (Arg0, IND0) /* \IND0 */
        Store (Arg1, DTA0) /* \DTA0 */
    }

    Method (GBYT, 1, NotSerialized)
    {
        Store (Arg0, IND0) /* \IND0 */
        Store (DTA0, Local0)
        Return (Local0)
    }

    Method (FON, 0, NotSerialized)
    {
        SBYT (0x30, 0xFF)
        SBYT (0x31, 0xFF)
        SBYT (0x32, 0xFF)
    }

    Method (FOFF, 0, NotSerialized)
    {
        SBYT (0x30, 0x00)
        SBYT (0x31, 0x00)
        SBYT (0x32, 0x00)
    }

    Scope (\_TZ)
    {
        ThermalZone (THRM)
        {
            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Return (RTMP ())
            }

            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                Return (TRPC) /* \TRPC */
            }
        }
    }

    Scope (\_GPE)
    {
        Method (_L04, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
        {
            Notify (\_SB.PCI0.P2P, 0x02) // Device Wake
        }

        Method (_L12, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
        {
            Notify (\_SB.PCI0.PCE2, 0x02) // Device Wake
            Notify (\_SB.PCI0.PCE3, 0x02) // Device Wake
            Notify (\_SB.PCI0.PCE4, 0x02) // Device Wake
            Notify (\_SB.PCI0.PCE5, 0x02) // Device Wake
            Notify (\_SB.PCI0.PCE6, 0x02) // Device Wake
            Notify (\_SB.PCI0.PCE7, 0x02) // Device Wake
        }

        Method (_L03, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
        {
            Notify (\_SB.PCI0.PS2K, 0x02) // Device Wake
        }

        Method (_L0B, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
        {
            Notify (\_SB.PCI0.USB0, 0x02) // Device Wake
            Notify (\_SB.PCI0.USB1, 0x02) // Device Wake
            Notify (\_SB.PCI0.USB2, 0x02) // Device Wake
            Notify (\_SB.PCI0.USB3, 0x02) // Device Wake
            Notify (\_SB.PCI0.USB4, 0x02) // Device Wake
            Notify (\_SB.PCI0.USB5, 0x02) // Device Wake
        }

        Method (_L1B, 0, NotSerialized)  // _Lxx: Level-Triggered GPE
        {
            Notify (\_SB.PCI0.SBAZ, 0x02) // Device Wake
        }
    }

    Scope (\_SB)
    {
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            Store (OSFX, OSTY) /* \OSTY */
            If (LEqual (OSFX, 0x00))
            {
                Store (0x04, OSTY) /* \OSTY */
            }

            If (LEqual (OSFX, 0x03))
            {
                Store (0x05, OSTY) /* \OSTY */
            }

            If (LEqual (OSFX, 0x04))
            {
                Store (0x06, OSTY) /* \OSTY */
            }
        }

        Device (PWRB)
        {
            Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */)  // _HID: Hardware ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (0x0B)
            }
        }

        Device (PCI0)
        {
            Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
            Name (_ADR, 0x00)  // _ADR: Address
            OperationRegion (BAR1, PCI_Config, 0x14, 0x04)
            Field (BAR1, ByteAcc, NoLock, Preserve)
            {
                MMIO,   32
            }

            Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
            {
                If (LEqual (OSFL, 0x02))
                {
                    Return (0x02)
                }
                Else
                {
                    Return (0x03)
                }
            }

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (0x0F)
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                Name (BUF0, ResourceTemplate ()
                {
                    WordBusNumber (ResourceConsumer, MinNotFixed, MaxNotFixed, PosDecode,
                        0x0000,             // Granularity
                        0x0000,             // Range Minimum
                        0x00FF,             // Range Maximum
                        0x0000,             // Translation Offset
                        0x0100,             // Length
                        ,, )
                    IO (Decode16,
                        0x0CF8,             // Range Minimum
                        0x0CF8,             // Range Maximum
                        0x01,               // Alignment
                        0x08,               // Length
                        )
                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                        0x0000,             // Granularity
                        0x0000,             // Range Minimum
                        0x0CF7,             // Range Maximum
                        0x0000,             // Translation Offset
                        0x0CF8,             // Length
                        ,, , TypeStatic)
                    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                        0x0000,             // Granularity
                        0x0D00,             // Range Minimum
                        0xFFFF,             // Range Maximum
                        0x0000,             // Translation Offset
                        0xF300,             // Length
                        ,, , TypeStatic)
                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                        0x00000000,         // Granularity
                        0x000A0000,         // Range Minimum
                        0x000BFFFF,         // Range Maximum
                        0x00000000,         // Translation Offset
                        0x00020000,         // Length
                        ,, , AddressRangeMemory, TypeStatic)
                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                        0x00000000,         // Granularity
                        0x000C0000,         // Range Minimum
                        0x000DFFFF,         // Range Maximum
                        0x00000000,         // Translation Offset
                        0x00020000,         // Length
                        ,, , AddressRangeMemory, TypeStatic)
                    DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                        0x00000000,         // Granularity
                        0x00100000,         // Range Minimum
                        0xFFFFFFFF,         // Range Maximum
                        0x00000000,         // Translation Offset
                        0xFFF00000,         // Length
                        ,, _Y00, AddressRangeMemory, TypeStatic)
                })
                CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._MIN, PLMN)  // _MIN: Minimum Base Address
                CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._MAX, PLMX)  // _MAX: Maximum Base Address
                CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._LEN, PLLN)  // _LEN: Length
                ShiftLeft (PCIL, 0x0C, PLMN) /* \_SB_.PCI0._CRS.PLMN */
                Subtract (PLMX, PLMN, Local0)
                Add (Local0, 0x01, PLLN) /* \_SB_.PCI0._CRS.PLLN */
                Return (BUF0) /* \_SB_.PCI0._CRS.BUF0 */
            }

            Name (PICM, Package (0x18)
            {
                Package (0x04)
                {
                    0x0002FFFF, 
                    0x00, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0002FFFF, 
                    0x01, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0002FFFF, 
                    0x02, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0002FFFF, 
                    0x03, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x00, 
                    \_SB.PCI0.LPC0.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x01, 
                    \_SB.PCI0.LPC0.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x02, 
                    \_SB.PCI0.LPC0.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x03, 
                    \_SB.PCI0.LPC0.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x00, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x01, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x02, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x03, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x00, 
                    \_SB.PCI0.LPC0.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x01, 
                    \_SB.PCI0.LPC0.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x02, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x03, 
                    \_SB.PCI0.LPC0.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x00, 
                    \_SB.PCI0.LPC0.LNKA, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x01, 
                    \_SB.PCI0.LPC0.LNKB, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x02, 
                    \_SB.PCI0.LPC0.LNKC, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x03, 
                    \_SB.PCI0.LPC0.LNKD, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0012FFFF, 
                    0x00, 
                    \_SB.PCI0.LPC0.LNK0, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0012FFFF, 
                    0x01, 
                    \_SB.PCI0.LPC0.LNK0, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0012FFFF, 
                    0x02, 
                    \_SB.PCI0.LPC0.LNK0, 
                    0x00
                }, 

                Package (0x04)
                {
                    0x0012FFFF, 
                    0x03, 
                    \_SB.PCI0.LPC0.LNK0, 
                    0x00
                }
            })
            Name (APIC, Package (0x15)
            {
                Package (0x04)
                {
                    0x0002FFFF, 
                    0x00, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0002FFFF, 
                    0x01, 
                    0x00, 
                    0x12
                }, 

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

                Package (0x04)
                {
                    0x0002FFFF, 
                    0x03, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x00, 
                    0x00, 
                    0x10
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x01, 
                    0x00, 
                    0x10
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x02, 
                    0x00, 
                    0x10
                }, 

                Package (0x04)
                {
                    0x0004FFFF, 
                    0x03, 
                    0x00, 
                    0x10
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x00, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x01, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x02, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0005FFFF, 
                    0x03, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x00, 
                    0x00, 
                    0x10
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x01, 
                    0x00, 
                    0x11
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x02, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0014FFFF, 
                    0x03, 
                    0x00, 
                    0x13
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x00, 
                    0x00, 
                    0x10
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x01, 
                    0x00, 
                    0x11
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x02, 
                    0x00, 
                    0x12
                }, 

                Package (0x04)
                {
                    0x0013FFFF, 
                    0x03, 
                    0x00, 
                    0x13
                }, 

                Package (0x04)
                {
                    0x0012FFFF, 
                    0x00, 
                    0x00, 
                    0x16
                }
            })
            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
            {
                If (LNot (PICF))
                {
                    Return (PICM) /* \_SB_.PCI0.PICM */
                }
                Else
                {
                    Return (APIC) /* \_SB_.PCI0.APIC */
                }
            }

            Device (SMB0)
            {
                Name (_ADR, 0x00140000)  // _ADR: Address
                OperationRegion (SMCF, PCI_Config, 0x90, 0x02)
                Field (SMCF, WordAcc, NoLock, Preserve)
                {
                    SB1,    16
                }

                Method (SMBB, 0, NotSerialized)
                {
                    And (SB1, 0xFFFE, Local0)
                    Return (Local0)
                }

                OperationRegion (\_SB.PCI0.SMB0.HETT, PCI_Config, 0x64, 0x02)
                Scope (\)
                {
                    Field (\_SB.PCI0.SMB0.HETT, ByteAcc, NoLock, Preserve)
                    {
                        HP0,    8, 
                            ,   2, 
                        HPTF,   1, 
                        Offset (0x02)
                    }
                }
            }

            Device (USB0)
            {
                Name (_ADR, 0x00130000)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0B, 
                    0x03
                })
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (LEqual (OSFL, 0x02))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }
            }

            Device (USB1)
            {
                Name (_ADR, 0x00130001)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0B, 
                    0x03
                })
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (LEqual (OSFL, 0x02))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }
            }

            Device (USB2)
            {
                Name (_ADR, 0x00130002)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0B, 
                    0x03
                })
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (LEqual (OSFL, 0x02))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }
            }

            Device (USB3)
            {
                Name (_ADR, 0x00130003)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0B, 
                    0x03
                })
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (LEqual (OSFL, 0x02))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }
            }

            Device (USB4)
            {
                Name (_ADR, 0x00130004)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0B, 
                    0x03
                })
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (LEqual (OSFL, 0x02))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }
            }

            Device (USB5)
            {
                Name (_ADR, 0x00130005)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0B, 
                    0x03
                })
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (LEqual (OSFL, 0x02))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }
            }

            Device (SBAZ)
            {
                Name (_ADR, 0x00140002)  // _ADR: Address
                OperationRegion (PCI, PCI_Config, 0x00, 0x0100)
                Field (PCI, AnyAcc, NoLock, Preserve)
                {
                    Offset (0x42), 
                    DNSP,   1, 
                    DNSO,   1, 
                    ENSR,   1
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x1B, 
                    0x04
                })
            }

            Device (LPC0)
            {
                Name (_ADR, 0x00140003)  // _ADR: Address
                Device (PMIO)
                {
                    Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
                    Name (_UID, 0x03)  // _UID: Unique ID
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IO (Decode16,
                                0x4100,             // Range Minimum
                                0x4100,             // Range Maximum
                                0x01,               // Alignment
                                0x20,               // Length
                                )
                            IO (Decode16,
                                0x0228,             // Range Minimum
                                0x0228,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IO (Decode16,
                                0x040B,             // Range Minimum
                                0x040B,             // Range Maximum
                                0x01,               // Alignment
                                0x01,               // Length
                                )
                            IO (Decode16,
                                0x04D6,             // Range Minimum
                                0x04D6,             // Range Maximum
                                0x01,               // Alignment
                                0x01,               // Length
                                )
                            IO (Decode16,
                                0x0C00,             // Range Minimum
                                0x0C00,             // Range Maximum
                                0x01,               // Alignment
                                0x02,               // Length
                                )
                            IO (Decode16,
                                0x0C14,             // Range Minimum
                                0x0C14,             // Range Maximum
                                0x01,               // Alignment
                                0x01,               // Length
                                )
                            IO (Decode16,
                                0x0C50,             // Range Minimum
                                0x0C50,             // Range Maximum
                                0x01,               // Alignment
                                0x03,               // Length
                                )
                            IO (Decode16,
                                0x0C6C,             // Range Minimum
                                0x0C6C,             // Range Maximum
                                0x01,               // Alignment
                                0x02,               // Length
                                )
                            IO (Decode16,
                                0x0C6F,             // Range Minimum
                                0x0C6F,             // Range Maximum
                                0x01,               // Alignment
                                0x01,               // Length
                                )
                            IO (Decode16,
                                0x0CD0,             // Range Minimum
                                0x0CD0,             // Range Maximum
                                0x01,               // Alignment
                                0x02,               // Length
                                )
                            IO (Decode16,
                                0x0CD2,             // Range Minimum
                                0x0CD2,             // Range Maximum
                                0x01,               // Alignment
                                0x02,               // Length
                                )
                            IO (Decode16,
                                0x0CD4,             // Range Minimum
                                0x0CD4,             // Range Maximum
                                0x01,               // Alignment
                                0x0C,               // Length
                                )
                            IO (Decode16,
                                0x4000,             // Range Minimum
                                0x4000,             // Range Maximum
                                0x01,               // Alignment
                                0xFF,               // Length
                                )
                            IO (Decode16,
                                0x4210,             // Range Minimum
                                0x4210,             // Range Maximum
                                0x01,               // Alignment
                                0x08,               // Length
                                )
                            IO (Decode16,
                                0x0B10,             // Range Minimum
                                0x0B10,             // Range Maximum
                                0x01,               // Alignment
                                0x10,               // Length
                                )
                            DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                                0x00000000,         // Granularity
                                0xE0000000,         // Range Minimum
                                0xE0000000,         // Range Maximum
                                0x00000000,         // Translation Offset
                                0x00000000,         // Length
                                ,, _Y01, AddressRangeMemory, TypeStatic)
                            DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                                0x00000000,         // Granularity
                                0xFEE00400,         // Range Minimum
                                0xFEE00FFF,         // Range Maximum
                                0x00000000,         // Translation Offset
                                0x00000BFF,         // Length
                                ,, , AddressRangeMemory, TypeStatic)
                        })
                        CreateDWordField (BUF0, \_SB.PCI0.LPC0.PMIO._CRS._Y01._MIN, BARX)  // _MIN: Minimum Base Address
                        CreateDWordField (BUF0, \_SB.PCI0.LPC0.PMIO._CRS._Y01._LEN, GALN)  // _LEN: Length
                        CreateDWordField (BUF0, \_SB.PCI0.LPC0.PMIO._CRS._Y01._MAX, GAMX)  // _MAX: Maximum Base Address
                        Store (0x1000, GALN) /* \_SB_.PCI0.LPC0.PMIO._CRS.GALN */
                        Store (\_SB.PCI0.MMIO, Local0)
                        And (Local0, 0xFFFFFFF0, BARX) /* \_SB_.PCI0.LPC0.PMIO._CRS.BARX */
                        Add (Local0, GALN, GAMX) /* \_SB_.PCI0.LPC0.PMIO._CRS.GAMX */
                        Subtract (GAMX, 0x01, GAMX) /* \_SB_.PCI0.LPC0.PMIO._CRS.GAMX */
                        Return (BUF0) /* \_SB_.PCI0.LPC0.PMIO._CRS.BUF0 */
                    }
                }

                OperationRegion (PIRQ, SystemIO, 0x0C00, 0x02)
                Field (PIRQ, ByteAcc, NoLock, Preserve)
                {
                    PIID,   8, 
                    PIDA,   8
                }

                Name (IPRS, ResourceTemplate ()
                {
                    IRQ (Level, ActiveLow, Shared, )
                        {3,4,5,6,7,10,11}
                })
                IndexField (PIID, PIDA, ByteAcc, NoLock, Preserve)
                {
                    PIRA,   8, 
                    PIRB,   8, 
                    PIRC,   8, 
                    PIRD,   8, 
                    PIRS,   8, 
                    Offset (0x09), 
                    PIRE,   8, 
                    PIRF,   8, 
                    PIR0,   8, 
                    PIR1,   8
                }

                Method (DSPI, 0, NotSerialized)
                {
                    Store (0x00, PIRA) /* \_SB_.PCI0.LPC0.PIRA */
                    Store (0x00, PIRB) /* \_SB_.PCI0.LPC0.PIRB */
                    Store (0x00, PIRC) /* \_SB_.PCI0.LPC0.PIRC */
                    Store (0x00, PIRD) /* \_SB_.PCI0.LPC0.PIRD */
                    Store (0x00, PIRE) /* \_SB_.PCI0.LPC0.PIRE */
                    Store (0x00, PIRF) /* \_SB_.PCI0.LPC0.PIRF */
                    Store (0x00, PIR0) /* \_SB_.PCI0.LPC0.PIR0 */
                    Store (0x00, PIR1) /* \_SB_.PCI0.LPC0.PIR1 */
                }

                Device (LNKA)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x01)  // _UID: Unique ID
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If (PIRA)
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x09)
                        }
                    }

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIRA) /* \_SB_.PCI0.LPC0.PIRA */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRA, IRQ0) /* \_SB_.PCI0.LPC0.LNKA._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRA) /* \_SB_.PCI0.LPC0.PIRA */
                    }
                }

                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
                    {
                        If (PIRB)
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x09)
                        }
                    }

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIRB) /* \_SB_.PCI0.LPC0.PIRB */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRB, IRQ0) /* \_SB_.PCI0.LPC0.LNKB._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRB) /* \_SB_.PCI0.LPC0.PIRB */
                    }
                }

                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
                    {
                        If (PIRC)
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x09)
                        }
                    }

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIRC) /* \_SB_.PCI0.LPC0.PIRC */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRC, IRQ0) /* \_SB_.PCI0.LPC0.LNKC._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRC) /* \_SB_.PCI0.LPC0.PIRC */
                    }
                }

                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
                    {
                        If (PIRD)
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x09)
                        }
                    }

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIRD) /* \_SB_.PCI0.LPC0.PIRD */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRD, IRQ0) /* \_SB_.PCI0.LPC0.LNKD._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRD) /* \_SB_.PCI0.LPC0.PIRD */
                    }
                }

                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
                    {
                        If (PIRE)
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x09)
                        }
                    }

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIRE) /* \_SB_.PCI0.LPC0.PIRE */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRE, IRQ0) /* \_SB_.PCI0.LPC0.LNKE._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRE) /* \_SB_.PCI0.LPC0.PIRE */
                    }
                }

                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
                    {
                        If (PIRF)
                        {
                            Return (0x0B)
                        }
                        Else
                        {
                            Return (0x09)
                        }
                    }

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIRF) /* \_SB_.PCI0.LPC0.PIRF */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIRF, IRQ0) /* \_SB_.PCI0.LPC0.LNKF._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIRF) /* \_SB_.PCI0.LPC0.PIRF */
                    }
                }

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

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIR0) /* \_SB_.PCI0.LPC0.PIR0 */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIR0, IRQ0) /* \_SB_.PCI0.LPC0.LNK0._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIR0) /* \_SB_.PCI0.LPC0.PIR0 */
                    }
                }

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

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

                    Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                    {
                        Store (0x00, PIR1) /* \_SB_.PCI0.LPC0.PIR1 */
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Store (IPRS, Local0)
                        CreateWordField (Local0, 0x01, IRQ0)
                        ShiftLeft (0x01, PIR1, IRQ0) /* \_SB_.PCI0.LPC0.LNK1._CRS.IRQ0 */
                        Return (Local0)
                    }

                    Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Decrement (Local0)
                        Store (Local0, PIR1) /* \_SB_.PCI0.LPC0.PIR1 */
                    }
                }

                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
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00A0,             // Range Minimum
                            0x00A0,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IRQNoFlags ()
                            {2}
                    })
                }

                Device (DMA1)
                {
                    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
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x0080,             // Range Minimum
                            0x0080,             // Range Maximum
                            0x01,               // Alignment
                            0x11,               // Length
                            )
                        IO (Decode16,
                            0x0094,             // Range Minimum
                            0x0094,             // Range Maximum
                            0x01,               // Alignment
                            0x0C,               // Length
                            )
                        IO (Decode16,
                            0x00C0,             // Range Minimum
                            0x00C0,             // Range Maximum
                            0x01,               // Alignment
                            0x20,               // Length
                            )
                    })
                }

                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 (LGreaterEqual (OSFX, 0x03))
                        {
                            If (HPTF)
                            {
                                Return (ATT6) /* \_SB_.PCI0.LPC0.TMR_.ATT6 */
                            }
                            Else
                            {
                                Return (ATT5) /* \_SB_.PCI0.LPC0.TMR_.ATT5 */
                            }
                        }
                        Else
                        {
                            Return (ATT5) /* \_SB_.PCI0.LPC0.TMR_.ATT5 */
                        }
                    }
                }

                Device (HPET)
                {
                    Name (_HID, EisaId ("PNP0103") /* HPET System Timer */)  // _HID: Hardware ID
                    Name (ATT3, ResourceTemplate ()
                    {
                        IRQNoFlags ()
                            {0}
                        IRQNoFlags ()
                            {8}
                        Memory32Fixed (ReadWrite,
                            0xFED00000,         // Address Base
                            0x00000400,         // Address Length
                            )
                    })
                    Name (ATT4, ResourceTemplate ()
                    {
                    })
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If (LGreaterEqual (OSFX, 0x03))
                        {
                            If (HPTF)
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (0x00)
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        If (LGreaterEqual (OSFX, 0x03))
                        {
                            If (HPTF)
                            {
                                Return (ATT3) /* \_SB_.PCI0.LPC0.HPET.ATT3 */
                            }
                            Else
                            {
                                Return (ATT4) /* \_SB_.PCI0.LPC0.HPET.ATT4 */
                            }
                        }
                        Else
                        {
                            Return (ATT4) /* \_SB_.PCI0.LPC0.HPET.ATT4 */
                        }
                    }
                }

                Device (RTC)
                {
                    Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */)  // _HID: Hardware ID
                    Name (ATT0, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                        IRQNoFlags ()
                            {8}
                    })
                    Name (ATT1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                    })
                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        If (LGreaterEqual (OSFX, 0x03))
                        {
                            If (HPTF)
                            {
                                Return (ATT1) /* \_SB_.PCI0.LPC0.RTC_.ATT1 */
                            }
                            Else
                            {
                                Return (ATT0) /* \_SB_.PCI0.LPC0.RTC_.ATT0 */
                            }
                        }
                        Else
                        {
                            Return (ATT0) /* \_SB_.PCI0.LPC0.RTC_.ATT0 */
                        }
                    }
                }

                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
                            0x01,               // 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
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        IRQNoFlags ()
                            {13}
                    })
                }
            }

            Device (P2P)
            {
                Name (_ADR, 0x00140004)  // _ADR: Address
                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    If (LEqual (OSFL, 0x02))
                    {
                        Return (0x02)
                    }
                    Else
                    {
                        Return (0x03)
                    }
                }

                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x04, 
                        0x05
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x00, 
                        \_SB.PCI0.LPC0.LNKE, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x01, 
                        \_SB.PCI0.LPC0.LNKF, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x02, 
                        \_SB.PCI0.LPC0.LNK0, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x03, 
                        \_SB.PCI0.LPC0.LNK1, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x00, 
                        0x00, 
                        0x14
                    }, 

                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x01, 
                        0x00, 
                        0x15
                    }, 

                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x02, 
                        0x00, 
                        0x16
                    }, 

                    Package (0x04)
                    {
                        0x0006FFFF, 
                        0x03, 
                        0x00, 
                        0x17
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.P2P_.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.P2P_.APIC */
                    }
                }
            }

            Device (IDE)
            {
                Name (_ADR, 0x00140001)  // _ADR: Address
                Name (UDMT, Package (0x08)
                {
                    0x78, 
                    0x5A, 
                    0x3C, 
                    0x2D, 
                    0x1E, 
                    0x14, 
                    0x0F, 
                    0x00
                })
                Name (PIOT, Package (0x06)
                {
                    0x0258, 
                    0x0186, 
                    0x010E, 
                    0xB4, 
                    0x78, 
                    0x00
                })
                Name (PITR, Package (0x06)
                {
                    0x99, 
                    0x47, 
                    0x34, 
                    0x22, 
                    0x20, 
                    0x99
                })
                Name (MDMT, Package (0x04)
                {
                    0x01E0, 
                    0x96, 
                    0x78, 
                    0x00
                })
                Name (MDTR, Package (0x04)
                {
                    0x77, 
                    0x21, 
                    0x20, 
                    0xFF
                })
                OperationRegion (IDE, PCI_Config, 0x40, 0x20)
                Field (IDE, AnyAcc, NoLock, Preserve)
                {
                    PPIT,   16, 
                    SPIT,   16, 
                    PMDT,   16, 
                    SMDT,   16, 
                    PPIC,   8, 
                    SPIC,   8, 
                    PPIM,   8, 
                    SPIM,   8, 
                    Offset (0x14), 
                    PUDC,   2, 
                    SUDC,   2, 
                    Offset (0x16), 
                    PUDM,   8, 
                    SUDM,   8
                }

                Method (GETT, 1, NotSerialized)
                {
                    Store (And (Arg0, 0x0F), Local0)
                    Store (ShiftRight (Arg0, 0x04), Local1)
                    Return (Multiply (0x1E, Add (Add (Local0, 0x01), Add (Local1, 
                        0x01))))
                }

                Method (GTM, 1, NotSerialized)
                {
                    CreateByteField (Arg0, 0x00, PIT1)
                    CreateByteField (Arg0, 0x01, PIT0)
                    CreateByteField (Arg0, 0x02, MDT1)
                    CreateByteField (Arg0, 0x03, MDT0)
                    CreateByteField (Arg0, 0x04, PICX)
                    CreateByteField (Arg0, 0x05, UDCX)
                    CreateByteField (Arg0, 0x06, UDMX)
                    Name (BUF, Buffer (0x14)
                    {
                        /* 0000 */  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,  /* ........ */
                        /* 0008 */  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,  /* ........ */
                        /* 0010 */  0x00, 0x00, 0x00, 0x00                           /* .... */
                    })
                    CreateDWordField (BUF, 0x00, PIO0)
                    CreateDWordField (BUF, 0x04, DMA0)
                    CreateDWordField (BUF, 0x08, PIO1)
                    CreateDWordField (BUF, 0x0C, DMA1)
                    CreateDWordField (BUF, 0x10, FLAG)
                    If (And (PICX, 0x01))
                    {
                        Return (BUF) /* \_SB_.PCI0.IDE_.GTM_.BUF_ */
                    }

                    Store (GETT (PIT0), PIO0) /* \_SB_.PCI0.IDE_.GTM_.PIO0 */
                    Store (GETT (PIT1), PIO1) /* \_SB_.PCI0.IDE_.GTM_.PIO1 */
                    If (And (UDCX, 0x01))
                    {
                        Or (FLAG, 0x01, FLAG) /* \_SB_.PCI0.IDE_.GTM_.FLAG */
                        Store (DerefOf (Index (^UDMT, And (UDMX, 0x0F))), DMA0) /* \_SB_.PCI0.IDE_.GTM_.DMA0 */
                    }
                    Else
                    {
                        Store (GETT (MDT0), DMA0) /* \_SB_.PCI0.IDE_.GTM_.DMA0 */
                    }

                    If (And (UDCX, 0x02))
                    {
                        Or (FLAG, 0x04, FLAG) /* \_SB_.PCI0.IDE_.GTM_.FLAG */
                        Store (DerefOf (Index (^UDMT, ShiftRight (UDMX, 0x04))), DMA1) /* \_SB_.PCI0.IDE_.GTM_.DMA1 */
                    }
                    Else
                    {
                        Store (GETT (MDT1), DMA1) /* \_SB_.PCI0.IDE_.GTM_.DMA1 */
                    }

                    Or (FLAG, 0x1A, FLAG) /* \_SB_.PCI0.IDE_.GTM_.FLAG */
                    Return (BUF) /* \_SB_.PCI0.IDE_.GTM_.BUF_ */
                }

                Method (STM, 3, NotSerialized)
                {
                    CreateDWordField (Arg0, 0x00, PIO0)
                    CreateDWordField (Arg0, 0x04, DMA0)
                    CreateDWordField (Arg0, 0x08, PIO1)
                    CreateDWordField (Arg0, 0x0C, DMA1)
                    CreateDWordField (Arg0, 0x10, FLAG)
                    Name (BUF, Buffer (0x07)
                    {
                         0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00         /* ....... */
                    })
                    CreateByteField (BUF, 0x00, PIT1)
                    CreateByteField (BUF, 0x01, PIT0)
                    CreateByteField (BUF, 0x02, MDT1)
                    CreateByteField (BUF, 0x03, MDT0)
                    CreateByteField (BUF, 0x04, PIMX)
                    CreateByteField (BUF, 0x05, UDCX)
                    CreateByteField (BUF, 0x06, UDMX)
                    Store (Match (^PIOT, MLE, PIO0, MTR, 0x00, 0x00), Local0)
                    Divide (Local0, 0x05, Local0)
                    Store (Match (^PIOT, MLE, PIO1, MTR, 0x00, 0x00), Local1)
                    Divide (Local1, 0x05, Local1)
                    Store (Or (ShiftLeft (Local1, 0x04), Local0), PIMX) /* \_SB_.PCI0.IDE_.STM_.PIMX */
                    Store (DerefOf (Index (^PITR, Local0)), PIT0) /* \_SB_.PCI0.IDE_.STM_.PIT0 */
                    Store (DerefOf (Index (^PITR, Local1)), PIT1) /* \_SB_.PCI0.IDE_.STM_.PIT1 */
                    If (And (FLAG, 0x01))
                    {
                        Store (Match (^UDMT, MLE, DMA0, MTR, 0x00, 0x00), Local0)
                        Divide (Local0, 0x07, Local0)
                        Or (UDMX, Local0, UDMX) /* \_SB_.PCI0.IDE_.STM_.UDMX */
                        Or (UDCX, 0x01, UDCX) /* \_SB_.PCI0.IDE_.STM_.UDCX */
                    }
                    Else
                    {
                        If (LNotEqual (DMA0, 0xFFFFFFFF))
                        {
                            Store (Match (^MDMT, MLE, DMA0, MTR, 0x00, 0x00), Local0)
                            Store (DerefOf (Index (^MDTR, Local0)), MDT0) /* \_SB_.PCI0.IDE_.STM_.MDT0 */
                        }
                    }

                    If (And (FLAG, 0x04))
                    {
                        Store (Match (^UDMT, MLE, DMA1, MTR, 0x00, 0x00), Local0)
                        Divide (Local0, 0x07, Local0)
                        Or (UDMX, ShiftLeft (Local0, 0x04), UDMX) /* \_SB_.PCI0.IDE_.STM_.UDMX */
                        Or (UDCX, 0x02, UDCX) /* \_SB_.PCI0.IDE_.STM_.UDCX */
                    }
                    Else
                    {
                        If (LNotEqual (DMA1, 0xFFFFFFFF))
                        {
                            Store (Match (^MDMT, MLE, DMA1, MTR, 0x00, 0x00), Local0)
                            Store (DerefOf (Index (^MDTR, Local0)), MDT1) /* \_SB_.PCI0.IDE_.STM_.MDT1 */
                        }
                    }

                    Return (BUF) /* \_SB_.PCI0.IDE_.STM_.BUF_ */
                }

                Method (GTF, 2, NotSerialized)
                {
                    CreateByteField (Arg1, 0x00, MDT1)
                    CreateByteField (Arg1, 0x01, MDT0)
                    CreateByteField (Arg1, 0x02, PIMX)
                    CreateByteField (Arg1, 0x03, UDCX)
                    CreateByteField (Arg1, 0x04, UDMX)
                    If (LEqual (Arg0, 0xA0))
                    {
                        Store (And (PIMX, 0x0F), Local0)
                        Store (MDT0, Local1)
                        And (UDCX, 0x01, Local2)
                        Store (And (UDMX, 0x0F), Local3)
                    }
                    Else
                    {
                        Store (ShiftRight (PIMX, 0x04), Local0)
                        Store (MDT1, Local1)
                        And (UDCX, 0x02, Local2)
                        Store (ShiftRight (UDMX, 0x04), Local3)
                    }

                    Name (BUF, Buffer (0x0E)
                    {
                        /* 0000 */  0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF, 0x03,  /* ........ */
                        /* 0008 */  0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF               /* ...... */
                    })
                    CreateByteField (BUF, 0x01, PMOD)
                    CreateByteField (BUF, 0x08, DMOD)
                    CreateByteField (BUF, 0x05, CMDA)
                    CreateByteField (BUF, 0x0C, CMDB)
                    Store (Arg0, CMDA) /* \_SB_.PCI0.IDE_.GTF_.CMDA */
                    Store (Arg0, CMDB) /* \_SB_.PCI0.IDE_.GTF_.CMDB */
                    Or (Local0, 0x08, PMOD) /* \_SB_.PCI0.IDE_.GTF_.PMOD */
                    If (Local2)
                    {
                        Or (Local3, 0x40, DMOD) /* \_SB_.PCI0.IDE_.GTF_.DMOD */
                    }
                    Else
                    {
                        Store (Match (^MDMT, MLE, GETT (Local1), MTR, 0x00, 0x00), Local4)
                        If (LLess (Local4, 0x03))
                        {
                            Or (0x20, Local4, DMOD) /* \_SB_.PCI0.IDE_.GTF_.DMOD */
                        }
                    }

                    Return (BUF) /* \_SB_.PCI0.IDE_.GTF_.BUF_ */
                }

                Device (PRID)
                {
                    Name (_ADR, 0x00)  // _ADR: Address
                    Method (_GTM, 0, NotSerialized)  // _GTM: Get Timing Mode
                    {
                        Name (BUF, Buffer (0x07)
                        {
                             0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00         /* ....... */
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIC)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (^^PPIT, VPIT) /* \_SB_.PCI0.IDE_.PRID._GTM.VPIT */
                        Store (^^PMDT, VMDT) /* \_SB_.PCI0.IDE_.PRID._GTM.VMDT */
                        Store (^^PPIC, VPIC) /* \_SB_.PCI0.IDE_.PRID._GTM.VPIC */
                        Store (^^PUDC, VUDC) /* \_SB_.PCI0.IDE_.PRID._GTM.VUDC */
                        Store (^^PUDM, VUDM) /* \_SB_.PCI0.IDE_.PRID._GTM.VUDM */
                        Return (GTM (BUF))
                    }

                    Method (_STM, 3, NotSerialized)  // _STM: Set Timing Mode
                    {
                        Name (BUF, Buffer (0x07)
                        {
                             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00         /* ....... */
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIM)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (STM (Arg0, Arg1, Arg2), BUF) /* \_SB_.PCI0.IDE_.PRID._STM.BUF_ */
                        Store (VPIT, ^^PPIT) /* \_SB_.PCI0.IDE_.PPIT */
                        Store (VMDT, ^^PMDT) /* \_SB_.PCI0.IDE_.PMDT */
                        Store (VPIM, ^^PPIM) /* \_SB_.PCI0.IDE_.PPIM */
                        Store (VUDC, ^^PUDC) /* \_SB_.PCI0.IDE_.PUDC */
                        Store (VUDM, ^^PUDM) /* \_SB_.PCI0.IDE_.PUDM */
                    }

                    Device (P_D0)
                    {
                        Name (_ADR, 0x00)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                 0x00, 0x00, 0x00, 0x00, 0x00                     /* ..... */
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^PMDT, VMDT) /* \_SB_.PCI0.IDE_.PRID.P_D0._GTF.VMDT */
                            Store (^^^PPIM, VPIM) /* \_SB_.PCI0.IDE_.PRID.P_D0._GTF.VPIM */
                            Store (^^^PUDC, VUDC) /* \_SB_.PCI0.IDE_.PRID.P_D0._GTF.VUDC */
                            Store (^^^PUDM, VUDM) /* \_SB_.PCI0.IDE_.PRID.P_D0._GTF.VUDM */
                            Return (GTF (0xA0, BUF))
                        }
                    }

                    Device (P_D1)
                    {
                        Name (_ADR, 0x01)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                 0x00, 0x00, 0x00, 0x00, 0x00                     /* ..... */
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^PMDT, VMDT) /* \_SB_.PCI0.IDE_.PRID.P_D1._GTF.VMDT */
                            Store (^^^PPIM, VPIM) /* \_SB_.PCI0.IDE_.PRID.P_D1._GTF.VPIM */
                            Store (^^^PUDC, VUDC) /* \_SB_.PCI0.IDE_.PRID.P_D1._GTF.VUDC */
                            Store (^^^PUDM, VUDM) /* \_SB_.PCI0.IDE_.PRID.P_D1._GTF.VUDM */
                            Return (GTF (0xB0, BUF))
                        }
                    }
                }

                Device (SECD)
                {
                    Name (_ADR, 0x01)  // _ADR: Address
                    Method (_GTM, 0, NotSerialized)  // _GTM: Get Timing Mode
                    {
                        Name (BUF, Buffer (0x07)
                        {
                             0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00         /* ....... */
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIC)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (^^SPIT, VPIT) /* \_SB_.PCI0.IDE_.SECD._GTM.VPIT */
                        Store (^^SMDT, VMDT) /* \_SB_.PCI0.IDE_.SECD._GTM.VMDT */
                        Store (^^SPIC, VPIC) /* \_SB_.PCI0.IDE_.SECD._GTM.VPIC */
                        Store (^^SUDC, VUDC) /* \_SB_.PCI0.IDE_.SECD._GTM.VUDC */
                        Store (^^SUDM, VUDM) /* \_SB_.PCI0.IDE_.SECD._GTM.VUDM */
                        Return (GTM (BUF))
                    }

                    Method (_STM, 3, NotSerialized)  // _STM: Set Timing Mode
                    {
                        Name (BUF, Buffer (0x07)
                        {
                             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00         /* ....... */
                        })
                        CreateWordField (BUF, 0x00, VPIT)
                        CreateWordField (BUF, 0x02, VMDT)
                        CreateByteField (BUF, 0x04, VPIM)
                        CreateByteField (BUF, 0x05, VUDC)
                        CreateByteField (BUF, 0x06, VUDM)
                        Store (STM (Arg0, Arg1, Arg2), BUF) /* \_SB_.PCI0.IDE_.SECD._STM.BUF_ */
                        Store (VPIT, ^^SPIT) /* \_SB_.PCI0.IDE_.SPIT */
                        Store (VMDT, ^^SMDT) /* \_SB_.PCI0.IDE_.SMDT */
                        Store (VPIM, ^^SPIM) /* \_SB_.PCI0.IDE_.SPIM */
                        Store (VUDC, ^^SUDC) /* \_SB_.PCI0.IDE_.SUDC */
                        Store (VUDM, ^^SUDM) /* \_SB_.PCI0.IDE_.SUDM */
                    }

                    Device (S_D0)
                    {
                        Name (_ADR, 0x00)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                 0x00, 0x00, 0x00, 0x00, 0x00                     /* ..... */
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^SMDT, VMDT) /* \_SB_.PCI0.IDE_.SECD.S_D0._GTF.VMDT */
                            Store (^^^SPIM, VPIM) /* \_SB_.PCI0.IDE_.SECD.S_D0._GTF.VPIM */
                            Store (^^^SUDC, VUDC) /* \_SB_.PCI0.IDE_.SECD.S_D0._GTF.VUDC */
                            Store (^^^SUDM, VUDM) /* \_SB_.PCI0.IDE_.SECD.S_D0._GTF.VUDM */
                            Return (GTF (0xA0, BUF))
                        }
                    }

                    Device (S_D1)
                    {
                        Name (_ADR, 0x01)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Name (BUF, Buffer (0x05)
                            {
                                 0x00, 0x00, 0x00, 0x00, 0x00                     /* ..... */
                            })
                            CreateWordField (BUF, 0x00, VMDT)
                            CreateByteField (BUF, 0x02, VPIM)
                            CreateByteField (BUF, 0x03, VUDC)
                            CreateByteField (BUF, 0x04, VUDM)
                            Store (^^^SMDT, VMDT) /* \_SB_.PCI0.IDE_.SECD.S_D1._GTF.VMDT */
                            Store (^^^SPIM, VPIM) /* \_SB_.PCI0.IDE_.SECD.S_D1._GTF.VPIM */
                            Store (^^^SUDC, VUDC) /* \_SB_.PCI0.IDE_.SECD.S_D1._GTF.VUDC */
                            Store (^^^SUDM, VUDM) /* \_SB_.PCI0.IDE_.SECD.S_D1._GTF.VUDM */
                            Return (GTF (0xB0, BUF))
                        }
                    }
                }
            }

            Device (PCE2)
            {
                Name (_ADR, 0x00020000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x12, 
                        0x04
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        LNKC, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        LNKD, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        LNKB, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x12
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x13
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x10
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x11
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.PCE2.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.PCE2.APIC */
                    }
                }
            }

            Device (PCE3)
            {
                Name (_ADR, 0x00030000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x12, 
                        0x04
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        LNKD, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        LNKB, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        LNKC, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x13
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x10
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x11
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x12
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.PCE3.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.PCE3.APIC */
                    }
                }
            }

            Device (PCE4)
            {
                Name (_ADR, 0x00040000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x12, 
                        0x04
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        LNKB, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        LNKC, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        LNKD, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x10
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x11
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x12
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x13
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.PCE4.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.PCE4.APIC */
                    }
                }
            }

            Device (PCE5)
            {
                Name (_ADR, 0x00050000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x12, 
                        0x04
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        LNKC, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        LNKD, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        LNKB, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x11
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x12
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x13
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x10
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.PCE5.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.PCE5.APIC */
                    }
                }
            }

            Device (PCE6)
            {
                Name (_ADR, 0x00060000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x12, 
                        0x04
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        LNKC, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        LNKD, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        LNKB, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x12
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x13
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x10
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x11
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.PCE6.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.PCE6.APIC */
                    }
                }
            }

            Device (PCE7)
            {
                Name (_ADR, 0x00070000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x12, 
                        0x04
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        LNKD, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        LNKB, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        LNKC, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x13
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x10
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x11
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x12
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.PCE7.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.PCE7.APIC */
                    }
                }
            }

            Device (PCE8)
            {
                Name (_ADR, 0x00080000)  // _ADR: Address
                Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
                {
                    Return (Package (0x02)
                    {
                        0x12, 
                        0x04
                    })
                }

                Name (PICM, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        LNKB, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        LNKC, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        LNKD, 
                        0x00
                    }
                })
                Name (APIC, Package (0x04)
                {
                    Package (0x04)
                    {
                        0xFFFF, 
                        0x00, 
                        0x00, 
                        0x10
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x01, 
                        0x00, 
                        0x11
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x02, 
                        0x00, 
                        0x12
                    }, 

                    Package (0x04)
                    {
                        0xFFFF, 
                        0x03, 
                        0x00, 
                        0x13
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.PCE8.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.PCE8.APIC */
                    }
                }
            }

            Scope (\)
            {
                Method (DISD, 1, NotSerialized)
                {
                }

                Method (CKIO, 2, NotSerialized)
                {
                }

                Method (SLDM, 2, NotSerialized)
                {
                }
            }

            Scope (\)
            {
                OperationRegion (\SCPP, SystemIO, 0xB0, 0x01)
                Field (\SCPP, ByteAcc, NoLock, Preserve)
                {
                    SMIP,   8
                }
            }

            Method (\_SB.PCI0._INI, 0, NotSerialized)  // _INI: Initialize
            {
                If (STRC (\_OS, "Microsoft Windows"))
                {
                    Store (0x56, SMIP) /* \SMIP */
                }
                Else
                {
                    If (STRC (\_OS, "Microsoft Windows NT"))
                    {
                        If (CondRefOf (\_OSI, Local0))
                        {
                            If (\_OSI ("Windows 2001"))
                            {
                                Store (0x59, SMIP) /* \SMIP */
                                Store (0x00, OSFL) /* \OSFL */
                                Store (0x03, OSFX) /* \OSFX */
                            }

                            If (\_OSI ("Windows 2006"))
                            {
                                Store (0x59, SMIP) /* \SMIP */
                                Store (0x00, OSFL) /* \OSFL */
                                Store (0x04, OSFX) /* \OSFX */
                            }
                        }
                        Else
                        {
                            Store (0x58, SMIP) /* \SMIP */
                            Store (0x00, OSFX) /* \OSFX */
                            Store (0x00, OSFL) /* \OSFL */
                        }
                    }
                    Else
                    {
                        Store (0x57, SMIP) /* \SMIP */
                        Store (0x02, OSFX) /* \OSFX */
                        Store (0x02, OSFL) /* \OSFL */
                    }
                }
            }

            Scope (\)
            {
                Method (OSTP, 0, NotSerialized)
                {
                    If (LEqual (OSFX, 0x01))
                    {
                        Store (0x56, SMIP) /* \SMIP */
                    }

                    If (LEqual (OSFX, 0x02))
                    {
                        Store (0x57, SMIP) /* \SMIP */
                    }

                    If (LEqual (OSFX, 0x00))
                    {
                        Store (0x58, SMIP) /* \SMIP */
                    }

                    If (LEqual (OSFX, 0x03))
                    {
                        Store (0x59, SMIP) /* \SMIP */
                    }

                    If (LEqual (OSFX, 0x04))
                    {
                        Store (0x59, SMIP) /* \SMIP */
                    }
                }
            }

            Device (SYSR)
            {
                Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
                Name (_UID, 0x01)  // _UID: Unique ID
                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                {
                    IO (Decode16,
                        0x0010,             // Range Minimum
                        0x0010,             // Range Maximum
                        0x01,               // Alignment
                        0x10,               // Length
                        )
                    IO (Decode16,
                        0x0022,             // Range Minimum
                        0x0022,             // Range Maximum
                        0x01,               // Alignment
                        0x1E,               // Length
                        )
                    IO (Decode16,
                        0x0044,             // Range Minimum
                        0x0044,             // Range Maximum
                        0x01,               // Alignment
                        0x1C,               // Length
                        )
                    IO (Decode16,
                        0x0062,             // Range Minimum
                        0x0062,             // Range Maximum
                        0x01,               // Alignment
                        0x02,               // Length
                        )
                    IO (Decode16,
                        0x0065,             // Range Minimum
                        0x0065,             // Range Maximum
                        0x01,               // Alignment
                        0x0B,               // Length
                        )
                    IO (Decode16,
                        0x0074,             // Range Minimum
                        0x0074,             // Range Maximum
                        0x01,               // Alignment
                        0x0C,               // Length
                        )
                    IO (Decode16,
                        0x0091,             // Range Minimum
                        0x0091,             // Range Maximum
                        0x01,               // Alignment
                        0x03,               // Length
                        )
                    IO (Decode16,
                        0x00A2,             // Range Minimum
                        0x00A2,             // Range Maximum
                        0x01,               // Alignment
                        0x1E,               // Length
                        )
                    IO (Decode16,
                        0x00E0,             // Range Minimum
                        0x00E0,             // Range Maximum
                        0x01,               // Alignment
                        0x10,               // Length
                        )
                    IO (Decode16,
                        0x04D0,             // Range Minimum
                        0x04D0,             // Range Maximum
                        0x01,               // Alignment
                        0x02,               // Length
                        )
                })
            }

            Scope (\)
            {
                OperationRegion (SMGP, SystemIO, 0x0800, 0x80)
                Field (SMGP, ByteAcc, NoLock, Preserve)
                {
                    PMST,   8, 
                    Offset (0x02), 
                    PMEN,   8, 
                    Offset (0x04), 
                    PM1S,   8, 
                    PMS3,   8, 
                    PMS5,   8, 
                    PMS6,   8, 
                    PME1,   8, 
                    PME3,   8, 
                    PME5,   8, 
                    PME6,   8, 
                    PPS1,   8, 
                    PPS3,   8, 
                    PPS5,   8, 
                    PPS6,   8, 
                    PPE1,   8, 
                    PPE3,   8, 
                    PPE5,   8, 
                    PPE6,   8, 
                    SM1S,   8, 
                    SM2S,   8, 
                    SMS3,   8, 
                    SMS4,   8, 
                    SME1,   8, 
                    SME2,   8, 
                    SME3,   8, 
                    SME4,   8, 
                    MSST,   8, 
                    RSGN,   8, 
                    FDC,    8, 
                    FDRS,   8, 
                    UAF1,   8, 
                    UAF2,   8, 
                    UAF3,   8, 
                    SG10,   8, 
                    SG11,   8, 
                    SG12,   8, 
                    SG13,   8, 
                    SG14,   8, 
                    UAF4,   8, 
                    SG15,   8, 
                    SG16,   8, 
                    SG17,   8, 
                    SG21,   8, 
                    SG22,   8, 
                    UAF5,   8, 
                    UAF6,   8, 
                    SP5,    8, 
                    SP6,    8, 
                    SG27,   8, 
                    SG30,   8, 
                    SG31,   8, 
                    SG32,   8, 
                    SG33,   8, 
                    SG34,   8, 
                    Offset (0x39), 
                    SG36,   8, 
                    SG37,   8, 
                    SG40,   8, 
                    COUT,   8, 
                    SG42,   8, 
                    Offset (0x3F), 
                    SG50,   8, 
                    SG51,   8, 
                    SG52,   8, 
                    SG53,   8, 
                    SG54,   8, 
                    SG55,   8, 
                    SG56,   8, 
                    SG57,   8, 
                    SG60,   8, 
                    SG61,   8, 
                    PWRR,   8, 
                    SLEP,   8, 
                    SG01,   8, 
                    SG02,   8, 
                    SG03,   8, 
                    SG04,   8, 
                    SG05,   8, 
                    SG06,   8, 
                    Offset (0x52), 
                    Offset (0x53), 
                    SLPP,   8, 
                    SG62,   8, 
                    SG63,   8, 
                    SG64,   8, 
                    SG65,   8, 
                    SG66,   8, 
                    SG67,   8, 
                    TEST,   8, 
                    DBCL,   8, 
                    MWAK,   8, 
                    LED1,   8, 
                    LED2,   8, 
                    KBSC,   8, 
                    KBS2,   8, 
                    KBB1,   8, 
                    KBB2,   8, 
                    KBB3,   8, 
                    KPWR,   8, 
                    WDTT,   8, 
                    WDTV,   8, 
                    WDTC,   8, 
                    WCTL,   8, 
                    Offset (0x6A), 
                    Offset (0x6B), 
                    Offset (0x6C), 
                    Offset (0x6D), 
                    Offset (0x6E), 
                    Offset (0x6F), 
                    SG45,   8, 
                    INDX,   8, 
                    DATA,   8, 
                    SG46,   8, 
                    SG47,   8, 
                    Offset (0x75), 
                    Offset (0x76), 
                    Offset (0x77), 
                    Offset (0x78), 
                    Offset (0x79), 
                    Offset (0x7A), 
                    Offset (0x7B), 
                    Offset (0x7C), 
                    Offset (0x7D), 
                    Offset (0x7E), 
                    Offset (0x7F), 
                    Offset (0x80)
                }
            }

            OperationRegion (WIN1, SystemIO, 0x2E, 0x02)
            Field (WIN1, ByteAcc, NoLock, Preserve)
            {
                INDX,   8, 
                DATA,   8
            }

            IndexField (INDX, DATA, ByteAcc, NoLock, Preserve)
            {
                Offset (0x02), 
                CFG,    8, 
                Offset (0x07), 
                LDN,    8, 
                Offset (0x20), 
                IDHI,   8, 
                IDLO,   8, 
                POWC,   8, 
                Offset (0x30), 
                ACTR,   8, 
                Offset (0x60), 
                IOAH,   8, 
                IOAL,   8, 
                Offset (0x70), 
                INTR,   8, 
                Offset (0x72), 
                INT1,   8, 
                Offset (0x74), 
                DMCH,   8, 
                Offset (0xC0), 
                GP40,   8, 
                Offset (0xF0), 
                OPT1,   8, 
                OPT2,   8, 
                OPT3,   8
            }

            Method (ENFG, 0, NotSerialized)
            {
                Store (0x55, INDX) /* \_SB_.PCI0.INDX */
            }

            Method (EXFG, 0, NotSerialized)
            {
                Store (0xAA, INDX) /* \_SB_.PCI0.INDX */
            }

            Device (FDC0)
            {
                Name (_HID, EisaId ("PNP0700"))  // _HID: Hardware ID
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    ENFG ()
                    Store (Zero, LDN) /* \_SB_.PCI0.LDN_ */
                    If (ACTR)
                    {
                        EXFG ()
                        Return (0x0F)
                    }
                    Else
                    {
                        If (LOr (IOAH, IOAL))
                        {
                            EXFG ()
                            Return (0x0D)
                        }
                        Else
                        {
                            EXFG ()
                            Return (0x00)
                        }
                    }
                }

                Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                {
                    ENFG ()
                    Store (Zero, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (Zero, ACTR) /* \_SB_.PCI0.ACTR */
                    SLDM (DMCH, 0x04)
                    EXFG ()
                    DISD (0x03)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    Name (BUF0, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x03F0,             // Range Minimum
                            0x03F0,             // Range Maximum
                            0x08,               // Alignment
                            0x06,               // Length
                            _Y02)
                        IO (Decode16,
                            0x03F7,             // Range Minimum
                            0x03F7,             // Range Maximum
                            0x08,               // Alignment
                            0x01,               // Length
                            )
                        IRQNoFlags ()
                            {6}
                        DMA (Compatibility, NotBusMaster, Transfer8, )
                            {2}
                    })
                    CreateByteField (BUF0, \_SB.PCI0.FDC0._CRS._Y02._MIN, IOLO)  // _MIN: Minimum Base Address
                    CreateByteField (BUF0, 0x03, IOHI)
                    CreateByteField (BUF0, \_SB.PCI0.FDC0._CRS._Y02._MAX, IORL)  // _MAX: Maximum Base Address
                    CreateByteField (BUF0, 0x05, IORH)
                    Return (BUF0) /* \_SB_.PCI0.FDC0._CRS.BUF0 */
                }

                Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                {
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x03F0,             // Range Minimum
                            0x03F0,             // Range Maximum
                            0x00,               // Alignment
                            0x06,               // Length
                            )
                        IO (Decode16,
                            0x03F7,             // Range Minimum
                            0x03F7,             // Range Maximum
                            0x00,               // Alignment
                            0x01,               // Length
                            )
                        IRQNoFlags ()
                            {6}
                        DMA (Compatibility, NotBusMaster, Transfer8, )
                            {2}
                    }
                    EndDependentFn ()
                })
                Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                {
                    CreateByteField (Arg0, 0x02, IOLO)
                    CreateByteField (Arg0, 0x03, IOHI)
                    CreateWordField (Arg0, 0x02, IOAD)
                    CreateWordField (Arg0, 0x19, IRQW)
                    CreateByteField (Arg0, 0x1C, DMAV)
                    ENFG ()
                    Store (Zero, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (One, ACTR) /* \_SB_.PCI0.ACTR */
                    SLDM (DMCH, DMCH)
                    EXFG ()
                    CKIO (IOAD, 0x03)
                }
            }

            Device (UAR1)
            {
                Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial Port */)  // _HID: Hardware ID
                Name (_UID, 0x01)  // _UID: Unique ID
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    ENFG ()
                    Store (0x04, LDN) /* \_SB_.PCI0.LDN_ */
                    If (ACTR)
                    {
                        EXFG ()
                        Return (0x0F)
                    }
                    Else
                    {
                        If (LOr (IOAH, IOAL))
                        {
                            EXFG ()
                            Return (0x0D)
                        }
                        Else
                        {
                            EXFG ()
                            Return (0x00)
                        }
                    }

                    EXFG ()
                }

                Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                {
                    ENFG ()
                    Store (0x04, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (Zero, ACTR) /* \_SB_.PCI0.ACTR */
                    EXFG ()
                    DISD (0x00)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    Name (BUF1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            _Y03)
                        IRQNoFlags (_Y04)
                            {}
                    })
                    CreateByteField (BUF1, \_SB.PCI0.UAR1._CRS._Y03._MIN, IOLO)  // _MIN: Minimum Base Address
                    CreateByteField (BUF1, 0x03, IOHI)
                    CreateByteField (BUF1, \_SB.PCI0.UAR1._CRS._Y03._MAX, IORL)  // _MAX: Maximum Base Address
                    CreateByteField (BUF1, 0x05, IORH)
                    CreateWordField (BUF1, \_SB.PCI0.UAR1._CRS._Y04._INT, IRQW)  // _INT: Interrupts
                    ENFG ()
                    Store (0x04, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (IOAL, IOLO) /* \_SB_.PCI0.UAR1._CRS.IOLO */
                    Store (IOAL, IORL) /* \_SB_.PCI0.UAR1._CRS.IORL */
                    Store (IOAH, IOHI) /* \_SB_.PCI0.UAR1._CRS.IOHI */
                    Store (IOAH, IORH) /* \_SB_.PCI0.UAR1._CRS.IORH */
                    Store (Zero, IRQW) /* \_SB_.PCI0.UAR1._CRS.IRQW */
                    If (LNotEqual (INTR, Zero))
                    {
                        ShiftLeft (One, INTR, IRQW) /* \_SB_.PCI0.UAR1._CRS.IRQW */
                    }

                    EXFG ()
                    Return (BUF1) /* \_SB_.PCI0.UAR1._CRS.BUF1 */
                }

                Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                {
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x03F8,             // Range Minimum
                            0x03F8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x02F8,             // Range Minimum
                            0x02F8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x03E8,             // Range Minimum
                            0x03E8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x02E8,             // Range Minimum
                            0x02E8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    EndDependentFn ()
                    IRQNoFlags ()
                        {3,4,5,7,9,10,11,12}
                })
                Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                {
                    CreateByteField (Arg0, 0x02, IOLO)
                    CreateByteField (Arg0, 0x03, IOHI)
                    CreateWordField (Arg0, 0x02, IOAD)
                    CreateWordField (Arg0, 0x09, IRQW)
                    ENFG ()
                    Store (0x04, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (One, ACTR) /* \_SB_.PCI0.ACTR */
                    Store (IOLO, IOAL) /* \_SB_.PCI0.IOAL */
                    Store (IOHI, IOAH) /* \_SB_.PCI0.IOAH */
                    FindSetLeftBit (IRQW, Local0)
                    If (LNotEqual (Local0, Zero))
                    {
                        Subtract (Local0, 0x01, Local0)
                    }

                    EXFG ()
                    CKIO (IOAD, 0x00)
                }
            }

            Device (UAR2)
            {
                Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial Port */)  // _HID: Hardware ID
                Name (_UID, 0x02)  // _UID: Unique ID
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    ENFG ()
                    Store (0x05, LDN) /* \_SB_.PCI0.LDN_ */
                    If (ACTR)
                    {
                        EXFG ()
                        Return (0x0F)
                    }
                    Else
                    {
                        If (LOr (IOAH, IOAL))
                        {
                            EXFG ()
                            Return (0x0D)
                        }
                        Else
                        {
                            EXFG ()
                            Return (0x00)
                        }
                    }

                    EXFG ()
                }

                Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                {
                    ENFG ()
                    Store (0x05, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (Zero, ACTR) /* \_SB_.PCI0.ACTR */
                    EXFG ()
                    DISD (0x00)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    Name (BUF1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            _Y05)
                        IRQNoFlags (_Y06)
                            {}
                    })
                    CreateByteField (BUF1, \_SB.PCI0.UAR2._CRS._Y05._MIN, IOLO)  // _MIN: Minimum Base Address
                    CreateByteField (BUF1, 0x03, IOHI)
                    CreateByteField (BUF1, \_SB.PCI0.UAR2._CRS._Y05._MAX, IORL)  // _MAX: Maximum Base Address
                    CreateByteField (BUF1, 0x05, IORH)
                    CreateWordField (BUF1, \_SB.PCI0.UAR2._CRS._Y06._INT, IRQW)  // _INT: Interrupts
                    ENFG ()
                    Store (0x05, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (IOAL, IOLO) /* \_SB_.PCI0.UAR2._CRS.IOLO */
                    Store (IOAL, IORL) /* \_SB_.PCI0.UAR2._CRS.IORL */
                    Store (IOAH, IOHI) /* \_SB_.PCI0.UAR2._CRS.IOHI */
                    Store (IOAH, IORH) /* \_SB_.PCI0.UAR2._CRS.IORH */
                    Store (Zero, IRQW) /* \_SB_.PCI0.UAR2._CRS.IRQW */
                    If (LNotEqual (INTR, Zero))
                    {
                        ShiftLeft (One, INTR, IRQW) /* \_SB_.PCI0.UAR2._CRS.IRQW */
                    }

                    EXFG ()
                    Return (BUF1) /* \_SB_.PCI0.UAR2._CRS.BUF1 */
                }

                Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                {
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x03F8,             // Range Minimum
                            0x03F8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x02F8,             // Range Minimum
                            0x02F8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x03E8,             // Range Minimum
                            0x03E8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x02E8,             // Range Minimum
                            0x02E8,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    EndDependentFn ()
                    IRQNoFlags ()
                        {3,4,5,7,9,10,11,12}
                })
                Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                {
                    CreateByteField (Arg0, 0x02, IOLO)
                    CreateByteField (Arg0, 0x03, IOHI)
                    CreateWordField (Arg0, 0x02, IOAD)
                    CreateWordField (Arg0, 0x09, IRQW)
                    ENFG ()
                    Store (0x05, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (One, ACTR) /* \_SB_.PCI0.ACTR */
                    Store (IOLO, IOAL) /* \_SB_.PCI0.IOAL */
                    Store (IOHI, IOAH) /* \_SB_.PCI0.IOAH */
                    FindSetLeftBit (IRQW, Local0)
                    If (LNotEqual (Local0, Zero))
                    {
                        Subtract (Local0, 0x01, Local0)
                    }

                    EXFG ()
                    CKIO (IOAD, 0x00)
                }
            }

            Device (LPT1)
            {
                Name (_HID, EisaId ("PNP0400") /* Standard LPT Parallel Port */)  // _HID: Hardware ID
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    And (OPT1, 0x02, Local0)
                    If (LNotEqual (Local0, 0x02))
                    {
                        If (ACTR)
                        {
                            EXFG ()
                            Return (0x0F)
                        }
                        Else
                        {
                            If (LOr (IOAH, IOAL))
                            {
                                EXFG ()
                                Return (0x0D)
                            }
                            Else
                            {
                                EXFG ()
                                Return (0x00)
                            }
                        }
                    }
                    Else
                    {
                        EXFG ()
                        Return (0x00)
                    }
                }

                Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                {
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (Zero, ACTR) /* \_SB_.PCI0.ACTR */
                    EXFG ()
                    DISD (0x02)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    Name (BUF5, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            _Y07)
                        IRQNoFlags (_Y08)
                            {}
                    })
                    CreateByteField (BUF5, \_SB.PCI0.LPT1._CRS._Y07._MIN, IOLO)  // _MIN: Minimum Base Address
                    CreateByteField (BUF5, 0x03, IOHI)
                    CreateByteField (BUF5, \_SB.PCI0.LPT1._CRS._Y07._MAX, IORL)  // _MAX: Maximum Base Address
                    CreateByteField (BUF5, 0x05, IORH)
                    CreateByteField (BUF5, \_SB.PCI0.LPT1._CRS._Y07._LEN, IOLE)  // _LEN: Length
                    CreateWordField (BUF5, \_SB.PCI0.LPT1._CRS._Y08._INT, IRQW)  // _INT: Interrupts
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (IOAL, IOLO) /* \_SB_.PCI0.LPT1._CRS.IOLO */
                    Store (IOLO, IORL) /* \_SB_.PCI0.LPT1._CRS.IORL */
                    Store (IOAH, IOHI) /* \_SB_.PCI0.LPT1._CRS.IOHI */
                    Store (IOHI, IORH) /* \_SB_.PCI0.LPT1._CRS.IORH */
                    If (LEqual (IOLO, 0xBC))
                    {
                        Store (0x04, IOLE) /* \_SB_.PCI0.LPT1._CRS.IOLE */
                    }
                    Else
                    {
                        Store (0x08, IOLE) /* \_SB_.PCI0.LPT1._CRS.IOLE */
                    }

                    Store (Zero, IRQW) /* \_SB_.PCI0.LPT1._CRS.IRQW */
                    If (LNotEqual (INTR, Zero))
                    {
                        ShiftLeft (One, INTR, IRQW) /* \_SB_.PCI0.LPT1._CRS.IRQW */
                    }

                    EXFG ()
                    Return (BUF5) /* \_SB_.PCI0.LPT1._CRS.BUF5 */
                }

                Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                {
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x0378,             // Range Minimum
                            0x0378,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x0278,             // Range Minimum
                            0x0278,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x03BC,             // Range Minimum
                            0x03BC,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                    }
                    EndDependentFn ()
                    IRQNoFlags ()
                        {3,4,5,7,9,10,11,12}
                })
                Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                {
                    CreateByteField (Arg0, 0x02, IOLO)
                    CreateByteField (Arg0, 0x03, IOHI)
                    CreateByteField (Arg0, 0x04, IORL)
                    CreateWordField (Arg0, 0x02, IOAD)
                    CreateByteField (Arg0, 0x05, IORH)
                    CreateWordField (Arg0, 0x09, IRQW)
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (One, ACTR) /* \_SB_.PCI0.ACTR */
                    Store (IOLO, IOAL) /* \_SB_.PCI0.IOAL */
                    Store (IOHI, IOAH) /* \_SB_.PCI0.IOAH */
                    FindSetLeftBit (IRQW, Local0)
                    If (LNotEqual (Local0, Zero))
                    {
                        Subtract (Local0, 0x01, Local0)
                    }

                    Store (Local0, INTR) /* \_SB_.PCI0.INTR */
                    EXFG ()
                    CKIO (IOAD, 0x02)
                }
            }

            Device (ECP1)
            {
                Name (_HID, EisaId ("PNP0401") /* ECP Parallel Port */)  // _HID: Hardware ID
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    And (OPT1, 0x02, Local0)
                    If (LEqual (Local0, 0x02))
                    {
                        If (ACTR)
                        {
                            EXFG ()
                            Return (0x0F)
                        }
                        Else
                        {
                            If (LOr (IOAH, IOAL))
                            {
                                EXFG ()
                                Return (0x0D)
                            }
                            Else
                            {
                                EXFG ()
                                Return (0x00)
                            }
                        }
                    }
                    Else
                    {
                        EXFG ()
                        Return (0x00)
                    }
                }

                Method (_DIS, 0, NotSerialized)  // _DIS: Disable Device
                {
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (Zero, ACTR) /* \_SB_.PCI0.ACTR */
                    SLDM (DMCH, 0x04)
                    EXFG ()
                    DISD (0x02)
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    Name (BUF6, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            _Y09)
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            _Y0A)
                        IRQNoFlags (_Y0B)
                            {}
                        DMA (Compatibility, NotBusMaster, Transfer8, _Y0C)
                            {}
                    })
                    CreateByteField (BUF6, \_SB.PCI0.ECP1._CRS._Y09._MIN, IOLO)  // _MIN: Minimum Base Address
                    CreateByteField (BUF6, 0x03, IOHI)
                    CreateByteField (BUF6, \_SB.PCI0.ECP1._CRS._Y09._MAX, IORL)  // _MAX: Maximum Base Address
                    CreateByteField (BUF6, 0x05, IORH)
                    CreateByteField (BUF6, \_SB.PCI0.ECP1._CRS._Y09._LEN, IOLE)  // _LEN: Length
                    CreateByteField (BUF6, \_SB.PCI0.ECP1._CRS._Y0A._MIN, IOEL)  // _MIN: Minimum Base Address
                    CreateByteField (BUF6, 0x0B, IOEH)
                    CreateByteField (BUF6, \_SB.PCI0.ECP1._CRS._Y0A._MAX, IOML)  // _MAX: Maximum Base Address
                    CreateByteField (BUF6, 0x0D, IOMH)
                    CreateWordField (BUF6, \_SB.PCI0.ECP1._CRS._Y0B._INT, IRQW)  // _INT: Interrupts
                    CreateByteField (BUF6, \_SB.PCI0.ECP1._CRS._Y0C._DMA, DMAC)  // _DMA: Direct Memory Access
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (One, ACTR) /* \_SB_.PCI0.ACTR */
                    Store (IOAL, Local2)
                    Store (Local2, IOLO) /* \_SB_.PCI0.ECP1._CRS.IOLO */
                    Store (IOAH, Local3)
                    Store (Local3, IOHI) /* \_SB_.PCI0.ECP1._CRS.IOHI */
                    Or (Local3, 0x04, Local3)
                    Store (Local3, IOEH) /* \_SB_.PCI0.ECP1._CRS.IOEH */
                    Store (Local3, IOMH) /* \_SB_.PCI0.ECP1._CRS.IOMH */
                    Store (IOLO, IORL) /* \_SB_.PCI0.ECP1._CRS.IORL */
                    Store (IOLO, IOEL) /* \_SB_.PCI0.ECP1._CRS.IOEL */
                    Store (IOLO, IOML) /* \_SB_.PCI0.ECP1._CRS.IOML */
                    Store (IOHI, IORH) /* \_SB_.PCI0.ECP1._CRS.IORH */
                    If (LEqual (IOLO, 0xBC))
                    {
                        Store (0x04, IOLE) /* \_SB_.PCI0.ECP1._CRS.IOLE */
                    }
                    Else
                    {
                        Store (0x08, IOLE) /* \_SB_.PCI0.ECP1._CRS.IOLE */
                    }

                    Store (Zero, IRQW) /* \_SB_.PCI0.ECP1._CRS.IRQW */
                    If (LNotEqual (INTR, Zero))
                    {
                        ShiftLeft (One, INTR, IRQW) /* \_SB_.PCI0.ECP1._CRS.IRQW */
                    }

                    Store (One, Local0)
                    Store (DMCH, Local5)
                    ShiftLeft (Local0, Local5, DMAC) /* \_SB_.PCI0.ECP1._CRS.DMAC */
                    EXFG ()
                    Return (BUF6) /* \_SB_.PCI0.ECP1._CRS.BUF6 */
                }

                Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                {
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x0378,             // Range Minimum
                            0x0378,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                        IO (Decode16,
                            0x0778,             // Range Minimum
                            0x0778,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x0278,             // Range Minimum
                            0x0278,             // Range Maximum
                            0x00,               // Alignment
                            0x08,               // Length
                            )
                        IO (Decode16,
                            0x0678,             // Range Minimum
                            0x0678,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                    }
                    StartDependentFnNoPri ()
                    {
                        IO (Decode16,
                            0x03BC,             // Range Minimum
                            0x03BC,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                        IO (Decode16,
                            0x07BC,             // Range Minimum
                            0x07BC,             // Range Maximum
                            0x00,               // Alignment
                            0x04,               // Length
                            )
                    }
                    EndDependentFn ()
                    IRQNoFlags ()
                        {3,4,5,7,9,10,11,12}
                    DMA (Compatibility, NotBusMaster, Transfer8, )
                        {1,3}
                })
                Method (_SRS, 1, NotSerialized)  // _SRS: Set Resource Settings
                {
                    CreateByteField (Arg0, 0x02, IOLO)
                    CreateByteField (Arg0, 0x03, IOHI)
                    CreateWordField (Arg0, 0x02, IOAD)
                    CreateWordField (Arg0, 0x11, IRQW)
                    CreateByteField (Arg0, 0x14, DMAC)
                    ENFG ()
                    Store (0x03, LDN) /* \_SB_.PCI0.LDN_ */
                    Store (One, ACTR) /* \_SB_.PCI0.ACTR */
                    Store (IOLO, IOAL) /* \_SB_.PCI0.IOAL */
                    Store (IOHI, IOAH) /* \_SB_.PCI0.IOAH */
                    FindSetLeftBit (IRQW, Local0)
                    If (LNotEqual (Local0, Zero))
                    {
                        Subtract (Local0, 0x01, Local0)
                    }

                    Store (Local0, INTR) /* \_SB_.PCI0.INTR */
                    FindSetLeftBit (DMAC, Local1)
                    Store (DMCH, Local0)
                    Subtract (Local1, 0x01, DMCH) /* \_SB_.PCI0.DMCH */
                    SLDM (Local0, DMCH)
                    EXFG ()
                    CKIO (IOAD, 0x02)
                }
            }

            OperationRegion (\GRAM, SystemMemory, 0x0400, 0x0100)
            Field (\GRAM, ByteAcc, NoLock, Preserve)
            {
                Offset (0x10), 
                FLG0,   8
            }

            Device (PS2M)
            {
                Name (_HID, EisaId ("PNP0F13") /* PS/2 Mouse */)  // _HID: Hardware ID
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    And (FLG0, 0x04, Local0)
                    If (LEqual (Local0, 0x04))
                    {
                        Return (0x0F)
                    }
                    Else
                    {
                        Return (0x00)
                    }
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    Name (BUFM, ResourceTemplate ()
                    {
                        IRQNoFlags ()
                            {12}
                    })
                    Return (BUFM) /* \_SB_.PCI0.PS2M._CRS.BUFM */
                }
            }

            Device (PS2K)
            {
                Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard (101/102-key, PS/2 Mouse) */)  // _HID: Hardware ID
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    ENFG ()
                    Store (0x07, LDN) /* \_SB_.PCI0.LDN_ */
                    If (ACTR)
                    {
                        EXFG ()
                        Return (0x0F)
                    }
                    Else
                    {
                        EXFG ()
                        Return (0x00)
                    }
                }

                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                {
                    Name (BUF7, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0060,             // Range Minimum
                            0x0060,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0064,             // Range Minimum
                            0x0064,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IRQNoFlags ()
                            {1}
                    })
                    Return (BUF7) /* \_SB_.PCI0.PS2K._CRS.BUF7 */
                }
            }

            Method (\_SB.PCI0.PS2M._PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (Package (0x02)
                {
                    0x03, 
                    0x05
                })
            }

            Method (\_SB.PCI0.PS2K._PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (Package (0x02)
                {
                    0x03, 
                    0x05
                })
            }

            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (Package (0x02)
                {
                    0x04, 
                    0x05
                })
            }

            Device (AGP)
            {
                Name (_ADR, 0x00010000)  // _ADR: Address
                Name (PICM, Package (0x06)
                {
                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x00, 
                        \_SB.PCI0.LPC0.LNKB, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x01, 
                        \_SB.PCI0.LPC0.LNKC, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x02, 
                        \_SB.PCI0.LPC0.LNKD, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x03, 
                        \_SB.PCI0.LPC0.LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0007FFFF, 
                        0x00, 
                        \_SB.PCI0.LPC0.LNKA, 
                        0x00
                    }, 

                    Package (0x04)
                    {
                        0x0007FFFF, 
                        0x01, 
                        \_SB.PCI0.LPC0.LNKD, 
                        0x00
                    }
                })
                Name (APIC, Package (0x06)
                {
                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x00, 
                        0x00, 
                        0x12
                    }, 

                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x01, 
                        0x00, 
                        0x13
                    }, 

                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x02, 
                        0x00, 
                        0x10
                    }, 

                    Package (0x04)
                    {
                        0x0005FFFF, 
                        0x03, 
                        0x00, 
                        0x11
                    }, 

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

                    Package (0x04)
                    {
                        0x0007FFFF, 
                        0x01, 
                        0x00, 
                        0x13
                    }
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (LNot (PICF))
                    {
                        Return (PICM) /* \_SB_.PCI0.AGP_.PICM */
                    }
                    Else
                    {
                        Return (APIC) /* \_SB_.PCI0.AGP_.APIC */
                    }
                }
            }
        }

        OperationRegion (SXTM, SystemMemory, 0x000FFF34, 0x04)
        Field (SXTM, WordAcc, NoLock, Preserve)
        {
            SMEM,   32
        }

        Device (MEM)
        {
            Name (_HID, EisaId ("PNP0C01") /* System Board */)  // _HID: Hardware ID
            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                Name (BUF0, ResourceTemplate ()
                {
                    Memory32Fixed (ReadOnly,
                        0x000F0000,         // Address Base
                        0x00010000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0xFED00000,         // Address Base
                        0x00000100,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0x00000000,         // Address Base
                        0x00010000,         // Address Length
                        _Y0D)
                    Memory32Fixed (ReadWrite,
                        0xFFFF0000,         // Address Base
                        0x00010000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0x00000000,         // Address Base
                        0x000A0000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0x00100000,         // Address Base
                        0x00000000,         // Address Length
                        _Y0E)
                    Memory32Fixed (ReadWrite,
                        0x00000000,         // Address Base
                        0x00000000,         // Address Length
                        _Y0F)
                    Memory32Fixed (ReadWrite,
                        0xFEC00000,         // Address Base
                        0x00001000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0xFEE00000,         // Address Base
                        0x00001000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0xFFF80000,         // Address Base
                        0x00070000,         // Address Length
                        )
                })
                CreateDWordField (BUF0, \_SB.MEM._CRS._Y0D._BAS, ACMM)  // _BAS: Base Address
                CreateDWordField (BUF0, \_SB.MEM._CRS._Y0D._LEN, ASSM)  // _LEN: Length
                CreateDWordField (BUF0, \_SB.MEM._CRS._Y0E._LEN, EXTM)  // _LEN: Length
                CreateDWordField (BUF0, \_SB.MEM._CRS._Y0F._BAS, SXT1)  // _BAS: Base Address
                CreateDWordField (BUF0, \_SB.MEM._CRS._Y0F._LEN, SXT2)  // _LEN: Length
                If (LNotEqual (SMEM, Zero))
                {
                    Add (AMEM, 0x00010000, SXT1) /* \_SB_.MEM_._CRS.SXT1 */
                    Add (SXT1, 0x00010000, SXT1) /* \_SB_.MEM_._CRS.SXT1 */
                }
                Else
                {
                    Store (Zero, SXT1) /* \_SB_.MEM_._CRS.SXT1 */
                }

                Store (SMEM, SXT2) /* \_SB_.MEM_._CRS.SXT2 */
                Subtract (AMEM, 0x00100000, EXTM) /* \_SB_.MEM_._CRS.EXTM */
                Store (AMEM, ACMM) /* \_SB_.MEM_._CRS.ACMM */
                And (AMEM, 0x000FFFFF, Local0)
                Subtract (0x00100000, Local0, ASSM) /* \_SB_.MEM_._CRS.ASSM */
                Return (BUF0) /* \_SB_.MEM_._CRS.BUF0 */
            }
        }

        Device (\_SB.PCI0.EXPL)
        {
            Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
            Name (_UID, 0x04)  // _UID: Unique ID
            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                Name (BUF0, ResourceTemplate ()
                {
                    Memory32Fixed (ReadWrite,
                        0xE0000000,         // Address Base
                        0x10000000,         // Address Length
                        )
                })
                Return (BUF0) /* \_SB_.PCI0.EXPL._CRS.BUF0 */
            }
        }
    }
}

