1    /*
2     * Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp.
3     * All rights reserved.
4     *
5     * Redistribution and use in source and binary forms, with or without modification,
6     * are permitted provided that the following conditions are met:
7     *
8     * Redistributions of source code must retain the above copyright notice,
9     * this list of conditions and the following disclaimer.
10     * Redistributions in binary form must reproduce the above copyright notice,
11     * this list of conditions and the following disclaimer in the documentation
12     * and/or other materials provided with the distribution.
13     * Neither the name of Intel Corporation nor the names of its contributors
14     * may be used to endorse or promote products derived from this software
15     * without specific prior written permission.
16     *
17     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20     * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22     * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23     * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25     * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27     */
28    /*
29     * Test of the Object and Index References
30     * and the call-by-reference convention.
31     *
32     * SPEC2 file contains specification of the tests.
33     */
34    /*
35     ??????????????????
36     SEE: current number of errors (17.04.2005): 0x26
37     SEE: report the name of each started test
38     SEE: q000,q001...
39     SEE: extend in every possible way the "total tests",
40     see top of this spec, as far as fixing the bugs.
41     SEE: continue to work on "Package total"
42     SEE: extend the test "The chain of Index_References" after bug fixing
43     SEE: CURRENTLY: compiler failed, Too few arguments (M002 requires X)
44     SEE: test ref70 now works in accordance with the current behaviour -
45     expects exceptions when dealing with ArgX-ORef & ArgX-IRef.
46     should be re-dericted: when read automatic dereference will
47     be done properly.
48     ??????????????????????
49     */
50    Name (Z111, 0x6F)
51    /* TEST 1: Read of ArgX-ORef with DerefOf */
52
53    Method (M221, 0, Serialized)
54    {
55        TS00 (__METHOD__)
56        M1AD (__METHOD__, 0x00, 0x01, 0x01, 0x01, 0x00)
57        M341 ()
58        If (C088)
59        {
60            M4D0 ()
61        }
62    }
63
64    /* TEST 2: Read of ArgX-ORef without DerefOf (automatic dereference) */
65
66    Method (M222, 0, Serialized)
67    {
68        TS00 (__METHOD__)
69        M1AD (__METHOD__, 0x00, 0x01, 0x01, 0x00, 0x00)
70        If (Y507)
71        {
72            M342 ()
73            If (C088)
74            {
75                M4D0 ()
76            }
77        }
78        Else
79        {
80            M1AE (__METHOD__, "read of ArgX-ORef without DerefOf", "AE_AML_OPERAND_TYPE exception instead of automatic dereference")
81        }
82    }
83
84    /* TEST 3: Read of ArgX-IRef with DerefOf */
85
86    Method (M223, 0, Serialized)
87    {
88        TS00 (__METHOD__)
89        M1AD (__METHOD__, 0x00, 0x01, 0x01, 0x01, 0x00)
90        M343 ()
91        If (C088)
92        {
93            M4D1 ()
94        }
95    }
96
97    /* TEST 4: Read of ArgX-IRef without DerefOf */
98
99    Method (M224, 0, Serialized)
100    {
101        TS00 (__METHOD__)
102        M1AD (__METHOD__, 0x00, 0x01, 0x01, 0x00, 0x00)
103        If (Y507)
104        {
105            M344 ()
106            If (C088)
107            {
108                M4D1 ()
109            }
110        }
111        Else
112        {
113            M1AE (__METHOD__, "read of ArgX-IRef without DerefOf", "AE_AML_OPERAND_TYPE exception instead of automatic dereference")
114        }
115    }
116
117    /* TEST 5.0: Store into ArgX-object doesn't change original data */
118
119    Method (M225, 0, Serialized)
120    {
121        TS00 (__METHOD__)
122        M1AD (__METHOD__, 0x01, 0x01, 0x00, 0x00, 0x00)
123        M1C0 ()
124    }
125
126    /* TEST 5.1: CopyObject into ArgX-object doesn't change original data */
127
128    Method (M226, 0, Serialized)
129    {
130        TS00 (__METHOD__)
131        M1AD (__METHOD__, 0x02, 0x01, 0x00, 0x00, 0x00)
132        M1C0 ()
133    }
134
135    /* TEST 6.0: Store into ArgX-ORef changes original data */
136
137    Method (M227, 0, Serialized)
138    {
139        TS00 (__METHOD__)
140        M362 ()
141        M363 ()
142        M364 ()
143        If (C088)
144        {
145            M1AD (__METHOD__, 0x01, 0x01, 0x01, 0x01, 0x00)
146            M4D0 ()
147        }
148    }
149
150    /* TEST 6.1: CopyObject into ArgX-ORef changes original data */
151
152    Method (M228, 0, Serialized)
153    {
154        TS00 (__METHOD__)
155        M1AD (__METHOD__, 0x02, 0x01, 0x01, 0x01, 0x00)
156        M4D0 ()
157    }
158
159    /* TEST 7.0: Store into ArgX-IRef */
160    /* */
161    /* ACTUALLY: doesn't write to the original object. */
162    Method (M229, 0, Serialized)
163    {
164        TS00 (__METHOD__)
165        M1AD (__METHOD__, 0x01, 0x01, 0x01, 0x01, 0x00)
166        M4D1 ()
167    }
168
169    /* TEST 7.1: CopyObject into ArgX-IRef */
170    /* */
171    /* ACTUALLY: doesn't write to the original object. */
172    Method (M22A, 0, Serialized)
173    {
174        TS00 (__METHOD__)
175        M1AD (__METHOD__, 0x02, 0x01, 0x01, 0x01, 0x00)
176        M4D1 ()
177    }
178
179    /* TEST 8: */
180    /* ArgX-object is one of String, Buffer and Package. */
181    /* Create IRef to the elements of the */
182    /* ArgX-object inside the Method and write to them. */
183    /* */
184    /* ACTUALLY: writes to the original object. */
185    Method (M22B, 0, NotSerialized)
186    {
187        TS00 ("m22b")
188        /* Store and CopyObject */
189
190        M345 ()
191    }
192
193    /* TEST 10: Check Buffer passed as a parameter. */
194    /* Create Buffer Field inside Method and write to it. */
195    /* */
196    /* ACTUALLY: writes to the original object. */
197    Method (M22C, 0, Serialized)
198    {
199        If (Y100)
200        {
201            TS00 (__METHOD__)
202        }
203        Else
204        {
205            Debug = __METHOD__ /* \M22C.TS__ */
206        }
207
208        Name (B000, Buffer (0x04)
209        {
210             0x01, 0x77, 0x03, 0x04                           // .w..
211        })
212        Name (B010, Buffer (0x04)
213        {
214             0x01, 0x77, 0x03, 0x04                           // .w..
215        })
216        Method (M000, 1, NotSerialized)
217        {
218            CreateField (Arg0, 0x08, 0x08, BF90)
219            If (BF90 != Buffer(){0x77})
220            {
221                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x77)
222            }
223
224            BF90 = 0x9999992B
225            If (BF90 != Buffer(){0x2B})
226            {
227                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x2B)
228            }
229        }
230
231        Method (M001, 1, NotSerialized)
232        {
233            CreateField (Arg0, 0x08, 0x08, BF90)
234            If (BF90 != Buffer(){0x77})
235            {
236                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x77)
237            }
238
239            BF90 = 0x2B
240            CopyObject (0x9999992B, BF90) /* \M22C.M001.BF90 */
241            If (BF90 != Buffer(){0x2B})
242            {
243                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x2B)
244            }
245        }
246
247        BEG0 (Z111, __METHOD__)
248        M000 (B000)
249        If (X191)
250        {
251            M001 (B010)
252        }
253
254        M386 (__METHOD__, B000, 0x00, __LINE__)
255        If (X191)
256        {
257            M386 (__METHOD__, B010, 0x00, __LINE__)
258        }
259
260        END0 ()
261    }
262
263    /* TEST 11: Check RefOf of ArgX-Object (ArgX is any type Object) */
264
265    Method (M22D, 0, Serialized)
266    {
267        TS00 (__METHOD__)
268        M346 ()
269        If (C088)
270        {
271            /* RefOf */
272
273            C08B = 0x01 /* do RefOf(ArgX) checkings */
274            M1AD (__METHOD__, 0x00, 0x01, 0x00, 0x00, 0x00)
275            M1C0 ()
276            /* CondRefOf */
277
278            C08B = 0x02 /* do RefOf(ArgX) checkings */
279            M1AD (__METHOD__, 0x00, 0x01, 0x00, 0x00, 0x00)
280            M1C0 ()
281            C08B = 0x00 /* do RefOf(ArgX) checkings */
282        }
283    }
284
285    /* TEST 12: Check DerefOf(RefOf) of ArgX-Object (ArgX is any type Object) */
286
287    Method (M22E, 0, NotSerialized)
288    {
289        TS00 ("m22e")
290        M347 ()
291    }
292
293    /* TEST 13: Check RefOf of ArgX-ORef */
294
295    Method (M22F, 0, NotSerialized)
296    {
297        TS00 ("m22f")
298        M348 ()
299    }
300
301    /* TEST 14: Check DerefOf(RefOf) of ArgX-ORef */
302    /* */
303    /* ACTUALLY: writes to the original object. */
304    Method (M230, 0, NotSerialized)
305    {
306        TS00 ("m230")
307        M349 ()
308    }
309
310    /* TEST 15: Check RefOf of ArgX-IRef */
311
312    Method (M231, 0, NotSerialized)
313    {
314        TS00 ("m231")
315        M34A ()
316    }
317
318    /* TEST 16: Check DerefOf(RefOf) of ArgX-IRef */
319
320    Method (M232, 0, NotSerialized)
321    {
322        TS00 ("m232")
323        M34B ()
324    }
325
326    /* TEST 17: Check RefOf of ArgX-String, ArgX-Buffer, ArgX-Package */
327    /* */
328    /* ACTUALLY: */
329    /* */
330    /* ArgX-String  - writes to the original String */
331    /* ArgX-Buffer  - doesn't */
332    /* ArgX-Package - doesn't */
333    Method (M233, 0, NotSerialized)
334    {
335        TS00 ("m233")
336        M34C ()
337    }
338
339    /* TEST 19: Check RefOf of ArgX-Buffer (check its Buffer Field) */
340    /* */
341    /* ACTUALLY: doesn't write to the original object. */
342    Method (M234, 0, Serialized)
343    {
344        If (Y100)
345        {
346            TS00 (__METHOD__)
347        }
348        Else
349        {
350            Debug = __METHOD__ /* \M234.TS__ */
351        }
352
353        Name (B000, Buffer (0x04)
354        {
355             0x01, 0x77, 0x03, 0x04                           // .w..
356        })
357        Method (M000, 1, NotSerialized)
358        {
359            Local2 = DerefOf (Arg0)
360            CreateField (Local2, 0x08, 0x08, BF90)
361            If (BF90 != Buffer(){0x77})
362            {
363                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x77)
364            }
365
366            BF90 = 0x9999992B
367            If (BF90 != Buffer(){0x2B})
368            {
369                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x2B)
370            }
371        }
372
373        Method (M001, 1, NotSerialized)
374        {
375            Local2 = DerefOf (Arg0)
376            CreateField (Local2, 0x08, 0x08, BF90)
377            If (BF90 != Buffer(){0x77})
378            {
379                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x77)
380            }
381
382            CopyObject (0x9999992B, BF90) /* \M234.M001.BF90 */
383            If (BF90 != Buffer(){0x2B})
384            {
385                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, BF90, 0x2B)
386            }
387        }
388
389        Method (M010, 2, NotSerialized)
390        {
391            Local0 = RefOf (Arg0)
392            M000 (Local0)
393            If ((Arg1 == C00A))
394            {
395                M381 (__METHOD__, Arg0, 0x00, __LINE__)
396            }
397            ElseIf ((Arg1 == C00B))
398            {
399                M382 (__METHOD__, Arg0, 0x00, __LINE__)
400            }
401            ElseIf ((Arg1 == C00C))
402            {
403                M383 (__METHOD__, Arg0, 0x00, __LINE__)
404            }
405        }
406
407        Method (M020, 2, NotSerialized)
408        {
409            M000 (RefOf (Arg0))
410            If ((Arg1 == C00A))
411            {
412                M381 (__METHOD__, Arg0, 0x00, __LINE__)
413            }
414            ElseIf ((Arg1 == C00B))
415            {
416                M382 (__METHOD__, Arg0, 0x00, __LINE__)
417            }
418            ElseIf ((Arg1 == C00C))
419            {
420                M383 (__METHOD__, Arg0, 0x00, __LINE__)
421            }
422        }
423
424        Method (M011, 2, NotSerialized)
425        {
426            Local0 = RefOf (Arg0)
427            M001 (Local0)
428            If ((Arg1 == C00A))
429            {
430                M381 (__METHOD__, Arg0, 0x00, __LINE__)
431            }
432            ElseIf ((Arg1 == C00B))
433            {
434                M382 (__METHOD__, Arg0, 0x00, __LINE__)
435            }
436            ElseIf ((Arg1 == C00C))
437            {
438                M383 (__METHOD__, Arg0, 0x00, __LINE__)
439            }
440        }
441
442        Method (M021, 2, NotSerialized)
443        {
444            M001 (RefOf (Arg0))
445            If ((Arg1 == C00A))
446            {
447                M381 (__METHOD__, Arg0, 0x00, __LINE__)
448            }
449            ElseIf ((Arg1 == C00B))
450            {
451                M382 (__METHOD__, Arg0, 0x00, __LINE__)
452            }
453            ElseIf ((Arg1 == C00C))
454            {
455                M383 (__METHOD__, Arg0, 0x00, __LINE__)
456            }
457        }
458
459        BEG0 (Z111, __METHOD__)
460        M010 (B000, C00B)
461        M382 (__METHOD__, B000, 0x00, __LINE__)
462        M020 (B000, C00B)
463        M382 (__METHOD__, B000, 0x00, __LINE__)
464        If (X191)
465        {
466            M011 (B000, C00B)
467            M382 (__METHOD__, B000, 0x00, __LINE__)
468        }
469
470        If (X191)
471        {
472            M021 (B000, C00B)
473            M382 (__METHOD__, B000, 0x00, __LINE__)
474        }
475
476        END0 ()
477    }
478
479    /*
480     * TEST 20: Check writing from ArgX to ArgY
481     *
482     * ACTUALLY:
483     *
484     *   '+' writes
485     *   '-' not writes
486     *   'e' exceptions occurs
487     *
488     *
489     *   - from ArgX-Object to ArgY-Object
490     *   + from ArgX-Object to ArgY-ORef
491     *   - from ArgX-Object to ArgY-IRef
492     *
493     *   - from ArgX-ORef to ArgY-Object
494     *   e from ArgX-ORef to ArgY-ORef
495     *   - from ArgX-ORef to ArgY-IRef
496     *
497     *   - from ArgX-IRef to ArgY-Object
498     *   e from ArgX-IRef to ArgY-ORef
499     *   - from ArgX-IRef to ArgY-IRef
500     */
501    Method (M235, 0, Serialized)
502    {
503        If (Y100)
504        {
505            TS00 (__METHOD__)
506        }
507        Else
508        {
509            Debug = __METHOD__ /* \M235.TS__ */
510        }
511
512        Name (I000, 0x77)
513        Name (I010, 0x77)
514        Name (I020, 0x77)
515        Name (S000, "qwer0000")
516        Name (S010, "qwer0000")
517        Name (S021, "q+er0000")
518        Name (S031, "q+er0000")
519        Name (I001, 0x2B)
520        Name (I011, 0x2B)
521        Name (I021, 0x2B)
522        Name (I031, 0x2B)
523        Name (I041, 0x2B)
524        Name (I051, 0x2B)
525        Name (I061, 0x2B)
526        Method (M000, 3, NotSerialized)
527        {
528            Arg1 = Arg0
529            If ((Arg2 == C009))
530            {
531                M380 (__METHOD__, Arg1, 0x00, __LINE__)
532            }
533            ElseIf ((Arg2 == C00A))
534            {
535                M381 (__METHOD__, Arg1, 0x00, __LINE__)
536            }
537            ElseIf ((Arg2 == C00B))
538            {
539                M382 (__METHOD__, Arg1, 0x00, __LINE__)
540            }
541            ElseIf ((Arg2 == C00C))
542            {
543                M383 (__METHOD__, Arg1, 0x00, __LINE__)
544            }
545        }
546
547        Method (M001, 3, NotSerialized)
548        {
549            CopyObject (Arg0, Arg1)
550            If ((Arg2 == C009))
551            {
552                M380 (__METHOD__, Arg1, 0x00, __LINE__)
553            }
554            ElseIf ((Arg2 == C00A))
555            {
556                M381 (__METHOD__, Arg1, 0x00, __LINE__)
557            }
558            ElseIf ((Arg2 == C00B))
559            {
560                M382 (__METHOD__, Arg1, 0x00, __LINE__)
561            }
562            ElseIf ((Arg2 == C00C))
563            {
564                M383 (__METHOD__, Arg1, 0x00, __LINE__)
565            }
566        }
567
568        Method (M002, 3, NotSerialized)
569        {
570            Arg1 = Arg0
571            Local2 = DerefOf (Arg1)
572            If ((Arg2 == C009))
573            {
574                M380 (__METHOD__, Local2, 0x00, __LINE__)
575            }
576            ElseIf ((Arg2 == C00A))
577            {
578                M381 (__METHOD__, Local2, 0x00, __LINE__)
579            }
580            ElseIf ((Arg2 == C00B))
581            {
582                M382 (__METHOD__, Local2, 0x00, __LINE__)
583            }
584            ElseIf ((Arg2 == C00C))
585            {
586                M383 (__METHOD__, Local2, 0x00, __LINE__)
587            }
588        }
589
590        Method (M003, 3, NotSerialized)
591        {
592            CopyObject (Arg0, Arg1)
593            Local2 = DerefOf (Arg1)
594            If ((Arg2 == C009))
595            {
596                M380 (__METHOD__, Local2, 0x00, __LINE__)
597            }
598            ElseIf ((Arg2 == C00A))
599            {
600                M381 (__METHOD__, Local2, 0x00, __LINE__)
601            }
602            ElseIf ((Arg2 == C00B))
603            {
604                M382 (__METHOD__, Local2, 0x00, __LINE__)
605            }
606            ElseIf ((Arg2 == C00C))
607            {
608                M383 (__METHOD__, Local2, 0x00, __LINE__)
609            }
610        }
611
612        Method (M004, 2, NotSerialized)
613        {
614            Arg1 = Arg0
615            M380 (__METHOD__, Arg1, 0x00, __LINE__)
616        }
617
618        Method (M005, 2, NotSerialized)
619        {
620            Arg1 = Arg0
621        }
622
623        BEG0 (Z111, __METHOD__)
624        /* ArgX-Object -->> ArgY-Object */
625
626        M000 (I000, I001, C009)
627        M380 (__METHOD__, I000, 0x00, __LINE__)
628        M384 (__METHOD__, I001, 0x00, __LINE__)
629        M001 (I000, I001, C009)
630        M380 (__METHOD__, I000, 0x00, __LINE__)
631        M384 (__METHOD__, I001, 0x00, __LINE__)
632        /* ArgX-Object -->> ArgY-ORef */
633
634        M002 (I000, RefOf (I001), C009)
635        M380 (__METHOD__, I000, 0x00, __LINE__)
636        M380 (__METHOD__, I001, 0x00, __LINE__)
637        M003 (I000, RefOf (I021), C009)
638        M380 (__METHOD__, I000, 0x00, __LINE__)
639        M380 (__METHOD__, I021, 0x00, __LINE__)
640        Local0 = RefOf (I031)
641        M002 (I000, Local0, C009)
642        M380 (__METHOD__, I000, 0x00, __LINE__)
643        M380 (__METHOD__, I031, 0x00, __LINE__)
644        Local2 = DerefOf (Local0)
645        M380 (__METHOD__, Local2, 0x00, __LINE__)
646        Local0 = RefOf (I041)
647        M003 (I000, Local0, C009)
648        M380 (__METHOD__, I000, 0x00, __LINE__)
649        M380 (__METHOD__, I041, 0x00, __LINE__)
650        Local2 = DerefOf (Local0)
651        M380 (__METHOD__, Local2, 0x00, __LINE__)
652        /* ArgX-Object -->> ArgY-IRef */
653
654        M004 (I000, Local0 = S021 [0x01])
655        M380 (__METHOD__, I000, 0x00, __LINE__)
656        M385 (__METHOD__, S021, 0x00, __LINE__)
657        Local2 = DerefOf (Local0)
658        M384 (__METHOD__, Local2, 0x00, __LINE__)
659        Local1 = Local0 = S021 [0x01]
660        M004 (I000, Local0)
661        M380 (__METHOD__, I000, 0x00, __LINE__)
662        M385 (__METHOD__, S021, 0x00, __LINE__)
663        Local2 = DerefOf (Local0)
664        M384 (__METHOD__, Local2, 0x00, __LINE__)
665        M004 (I000, Local1)
666        M380 (__METHOD__, I000, 0x00, __LINE__)
667        M385 (__METHOD__, S021, 0x00, __LINE__)
668        Local2 = DerefOf (Local1)
669        M384 (__METHOD__, Local2, 0x00, __LINE__)
670        /* ArgX-ORef -->> ArgY-Object */
671
672        M005 (RefOf (I000), S000)
673        M380 (__METHOD__, I000, 0x00, __LINE__)
674        M381 (__METHOD__, S000, 0x00, __LINE__)
675        M005 (RefOf (I000), I051)
676        M380 (__METHOD__, I000, 0x00, __LINE__)
677        M384 (__METHOD__, I051, 0x00, __LINE__)
678        Local0 = RefOf (I000)
679        M005 (Local0, S000)
680        M380 (__METHOD__, I000, 0x00, __LINE__)
681        M381 (__METHOD__, S000, 0x00, __LINE__)
682        M005 (Local0, I051)
683        M380 (__METHOD__, I000, 0x00, __LINE__)
684        M384 (__METHOD__, I051, 0x00, __LINE__)
685        /* ArgX-IRef -->> ArgY-Object */
686
687        M005 (Local0 = S000 [0x01], I000)
688        M381 (__METHOD__, S000, 0x00, __LINE__)
689        M380 (__METHOD__, I000, 0x00, __LINE__)
690        /* The entire expression (exercised below): */
691        /* m005(Index(s021, 1, Local0), RefOf(i010)) */
692        /* here is executed step by step: */
693        M385 (__METHOD__, S021, 0x00, __LINE__)
694        M380 (__METHOD__, I010, 0x00, __LINE__)
695        M005 (Local0 = S021 [0x01], I010)
696        M385 (__METHOD__, S021, 0x00, __LINE__)
697        M380 (__METHOD__, I010, 0x00, __LINE__)
698        M005 (I051, RefOf (I010))
699        M385 (__METHOD__, S021, 0x00, __LINE__)
700        M384 (__METHOD__, I051, 0x00, __LINE__)
701        M384 (__METHOD__, I010, 0x00, __LINE__)
702        If (Y513)
703        {
704            /* ArgX-IRef -->> ArgY-ORef */
705
706            M005 (Local0 = S021 [0x01], RefOf (I020))
707            M385 (__METHOD__, S021, 0x00, __LINE__)
708            M384 (__METHOD__, I020, 0x00, __LINE__)
709            Local1 = DerefOf (Local0)
710            M384 (__METHOD__, Local1, 0x00, __LINE__)
711        }
712
713        /* ArgX-IRef -->> ArgY-IRef */
714
715        M005 (Local0 = S021 [0x01], Local1 = S010 [0x01])
716        M385 (__METHOD__, S021, 0x00, __LINE__)
717        M381 (__METHOD__, S010, 0x00, __LINE__)
718        Local2 = DerefOf (Local0)
719        M384 (__METHOD__, Local2, 0x00, __LINE__)
720        Local2 = DerefOf (Local1)
721        M380 (__METHOD__, Local2, 0x00, __LINE__)
722        If (Y513)
723        {
724            /* ArgX-ORef -->> ArgY-ORef */
725
726            M005 (RefOf (I000), RefOf (I061))
727            M380 (__METHOD__, I000, 0x00, __LINE__)
728            M380 (__METHOD__, I061, 0x00, __LINE__)
729        }
730
731        /* ArgX-ORef -->> ArgY-IRef */
732
733        M005 (RefOf (I000), Local0 = S031 [0x01])
734        M380 (__METHOD__, I000, 0x00, __LINE__)
735        M385 (__METHOD__, S031, 0x00, __LINE__)
736        Local2 = DerefOf (Local0)
737        M384 (__METHOD__, Local2, 0x00, __LINE__)
738        END0 ()
739    }
740
741    /*
742     * TEST 21: Check writing from ArgX to LocalX
743     *
744     * ACTUALLY:
745     *
746     *   - from ArgX-Object to LocalX
747     *   - from ArgX-ORef to LocalX
748     *   - from ArgX-IRef to LocalX
749     */
750    Method (M236, 0, Serialized)
751    {
752        If (Y100)
753        {
754            TS00 (__METHOD__)
755        }
756        Else
757        {
758            Debug = __METHOD__ /* \M236.TS__ */
759        }
760
761        Name (I000, 0x77)
762        Name (S000, "qwer0000")
763        Name (B000, Buffer (0x04)
764        {
765             0x01, 0x77, 0x03, 0x04                           // .w..
766        })
767        Name (P000, Package (0x03)
768        {
769            0x05,
770            0x77,
771            0x07
772        })
773        Name (I001, 0x2B)
774        Name (S001, "q+er0000")
775        Method (M000, 2, NotSerialized)
776        {
777            Local0 = Arg0
778            If ((Arg1 == C009))
779            {
780                M380 (__METHOD__, Local0, 0x00, __LINE__)
781            }
782            ElseIf ((Arg1 == C00A))
783            {
784                M381 (__METHOD__, Local0, 0x00, __LINE__)
785            }
786            ElseIf ((Arg1 == C00B))
787            {
788                M382 (__METHOD__, Local0, 0x00, __LINE__)
789            }
790            ElseIf ((Arg1 == C00C))
791            {
792                M383 (__METHOD__, Local0, 0x00, __LINE__)
793            }
794
795            Local0 = 0x11
796        }
797
798        Method (M001, 2, NotSerialized)
799        {
800            Local0 = Arg0
801            Local0 = ObjectType (Arg0)
802            If ((Local0 != Arg1))
803            {
804                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, Arg1)
805            }
806
807            /* Overwrite LocalX which contains either */
808            /* Object or ORef or IRef. */
809            Local0 = 0x11
810        }
811
812        BEG0 (Z111, __METHOD__)
813        /* ArgX-Object -->> LocalX */
814
815        M000 (I000, C009)
816        M000 (S000, C00A)
817        M000 (B000, C00B)
818        M000 (P000, C00C)
819        M380 (__METHOD__, I000, 0x00, __LINE__)
820        M381 (__METHOD__, S000, 0x00, __LINE__)
821        M382 (__METHOD__, B000, 0x00, __LINE__)
822        M383 (__METHOD__, P000, 0x00, __LINE__)
823        /* ArgX-ORef -->> LocalX */
824
825        M001 (RefOf (I000), C009)
826        M001 (RefOf (S000), C00A)
827        M001 (RefOf (B000), C00B)
828        M001 (RefOf (P000), C00C)
829        M380 (__METHOD__, I000, 0x00, __LINE__)
830        M381 (__METHOD__, S000, 0x00, __LINE__)
831        M382 (__METHOD__, B000, 0x00, __LINE__)
832        M383 (__METHOD__, P000, 0x00, __LINE__)
833        /* ArgX-IRef -->> LocalX */
834
835        M001 (S000 [0x01], C016)
836        M001 (B000 [0x01], C016)
837        M001 (P000 [0x01], C009)
838        M380 (__METHOD__, I000, 0x00, __LINE__)
839        M381 (__METHOD__, S000, 0x00, __LINE__)
840        M382 (__METHOD__, B000, 0x00, __LINE__)
841        M383 (__METHOD__, P000, 0x00, __LINE__)
842        END0 ()
843    }
844
845    /*
846     * TEST 23: Generate LocalX-ORef and write to it
847     *
848     * ACTUALLY: doesn't write to the original object
849     */
850    Method (M237, 0, Serialized)
851    {
852        If (Y100)
853        {
854            TS00 (__METHOD__)
855        }
856        Else
857        {
858            Debug = __METHOD__ /* \M237.TS__ */
859        }
860
861        Name (I000, 0x77)
862        Name (S000, "qwer0000")
863        Name (B000, Buffer (0x04)
864        {
865             0x01, 0x77, 0x03, 0x04                           // .w..
866        })
867        Name (P000, Package (0x03)
868        {
869            0x05,
870            0x77,
871            0x07
872        })
873        /* Overwrite LocalX-ORef */
874
875        Method (M000, 1, NotSerialized)
876        {
877            Local0 = RefOf (Arg0)
878            Local0 = 0x11
879            Local0 = RefOf (I000)
880            Local0 = 0x11
881            Local0 = RefOf (S000)
882            Local0 = 0x11
883            Local0 = RefOf (B000)
884            Local0 = 0x11
885            Local0 = RefOf (P000)
886            Local0 = 0x11
887        }
888
889        BEG0 (Z111, __METHOD__)
890        M000 (I000)
891        M000 (S000)
892        M000 (B000)
893        M000 (P000)
894        M380 (__METHOD__, I000, 0x00, __LINE__)
895        M381 (__METHOD__, S000, 0x00, __LINE__)
896        M382 (__METHOD__, B000, 0x00, __LINE__)
897        M383 (__METHOD__, P000, 0x00, __LINE__)
898        END0 ()
899    }
900
901    /*
902     * TEST 24: Generate LocalX-IRef and write to it
903     *
904     * ACTUALLY: doesn't write to the original object
905     */
906    Method (M238, 0, Serialized)
907    {
908        If (Y100)
909        {
910            TS00 (__METHOD__)
911        }
912        Else
913        {
914            Debug = __METHOD__ /* \M238.TS__ */
915        }
916
917        Name (I000, 0x77)
918        Name (S000, "qwer0000")
919        Name (B000, Buffer (0x04)
920        {
921             0x01, 0x77, 0x03, 0x04                           // .w..
922        })
923        Name (P000, Package (0x03)
924        {
925            0x05,
926            0x77,
927            0x07
928        })
929        /* Overwrite LocalX-ORef */
930
931        Method (M000, 1, NotSerialized)
932        {
933            Local1 = Local0 = Arg0 [0x01]
934            Local0 = 0x11
935            Local1 = 0x22
936            Local1 = Local0 = S000 [0x01]
937            Local0 = 0x11
938            Local1 = 0x22
939            Local1 = Local0 = B000 [0x01]
940            Local0 = 0x11
941            Local1 = 0x22
942            Local1 = Local0 = P000 [0x01]
943            Local0 = 0x11
944            Local1 = 0x22
945        }
946
947        Method (M001, 1, NotSerialized)
948        {
949            Local1 = Local0 = Arg0 [0x01]
950            CopyObject (0x11, Local0)
951            CopyObject (0x22, Local1)
952            Local1 = Local0 = S000 [0x01]
953            CopyObject (0x11, Local0)
954            CopyObject (0x22, Local1)
955            Local1 = Local0 = B000 [0x01]
956            CopyObject (0x11, Local0)
957            CopyObject (0x22, Local1)
958            Local1 = Local0 = P000 [0x01]
959            CopyObject (0x11, Local0)
960            CopyObject (0x22, Local1)
961        }
962
963        BEG0 (Z111, __METHOD__)
964        M000 (S000)
965        M000 (B000)
966        M000 (P000)
967        M380 (__METHOD__, I000, 0x00, __LINE__)
968        M381 (__METHOD__, S000, 0x00, __LINE__)
969        M382 (__METHOD__, B000, 0x00, __LINE__)
970        M383 (__METHOD__, P000, 0x00, __LINE__)
971        M001 (S000)
972        M001 (B000)
973        M001 (P000)
974        M380 (__METHOD__, I000, 0x00, __LINE__)
975        M381 (__METHOD__, S000, 0x00, __LINE__)
976        M382 (__METHOD__, B000, 0x00, __LINE__)
977        M383 (__METHOD__, P000, 0x00, __LINE__)
978        END0 ()
979    }
980
981    /*
982     * TEST 25: Generate ORef to global Object into ArgX and write to it
983     *
984     * ACTUALLY:
985     *
986     *    - doesn't write to the original object
987     *    - the repeated attempts to overwrite ORef-ArgX cause exceptions
988     */
989    Method (M239, 0, Serialized)
990    {
991        If (Y100)
992        {
993            TS00 (__METHOD__)
994        }
995        Else
996        {
997            Debug = __METHOD__ /* \M239.TS__ */
998        }
999
1000        /* Local Objects */
1001
1002        Method (M000, 2, NotSerialized)
1003        {
1004            Arg1 = RefOf (Arg0)
1005            Arg1 = 0x11
1006        }
1007
1008        Method (M001, 2, NotSerialized)
1009        {
1010            Arg1 = RefOf (Arg0)
1011            Arg1 = 0x11
1012            Arg1 = RefOf (IA00)
1013            Arg1 = 0x11
1014            Arg1 = RefOf (SA00)
1015            Arg1 = 0x11
1016            Arg1 = RefOf (BA00)
1017            Arg1 = 0x11
1018            Arg1 = RefOf (PA00)
1019            Arg1 = 0x11
1020        }
1021
1022        Method (M002, 2, NotSerialized)
1023        {
1024            Arg1 = RefOf (Arg0)
1025            CopyObject (0x11, Arg1)
1026            Arg1 = RefOf (IA00)
1027            CopyObject (0x11, Arg1)
1028            Arg1 = RefOf (SA00)
1029            CopyObject (0x11, Arg1)
1030            Arg1 = RefOf (BA00)
1031            CopyObject (0x11, Arg1)
1032            Arg1 = RefOf (PA00)
1033            CopyObject (0x11, Arg1)
1034        }
1035
1036        Method (M003, 2, NotSerialized)
1037        {
1038            CopyObject (RefOf (Arg0), Arg1)
1039            CopyObject (0x11, Arg1)
1040            CopyObject (RefOf (IA00), Arg1)
1041            CopyObject (0x11, Arg1)
1042            CopyObject (RefOf (SA00), Arg1)
1043            CopyObject (0x11, Arg1)
1044            CopyObject (RefOf (BA00), Arg1)
1045            CopyObject (0x11, Arg1)
1046            CopyObject (RefOf (PA00), Arg1)
1047            CopyObject (0x11, Arg1)
1048        }
1049
1050        BEG0 (Z111, __METHOD__)
1051        /* m000 */
1052
1053        M000 (IA00, IA10)
1054        M000 (SA00, SA10)
1055        M000 (BA00, BA10)
1056        M000 (PA00, PA10)
1057        M380 (__METHOD__, IA00, 0x00, __LINE__)
1058        M381 (__METHOD__, SA00, 0x00, __LINE__)
1059        M382 (__METHOD__, BA00, 0x00, __LINE__)
1060        M383 (__METHOD__, PA00, 0x00, __LINE__)
1061        M380 (__METHOD__, IA10, 0x00, __LINE__)
1062        M381 (__METHOD__, SA10, 0x00, __LINE__)
1063        M382 (__METHOD__, BA10, 0x00, __LINE__)
1064        M383 (__METHOD__, PA10, 0x00, __LINE__)
1065        If (Y514)
1066        {
1067            /* m001 */
1068
1069            M001 (IA00, IA10)
1070            M001 (SA00, SA10)
1071            M001 (BA00, BA10)
1072            M001 (PA00, PA10)
1073            M380 (__METHOD__, IA00, 0x00, __LINE__)
1074            M381 (__METHOD__, SA00, 0x00, __LINE__)
1075            M382 (__METHOD__, BA00, 0x00, __LINE__)
1076            M383 (__METHOD__, PA00, 0x00, __LINE__)
1077            M380 (__METHOD__, IA10, 0x00, __LINE__)
1078            M381 (__METHOD__, SA10, 0x00, __LINE__)
1079            M382 (__METHOD__, BA10, 0x00, __LINE__)
1080            M383 (__METHOD__, PA10, 0x00, __LINE__)
1081            /* m002 */
1082
1083            M002 (IA00, IA10)
1084            M002 (SA00, SA10)
1085            M002 (BA00, BA10)
1086            M002 (PA00, PA10)
1087            M380 (__METHOD__, IA00, 0x00, __LINE__)
1088            M381 (__METHOD__, SA00, 0x00, __LINE__)
1089            M382 (__METHOD__, BA00, 0x00, __LINE__)
1090            M383 (__METHOD__, PA00, 0x00, __LINE__)
1091            M380 (__METHOD__, IA10, 0x00, __LINE__)
1092            M381 (__METHOD__, SA10, 0x00, __LINE__)
1093            M382 (__METHOD__, BA10, 0x00, __LINE__)
1094            M383 (__METHOD__, PA10, 0x00, __LINE__)
1095        }
1096
1097        /* m003 */
1098
1099        M003 (IA00, IA10)
1100        M003 (SA00, SA10)
1101        M003 (BA00, BA10)
1102        M003 (PA00, PA10)
1103        M380 (__METHOD__, IA00, 0x00, __LINE__)
1104        M381 (__METHOD__, SA00, 0x00, __LINE__)
1105        M382 (__METHOD__, BA00, 0x00, __LINE__)
1106        M383 (__METHOD__, PA00, 0x00, __LINE__)
1107        M380 (__METHOD__, IA10, 0x00, __LINE__)
1108        M381 (__METHOD__, SA10, 0x00, __LINE__)
1109        M382 (__METHOD__, BA10, 0x00, __LINE__)
1110        M383 (__METHOD__, PA10, 0x00, __LINE__)
1111        END0 ()
1112    }
1113
1114    /*
1115     * TEST 26: Generate ORef to local Object into ArgX and write to it
1116     *
1117     * ACTUALLY:
1118     *
1119     *    - doesn't write to the original object
1120     *    - the repeated attempts to overwrite ORef-ArgX cause exceptions
1121     */
1122    Method (M23A, 0, Serialized)
1123    {
1124        If (Y100)
1125        {
1126            TS00 (__METHOD__)
1127        }
1128        Else
1129        {
1130            Debug = __METHOD__ /* \M23A.TS__ */
1131        }
1132
1133        /* Local Objects */
1134
1135        Name (I000, 0x77)
1136        Name (S000, "qwer0000")
1137        Name (B000, Buffer (0x04)
1138        {
1139             0x01, 0x77, 0x03, 0x04                           // .w..
1140        })
1141        Name (P000, Package (0x03)
1142        {
1143            0x05,
1144            0x77,
1145            0x07
1146        })
1147        Name (I010, 0x77)
1148        Name (S010, "qwer0000")
1149        Name (B010, Buffer (0x04)
1150        {
1151             0x01, 0x77, 0x03, 0x04                           // .w..
1152        })
1153        Name (P010, Package (0x03)
1154        {
1155            0x05,
1156            0x77,
1157            0x07
1158        })
1159        Method (M000, 2, NotSerialized)
1160        {
1161            Arg1 = RefOf (Arg0)
1162            Arg1 = 0x11
1163        }
1164
1165        Method (M001, 2, NotSerialized)
1166        {
1167            Arg1 = RefOf (Arg0)
1168            Arg1 = 0x11
1169            Arg1 = RefOf (I000)
1170            Arg1 = 0x11
1171            Arg1 = RefOf (S000)
1172            Arg1 = 0x11
1173            Arg1 = RefOf (B000)
1174            Arg1 = 0x11
1175            Arg1 = RefOf (P000)
1176            Arg1 = 0x11
1177        }
1178
1179        Method (M002, 2, NotSerialized)
1180        {
1181            Arg1 = RefOf (Arg0)
1182            CopyObject (0x11, Arg1)
1183            Arg1 = RefOf (I000)
1184            CopyObject (0x11, Arg1)
1185            Arg1 = RefOf (S000)
1186            CopyObject (0x11, Arg1)
1187            Arg1 = RefOf (B000)
1188            CopyObject (0x11, Arg1)
1189            Arg1 = RefOf (P000)
1190            CopyObject (0x11, Arg1)
1191        }
1192
1193        Method (M003, 2, NotSerialized)
1194        {
1195            CopyObject (RefOf (Arg0), Arg1)
1196            CopyObject (0x11, Arg1)
1197            CopyObject (RefOf (I000), Arg1)
1198            CopyObject (0x11, Arg1)
1199            CopyObject (RefOf (S000), Arg1)
1200            CopyObject (0x11, Arg1)
1201            CopyObject (RefOf (B000), Arg1)
1202            CopyObject (0x11, Arg1)
1203            CopyObject (RefOf (P000), Arg1)
1204            CopyObject (0x11, Arg1)
1205        }
1206
1207        BEG0 (Z111, __METHOD__)
1208        /* m000 */
1209
1210        M000 (I000, I010)
1211        M000 (S000, S010)
1212        M000 (B000, B010)
1213        M000 (P000, P010)
1214        M380 (__METHOD__, I000, 0x00, __LINE__)
1215        M381 (__METHOD__, S000, 0x00, __LINE__)
1216        M382 (__METHOD__, B000, 0x00, __LINE__)
1217        M383 (__METHOD__, P000, 0x00, __LINE__)
1218        M380 (__METHOD__, I010, 0x00, __LINE__)
1219        M381 (__METHOD__, S010, 0x00, __LINE__)
1220        M382 (__METHOD__, B010, 0x00, __LINE__)
1221        M383 (__METHOD__, P010, 0x00, __LINE__)
1222        If (Y514)
1223        {
1224            /* m001 */
1225
1226            M001 (I000, I010)
1227            M001 (S000, S010)
1228            M001 (B000, B010)
1229            M001 (P000, P010)
1230            M380 (__METHOD__, I000, 0x00, __LINE__)
1231            M381 (__METHOD__, S000, 0x00, __LINE__)
1232            M382 (__METHOD__, B000, 0x00, __LINE__)
1233            M383 (__METHOD__, P000, 0x00, __LINE__)
1234            M380 (__METHOD__, I010, 0x00, __LINE__)
1235            M381 (__METHOD__, S010, 0x00, __LINE__)
1236            M382 (__METHOD__, B010, 0x00, __LINE__)
1237            M383 (__METHOD__, P010, 0x00, __LINE__)
1238            /* m002 */
1239
1240            M002 (I000, I010)
1241            M002 (S000, S010)
1242            M002 (B000, B010)
1243            M002 (P000, P010)
1244            M380 (__METHOD__, I000, 0x00, __LINE__)
1245            M381 (__METHOD__, S000, 0x00, __LINE__)
1246            M382 (__METHOD__, B000, 0x00, __LINE__)
1247            M383 (__METHOD__, P000, 0x00, __LINE__)
1248            M380 (__METHOD__, I010, 0x00, __LINE__)
1249            M381 (__METHOD__, S010, 0x00, __LINE__)
1250            M382 (__METHOD__, B010, 0x00, __LINE__)
1251            M383 (__METHOD__, P010, 0x00, __LINE__)
1252        }
1253
1254        /* m003 */
1255
1256        M003 (I000, I010)
1257        M003 (S000, S010)
1258        M003 (B000, B010)
1259        M003 (P000, P010)
1260        M380 (__METHOD__, I000, 0x00, __LINE__)
1261        M381 (__METHOD__, S000, 0x00, __LINE__)
1262        M382 (__METHOD__, B000, 0x00, __LINE__)
1263        M383 (__METHOD__, P000, 0x00, __LINE__)
1264        M380 (__METHOD__, I010, 0x00, __LINE__)
1265        M381 (__METHOD__, S010, 0x00, __LINE__)
1266        M382 (__METHOD__, B010, 0x00, __LINE__)
1267        M383 (__METHOD__, P010, 0x00, __LINE__)
1268        END0 ()
1269    }
1270
1271    /*
1272     * TEST 27: Check CopyObject to LocalX
1273     *
1274     * Local0-Local7 can be written with any type object without any conversion
1275     *
1276     * Check each type after each one
1277     */
1278    Method (M23B, 0, NotSerialized)
1279    {
1280        TS00 ("m23b")
1281        M1B1 ()
1282    }
1283
1284    /*
1285     * TEST 28: Check Store to LocalX
1286     *
1287     * Local0-Local7 can be written without any conversion
1288     *
1289     * Check each type after each one
1290     */
1291    Method (M23C, 0, NotSerialized)
1292    {
1293        TS00 ("m23c")
1294        M1B2 ()
1295    }
1296
1297    /*
1298     * TEST 29: CopyObject the result of RefOf to LocalX
1299     *
1300     * References to any type Objects are available.
1301     */
1302    Method (M23D, 0, NotSerialized)
1303    {
1304        TS00 ("m23d")
1305        M1B4 ()
1306    }
1307
1308    /*
1309     * TEST 30: Store the result of RefOf to LocalX
1310     *
1311     * ACTUALLY: references to any type Objects are available
1312     */
1313    Method (M23E, 0, NotSerialized)
1314    {
1315        TS00 ("m23e")
1316        M1B5 ()
1317    }
1318
1319    /*
1320     * TEST 31: CopyObject the result of Index to LocalX
1321     */
1322    Method (M23F, 0, NotSerialized)
1323    {
1324        TS00 ("m23f")
1325        M1B6 ()
1326    }
1327
1328    /*
1329     * TEST 32: Store the result of Index to LocalX
1330     */
1331    Method (M250, 0, NotSerialized)
1332    {
1333        TS00 ("m250")
1334        M1B7 ()
1335    }
1336
1337    /*
1338     * TEST 33: mix of all the legal ways (enumerated in
1339     *          tests TEST 27 - TEST 35) of initializing
1340     *          the LocalX.
1341     */
1342    Method (M251, 0, NotSerialized)
1343    {
1344        TS00 ("m251")
1345        /* Strategies: */
1346        /* 1 - mix of groups, 2 - Mod-6 strategy, otherwise - linear */
1347        M1E0 (0x01)
1348    }
1349
1350    /*
1351     * TEST 34: Obtain the NamedX objects of all the types
1352     *          and check their {type,size,value}.
1353     *
1354     * SEE: it is implemented in name/name.asl
1355     */
1356    /*
1357     * TEST 35
1358     *
1359     * Obtain and verify the ORef
1360     * and IRef to named objects
1361     * {type,size,value}.
1362     */
1363    Method (M252, 0, Serialized)
1364    {
1365        TS00 (__METHOD__)
1366        M1AD (__METHOD__, 0x00, 0x01, 0x01, 0x01, 0x00)
1367        /* NamedX-ORef */
1368
1369        M4D2 ()
1370        /* NamedX-IRef */
1371
1372        M4D3 ()
1373    }
1374
1375    /*
1376     * TEST 36: Check ArgX-ORef being passed further to another Method
1377     *
1378     * ACTUALLY: writes to the original object
1379     *           Object:RefOf:ORef:ArgX-ORef:M2:M3:...:M*:write
1380     *           ^ Changed
1381     *
1382     * A set of available for Store types for to write into is restricted
1383     */
1384    Method (M253, 0, NotSerialized)
1385    {
1386        TS00 ("m253")
1387        /* Store */
1388
1389        M34D (0x00)
1390        /* CopyObject */
1391
1392        M34D (0x01)
1393    }
1394
1395    /*
1396     * TEST 37: Check ArgX-IRef being passed further to another Method
1397     *
1398     * ACTUALLY: doesn't write to the original object
1399     */
1400    Method (M254, 0, NotSerialized)
1401    {
1402        TS00 ("m254")
1403        /* Store */
1404
1405        M34E (0x00)
1406        /* CopyObject */
1407
1408        M34E (0x01)
1409    }
1410
1411    /*
1412     * TEST 38: Check write(x, RefOf(y))
1413     */
1414    Method (M255, 0, NotSerialized)
1415    {
1416        TS00 ("m255")
1417        /* Store */
1418
1419        M34F ()
1420        /* CopyObject */
1421    /* CURRENTLY: compiler failed CopyObject(xx, RefOf(xx)) */
1422    /* m350() */
1423    }
1424
1425    /*
1426     * TEST 39: Check write(x, Index(String))
1427     */
1428    Method (M256, 0, Serialized)
1429    {
1430        TS00 (__METHOD__)
1431        Name (S000, "qwer0000")
1432        Name (S010, "qwer0000")
1433        BEG0 (Z111, __METHOD__)
1434        /* Store */
1435
1436        S000 [0x01] = 0x2B
1437        M385 (__METHOD__, S000, 0x00, __LINE__)
1438        Local0 = S010 [0x01]
1439        S010 [0x01] = 0x2B
1440        M385 (__METHOD__, S010, 0x00, __LINE__)
1441        /* CopyObject */
1442        /* CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx)) */
1443        /* CopyObject(0x2b, Index(s020, 1)) */
1444        /* m385 (ts, s020, 0, __LINE__)*/
1445        END0 ()
1446    }
1447
1448    /*
1449     * TEST 40: Check write(x, Index(Buffer))
1450     */
1451    Method (M257, 0, Serialized)
1452    {
1453        TS00 (__METHOD__)
1454        Name (B000, Buffer (0x04)
1455        {
1456             0x01, 0x77, 0x03, 0x04                           // .w..
1457        })
1458        Name (B010, Buffer (0x04)
1459        {
1460             0x01, 0x77, 0x03, 0x04                           // .w..
1461        })
1462        BEG0 (Z111, __METHOD__)
1463        /* Store */
1464
1465        B000 [0x01] = 0x2B
1466        M386 (__METHOD__, B000, 0x00, __LINE__)
1467        Local0 = B010 [0x01]
1468        B010 [0x01] = 0x2B
1469        M386 (__METHOD__, B010, 0x00, __LINE__)
1470        END0 ()
1471    }
1472
1473    /*
1474     * TEST 41: Check Store(Object, Index(Package(){Uninitialized}))
1475     */
1476    Method (M258, 1, Serialized)
1477    {
1478        TS00 (__METHOD__)
1479        Name (P100, Package (0x12){})
1480        P100 [0x00] = 0x00
1481        P100 [0x01] = I900 /* \I900 */
1482        P100 [0x02] = S900 /* \S900 */
1483        P100 [0x03] = B900 /* \B900 */
1484        P100 [0x04] = P953 /* \P953 */
1485        P100 [0x05] = F900 /* \F900 */
1486        /*
1487         // Removed 09/2015. iASL now disallows these stores
1488         if (arg0) {
1489         // Check these for exceptions but not there
1490         Store(d900, Index(p100, 6))
1491         Store(e900, Index(p100, 7))
1492         Store(m914, Index(p100, 8))
1493         Store(mx90, Index(p100, 9))
1494         Store(r900, Index(p100, 10))
1495         Store(pw90, Index(p100, 11))
1496         Store(pr90, Index(p100, 12))
1497         Store(tz90, Index(p100, 13))
1498         }
1499         */
1500        P100 [0x0E] = BF90 /* \BF90 */
1501        P100 [0x0F] = 0x0F
1502        P100 [0x10] = 0x10
1503        /* Verify p955-like Package */
1504
1505        M1AF (P100, 0x00, 0x00, 0x00)
1506        M1A6 ()
1507    }
1508
1509    /*
1510     * TEST 42: Check CopyObject(Object, Index(Package(){Uninitialized}))
1511     *
1512     * CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx))
1513     */
1514    Method (M259, 0, Serialized)
1515    {
1516        TS00 ("m259")
1517        Name (P100, Package (0x12){})
1518        /*
1519     *	CopyObject(i900, Index(p100, 1))
1520     *	CopyObject(s900, Index(p100, 2))
1521     *	CopyObject(b900, Index(p100, 3))
1522     *	CopyObject(p953, Index(p100, 4))
1523     *	CopyObject(f900, Index(p100, 5))
1524     *	CopyObject(d900, Index(p100, 6))
1525     *	CopyObject(e900, Index(p100, 7))
1526     *	CopyObject(m914, Index(p100, 8))
1527     *	CopyObject(mx90, Index(p100, 9))
1528     *	CopyObject(r900, Index(p100, 10))
1529     *	CopyObject(pw90, Index(p100, 11))
1530     *	CopyObject(pr90, Index(p100, 12))
1531     *	CopyObject(tz90, Index(p100, 13))
1532     *	CopyObject(bf90, Index(p100, 14))
1533     *
1534     *	m1af(p100, 1, 0, 0)
1535     *
1536     *
1537     *	m1a6()
1538     */
1539    }
1540
1541    /*
1542     * TEST 43: Check Store(RefOf(Object), Index(Package(){Uninitialized}))
1543     */
1544    Method (M25A, 0, Serialized)
1545    {
1546        TS00 ("m25a")
1547        Name (P100, Package (0x12){})
1548        M352 (P100)
1549        M1AF (P100, 0x01, 0x01, 0x01)
1550        M1A6 ()
1551    }
1552
1553    /*
1554     * TEST 44: Check Store(Index(Object,x), Index(Package(){Uninitialized}))
1555     */
1556    Method (M25B, 0, Serialized)
1557    {
1558        TS00 ("m25b")
1559        Name (P100, Package (0x12){})
1560        /* Store IRef (Index(p955, x)) into Package */
1561
1562        M353 (P100, 0x00)
1563        /* Verify p955-like Package */
1564
1565        M1AF (P100, 0x01, 0x00, 0x01)
1566        M1A6 ()
1567    }
1568
1569    /*
1570     * TEST 45: Check write(x, Index(Package(){Constant}))
1571     */
1572    Method (M25C, 0, Serialized)
1573    {
1574        TS00 (__METHOD__)
1575        Name (P000, Package (0x03)
1576        {
1577            0x05,
1578            0x77,
1579            0x07
1580        })
1581        Name (P010, Package (0x03)
1582        {
1583            0x05,
1584            0x77,
1585            0x07
1586        })
1587        BEG0 (Z111, __METHOD__)
1588        /* Store */
1589
1590        P000 [0x01] = 0x2B
1591        M387 (__METHOD__, P000, 0x00, __LINE__)
1592        Local0 = P010 [0x01]
1593        P010 [0x01] = 0x2B
1594        M387 (__METHOD__, P010, 0x00, __LINE__)
1595        END0 ()
1596    }
1597
1598    /*
1599     * TEST 46: Check write(x, Index(Package(){NamedX}))
1600     */
1601    Method (M25D, 0, NotSerialized)
1602    {
1603        TS00 ("m25d")
1604        /* Write Integer into Package and verify the obtained contents */
1605
1606        M351 (P955)
1607        /* Restore p955 Package */
1608
1609        M1C6 ()
1610        /* Check that the original data (i900,...) */
1611        /* are unchanged: */
1612        M1A6 ()
1613    }
1614
1615    /*
1616     * TEST 47: Check Store(Object, Index(Package(){ORef}))
1617     */
1618    Method (M25E, 0, Serialized)
1619    {
1620        TS00 ("m25e")
1621        Name (P100, Package (0x12){})
1622        /* Prepare Package with ORef elements */
1623        /* pointing to the global *9** data: */
1624        M352 (P100)
1625        /* Verify p955-like Package */
1626
1627        M1AF (P100, 0x01, 0x01, 0x01)
1628        /* Check the global *9** data are safe: */
1629
1630        M1A6 ()
1631        /* Write Integer into Package over the ORef */
1632        /* and verify the obtained contents */
1633        M351 (P100)
1634        /* Check the global *9** data are safe: */
1635
1636        M1A6 ()
1637    }
1638
1639    /*
1640     * TEST 48: Check Store(Object, Index(Package(){IRef}))
1641     */
1642    Method (M25F, 0, Serialized)
1643    {
1644        TS00 ("m25f")
1645        Name (P100, Package (0x12){})
1646        /* Store IRef (Index(p955, x)) into Package */
1647        /* (p955 belongs to *9** data): */
1648        M353 (P100, 0x00)
1649        /* Verify p955-like Package */
1650
1651        M1AF (P100, 0x01, 0x00, 0x01)
1652        M1A6 ()
1653        /* Write Integer into Package over the IRef */
1654        /* and verify the obtained contents */
1655        M351 (P100)
1656        /* Check the global *9** data are safe: */
1657
1658        M1A6 ()
1659    }
1660
1661    /*
1662     * TEST 49: ORef-LocalX
1663     */
1664    Method (M260, 0, NotSerialized)
1665    {
1666        TS00 ("m260")
1667        /* Store */
1668
1669        M354 ()
1670        /* CopyObject */
1671
1672        M355 ()
1673    }
1674
1675    Method (M354, 0, Serialized)
1676    {
1677        Name (I000, 0x77)
1678        Name (S000, "qwer0000")
1679        Name (B000, Buffer (0x04)
1680        {
1681             0x01, 0x77, 0x03, 0x04                           // .w..
1682        })
1683        Name (P000, Package (0x03)
1684        {
1685            0x05,
1686            0x77,
1687            0x07
1688        })
1689        Device (D000)
1690        {
1691            Name (I000, 0xABCD0017)
1692        }
1693
1694        Method (M000, 1, NotSerialized)
1695        {
1696            Arg0 = 0x2B
1697        }
1698
1699        BEG0 (Z111, __METHOD__)
1700        Local0 = RefOf (I000)
1701        If (0x00)
1702        {
1703            /* This is a reference */
1704
1705            CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
1706            Local7 = (Local0 + 0x01)
1707            CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
1708        }
1709
1710        M1A3 (Local0, C009, 0x00, 0x00, __LINE__)
1711        M380 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1712        M000 (Local0)
1713        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1714        Local0 = RefOf (S000)
1715        M1A3 (Local0, C00A, 0x00, 0x00, __LINE__)
1716        M381 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1717        M000 (Local0)
1718        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1719        Local0 = RefOf (B000)
1720        M1A3 (Local0, C00B, 0x00, 0x00, __LINE__)
1721        M382 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1722        M000 (Local0)
1723        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1724        Local0 = RefOf (P000)
1725        M1A3 (Local0, C00C, 0x00, 0x00, __LINE__)
1726        M383 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1727        M000 (Local0)
1728        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1729        Local0 = RefOf (D000)
1730        M1A3 (Local0, C00E, 0x00, 0x00, __LINE__)
1731        M000 (Local0)
1732        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1733        END0 ()
1734    }
1735
1736    Method (M355, 0, Serialized)
1737    {
1738        Name (I000, 0x77)
1739        Name (S000, "qwer0000")
1740        Name (B000, Buffer (0x04)
1741        {
1742             0x01, 0x77, 0x03, 0x04                           // .w..
1743        })
1744        Name (P000, Package (0x03)
1745        {
1746            0x05,
1747            0x77,
1748            0x07
1749        })
1750        Device (D000)
1751        {
1752            Name (I000, 0xABCD0017)
1753        }
1754
1755        Method (M000, 1, NotSerialized)
1756        {
1757            CopyObject (0x2B, Arg0)
1758        }
1759
1760        BEG0 (Z111, __METHOD__)
1761        CopyObject (RefOf (I000), Local0)
1762        If (0x00)
1763        {
1764            /* This is a reference */
1765
1766            CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
1767            Local7 = (Local0 + 0x01)
1768            CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
1769        }
1770
1771        M1A3 (Local0, C009, 0x00, 0x00, __LINE__)
1772        M380 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1773        M000 (Local0)
1774        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1775        CopyObject (RefOf (S000), Local0)
1776        M1A3 (Local0, C00A, 0x00, 0x00, __LINE__)
1777        M381 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1778        M000 (Local0)
1779        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1780        CopyObject (RefOf (B000), Local0)
1781        M1A3 (Local0, C00B, 0x00, 0x00, __LINE__)
1782        M382 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1783        M000 (Local0)
1784        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1785        CopyObject (RefOf (P000), Local0)
1786        M1A3 (Local0, C00C, 0x00, 0x00, __LINE__)
1787        M383 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1788        M000 (Local0)
1789        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1790        CopyObject (RefOf (D000), Local0)
1791        M1A3 (Local0, C00E, 0x00, 0x00, __LINE__)
1792        M000 (Local0)
1793        M384 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
1794        END0 ()
1795    }
1796
1797    /*
1798     * TEST 50: ORef-ArgX
1799     */
1800    Method (M261, 0, Serialized)
1801    {
1802        TS00 (__METHOD__)
1803        Name (I000, 0x77)
1804        Name (I001, 0x77)
1805        BEG0 (Z111, __METHOD__)
1806        /* Store */
1807
1808        If (Y519)
1809        {
1810            M356 (I000)
1811            M380 (__METHOD__, I000, 0x00, __LINE__)
1812        }
1813        Else
1814        {
1815            M1AE (__METHOD__, "Store ORef to ArgX", "AE_AML_OPERAND_TYPE exception occurs")
1816        }
1817
1818        /* CopyObject */
1819
1820        If (Y520)
1821        {
1822            M357 (I001)
1823            M380 (__METHOD__, I001, 0x00, __LINE__)
1824        }
1825        Else
1826        {
1827            M1AE (__METHOD__, "CopyObject ORef to ArgX", "AE_AML_OPERAND_TYPE exception occurs")
1828        }
1829
1830        END0 ()
1831    }
1832
1833    Method (M356, 1, Serialized)
1834    {
1835        Name (I000, 0x77)
1836        Name (S000, "qwer0000")
1837        Name (B000, Buffer (0x04)
1838        {
1839             0x01, 0x77, 0x03, 0x04                           // .w..
1840        })
1841        Name (P000, Package (0x03)
1842        {
1843            0x05,
1844            0x77,
1845            0x07
1846        })
1847        Device (D000)
1848        {
1849            Name (I000, 0xABCD0017)
1850        }
1851
1852        Method (M000, 1, NotSerialized)
1853        {
1854            Arg0 = 0x2B
1855        }
1856
1857        BEG0 (Z111, __METHOD__)
1858        Arg0 = RefOf (I000)
1859        If (0x00)
1860        {
1861            /* This is a reference */
1862
1863            CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
1864            Local7 = (Arg0 + 0x01)
1865            CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
1866        }
1867
1868        M1A3 (Arg0, C009, 0x00, 0x00, __LINE__)
1869        M380 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1870        M000 (Arg0)
1871        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1872        Arg0 = RefOf (S000)
1873        M1A3 (Arg0, C00A, 0x00, 0x00, __LINE__)
1874        M381 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1875        M000 (Arg0)
1876        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1877        Arg0 = RefOf (B000)
1878        M1A3 (Arg0, C00B, 0x00, 0x00, __LINE__)
1879        M382 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1880        M000 (Arg0)
1881        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1882        Arg0 = RefOf (P000)
1883        M1A3 (Arg0, C00C, 0x00, 0x00, __LINE__)
1884        M383 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1885        M000 (Arg0)
1886        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1887        Arg0 = RefOf (D000)
1888        M1A3 (Arg0, C00E, 0x00, 0x00, __LINE__)
1889        M000 (Arg0)
1890        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1891        END0 ()
1892    }
1893
1894    Method (M357, 1, Serialized)
1895    {
1896        Name (I000, 0x77)
1897        Name (S000, "qwer0000")
1898        Name (B000, Buffer (0x04)
1899        {
1900             0x01, 0x77, 0x03, 0x04                           // .w..
1901        })
1902        Name (P000, Package (0x03)
1903        {
1904            0x05,
1905            0x77,
1906            0x07
1907        })
1908        Device (D000)
1909        {
1910            Name (I000, 0xABCD0017)
1911        }
1912
1913        Method (M000, 1, NotSerialized)
1914        {
1915            CopyObject (0x2B, Arg0)
1916        }
1917
1918        BEG0 (Z111, __METHOD__)
1919        CopyObject (RefOf (I000), Arg0)
1920        If (0x00)
1921        {
1922            /* This is a reference */
1923
1924            CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
1925            Local7 = (Arg0 + 0x01)
1926            CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
1927        }
1928
1929        M1A3 (Arg0, C009, 0x00, 0x00, __LINE__)
1930        M380 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1931        M000 (Arg0)
1932        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1933        CopyObject (RefOf (S000), Arg0)
1934        M1A3 (Arg0, C00A, 0x00, 0x00, __LINE__)
1935        M381 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1936        M000 (Arg0)
1937        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1938        CopyObject (RefOf (B000), Arg0)
1939        M1A3 (Arg0, C00B, 0x00, 0x00, __LINE__)
1940        M382 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1941        M000 (Arg0)
1942        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1943        CopyObject (RefOf (P000), Arg0)
1944        M1A3 (Arg0, C00C, 0x00, 0x00, __LINE__)
1945        M383 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1946        M000 (Arg0)
1947        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1948        CopyObject (RefOf (D000), Arg0)
1949        M1A3 (Arg0, C00E, 0x00, 0x00, __LINE__)
1950        M000 (Arg0)
1951        M384 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
1952        END0 ()
1953    }
1954
1955    /*
1956     * TEST 51: ORef-NamedX
1957     */
1958    Method (M262, 0, Serialized)
1959    {
1960        TS00 (__METHOD__)
1961        /* Store */
1962
1963        If (Y521)
1964        {
1965            M358 ()
1966        }
1967        Else
1968        {
1969            M1AE (__METHOD__, "Store ORef to NamedX", "AE_AML_OPERAND_TYPE exception occurs")
1970        }
1971
1972        /* CopyObject */
1973
1974        If (Y522)
1975        {
1976            M359 ()
1977        }
1978        Else
1979        {
1980            M1AE (__METHOD__, "CopyObject ORef to NamedX", "AE_AML_OPERAND_TYPE exception occurs")
1981        }
1982    }
1983
1984    Method (M358, 0, Serialized)
1985    {
1986        Name (III0, 0x00)
1987        Name (I000, 0x77)
1988        Name (S000, "qwer0000")
1989        Name (B000, Buffer (0x04)
1990        {
1991             0x01, 0x77, 0x03, 0x04                           // .w..
1992        })
1993        Name (P000, Package (0x03)
1994        {
1995            0x05,
1996            0x77,
1997            0x07
1998        })
1999        Device (D000)
2000        {
2001            Name (I000, 0xABCD0017)
2002        }
2003
2004        Method (M000, 1, NotSerialized)
2005        {
2006            Arg0 = 0x2B
2007        }
2008
2009        BEG0 (Z111, __METHOD__)
2010        III0 = RefOf (I000)
2011        If (0x00)
2012        {
2013            /* This is a reference */
2014
2015            CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
2016            Local7 = (III0 + 0x01)
2017            CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
2018        }
2019
2020        M1A3 (III0, C009, 0x00, 0x00, __LINE__)
2021        M380 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2022        M000 (III0)
2023        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2024        III0 = RefOf (S000)
2025        M1A3 (III0, C00A, 0x00, 0x00, __LINE__)
2026        M381 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2027        M000 (III0)
2028        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2029        III0 = RefOf (B000)
2030        M1A3 (III0, C00B, 0x00, 0x00, __LINE__)
2031        M382 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2032        M000 (III0)
2033        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2034        III0 = RefOf (P000)
2035        M1A3 (III0, C00C, 0x00, 0x00, __LINE__)
2036        M383 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2037        M000 (III0)
2038        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2039        III0 = RefOf (D000)
2040        M1A3 (III0, C00E, 0x00, 0x00, __LINE__)
2041        M000 (III0)
2042        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2043        END0 ()
2044    }
2045
2046    Method (M359, 0, Serialized)
2047    {
2048        Name (III0, 0x00)
2049        Name (I000, 0x77)
2050        Name (S000, "qwer0000")
2051        Name (B000, Buffer (0x04)
2052        {
2053             0x01, 0x77, 0x03, 0x04                           // .w..
2054        })
2055        Name (P000, Package (0x03)
2056        {
2057            0x05,
2058            0x77,
2059            0x07
2060        })
2061        Device (D000)
2062        {
2063            Name (I000, 0xABCD0017)
2064        }
2065
2066        Method (M000, 1, NotSerialized)
2067        {
2068            CopyObject (0x2B, Arg0)
2069        }
2070
2071        BEG0 (Z111, __METHOD__)
2072        CopyObject (RefOf (I000), III0) /* \M359.III0 */
2073        If (0x00)
2074        {
2075            /* This is a reference */
2076
2077            CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
2078            Local7 = (III0 + 0x01)
2079            CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
2080        }
2081
2082        M1A3 (III0, C009, 0x00, 0x00, __LINE__)
2083        M380 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2084        M000 (III0)
2085        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2086        CopyObject (RefOf (S000), III0) /* \M359.III0 */
2087        M1A3 (III0, C00A, 0x00, 0x00, __LINE__)
2088        M381 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2089        M000 (III0)
2090        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2091        CopyObject (RefOf (B000), III0) /* \M359.III0 */
2092        M1A3 (III0, C00B, 0x00, 0x00, __LINE__)
2093        M382 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2094        M000 (III0)
2095        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2096        CopyObject (RefOf (P000), III0) /* \M359.III0 */
2097        M1A3 (III0, C00C, 0x00, 0x00, __LINE__)
2098        M383 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2099        M000 (III0)
2100        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2101        CopyObject (RefOf (D000), III0) /* \M359.III0 */
2102        M1A3 (III0, C00E, 0x00, 0x00, __LINE__)
2103        M000 (III0)
2104        M384 (__METHOD__, DerefOf (III0), 0x00, __LINE__)
2105        END0 ()
2106    }
2107
2108    /*
2109     * TEST 52: ORef-El_of_Package
2110     */
2111    Method (M263, 0, NotSerialized)
2112    {
2113        TS00 ("m263")
2114        /* Store */
2115
2116        M35A ()
2117        /* CopyObject */
2118
2119        M35B ()
2120    }
2121
2122    Method (M35A, 0, Serialized)
2123    {
2124        Name (PPP0, Package (0x05){})
2125        Name (I000, 0x77)
2126        Name (S000, "qwer0000")
2127        Name (B000, Buffer (0x04)
2128        {
2129             0x01, 0x77, 0x03, 0x04                           // .w..
2130        })
2131        Name (P000, Package (0x03)
2132        {
2133            0x05,
2134            0x77,
2135            0x07
2136        })
2137        Device (D000)
2138        {
2139            Name (I000, 0xABCD0017)
2140        }
2141
2142        BEG0 (Z111, __METHOD__)
2143        PPP0 [0x00] = RefOf (I000)
2144        PPP0 [0x01] = RefOf (S000)
2145        PPP0 [0x02] = RefOf (B000)
2146        PPP0 [0x03] = RefOf (P000)
2147        PPP0 [0x04] = RefOf (D000)
2148        Local0 = DerefOf (PPP0 [0x00])
2149        M1A3 (Local0, C009, 0x00, 0x00, __LINE__)
2150        M380 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2151        Local0 = DerefOf (PPP0 [0x01])
2152        M1A3 (Local0, C00A, 0x00, 0x00, __LINE__)
2153        M381 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2154        Local0 = DerefOf (PPP0 [0x02])
2155        M1A3 (Local0, C00B, 0x00, 0x00, __LINE__)
2156        M382 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2157        Local0 = DerefOf (PPP0 [0x03])
2158        M1A3 (Local0, C00C, 0x00, 0x00, __LINE__)
2159        M383 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2160        Local0 = DerefOf (PPP0 [0x04])
2161        M1A3 (Local0, C00E, 0x00, 0x00, __LINE__)
2162        /* Replace */
2163
2164        PPP0 [0x00] = RefOf (I000)
2165        Local0 = DerefOf (PPP0 [0x00])
2166        M1A3 (Local0, C009, 0x00, 0x00, __LINE__)
2167        M380 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2168        PPP0 [0x00] = RefOf (S000)
2169        Local0 = DerefOf (PPP0 [0x00])
2170        M1A3 (Local0, C00A, 0x00, 0x00, __LINE__)
2171        M381 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2172        PPP0 [0x00] = RefOf (B000)
2173        Local0 = DerefOf (PPP0 [0x00])
2174        M1A3 (Local0, C00B, 0x00, 0x00, __LINE__)
2175        M382 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2176        PPP0 [0x00] = RefOf (P000)
2177        Local0 = DerefOf (PPP0 [0x00])
2178        M1A3 (Local0, C00C, 0x00, 0x00, __LINE__)
2179        M383 (__METHOD__, DerefOf (Local0), 0x00, __LINE__)
2180        PPP0 [0x00] = RefOf (D000)
2181        Local0 = DerefOf (PPP0 [0x00])
2182        M1A3 (Local0, C00E, 0x00, 0x00, __LINE__)
2183        END0 ()
2184    }
2185
2186    /* CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx)) */
2187
2188    Method (M35B, 0, NotSerialized)
2189    {
2190        /*
2191     Name(ts, "m35b")
2192     Name(ppp0, Package(5) {})
2193     Name(i000, 0x77)
2194     Name(s000, "qwer0000")
2195     Name(b000, Buffer(4) {1,0x77,3,4})
2196     Name(p000, Package(3) {5,0x77,7})
2197     Device(d000) { Name(i000, 0xabcd0017) }
2198     BEG0(z111, ts)
2199     CopyObject(RefOf(i000), Index(ppp0, 0))
2200     CopyObject(RefOf(s000), Index(ppp0, 1))
2201     CopyObject(RefOf(b000), Index(ppp0, 2))
2202     CopyObject(RefOf(p000), Index(ppp0, 3))
2203     CopyObject(RefOf(d000), Index(ppp0, 4))
2204     CopyObject(DerefOf(Index(ppp0, 0)), Local0)
2205     m1a3(Local0, c009, 0, 0, 0)
2206     m380 (ts, DerefOf(Local0), 0, __LINE__)
2207     CopyObject(DerefOf(Index(ppp0, 1)), Local0)
2208     m1a3(Local0, c00a, 0, 0, 2)
2209     m381 (ts, DerefOf(Local0), 0, __LINE__)
2210     CopyObject(DerefOf(Index(ppp0, 2)), Local0)
2211     m1a3(Local0, c00b, 0, 0, 4)
2212     m382 (ts, DerefOf(Local0), 0, __LINE__)
2213     CopyObject(DerefOf(Index(ppp0, 3)), Local0)
2214     m1a3(Local0, c00c, 0, 0, 6)
2215     m383 (ts, DerefOf(Local0), 0, __LINE__)
2216     CopyObject(DerefOf(Index(ppp0, 4)), Local0)
2217     m1a3(Local0, c00e, 0, 0, 8)
2218     // Replace
2219     CopyObject(RefOf(i000), Index(ppp0, 0))
2220     CopyObject(DerefOf(Index(ppp0, 0)), Local0)
2221     m1a3(Local0, c009, 0, 0, 9)
2222     m380 (ts, DerefOf(Local0), 0, __LINE__)
2223     CopyObject(RefOf(s000), Index(ppp0, 0))
2224     CopyObject(DerefOf(Index(ppp0, 0)), Local0)
2225     m1a3(Local0, c00a, 0, 0, 11)
2226     m381 (ts, DerefOf(Local0), 0, __LINE__)
2227     CopyObject(RefOf(b000), Index(ppp0, 0))
2228     CopyObject(DerefOf(Index(ppp0, 0)), Local0)
2229     m1a3(Local0, c00b, 0, 0, 13)
2230     m382 (ts, DerefOf(Local0), 0, __LINE__)
2231     CopyObject(RefOf(p000), Index(ppp0, 0))
2232     CopyObject(DerefOf(Index(ppp0, 0)), Local0)
2233     m1a3(Local0, c00c, 0, 0, 15)
2234     m383 (ts, DerefOf(Local0), 0, __LINE__)
2235     CopyObject(RefOf(d000), Index(ppp0, 0))
2236     CopyObject(DerefOf(Index(ppp0, 0)), Local0)
2237     m1a3(Local0, c00e, 0, 0, 17)
2238     END0()
2239     */
2240    }
2241
2242    /*
2243     * TEST 53: IRef-LocalX
2244     */
2245    Method (M264, 0, NotSerialized)
2246    {
2247        TS00 ("m264")
2248        /* Store */
2249
2250        M35C ()
2251        /* CopyObject */
2252
2253        M35D ()
2254    }
2255
2256    Method (M35C, 0, Serialized)
2257    {
2258        Name (P000, Package (0x12){})
2259        BEG0 (Z111, __METHOD__)
2260        /* Construct the p955-like Package p000 applying LocalX-IRef */
2261
2262        Store (P956 [0x00], Local0)
2263        P000 [0x00] = Local0
2264        Store (P956 [0x01], Local0)
2265        P000 [0x01] = Local0
2266        Store (P956 [0x02], Local0)
2267        P000 [0x02] = Local0
2268        Store (P956 [0x03], Local0)
2269        P000 [0x03] = Local0
2270        Store (P956 [0x04], Local0)
2271        P000 [0x04] = Local0
2272        Store (P956 [0x05], Local0)
2273        P000 [0x05] = Local0
2274        Store (P956 [0x06], Local0)
2275        P000 [0x06] = Local0
2276        Store (P956 [0x07], Local0)
2277        P000 [0x07] = Local0
2278        Store (P956 [0x08], Local0)
2279        P000 [0x08] = Local0
2280        Store (P956 [0x09], Local0)
2281        P000 [0x09] = Local0
2282        Store (P956 [0x0A], Local0)
2283        P000 [0x0A] = Local0
2284        Store (P956 [0x0B], Local0)
2285        P000 [0x0B] = Local0
2286        Store (P956 [0x0C], Local0)
2287        P000 [0x0C] = Local0
2288        Store (P956 [0x0D], Local0)
2289        P000 [0x0D] = Local0
2290        Store (P956 [0x0E], Local0)
2291        P000 [0x0E] = Local0
2292        Store (P956 [0x0F], Local0)
2293        P000 [0x0F] = Local0
2294        Store (P956 [0x10], Local0)
2295        P000 [0x10] = Local0
2296        P000 [0x00] = 0x00
2297        P000 [0x0F] = 0x0F
2298        P000 [0x10] = 0x10
2299        /* Verify p955-like Package */
2300
2301        M1AF (P000, 0x01, 0x00, 0x01)
2302        M1A6 ()
2303        END0 ()
2304    }
2305
2306    /* CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx)) */
2307
2308    Method (M35D, 0, NotSerialized)
2309    {
2310        /*
2311     Name(ts, "m35d")
2312     Name(p000, Package(18) {})
2313     BEG0(z111, ts)
2314     // Construct the p955-like Package p000 applying LocalX-IRef
2315     CopyObject(Index(p956, 0), Local0)
2316     CopyObject(Local0, Index(p000, 0))
2317     CopyObject(Index(p956, 1), Local0)
2318     CopyObject(Local0, Index(p000, 1))
2319     CopyObject(Index(p956, 2), Local0)
2320     CopyObject(Local0, Index(p000, 2))
2321     CopyObject(Index(p956, 3), Local0)
2322     CopyObject(Local0, Index(p000, 3))
2323     CopyObject(Index(p956, 4), Local0)
2324     CopyObject(Local0, Index(p000, 4))
2325     CopyObject(Index(p956, 5), Local0)
2326     CopyObject(Local0, Index(p000, 5))
2327     CopyObject(Index(p956, 6), Local0)
2328     CopyObject(Local0, Index(p000, 6))
2329     CopyObject(Index(p956, 7), Local0)
2330     CopyObject(Local0, Index(p000, 7))
2331     CopyObject(Index(p956, 8), Local0)
2332     CopyObject(Local0, Index(p000, 8))
2333     CopyObject(Index(p956, 9), Local0)
2334     CopyObject(Local0, Index(p000, 9))
2335     CopyObject(Index(p956, 10), Local0)
2336     CopyObject(Local0, Index(p000, 10))
2337     CopyObject(Index(p956, 11), Local0)
2338     CopyObject(Local0, Index(p000, 11))
2339     CopyObject(Index(p956, 12), Local0)
2340     CopyObject(Local0, Index(p000, 12))
2341     CopyObject(Index(p956, 13), Local0)
2342     CopyObject(Local0, Index(p000, 13))
2343     CopyObject(Index(p956, 14), Local0)
2344     CopyObject(Local0, Index(p000, 14))
2345     CopyObject(Index(p956, 15), Local0)
2346     CopyObject(Local0, Index(p000, 15))
2347     CopyObject(Index(p956, 16), Local0)
2348     CopyObject(Local0, Index(p000, 16))
2349     CopyObject(0, Index(p000, 0))
2350     CopyObject(15, Index(p000, 15))
2351     CopyObject(16, Index(p000, 16))
2352     // Verify p955-like Package
2353     m1af(p000, 1, 0, 1)
2354     m1a6()
2355     END0()
2356     */
2357    }
2358
2359    /*
2360     * TEST 54: IRef-ArgX
2361     */
2362    Method (M265, 0, Serialized)
2363    {
2364        TS00 (__METHOD__)
2365        Name (I000, 0x77)
2366        Name (I010, 0x77)
2367        /* Store */
2368
2369        M35E (I000)
2370        M380 (__METHOD__, I000, Z111, __LINE__)
2371        /* CopyObject */
2372
2373        M35F (I010)
2374        M380 (__METHOD__, I010, Z111, __LINE__)
2375    }
2376
2377    Method (M35E, 1, Serialized)
2378    {
2379        Name (P000, Package (0x12){})
2380        BEG0 (Z111, __METHOD__)
2381        /* Construct the p955-like Package p000 applying LocalX-IRef */
2382
2383        Store (P956 [0x00], Arg0)
2384        P000 [0x00] = Arg0
2385        Store (P956 [0x01], Arg0)
2386        P000 [0x01] = Arg0
2387        Store (P956 [0x02], Arg0)
2388        P000 [0x02] = Arg0
2389        Store (P956 [0x03], Arg0)
2390        P000 [0x03] = Arg0
2391        Store (P956 [0x04], Arg0)
2392        P000 [0x04] = Arg0
2393        Store (P956 [0x05], Arg0)
2394        P000 [0x05] = Arg0
2395        Store (P956 [0x06], Arg0)
2396        P000 [0x06] = Arg0
2397        Store (P956 [0x07], Arg0)
2398        P000 [0x07] = Arg0
2399        Store (P956 [0x08], Arg0)
2400        P000 [0x08] = Arg0
2401        Store (P956 [0x09], Arg0)
2402        P000 [0x09] = Arg0
2403        Store (P956 [0x0A], Arg0)
2404        P000 [0x0A] = Arg0
2405        Store (P956 [0x0B], Arg0)
2406        P000 [0x0B] = Arg0
2407        Store (P956 [0x0C], Arg0)
2408        P000 [0x0C] = Arg0
2409        Store (P956 [0x0D], Arg0)
2410        P000 [0x0D] = Arg0
2411        Store (P956 [0x0E], Arg0)
2412        P000 [0x0E] = Arg0
2413        Store (P956 [0x0F], Arg0)
2414        P000 [0x0F] = Arg0
2415        Store (P956 [0x10], Arg0)
2416        P000 [0x10] = Arg0
2417        P000 [0x00] = 0x00
2418        P000 [0x0F] = 0x0F
2419        P000 [0x10] = 0x10
2420        /* Verify p955-like Package */
2421
2422        M1AF (P000, 0x01, 0x00, 0x01)
2423        M1A6 ()
2424        END0 ()
2425    }
2426
2427    /* CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx)) */
2428
2429    Method (M35F, 1, NotSerialized)
2430    {
2431        /*
2432     Name(ts, "m35f")
2433     Name(p000, Package(18) {})
2434     BEG0(z111, ts)
2435     // Construct the p955-like Package p000 applying LocalX-IRef
2436     CopyObject(Index(p956, 0), Arg0)
2437     CopyObject(Arg0, Index(p000, 0))
2438     CopyObject(Index(p956, 1), Arg0)
2439     CopyObject(Arg0, Index(p000, 1))
2440     CopyObject(Index(p956, 2), Arg0)
2441     CopyObject(Arg0, Index(p000, 2))
2442     CopyObject(Index(p956, 3), Arg0)
2443     CopyObject(Arg0, Index(p000, 3))
2444     CopyObject(Index(p956, 4), Arg0)
2445     CopyObject(Arg0, Index(p000, 4))
2446     CopyObject(Index(p956, 5), Arg0)
2447     CopyObject(Arg0, Index(p000, 5))
2448     CopyObject(Index(p956, 6), Arg0)
2449     CopyObject(Arg0, Index(p000, 6))
2450     CopyObject(Index(p956, 7), Arg0)
2451     CopyObject(Arg0, Index(p000, 7))
2452     CopyObject(Index(p956, 8), Arg0)
2453     CopyObject(Arg0, Index(p000, 8))
2454     CopyObject(Index(p956, 9), Arg0)
2455     CopyObject(Arg0, Index(p000, 9))
2456     CopyObject(Index(p956, 10), Arg0)
2457     CopyObject(Arg0, Index(p000, 10))
2458     CopyObject(Index(p956, 11), Arg0)
2459     CopyObject(Arg0, Index(p000, 11))
2460     CopyObject(Index(p956, 12), Arg0)
2461     CopyObject(Arg0, Index(p000, 12))
2462     CopyObject(Index(p956, 13), Arg0)
2463     CopyObject(Arg0, Index(p000, 13))
2464     CopyObject(Index(p956, 14), Arg0)
2465     CopyObject(Arg0, Index(p000, 14))
2466     CopyObject(Index(p956, 15), Arg0)
2467     CopyObject(Arg0, Index(p000, 15))
2468     CopyObject(Index(p956, 16), Arg0)
2469     CopyObject(Arg0, Index(p000, 16))
2470     CopyObject(0, Index(p000, 0))
2471     CopyObject(15, Index(p000, 15))
2472     CopyObject(16, Index(p000, 16))
2473     // Verify p955-like Package
2474     m1af(p000, 1, 0, 1)
2475     m1a6()
2476     END0()
2477     */
2478    }
2479
2480    /*
2481     * TEST 55: IRef-NamedX
2482     */
2483    Method (M266, 0, Serialized)
2484    {
2485        TS00 (__METHOD__)
2486        /* Store */
2487
2488        If (Y521)
2489        {
2490            M360 ()
2491        }
2492        Else
2493        {
2494            M1AE (__METHOD__, "Store IRef to NamedX", "AE_AML_OPERAND_TYPE exception occurs")
2495        }
2496
2497        /* CopyObject */
2498
2499        M361 ()
2500    }
2501
2502    Method (M360, 0, Serialized)
2503    {
2504        Name (III0, 0x00)
2505        Name (P000, Package (0x12){})
2506        BEG0 (Z111, __METHOD__)
2507        /* Construct the p955-like Package p000 applying LocalX-IRef */
2508
2509        Store (P956 [0x00], III0) /* \M360.III0 */
2510        P000 [0x00] = III0 /* \M360.III0 */
2511        Store (P956 [0x01], III0) /* \M360.III0 */
2512        P000 [0x01] = III0 /* \M360.III0 */
2513        Store (P956 [0x02], III0) /* \M360.III0 */
2514        P000 [0x02] = III0 /* \M360.III0 */
2515        Store (P956 [0x03], III0) /* \M360.III0 */
2516        P000 [0x03] = III0 /* \M360.III0 */
2517        Store (P956 [0x04], III0) /* \M360.III0 */
2518        P000 [0x04] = III0 /* \M360.III0 */
2519        Store (P956 [0x05], III0) /* \M360.III0 */
2520        P000 [0x05] = III0 /* \M360.III0 */
2521        Store (P956 [0x06], III0) /* \M360.III0 */
2522        P000 [0x06] = III0 /* \M360.III0 */
2523        Store (P956 [0x07], III0) /* \M360.III0 */
2524        P000 [0x07] = III0 /* \M360.III0 */
2525        Store (P956 [0x08], III0) /* \M360.III0 */
2526        P000 [0x08] = III0 /* \M360.III0 */
2527        Store (P956 [0x09], III0) /* \M360.III0 */
2528        P000 [0x09] = III0 /* \M360.III0 */
2529        Store (P956 [0x0A], III0) /* \M360.III0 */
2530        P000 [0x0A] = III0 /* \M360.III0 */
2531        Store (P956 [0x0B], III0) /* \M360.III0 */
2532        P000 [0x0B] = III0 /* \M360.III0 */
2533        Store (P956 [0x0C], III0) /* \M360.III0 */
2534        P000 [0x0C] = III0 /* \M360.III0 */
2535        Store (P956 [0x0D], III0) /* \M360.III0 */
2536        P000 [0x0D] = III0 /* \M360.III0 */
2537        Store (P956 [0x0E], III0) /* \M360.III0 */
2538        P000 [0x0E] = III0 /* \M360.III0 */
2539        Store (P956 [0x0F], III0) /* \M360.III0 */
2540        P000 [0x0F] = III0 /* \M360.III0 */
2541        Store (P956 [0x10], III0) /* \M360.III0 */
2542        P000 [0x10] = III0 /* \M360.III0 */
2543        P000 [0x00] = 0x00
2544        P000 [0x0F] = 0x0F
2545        P000 [0x10] = 0x10
2546        /* Verify p955-like Package */
2547
2548        M1AF (P000, 0x01, 0x00, 0x01)
2549        M1A6 ()
2550        END0 ()
2551    }
2552
2553    /* CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx)) */
2554
2555    Method (M361, 0, NotSerialized)
2556    {
2557        /*
2558     Name(ts, "m361")
2559     Name(iii0, 0)
2560     Name(p000, Package(18) {})
2561     BEG0(z111, ts)
2562     // Construct the p955-like Package p000 applying LocalX-IRef
2563     CopyObject(Index(p956, 0), iii0)
2564     CopyObject(iii0, Index(p000, 0))
2565     CopyObject(Index(p956, 1), iii0)
2566     CopyObject(iii0, Index(p000, 1))
2567     CopyObject(Index(p956, 2), iii0)
2568     CopyObject(iii0, Index(p000, 2))
2569     CopyObject(Index(p956, 3), iii0)
2570     CopyObject(iii0, Index(p000, 3))
2571     CopyObject(Index(p956, 4), iii0)
2572     CopyObject(iii0, Index(p000, 4))
2573     CopyObject(Index(p956, 5), iii0)
2574     CopyObject(iii0, Index(p000, 5))
2575     CopyObject(Index(p956, 6), iii0)
2576     CopyObject(iii0, Index(p000, 6))
2577     CopyObject(Index(p956, 7), iii0)
2578     CopyObject(iii0, Index(p000, 7))
2579     CopyObject(Index(p956, 8), iii0)
2580     CopyObject(iii0, Index(p000, 8))
2581     CopyObject(Index(p956, 9), iii0)
2582     CopyObject(iii0, Index(p000, 9))
2583     CopyObject(Index(p956, 10), iii0)
2584     CopyObject(iii0, Index(p000, 10))
2585     CopyObject(Index(p956, 11), iii0)
2586     CopyObject(iii0, Index(p000, 11))
2587     CopyObject(Index(p956, 12), iii0)
2588     CopyObject(iii0, Index(p000, 12))
2589     CopyObject(Index(p956, 13), iii0)
2590     CopyObject(iii0, Index(p000, 13))
2591     CopyObject(Index(p956, 14), iii0)
2592     CopyObject(iii0, Index(p000, 14))
2593     CopyObject(Index(p956, 15), iii0)
2594     CopyObject(iii0, Index(p000, 15))
2595     CopyObject(Index(p956, 16), iii0)
2596     CopyObject(iii0, Index(p000, 16))
2597     CopyObject(0, Index(p000, 0))
2598     CopyObject(15, Index(p000, 15))
2599     CopyObject(16, Index(p000, 16))
2600     // Verify p955-like Package
2601     m1af(p000, 1, 0, 1)
2602     m1a6()
2603     END0()
2604     */
2605    }
2606
2607    /*
2608     * TEST 56: IRef-El_of_Package
2609     */
2610    Method (M267, 0, Serialized)
2611    {
2612        TS00 ("m267")
2613        Name (P100, Package (0x12){})
2614        /* Store */
2615
2616        M25B ()
2617        If (Q003)
2618        {
2619            /* CopyObject */
2620            /* CopyObject IRef (Index(p955, x)) into Package */
2621            M353 (P100, 0x01)
2622            /* Verify p955-like Package */
2623
2624            M1AF (P100, 0x01, 0x00, 0x01)
2625            M1A6 ()
2626        }
2627    }
2628
2629    /*
2630     * TEST 57: Store total
2631     */
2632    Method (M268, 0, NotSerialized)
2633    {
2634        M1AE ("m268", "Store total", "Not implemented yet")
2635    }
2636
2637    /*
2638     * TEST 58: CopyObject total
2639     */
2640    Method (M269, 0, NotSerialized)
2641    {
2642        M1AE ("m269", "CopyObject total", "Not implemented yet")
2643    }
2644
2645    /*
2646     * TEST 59: Mix of Store and CopyObject total
2647     */
2648    Method (M26A, 0, NotSerialized)
2649    {
2650        M1AE ("m26a", "Mix of Store and CopyObject total", "Not implemented yet")
2651    }
2652
2653    /*
2654     * TEST 60: Package total
2655     */
2656    Method (M26B, 0, Serialized)
2657    {
2658        TS00 (__METHOD__)
2659        Name (I000, 0x77)
2660        Name (I001, 0x77)
2661        /* READ */
2662        /* m1c1 & m1c2 - perform all the ways reading */
2663        /* element of Package passed by ArgX. */
2664        /* Read immediate image element of Package */
2665        /* */
2666        /* Package specified by the immediate */
2667        /* images of {Integer, String, Buffer, Package}. */
2668        M1C1 ()
2669        /* Read NamedX element of Package */
2670        /* {Integer, String, Buffer, Package}. */
2671        M1C2 ()
2672        /* Read any type named object element of Package */
2673
2674        M1AF (P955, 0x01, 0x01, 0x00)
2675        /* Check Uninitialized element of Package */
2676
2677        M1C4 ()
2678        /* The chain of Index_References */
2679
2680        M1C5 ()
2681        /* Access to the Method named object element of Package */
2682
2683        M1C7 ()
2684        M1C8 ()
2685        /* Read automatic dereference expected */
2686        /* when accessing element of Package. */
2687        M1CE ()
2688        If (X132)
2689        {
2690            M1CF () /* bug 132 */
2691            M1D0 () /* bug 132 */
2692        }
2693
2694        /* WRITE */
2695        /* Write to element of Package specified as */
2696        /* immediate IRef passed to method. */
2697        If (X133)
2698        {
2699            M1D9 () /* bug 133 */
2700            M1DA () /* bug 133 */
2701        }
2702
2703        /* EXCEPTIONS */
2704        /* No read automatic dereference expected */
2705        M1D1 ()
2706        If (X127)
2707        {
2708            M1D2 () /* bug 127 */
2709        }
2710
2711        M1D3 (I000, I001)
2712        M380 (__METHOD__, I000, 0x00, __LINE__)
2713        M380 (__METHOD__, I001, 0x00, __LINE__)
2714        If (X127)
2715        {
2716            M1D4 (I000, I001) /* bug 127 */
2717        }
2718
2719        M380 (__METHOD__, I000, 0x00, __LINE__)
2720        M380 (__METHOD__, I001, 0x00, __LINE__)
2721        If (X127)
2722        {
2723            M1D5 () /* bug 127 */
2724            M1D6 () /* bug 127 */
2725            M1DB () /* bug 127 */
2726        }
2727
2728        /* Other */
2729
2730        M1D7 ()
2731        M1D8 ()
2732        /* DerefOf of the Method named object element of Package */
2733
2734        M1C9 ()
2735        /* Size of Package */
2736        /* m1ca: bug 129 (not a bug, in case of */
2737        /* dynamically created Package non-limited */
2738        /* size Package is allowed. Handled by the */
2739        /* particular AML opcode VarPackage). */
2740        M1CA ()
2741        M1CB ()
2742    }
2743
2744    /*
2745     * TEST 61: String total
2746     */
2747    Method (M26C, 0, NotSerialized)
2748    {
2749        M1AE ("m26c", "String total", "Not implemented yet")
2750    }
2751
2752    /*
2753     * TEST 62: Buffer total
2754     */
2755    Method (M26D, 0, NotSerialized)
2756    {
2757        CH03 ("m26d", 0x00, __LINE__, 0x00, 0x00)
2758        M1AE ("m26d", "Buffer total", "Not implemented yet")
2759        CH03 ("m26d", 0x00, __LINE__, 0x00, 0x00)
2760    }
2761
2762    /*
2763     * TEST 63: All the legal ways of WRITING ORef reference to some target location
2764     */
2765    Method (M26E, 0, Serialized)
2766    {
2767        If (Y100)
2768        {
2769            TS00 (__METHOD__)
2770        }
2771        Else
2772        {
2773            Debug = __METHOD__ /* \M26E.TS__ */
2774        }
2775
2776        CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
2777        /* Store */
2778
2779        M365 ()
2780        /* CopyObject */
2781
2782        M366 ()
2783        CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
2784    }
2785
2786    Method (M365, 0, Serialized)
2787    {
2788        Name (I000, 0x77)
2789        Name (I001, 0x77)
2790        Name (I002, 0x77)
2791        Name (I003, 0x00)
2792        Name (I004, 0x77)
2793        Name (III0, 0x11)
2794        Name (III1, 0x22)
2795        Name (III2, 0x33)
2796        Name (III3, 0x44)
2797        Name (III4, 0x55)
2798        Name (III5, 0x66)
2799        Name (III6, 0x88)
2800        Name (III7, 0x99)
2801        Name (PPP0, Package (0x01)
2802        {
2803            0x11
2804        })
2805        Name (PPP1, Package (0x01){})
2806        Method (M000, 1, Serialized)
2807        {
2808            Name (I002, 0x77)
2809            Arg0 = RefOf (I002)
2810            M380 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
2811            M380 (__METHOD__, I002, 0x00, __LINE__)
2812        }
2813
2814        Method (M001, 1, NotSerialized)
2815        {
2816            Arg0 = RefOf (I000)
2817        }
2818
2819        Method (M002, 2, NotSerialized)
2820        {
2821            Arg0 = 0x00
2822            M001 (RefOf (Arg0))
2823            Arg1 = DerefOf (Arg0)
2824            M380 (__METHOD__, Arg1, 0x00, __LINE__)
2825        }
2826
2827        Method (M003, 0, NotSerialized)
2828        {
2829            Local0 = RefOf (III1)
2830            Return (Local0)
2831        }
2832
2833        Method (M004, 1, NotSerialized)
2834        {
2835            Local0 = RefOf (III2)
2836            Return (Local0)
2837        }
2838
2839        Method (M009, 0, NotSerialized)
2840        {
2841            Return (RefOf (III7))
2842        }
2843
2844        Method (M005, 1, NotSerialized)
2845        {
2846            DerefOf (Arg0) = RefOf (I000)
2847        }
2848
2849        Method (M006, 2, NotSerialized)
2850        {
2851            Arg0 = 0x00
2852            M005 (RefOf (Arg0))
2853            Arg1 = DerefOf (Arg0)
2854            M380 (__METHOD__, Arg1, 0x00, __LINE__)
2855        }
2856
2857        Method (M007, 1, NotSerialized)
2858        {
2859            Arg0 = RefOf (I004)
2860        }
2861
2862        Method (M008, 1, NotSerialized)
2863        {
2864            DerefOf (Arg0) = RefOf (I004)
2865        }
2866
2867        BEG0 (Z111, __METHOD__)
2868        /* 1. */
2869
2870        Local0 = RefOf (I000)
2871        Local1 = DerefOf (Local0)
2872        M380 (__METHOD__, Local1, 0x00, __LINE__)
2873        M380 (__METHOD__, I000, 0x00, __LINE__)
2874        /* 2. */
2875
2876        M000 (I001)
2877        M380 (__METHOD__, I001, 0x00, __LINE__)
2878        /* 3. */
2879
2880        CopyObject (RefOf (I000), III0) /* \M365.III0 */
2881        III0 = RefOf (I001)
2882        Local1 = DerefOf (III0)
2883        M380 (__METHOD__, I001, 0x00, __LINE__)
2884        If (Y523)
2885        {
2886            M380 (__METHOD__, Local1, 0x00, __LINE__)
2887        }
2888
2889        /* 4. */
2890
2891        Local0 = 0x00
2892        M001 (RefOf (Local0))
2893        Local1 = DerefOf (Local0)
2894        M380 (__METHOD__, Local1, 0x00, __LINE__)
2895        /* 5. */
2896
2897        M002 (I001, I002)
2898        M380 (__METHOD__, I001, 0x00, __LINE__)
2899        M380 (__METHOD__, I002, 0x00, __LINE__)
2900        /* 6. */
2901
2902        If (Y526)
2903        {
2904            CopyObject (RefOf (I003), III5) /* \M365.III5 */
2905            M007 (RefOf (III5))
2906            Local1 = DerefOf (III5)
2907            M380 (__METHOD__, Local1, 0x00, __LINE__)
2908        }
2909
2910        /* 7. */
2911
2912        If (Y113)
2913        {
2914            M001 (PPP0 [0x00])
2915            Store (PPP0 [0x00], Local0)
2916            Local1 = DerefOf (Local0)
2917            Local2 = DerefOf (Local1)
2918            M380 (__METHOD__, Local2, 0x00, __LINE__)
2919        }
2920
2921        /* 8. */
2922
2923        If (Y525)
2924        {
2925            CopyObject (RefOf (III3), III4) /* \M365.III4 */
2926            RefOf (III4) = RefOf (I000)
2927            Local1 = DerefOf (III4)
2928            M380 (__METHOD__, I000, 0x00, __LINE__)
2929            M380 (__METHOD__, Local1, 0x00, __LINE__)
2930        }
2931
2932        /* 9. */
2933
2934        PPP1 [0x00] = RefOf (I000)
2935        Local2 = DerefOf (PPP1 [0x00])
2936        Local1 = DerefOf (Local2)
2937        M380 (__METHOD__, Local1, 0x00, __LINE__)
2938        M380 (__METHOD__, I000, 0x00, __LINE__)
2939        /* 10. */
2940        /*
2941         * There are some statements try to pass a value of an integer to a LocalX via reference,
2942         * But they all use the wrong expression, so they are removed from here.
2943         */
2944        /* 11. */
2945        /* 12. */
2946        If (Y524)
2947        {
2948            Local7 = 0x12
2949            Local6 = RefOf (Local7)
2950            DerefOf (Local6) = RefOf (I000)
2951            Local0 = DerefOf (Local7)
2952            M380 (__METHOD__, Local0, 0x00, __LINE__)
2953            M380 (__METHOD__, I000, 0x00, __LINE__)
2954        }
2955
2956        /* Particular cases of (12): */
2957
2958        If (Y524)
2959        {
2960            /* 13. (4) */
2961
2962            Local0 = 0x00
2963            M005 (RefOf (Local0))
2964            Local1 = DerefOf (Local0)
2965            M380 (__METHOD__, Local1, 0x00, __LINE__)
2966            /* 14. (5) */
2967
2968            M006 (I001, I002)
2969            M380 (__METHOD__, I001, 0x00, __LINE__)
2970            M380 (__METHOD__, I002, 0x00, __LINE__)
2971            /* 15. (6) */
2972
2973            If (Y526)
2974            {
2975                CopyObject (RefOf (I003), III6) /* \M365.III6 */
2976                M008 (RefOf (III6))
2977                Local1 = DerefOf (III6)
2978                M380 (__METHOD__, Local1, 0x00, __LINE__)
2979            }
2980
2981            /* 16. (7) */
2982
2983            If (Y113)
2984            {
2985                M005 (PPP0 [0x00])
2986                Store (PPP0 [0x00], Local0)
2987                Local1 = DerefOf (Local0)
2988                Local2 = DerefOf (Local1)
2989                M380 (__METHOD__, Local2, 0x00, __LINE__)
2990            }
2991
2992            /* 17. (8) */
2993
2994            If (Y525)
2995            {
2996                CopyObject (RefOf (III3), III4) /* \M365.III4 */
2997                DerefOf (RefOf (III4)) = RefOf (I000)
2998                Local1 = DerefOf (III4)
2999                M380 (__METHOD__, I000, 0x00, __LINE__)
3000                M380 (__METHOD__, Local1, 0x00, __LINE__)
3001            }
3002
3003            /* 18. (9) */
3004
3005            DerefOf (PPP1 [0x00]) = RefOf (I000)
3006            Local2 = DerefOf (PPP1 [0x00])
3007            Local1 = DerefOf (Local2)
3008            M380 (__METHOD__, Local1, 0x00, __LINE__)
3009            M380 (__METHOD__, I000, 0x00, __LINE__)
3010            /* 19. (10) */
3011
3012            DerefOf (M003 ()) = RefOf (I000)
3013            Local1 = DerefOf (III1)
3014            M380 (__METHOD__, I000, 0x00, __LINE__)
3015            M380 (__METHOD__, Local1, 0x00, __LINE__)
3016            /* 20. (11) */
3017
3018            DerefOf (M004 (0x00)) = RefOf (I000)
3019            Local1 = DerefOf (III2)
3020            M380 (__METHOD__, I000, 0x00, __LINE__)
3021            M380 (__METHOD__, Local1, 0x00, __LINE__)
3022        }
3023
3024        END0 ()
3025    }
3026
3027    Method (M366, 0, Serialized)
3028    {
3029        Name (I000, 0x77)
3030        Name (I001, 0x77)
3031        Name (I002, 0x77)
3032        Name (III0, 0x00)
3033        Name (III1, 0x00)
3034        Name (PPP0, Package (0x01){})
3035        Name (PPP1, Package (0x01)
3036        {
3037            0x00
3038        })
3039        Method (M000, 1, Serialized)
3040        {
3041            Name (I002, 0x77)
3042            CopyObject (RefOf (I002), Arg0)
3043            M380 (__METHOD__, DerefOf (Arg0), 0x00, __LINE__)
3044            M380 (__METHOD__, I002, 0x00, __LINE__)
3045        }
3046
3047        Method (M001, 1, NotSerialized)
3048        {
3049            CopyObject (RefOf (I000), Arg0)
3050        }
3051
3052        Method (M002, 2, NotSerialized)
3053        {
3054            Arg0 = 0x00
3055            M001 (RefOf (Arg0))
3056            Arg1 = DerefOf (Arg0)
3057            M380 (__METHOD__, Arg1, 0x00, __LINE__)
3058        }
3059
3060        BEG0 (Z111, __METHOD__)
3061        /* 21. */
3062
3063        CopyObject (RefOf (I000), Local0)
3064        Local1 = DerefOf (Local0)
3065        M380 (__METHOD__, Local1, 0x00, __LINE__)
3066        M380 (__METHOD__, I000, 0x00, __LINE__)
3067        /* 22. */
3068
3069        M000 (I001)
3070        M380 (__METHOD__, I001, 0x00, __LINE__)
3071        /* 23. */
3072
3073        If (Y128)
3074        {
3075            CopyObject (RefOf (I000), III0) /* \M366.III0 */
3076            Local1 = DerefOf (III0)
3077            M380 (__METHOD__, Local1, 0x00, __LINE__)
3078            M380 (__METHOD__, I000, 0x00, __LINE__)
3079        }
3080
3081        /* 24. */
3082
3083        Local0 = 0x00
3084        M001 (RefOf (Local0))
3085        Local1 = DerefOf (Local0)
3086        M380 (__METHOD__, Local1, 0x00, __LINE__)
3087        /* 25. */
3088
3089        M002 (I001, I002)
3090        M380 (__METHOD__, I001, 0x00, __LINE__)
3091        M380 (__METHOD__, I002, 0x00, __LINE__)
3092        /* 26. */
3093
3094        If (Y526)
3095        {
3096            III1 = 0x00
3097            M001 (RefOf (III1))
3098            Local1 = DerefOf (III1)
3099            M380 (__METHOD__, Local1, 0x00, __LINE__)
3100        }
3101
3102        /* 27. */
3103
3104        If (Y113)
3105        {
3106            M001 (PPP1 [0x00])
3107            Store (PPP1 [0x00], Local0)
3108            Local1 = DerefOf (Local0)
3109            Local2 = DerefOf (Local1)
3110            M380 (__METHOD__, Local2, 0x00, __LINE__)
3111        }
3112
3113        /*
3114         * 28. (Compiler failed)
3115         *
3116         * CopyObject(RefOf(i000), Index(ppp0, 0))
3117         * Store(DerefOf(Index(ppp0, 0)), Local2)
3118         * Store(DerefOf(Local2), Local1)
3119         * m380 (ts, Local1, 0, __LINE__)
3120         * m380 (ts, i000, 0, __LINE__)
3121         */
3122        END0 ()
3123    }
3124
3125    /*
3126     * TEST 64: All the legal ways of WRITING IRef reference to some target location
3127     */
3128    Method (M26F, 0, NotSerialized)
3129    {
3130        CH03 ("m26f", 0x00, __LINE__, 0x00, 0x00)
3131        M1AE ("m26f", "All the legal ways of writing IRef reference to some target location", "Not implemented yet")
3132        CH03 ("m26f", 0x00, __LINE__, 0x00, 0x00)
3133    }
3134
3135    /*
3136     * TEST 65: All the legal SOURCES of references (both ORef and IRef)
3137     */
3138    Method (M270, 0, Serialized)
3139    {
3140        CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
3141        If (Y100)
3142        {
3143            TS00 (__METHOD__)
3144        }
3145        Else
3146        {
3147            Debug = __METHOD__ /* \M270.TS__ */
3148        }
3149
3150        CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
3151        /* Store */
3152
3153        M367 ()
3154        CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
3155        /* CopyObject */
3156
3157        M368 ()
3158        CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
3159        M1AE ("m270", "All the legal sources of references (ORef and IRef)", "Started, but not implemented yet")
3160        CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
3161    }
3162
3163    Method (M367, 0, Serialized)
3164    {
3165        Name (I000, 0x77)
3166        Name (I001, 0x77)
3167        Name (I002, 0x77)
3168        Name (I003, 0x77)
3169        Name (I004, 0x77)
3170        Name (I005, 0x77)
3171        Name (I006, 0x77)
3172        Name (III0, 0x11)
3173        Name (III1, 0x22)
3174        Method (M001, 7, NotSerialized)
3175        {
3176            Local0 = RefOf (I000)
3177            Arg0 = Local0
3178            Arg1 = Local0
3179            Arg2 = Local0
3180            Arg3 = Local0
3181            Arg4 = Local0
3182            Arg5 = Local0
3183            Arg6 = Local0
3184            Local7 = DerefOf (Arg0)
3185            M380 (__METHOD__, Local7, 0x00, __LINE__)
3186            Local7 = DerefOf (Arg1)
3187            M380 (__METHOD__, Local7, 0x00, __LINE__)
3188            Local7 = DerefOf (Arg2)
3189            M380 (__METHOD__, Local7, 0x00, __LINE__)
3190            Local7 = DerefOf (Arg3)
3191            M380 (__METHOD__, Local7, 0x00, __LINE__)
3192            Local7 = DerefOf (Arg4)
3193            M380 (__METHOD__, Local7, 0x00, __LINE__)
3194            Local7 = DerefOf (Arg5)
3195            M380 (__METHOD__, Local7, 0x00, __LINE__)
3196            Local7 = DerefOf (Arg6)
3197            M380 (__METHOD__, Local7, 0x00, __LINE__)
3198        }
3199
3200        Method (M002, 7, NotSerialized)
3201        {
3202            Arg0 = RefOf (I000)
3203            Arg1 = Arg0
3204            Arg2 = Arg1
3205            Arg3 = Arg2
3206            Arg4 = Arg3
3207            Arg5 = Arg4
3208            Arg6 = Arg5
3209            M380 (__METHOD__, DerefOf (Arg6), 0x00, __LINE__)
3210            Arg6 = DerefOf (Arg0)
3211            M380 (__METHOD__, Arg6, 0x00, __LINE__)
3212            Arg6 = DerefOf (Arg1)
3213            M380 (__METHOD__, Arg6, 0x00, __LINE__)
3214            Arg6 = DerefOf (Arg2)
3215            M380 (__METHOD__, Arg6, 0x00, __LINE__)
3216            Arg6 = DerefOf (Arg3)
3217            M380 (__METHOD__, Arg6, 0x00, __LINE__)
3218            Arg6 = DerefOf (Arg4)
3219            M380 (__METHOD__, Arg6, 0x00, __LINE__)
3220            Arg6 = DerefOf (Arg5)
3221            M380 (__METHOD__, Arg6, 0x00, __LINE__)
3222        }
3223
3224        BEG0 (Z111, __METHOD__)
3225        /* 1. ORef-LocalX */
3226
3227        Local0 = RefOf (I000)
3228        Local1 = Local0
3229        Local2 = Local1
3230        Local3 = Local2
3231        Local4 = Local3
3232        Local5 = Local4
3233        Local6 = Local5
3234        Local7 = Local6
3235        M380 (__METHOD__, DerefOf (Local7), 0x00, __LINE__)
3236        Local7 = DerefOf (Local0)
3237        M380 (__METHOD__, Local7, 0x00, __LINE__)
3238        Local7 = DerefOf (Local1)
3239        M380 (__METHOD__, Local7, 0x00, __LINE__)
3240        Local7 = DerefOf (Local2)
3241        M380 (__METHOD__, Local7, 0x00, __LINE__)
3242        Local7 = DerefOf (Local3)
3243        M380 (__METHOD__, Local7, 0x00, __LINE__)
3244        Local7 = DerefOf (Local4)
3245        M380 (__METHOD__, Local7, 0x00, __LINE__)
3246        Local7 = DerefOf (Local5)
3247        M380 (__METHOD__, Local7, 0x00, __LINE__)
3248        Local7 = DerefOf (Local6)
3249        M380 (__METHOD__, Local7, 0x00, __LINE__)
3250        /* 2. ORef-LocalX */
3251
3252        M001 (I000, I001, I002, I003, I004, I005, I006)
3253        M380 (__METHOD__, I000, 0x00, __LINE__)
3254        M380 (__METHOD__, I001, 0x00, __LINE__)
3255        M380 (__METHOD__, I002, 0x00, __LINE__)
3256        M380 (__METHOD__, I003, 0x00, __LINE__)
3257        M380 (__METHOD__, I004, 0x00, __LINE__)
3258        M380 (__METHOD__, I005, 0x00, __LINE__)
3259        M380 (__METHOD__, I006, 0x00, __LINE__)
3260        If (Y134)
3261        {
3262            /* 2. ORef-ArgX */
3263
3264            M002 (I000, I001, I002, I003, I004, I005, I006)
3265            M380 (__METHOD__, I000, 0x00, __LINE__)
3266            M380 (__METHOD__, I001, 0x00, __LINE__)
3267            M380 (__METHOD__, I002, 0x00, __LINE__)
3268            M380 (__METHOD__, I003, 0x00, __LINE__)
3269            M380 (__METHOD__, I004, 0x00, __LINE__)
3270            M380 (__METHOD__, I005, 0x00, __LINE__)
3271            M380 (__METHOD__, I006, 0x00, __LINE__)
3272        }
3273
3274        /* 3. ORef-LocalX */
3275
3276        If (X128)
3277        {
3278            /* This operation causes Bug 128 */
3279
3280            CopyObject (RefOf (III1), III0) /* \M367.III0 */
3281            Local0 = RefOf (I000)
3282            III0 = Local0
3283            Local1 = DerefOf (III0)
3284            M380 (__METHOD__, I000, 0x00, __LINE__)
3285            If (Y523)
3286            {
3287                M380 (__METHOD__, Local1, 0x00, __LINE__)
3288            }
3289        }
3290
3291        END0 ()
3292    }
3293
3294    Method (M368, 0, Serialized)
3295    {
3296        Name (I000, 0x77)
3297        BEG0 (Z111, __METHOD__)
3298        /* 21. ORef-LocalX */
3299
3300        CopyObject (RefOf (I000), Local0)
3301        CopyObject (Local0, Local1)
3302        CopyObject (Local1, Local2)
3303        CopyObject (Local2, Local3)
3304        CopyObject (Local3, Local4)
3305        CopyObject (Local4, Local5)
3306        CopyObject (Local5, Local6)
3307        CopyObject (Local6, Local7)
3308        M380 (__METHOD__, DerefOf (Local7), 0x00, __LINE__)
3309        CopyObject (DerefOf (Local0), Local7)
3310        M380 (__METHOD__, Local7, 0x00, __LINE__)
3311        CopyObject (DerefOf (Local1), Local7)
3312        M380 (__METHOD__, Local7, 0x00, __LINE__)
3313        CopyObject (DerefOf (Local2), Local7)
3314        M380 (__METHOD__, Local7, 0x00, __LINE__)
3315        CopyObject (DerefOf (Local3), Local7)
3316        M380 (__METHOD__, Local7, 0x00, __LINE__)
3317        CopyObject (DerefOf (Local4), Local7)
3318        M380 (__METHOD__, Local7, 0x00, __LINE__)
3319        CopyObject (DerefOf (Local5), Local7)
3320        M380 (__METHOD__, Local7, 0x00, __LINE__)
3321        CopyObject (DerefOf (Local6), Local7)
3322        M380 (__METHOD__, Local7, 0x00, __LINE__)
3323        END0 ()
3324    }
3325
3326    /*
3327     * Separately (though such are already):
3328     * put reference into element of Package
3329     * and then write another reference into
3330     * that element of that Package.
3331     * No any correlation must be.
3332     */
3333    Name (I003, 0x12345678)
3334    Name (P090, Package (0x09){})
3335    Name (P091, Package (0x09)
3336    {
3337        0x01,
3338        0x02,
3339        0x03,
3340        0x04,
3341        0x05,
3342        0x06,
3343        0x07,
3344        0x08,
3345        0x09
3346    })
3347    Method (M271, 2, NotSerialized)
3348    {
3349        P090 [Arg1] = Arg0
3350    }
3351
3352    /* IRef upon IRef */
3353
3354    Method (M272, 0, NotSerialized)
3355    {
3356        M271 (P091 [0x01], 0x03)
3357        M271 (P091 [0x01], 0x03)
3358    }
3359
3360    /* IRef upon ORef */
3361
3362    Method (M273, 0, NotSerialized)
3363    {
3364        M271 (RefOf (I003), 0x04)
3365        M271 (P091 [0x01], 0x04)
3366    }
3367
3368    /* ORef upon IRef */
3369
3370    Method (M274, 0, NotSerialized)
3371    {
3372        M271 (P091 [0x01], 0x05)
3373        M271 (RefOf (I003), 0x05)
3374    }
3375
3376    /* ORef upon ORef */
3377
3378    Method (M275, 0, NotSerialized)
3379    {
3380        M271 (RefOf (I003), 0x06)
3381        M271 (RefOf (I003), 0x06)
3382    }
3383
3384    Method (M276, 0, NotSerialized)
3385    {
3386        M272 ()
3387        M273 ()
3388        M274 ()
3389        M275 ()
3390    }
3391
3392    /*
3393     *
3394     * Simple Tests
3395     *
3396     */
3397    /* Simple TEST 1: read of ArgX-ORef with DerefOf */
3398    Method (M341, 0, Serialized)
3399    {
3400        Name (I000, 0x19283746)
3401        Local0 = RefOf (I000)
3402        Method (M000, 1, NotSerialized)
3403        {
3404            Local0 = DerefOf (Arg0)
3405            Local7 = (Local0 + 0x05)
3406            If ((Local7 != 0x1928374B))
3407            {
3408                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local7, 0x1928374B)
3409            }
3410        }
3411
3412        M000 (Local0)
3413    }
3414
3415    /* Simple TEST 2: read of ArgX-ORef without DerefOf */
3416
3417    Method (M342, 0, Serialized)
3418    {
3419        Name (I000, 0x00)
3420        BEG0 (Z111, __METHOD__)
3421        Local0 = RefOf (I000)
3422        M1CC (__METHOD__, Local0, 0x01, 0x00)
3423        M1CD (__METHOD__, Local0, 0x01, 0x00)
3424        M1CC (__METHOD__, RefOf (I000), 0x01, 0x00)
3425        M1CD (__METHOD__, RefOf (I000), 0x01, 0x00)
3426        END0 ()
3427    }
3428
3429    /* Simple TEST 3: read of ArgX-IRef with DerefOf */
3430
3431    Method (M343, 0, Serialized)
3432    {
3433        Name (P000, Package (0x05)
3434        {
3435            0x0B,
3436            0x0C,
3437            0x0D,
3438            0x0E,
3439            0x0F
3440        })
3441        Store (P000 [0x03], Local0)
3442        Method (M000, 1, NotSerialized)
3443        {
3444            Local0 = DerefOf (Arg0)
3445            Local7 = (Local0 + 0x05)
3446            If ((Local7 != 0x13))
3447            {
3448                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local7, 0x13)
3449            }
3450        }
3451
3452        M000 (Local0)
3453    }
3454
3455    /* Simple TEST 4: read of ArgX-IRef without DerefOf */
3456
3457    Method (M344, 0, Serialized)
3458    {
3459        Name (P000, Package (0x05)
3460        {
3461            0x0B,
3462            0x0C,
3463            0x0D,
3464            0x0E,
3465            0x0F
3466        })
3467        Store (P000 [0x03], Local0)
3468        Method (M000, 1, NotSerialized)
3469        {
3470            Local7 = (Arg0 + 0x05)
3471            If ((Local7 != 0x13))
3472            {
3473                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local7, 0x13)
3474            }
3475        }
3476
3477        M000 (Local0)
3478    }
3479
3480    /* Simple TEST 8 */
3481
3482    Method (M345, 0, Serialized)
3483    {
3484        Name (S000, "qwer0000")
3485        Name (B000, Buffer (0x04)
3486        {
3487             0x01, 0x77, 0x03, 0x04                           // .w..
3488        })
3489        Name (P000, Package (0x03)
3490        {
3491            0x05,
3492            0x77,
3493            0x07
3494        })
3495        Name (S010, "qwer0000")
3496        Name (B010, Buffer (0x04)
3497        {
3498             0x01, 0x77, 0x03, 0x04                           // .w..
3499        })
3500        Name (P010, Package (0x03)
3501        {
3502            0x05,
3503            0x77,
3504            0x07
3505        })
3506        /* Store to reference keeping in LocalX */
3507
3508        Method (M000, 1, NotSerialized)
3509        {
3510            Local1 = Local0 = Arg0 [0x01]
3511            Local0 = 0x90
3512            If ((Local0 != 0x90))
3513            {
3514                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, 0x90)
3515            }
3516
3517            Local1 = 0x91
3518            If ((Local1 != 0x91))
3519            {
3520                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, 0x91)
3521            }
3522        }
3523
3524        /* CopyObject to reference keeping in LocalX */
3525
3526        Method (M001, 1, NotSerialized)
3527        {
3528            Local1 = Local0 = Arg0 [0x01]
3529            CopyObject (0x94, Local0)
3530            If ((Local0 != 0x94))
3531            {
3532                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, 0x94)
3533            }
3534
3535            CopyObject (0x95, Local1)
3536            If ((Local1 != 0x95))
3537            {
3538                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, 0x95)
3539            }
3540        }
3541
3542        /* Store to reference immediately */
3543
3544        Method (M002, 1, NotSerialized)
3545        {
3546            Arg0 [0x01] = 0x2B
3547        }
3548
3549        /* Store to reference immediately */
3550
3551        Method (M003, 1, NotSerialized)
3552        {
3553            Local0 = Arg0 [0x01]
3554            Arg0 [0x01] = 0x2B
3555        }
3556
3557        /* CopyObject to reference immediately */
3558
3559        Method (M004, 1, NotSerialized)
3560        {
3561                /* CopyObject(0x96, Index(arg0, 1)) */
3562        /* CopyObject(0x97, Index(arg0, 1, Local0)) */
3563        }
3564
3565        BEG0 (Z111, __METHOD__)
3566        M000 (S000)
3567        M000 (B000)
3568        M000 (P000)
3569        M381 (__METHOD__, S000, 0x00, __LINE__)
3570        M382 (__METHOD__, B000, 0x00, __LINE__)
3571        M383 (__METHOD__, P000, 0x00, __LINE__)
3572        M001 (S000)
3573        M001 (B000)
3574        M001 (P000)
3575        M381 (__METHOD__, S000, 0x00, __LINE__)
3576        M382 (__METHOD__, B000, 0x00, __LINE__)
3577        M383 (__METHOD__, P000, 0x00, __LINE__)
3578        M002 (S000)
3579        M002 (B000)
3580        M002 (P000)
3581        M385 (__METHOD__, S000, 0x00, __LINE__)
3582        M386 (__METHOD__, B000, 0x00, __LINE__)
3583        M387 (__METHOD__, P000, 0x00, __LINE__)
3584        M003 (S010)
3585        M003 (B010)
3586        M003 (P010)
3587        M385 (__METHOD__, S010, 0x00, __LINE__)
3588        M386 (__METHOD__, B010, 0x00, __LINE__)
3589        M387 (__METHOD__, P010, 0x00, __LINE__)
3590        END0 ()
3591    }
3592
3593    Method (M346, 0, Serialized)
3594    {
3595        Name (I000, 0xABCD0000)
3596        Method (M000, 1, NotSerialized)
3597        {
3598            Local0 = RefOf (Arg0)
3599            Local6 = DerefOf (Local0)
3600            RefOf (Arg0) = 0x11111111
3601            /* CopyObject(0x11111111, RefOf(arg0)) */
3602
3603            Local7 = DerefOf (Local0)
3604            Local1 = ObjectType (Local0)
3605            If ((Local1 != C009))
3606            {
3607                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, C009)
3608            }
3609            Else
3610            {
3611                Local1 = SizeOf (Local0)
3612                If ((Local1 != ISZ0))
3613                {
3614                    ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, ISZ0)
3615                }
3616
3617                If ((Local6 != 0xABCD0000))
3618                {
3619                    ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local6, 0xABCD0000)
3620                }
3621
3622                If ((Local7 != 0x11111111))
3623                {
3624                    ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local7, 0x11111111)
3625                }
3626            }
3627        }
3628
3629        M000 (I000)
3630        If ((I000 != 0xABCD0000))
3631        {
3632            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I000, 0xABCD0000)
3633        }
3634    }
3635
3636    Method (M347, 0, Serialized)
3637    {
3638        Name (I000, 0xABCD0000)
3639        Method (M000, 1, NotSerialized)
3640        {
3641            Local0 = DerefOf (RefOf (Arg0))
3642            Local1 = ObjectType (Local0)
3643            If ((Local1 != C009))
3644            {
3645                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, C009)
3646            }
3647            Else
3648            {
3649                Local1 = SizeOf (Local0)
3650                If ((Local1 != ISZ0))
3651                {
3652                    ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, ISZ0)
3653                }
3654
3655                If ((Local0 != 0xABCD0000))
3656                {
3657                    ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, 0xABCD0000)
3658                }
3659            }
3660        }
3661
3662        M000 (I000)
3663        If ((I000 != 0xABCD0000))
3664        {
3665            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I000, 0xABCD0000)
3666        }
3667    }
3668
3669    Method (M348, 0, Serialized)
3670    {
3671        Name (I000, 0xABCD0000)
3672        Method (M000, 1, NotSerialized)
3673        {
3674            Local0 = RefOf (Arg0)
3675            Local1 = DerefOf (Local0)
3676            Local2 = DerefOf (Local1)
3677            If ((Local2 != 0xABCD0000))
3678            {
3679                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0xABCD0000)
3680            }
3681
3682            RefOf (Arg0) = 0x11111111
3683            Local0 = RefOf (Arg0)
3684            Local0 = 0x11111111
3685            If ((Local0 != 0x11111111))
3686            {
3687                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, 0x11111111)
3688            }
3689        }
3690
3691        M000 (RefOf (I000))
3692        If ((I000 != 0xABCD0000))
3693        {
3694            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I000, 0xABCD0000)
3695        }
3696
3697        Local0 = RefOf (I000)
3698        M000 (Local0)
3699        If ((I000 != 0xABCD0000))
3700        {
3701            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I000, 0xABCD0000)
3702        }
3703
3704        Local2 = DerefOf (Local0)
3705        If ((Local2 != 0xABCD0000))
3706        {
3707            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0xABCD0000)
3708        }
3709    }
3710
3711    Method (M349, 0, Serialized)
3712    {
3713        Name (I000, 0xABCD0000)
3714        Name (I001, 0xABCD0001)
3715        Method (M000, 1, NotSerialized)
3716        {
3717            Local1 = DerefOf (RefOf (Arg0))
3718            Local2 = DerefOf (Local1)
3719            If ((Local2 != 0xABCD0000))
3720            {
3721                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0xABCD0000)
3722            }
3723        }
3724
3725        Method (M001, 1, NotSerialized)
3726        {
3727            DerefOf (RefOf (Arg0)) = 0x11111111
3728                /* CopyObject(0x11111111, DerefOf(RefOf(arg0))) */
3729        }
3730
3731        /* Reading */
3732
3733        M000 (RefOf (I000))
3734        If ((I000 != 0xABCD0000))
3735        {
3736            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I000, 0xABCD0000)
3737        }
3738
3739        Local0 = RefOf (I000)
3740        M000 (Local0)
3741        If ((I000 != 0xABCD0000))
3742        {
3743            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I000, 0xABCD0000)
3744        }
3745
3746        If (Y512)
3747        {
3748            Local2 = DerefOf (Local0)
3749            If ((Local2 != 0xABCD0000))
3750            {
3751                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0xABCD0000)
3752            }
3753        }
3754
3755        /* Writing */
3756
3757        M001 (RefOf (I001))
3758        If ((I001 != 0x11111111))
3759        {
3760            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I001, 0x11111111)
3761        }
3762
3763        Local0 = RefOf (I001)
3764        M001 (Local0)
3765        If ((I001 != 0x11111111))
3766        {
3767            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, I001, 0x11111111)
3768        }
3769
3770        If (Y512)
3771        {
3772            Local2 = DerefOf (Local0)
3773            If ((Local2 != 0x11111111))
3774            {
3775                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x11111111)
3776            }
3777        }
3778    }
3779
3780    Method (M34A, 0, Serialized)
3781    {
3782        Name (B000, Buffer (0x05)
3783        {
3784             0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3785        })
3786        Method (M000, 1, NotSerialized)
3787        {
3788            Local2 = DerefOf (Arg0)
3789            If ((Local2 != 0x69))
3790            {
3791                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3792            }
3793        }
3794
3795        /* The same but use RefOf and than back DerefOf */
3796
3797        Method (M001, 1, NotSerialized)
3798        {
3799            Local0 = RefOf (Arg0)
3800            Local1 = DerefOf (Local0)
3801            Local2 = DerefOf (Local1)
3802            If ((Local2 != 0x69))
3803            {
3804                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3805            }
3806        }
3807
3808        Method (M002, 1, NotSerialized)
3809        {
3810            RefOf (Arg0) = 0x11111111
3811            Local0 = RefOf (Arg0)
3812            Local0 = 0x11111111
3813            If ((Local0 != 0x11111111))
3814            {
3815                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, 0x11111111)
3816            }
3817        }
3818
3819        /* m000 */
3820
3821        M000 (B000 [0x02])
3822        If ((B000 != Buffer (0x05)
3823                    {
3824                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3825                    }))
3826        {
3827            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3828                {
3829                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3830                })
3831        }
3832
3833        Store (B000 [0x02], Local0)
3834        M000 (Local0)
3835        If ((B000 != Buffer (0x05)
3836                    {
3837                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3838                    }))
3839        {
3840            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3841                {
3842                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3843                })
3844        }
3845
3846        Local2 = DerefOf (Local0)
3847        If ((Local2 != 0x69))
3848        {
3849            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3850        }
3851
3852        Local1 = Local0 = B000 [0x02]
3853        M000 (Local0)
3854        If ((B000 != Buffer (0x05)
3855                    {
3856                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3857                    }))
3858        {
3859            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3860                {
3861                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3862                })
3863        }
3864
3865        Local2 = DerefOf (Local0)
3866        If ((Local2 != 0x69))
3867        {
3868            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3869        }
3870
3871        M000 (Local1)
3872        If ((B000 != Buffer (0x05)
3873                    {
3874                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3875                    }))
3876        {
3877            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3878                {
3879                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3880                })
3881        }
3882
3883        Local2 = DerefOf (Local1)
3884        If ((Local2 != 0x69))
3885        {
3886            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3887        }
3888
3889        /* m001 */
3890
3891        M001 (B000 [0x02])
3892        If ((B000 != Buffer (0x05)
3893                    {
3894                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3895                    }))
3896        {
3897            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3898                {
3899                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3900                })
3901        }
3902
3903        Store (B000 [0x02], Local0)
3904        M001 (Local0)
3905        If ((B000 != Buffer (0x05)
3906                    {
3907                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3908                    }))
3909        {
3910            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3911                {
3912                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3913                })
3914        }
3915
3916        Local2 = DerefOf (Local0)
3917        If ((Local2 != 0x69))
3918        {
3919            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3920        }
3921
3922        Local1 = Local0 = B000 [0x02]
3923        M001 (Local0)
3924        If ((B000 != Buffer (0x05)
3925                    {
3926                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3927                    }))
3928        {
3929            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3930                {
3931                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3932                })
3933        }
3934
3935        Local2 = DerefOf (Local0)
3936        If ((Local2 != 0x69))
3937        {
3938            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3939        }
3940
3941        M001 (Local1)
3942        If ((B000 != Buffer (0x05)
3943                    {
3944                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3945                    }))
3946        {
3947            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3948                {
3949                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3950                })
3951        }
3952
3953        Local2 = DerefOf (Local1)
3954        If ((Local2 != 0x69))
3955        {
3956            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3957        }
3958
3959        /* m002 */
3960
3961        M002 (B000 [0x02])
3962        If ((B000 != Buffer (0x05)
3963                    {
3964                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3965                    }))
3966        {
3967            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3968                {
3969                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3970                })
3971        }
3972
3973        Store (B000 [0x02], Local0)
3974        M002 (Local0)
3975        If ((B000 != Buffer (0x05)
3976                    {
3977                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3978                    }))
3979        {
3980            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
3981                {
3982                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3983                })
3984        }
3985
3986        Local2 = DerefOf (Local0)
3987        If ((Local2 != 0x69))
3988        {
3989            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
3990        }
3991
3992        Local1 = Local0 = B000 [0x02]
3993        M002 (Local0)
3994        If ((B000 != Buffer (0x05)
3995                    {
3996                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
3997                    }))
3998        {
3999            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4000                {
4001                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4002                })
4003        }
4004
4005        Local2 = DerefOf (Local0)
4006        If ((Local2 != 0x69))
4007        {
4008            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4009        }
4010
4011        M002 (Local1)
4012        If ((B000 != Buffer (0x05)
4013                    {
4014                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4015                    }))
4016        {
4017            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4018                {
4019                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4020                })
4021        }
4022
4023        Local2 = DerefOf (Local1)
4024        If ((Local2 != 0x69))
4025        {
4026            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4027        }
4028    }
4029
4030    Method (M34B, 0, Serialized)
4031    {
4032        Name (B000, Buffer (0x05)
4033        {
4034             0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4035        })
4036        Name (B001, Buffer (0x05)
4037        {
4038             0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4039        })
4040        Method (M000, 1, NotSerialized)
4041        {
4042            Local2 = DerefOf (Arg0)
4043            If ((Local2 != 0x69))
4044            {
4045                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4046            }
4047        }
4048
4049        /* The same but use RefOf and than back DerefOf */
4050
4051        Method (M001, 1, NotSerialized)
4052        {
4053            Local1 = DerefOf (RefOf (Arg0))
4054            Local2 = DerefOf (Local1)
4055            If ((Local2 != 0x69))
4056            {
4057                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4058            }
4059        }
4060
4061        Method (M002, 1, NotSerialized)
4062        {
4063            DerefOf (RefOf (Arg0)) = 0x11111111
4064                /* CopyObject(0x11111111, DerefOf(RefOf(arg0))) */
4065        }
4066
4067        /* m000 */
4068
4069        M000 (B000 [0x02])
4070        If ((B000 != Buffer (0x05)
4071                    {
4072                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4073                    }))
4074        {
4075            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4076                {
4077                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4078                })
4079        }
4080
4081        Store (B000 [0x02], Local0)
4082        M000 (Local0)
4083        If ((B000 != Buffer (0x05)
4084                    {
4085                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4086                    }))
4087        {
4088            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4089                {
4090                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4091                })
4092        }
4093
4094        Local2 = DerefOf (Local0)
4095        If ((Local2 != 0x69))
4096        {
4097            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4098        }
4099
4100        Local1 = Local0 = B000 [0x02]
4101        M000 (Local0)
4102        If ((B000 != Buffer (0x05)
4103                    {
4104                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4105                    }))
4106        {
4107            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4108                {
4109                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4110                })
4111        }
4112
4113        Local2 = DerefOf (Local0)
4114        If ((Local2 != 0x69))
4115        {
4116            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4117        }
4118
4119        M000 (Local1)
4120        If ((B000 != Buffer (0x05)
4121                    {
4122                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4123                    }))
4124        {
4125            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4126                {
4127                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4128                })
4129        }
4130
4131        Local2 = DerefOf (Local1)
4132        If ((Local2 != 0x69))
4133        {
4134            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4135        }
4136
4137        /* m001 */
4138
4139        M001 (B000 [0x02])
4140        If ((B000 != Buffer (0x05)
4141                    {
4142                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4143                    }))
4144        {
4145            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4146                {
4147                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4148                })
4149        }
4150
4151        Store (B000 [0x02], Local0)
4152        M001 (Local0)
4153        If ((B000 != Buffer (0x05)
4154                    {
4155                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4156                    }))
4157        {
4158            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4159                {
4160                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4161                })
4162        }
4163
4164        If (Y512)
4165        {
4166            Local2 = DerefOf (Local0)
4167            If ((Local2 != 0x69))
4168            {
4169                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4170            }
4171        }
4172
4173        Local1 = Local0 = B000 [0x02]
4174        M001 (Local0)
4175        If ((B000 != Buffer (0x05)
4176                    {
4177                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4178                    }))
4179        {
4180            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4181                {
4182                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4183                })
4184        }
4185
4186        If (Y512)
4187        {
4188            Local2 = DerefOf (Local0)
4189            If ((Local2 != 0x69))
4190            {
4191                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4192            }
4193        }
4194
4195        M001 (Local1)
4196        If ((B000 != Buffer (0x05)
4197                    {
4198                         0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4199                    }))
4200        {
4201            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4202                {
4203                     0x01, 0x02, 0x69, 0x04, 0x05                     // ..i..
4204                })
4205        }
4206
4207        If (Y512)
4208        {
4209            Local2 = DerefOf (Local1)
4210            If ((Local2 != 0x69))
4211            {
4212                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x69)
4213            }
4214        }
4215
4216        /* m002 */
4217
4218        M002 (B000 [0x02])
4219        If ((B000 != Buffer (0x05)
4220                    {
4221                         0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4222                    }))
4223        {
4224            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4225                {
4226                     0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4227                })
4228        }
4229
4230        Store (B000 [0x02], Local0)
4231        M002 (Local0)
4232        If ((B000 != Buffer (0x05)
4233                    {
4234                         0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4235                    }))
4236        {
4237            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4238                {
4239                     0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4240                })
4241        }
4242
4243        If (Y512)
4244        {
4245            Local2 = DerefOf (Local0)
4246            If ((Local2 != 0x11))
4247            {
4248                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x11)
4249            }
4250        }
4251
4252        Local1 = Local0 = B000 [0x02]
4253        M002 (Local0)
4254        If ((B000 != Buffer (0x05)
4255                    {
4256                         0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4257                    }))
4258        {
4259            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4260                {
4261                     0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4262                })
4263        }
4264
4265        If (Y512)
4266        {
4267            Local2 = DerefOf (Local0)
4268            If ((Local2 != 0x11))
4269            {
4270                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x11)
4271            }
4272        }
4273
4274        M002 (Local1)
4275        If ((B000 != Buffer (0x05)
4276                    {
4277                         0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4278                    }))
4279        {
4280            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, B000, Buffer (0x05)
4281                {
4282                     0x01, 0x02, 0x11, 0x04, 0x05                     // .....
4283                })
4284        }
4285
4286        If (Y512)
4287        {
4288            Local2 = DerefOf (Local1)
4289            If ((Local2 != 0x11))
4290            {
4291                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x11)
4292            }
4293        }
4294    }
4295
4296    /* Simple TEST 17 */
4297
4298    Method (M34C, 0, Serialized)
4299    {
4300        Name (S000, "qwer0000")
4301        Name (B000, Buffer (0x04)
4302        {
4303             0x01, 0x77, 0x03, 0x04                           // .w..
4304        })
4305        Name (P000, Package (0x03)
4306        {
4307            0x05,
4308            0x77,
4309            0x07
4310        })
4311        Name (S010, "qwer0000")
4312        Name (B010, Buffer (0x04)
4313        {
4314             0x01, 0x77, 0x03, 0x04                           // .w..
4315        })
4316        Name (P010, Package (0x03)
4317        {
4318            0x05,
4319            0x77,
4320            0x07
4321        })
4322        Name (S020, "qwer0000")
4323        Name (B020, Buffer (0x04)
4324        {
4325             0x01, 0x77, 0x03, 0x04                           // .w..
4326        })
4327        Name (P020, Package (0x03)
4328        {
4329            0x05,
4330            0x77,
4331            0x07
4332        })
4333        Name (S030, "qwer0000")
4334        Name (B030, Buffer (0x04)
4335        {
4336             0x01, 0x77, 0x03, 0x04                           // .w..
4337        })
4338        Name (P030, Package (0x03)
4339        {
4340            0x05,
4341            0x77,
4342            0x07
4343        })
4344        /* Store to reference keeping in LocalX */
4345
4346        Method (M000, 2, NotSerialized)
4347        {
4348            Local2 = DerefOf (Arg0)
4349            Local3 = ObjectType (Local2)
4350            If ((Local3 != Arg1))
4351            {
4352                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local3, Arg1)
4353            }
4354
4355            Local1 = Local0 = Local2 [0x01]
4356            Local0 = 0x90
4357            If ((Local0 != 0x90))
4358            {
4359                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, 0x90)
4360            }
4361
4362            Local1 = 0x91
4363            If ((Local1 != 0x91))
4364            {
4365                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, 0x91)
4366            }
4367        }
4368
4369        /* CopyObject to reference keeping in LocalX */
4370
4371        Method (M001, 1, NotSerialized)
4372        {
4373            Local2 = DerefOf (Arg0)
4374            Local1 = Local0 = Local2 [0x01]
4375            CopyObject (0x94, Local0)
4376            If ((Local0 != 0x94))
4377            {
4378                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, 0x94)
4379            }
4380
4381            CopyObject (0x95, Local1)
4382            If ((Local1 != 0x95))
4383            {
4384                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, 0x95)
4385            }
4386        }
4387
4388        /* Store to reference immediately */
4389
4390        Method (M002, 2, NotSerialized)
4391        {
4392            Local2 = DerefOf (Arg0)
4393            Local2 [0x01] = 0x2B
4394            If ((Arg1 == C00A))
4395            {
4396                M385 (__METHOD__, Local2, 0x00, __LINE__)
4397            }
4398            ElseIf ((Arg1 == C00B))
4399            {
4400                M386 (__METHOD__, Local2, 0x00, __LINE__)
4401            }
4402            ElseIf ((Arg1 == C00C))
4403            {
4404                M387 (__METHOD__, Local2, 0x00, __LINE__)
4405            }
4406        }
4407
4408        /* Store to reference immediately */
4409
4410        Method (M003, 2, NotSerialized)
4411        {
4412            Local2 = DerefOf (Arg0)
4413            Local0 = Local2 [0x01]
4414            Local2 [0x01] = 0x2B
4415            If ((Arg1 == C00A))
4416            {
4417                M385 (__METHOD__, Local2, 0x00, __LINE__)
4418            }
4419            ElseIf ((Arg1 == C00B))
4420            {
4421                M386 (__METHOD__, Local2, 0x00, __LINE__)
4422            }
4423            ElseIf ((Arg1 == C00C))
4424            {
4425                M387 (__METHOD__, Local2, 0x00, __LINE__)
4426            }
4427
4428            Local2 = DerefOf (Local0)
4429            If ((Local2 != 0x2B))
4430            {
4431                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local2, 0x2B)
4432            }
4433        }
4434
4435        Method (M010, 2, NotSerialized)
4436        {
4437            Local0 = RefOf (Arg0)
4438            M000 (Local0, Arg1)
4439            M000 (RefOf (Arg0), Arg1)
4440            If ((Arg1 == C00A))
4441            {
4442                M381 (__METHOD__, Arg0, 0x00, __LINE__)
4443            }
4444            ElseIf ((Arg1 == C00B))
4445            {
4446                M382 (__METHOD__, Arg0, 0x00, __LINE__)
4447            }
4448            ElseIf ((Arg1 == C00C))
4449            {
4450                M383 (__METHOD__, Arg0, 0x00, __LINE__)
4451            }
4452        }
4453
4454        Method (M011, 2, NotSerialized)
4455        {
4456            Local0 = RefOf (Arg0)
4457            M001 (Local0)
4458            M001 (RefOf (Arg0))
4459            If ((Arg1 == C00A))
4460            {
4461                M381 (__METHOD__, Arg0, 0x00, __LINE__)
4462            }
4463            ElseIf ((Arg1 == C00B))
4464            {
4465                M382 (__METHOD__, Arg0, 0x00, __LINE__)
4466            }
4467            ElseIf ((Arg1 == C00C))
4468            {
4469                M383 (__METHOD__, Arg0, 0x00, __LINE__)
4470            }
4471        }
4472
4473        Method (M012, 2, NotSerialized)
4474        {
4475            Local0 = RefOf (Arg0)
4476            M002 (Local0, Arg1)
4477            If ((Arg1 == C00A))
4478            {
4479                M381 (__METHOD__, Arg0, 0x00, __LINE__)
4480            }
4481            ElseIf ((Arg1 == C00B))
4482            {
4483                M382 (__METHOD__, Arg0, 0x00, __LINE__)
4484            }
4485            ElseIf ((Arg1 == C00C))
4486            {
4487                M383 (__METHOD__, Arg0, 0x00, __LINE__)
4488            }
4489        }
4490
4491        Method (M022, 2, NotSerialized)
4492        {
4493            M002 (RefOf (Arg0), Arg1)
4494            If ((Arg1 == C00A))
4495            {
4496                M381 (__METHOD__, Arg0, 0x00, __LINE__)
4497            }
4498            ElseIf ((Arg1 == C00B))
4499            {
4500                M382 (__METHOD__, Arg0, 0x00, __LINE__)
4501            }
4502            ElseIf ((Arg1 == C00C))
4503            {
4504                M383 (__METHOD__, Arg0, 0x00, __LINE__)
4505            }
4506        }
4507
4508        Method (M013, 2, NotSerialized)
4509        {
4510            Local0 = RefOf (Arg0)
4511            M003 (Local0, Arg1)
4512            If ((Arg1 == C00A))
4513            {
4514                M381 (__METHOD__, Arg0, 0x00, __LINE__)
4515            }
4516            ElseIf ((Arg1 == C00B))
4517            {
4518                M382 (__METHOD__, Arg0, 0x00, __LINE__)
4519            }
4520            ElseIf ((Arg1 == C00C))
4521            {
4522                M383 (__METHOD__, Arg0, 0x00, __LINE__)
4523            }
4524        }
4525
4526        Method (M023, 2, NotSerialized)
4527        {
4528            M003 (RefOf (Arg0), Arg1)
4529            If ((Arg1 == C00A))
4530            {
4531                M381 (__METHOD__, Arg0, 0x00, __LINE__)
4532            }
4533            ElseIf ((Arg1 == C00B))
4534            {
4535                M382 (__METHOD__, Arg0, 0x00, __LINE__)
4536            }
4537            ElseIf ((Arg1 == C00C))
4538            {
4539                M383 (__METHOD__, Arg0, 0x00, __LINE__)
4540            }
4541        }
4542
4543        BEG0 (Z111, __METHOD__)
4544        M010 (S000, C00A)
4545        M010 (B000, C00B)
4546        M010 (P000, C00C)
4547        M381 (__METHOD__, S000, 0x00, __LINE__)
4548        M382 (__METHOD__, B000, 0x00, __LINE__)
4549        M383 (__METHOD__, P000, 0x00, __LINE__)
4550        M011 (S000, C00A)
4551        M011 (B000, C00B)
4552        M011 (P000, C00C)
4553        M381 (__METHOD__, S000, 0x00, __LINE__)
4554        M382 (__METHOD__, B000, 0x00, __LINE__)
4555        M383 (__METHOD__, P000, 0x00, __LINE__)
4556        M012 (S000, C00A)
4557        M012 (B000, C00B)
4558        M012 (P000, C00C)
4559        M381 (__METHOD__, S000, 0x00, __LINE__)
4560        M382 (__METHOD__, B000, 0x00, __LINE__)
4561        M383 (__METHOD__, P000, 0x00, __LINE__)
4562        M022 (S010, C00A)
4563        M022 (B010, C00B)
4564        M022 (P010, C00C)
4565        M381 (__METHOD__, S010, 0x00, __LINE__)
4566        M382 (__METHOD__, B010, 0x00, __LINE__)
4567        M383 (__METHOD__, P010, 0x00, __LINE__)
4568        M013 (S020, C00A)
4569        M013 (B020, C00B)
4570        M013 (P020, C00C)
4571        M381 (__METHOD__, S020, 0x00, __LINE__)
4572        M382 (__METHOD__, B020, 0x00, __LINE__)
4573        M383 (__METHOD__, P020, 0x00, __LINE__)
4574        M023 (S030, C00A)
4575        M023 (B030, C00B)
4576        M023 (P030, C00C)
4577        M381 (__METHOD__, S030, 0x00, __LINE__)
4578        M382 (__METHOD__, B030, 0x00, __LINE__)
4579        M383 (__METHOD__, P030, 0x00, __LINE__)
4580        END0 ()
4581    }
4582
4583    Method (M34D, 1, Serialized)
4584    {
4585        Name (OP00, 0x00)
4586        Name (OP01, 0x01)
4587        OP00 = Arg0
4588        Name (I000, 0x77)
4589        Name (S000, "qwer0000")
4590        Name (B000, Buffer (0x04)
4591        {
4592             0x01, 0x77, 0x03, 0x04                           // .w..
4593        })
4594        Name (P000, Package (0x03)
4595        {
4596            0x05,
4597            0x77,
4598            0x07
4599        })
4600        Name (I010, 0x77)
4601        Name (S010, "qwer0000")
4602        Name (B010, Buffer (0x04)
4603        {
4604             0x01, 0x77, 0x03, 0x04                           // .w..
4605        })
4606        Name (P010, Package (0x03)
4607        {
4608            0x05,
4609            0x77,
4610            0x07
4611        })
4612        Name (I020, 0x77)
4613        Name (S020, "qwer0000")
4614        Name (B020, Buffer (0x04)
4615        {
4616             0x01, 0x77, 0x03, 0x04                           // .w..
4617        })
4618        Name (P020, Package (0x03)
4619        {
4620            0x05,
4621            0x77,
4622            0x07
4623        })
4624        Name (I030, 0x77)
4625        Name (S030, "qwer0000")
4626        Name (B030, Buffer (0x04)
4627        {
4628             0x01, 0x77, 0x03, 0x04                           // .w..
4629        })
4630        Name (P030, Package (0x03)
4631        {
4632            0x05,
4633            0x77,
4634            0x07
4635        })
4636        Name (I040, 0x77)
4637        Name (S040, "qwer0000")
4638        Name (B040, Buffer (0x04)
4639        {
4640             0x01, 0x77, 0x03, 0x04                           // .w..
4641        })
4642        Name (P040, Package (0x03)
4643        {
4644            0x05,
4645            0x77,
4646            0x07
4647        })
4648        Name (I050, 0x77)
4649        Name (S050, "qwer0000")
4650        Name (B050, Buffer (0x04)
4651        {
4652             0x01, 0x77, 0x03, 0x04                           // .w..
4653        })
4654        Name (P050, Package (0x03)
4655        {
4656            0x05,
4657            0x77,
4658            0x07
4659        })
4660        Name (I060, 0x77)
4661        Name (S060, "qwer0000")
4662        Name (B060, Buffer (0x04)
4663        {
4664             0x01, 0x77, 0x03, 0x04                           // .w..
4665        })
4666        Name (P060, Package (0x03)
4667        {
4668            0x05,
4669            0x77,
4670            0x07
4671        })
4672        Name (I070, 0x77)
4673        Name (S070, "qwer0000")
4674        Name (B070, Buffer (0x04)
4675        {
4676             0x01, 0x77, 0x03, 0x04                           // .w..
4677        })
4678        Name (P070, Package (0x03)
4679        {
4680            0x05,
4681            0x77,
4682            0x07
4683        })
4684        Name (I001, 0x2B)
4685        Name (S001, "q+er0000")
4686        Name (B001, Buffer (0x04)
4687        {
4688             0x01, 0x2B, 0x03, 0x04                           // .+..
4689        })
4690        Name (P001, Package (0x03)
4691        {
4692            0x05,
4693            0x2B,
4694            0x07
4695        })
4696        Method (M000, 3, NotSerialized)
4697        {
4698            Method (M000, 3, NotSerialized)
4699            {
4700                Method (M000, 3, NotSerialized)
4701                {
4702                    Method (M000, 3, NotSerialized)
4703                    {
4704                        Local0 = ObjectType (Arg0)
4705                        If ((Local0 != Arg2))
4706                        {
4707                            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, Arg2)
4708                        }
4709
4710                        If (OP00)
4711                        {
4712                            /* CopyObject */
4713
4714                            If ((Arg1 == C009))
4715                            {
4716                                CopyObject (0x2B, Arg0)
4717                            }
4718                            ElseIf ((Arg1 == C00A))
4719                            {
4720                                CopyObject ("q+er0000", Arg0)
4721                            }
4722                            ElseIf ((Arg1 == C00B))
4723                            {
4724                                CopyObject (Buffer (0x04)
4725                                    {
4726                                         0x01, 0x2B, 0x03, 0x04                           // .+..
4727                                    }, Arg0)
4728                            }
4729                            ElseIf ((Arg1 == C00C))
4730                            {
4731                                CopyObject (Package (0x03)
4732                                    {
4733                                        0x05,
4734                                        0x2B,
4735                                        0x07
4736                                    }, Arg0)
4737                            }
4738                        }
4739                        ElseIf                        /* Store */
4740
4741 ((Arg1 == C009))
4742                        {
4743                            Arg0 = 0x2B
4744                        }
4745                        ElseIf ((Arg1 == C00A))
4746                        {
4747                            Arg0 = "q+er0000"
4748                        }
4749                        ElseIf ((Arg1 == C00B))
4750                        {
4751                            Arg0 = Buffer (0x04)
4752                                {
4753                                     0x01, 0x2B, 0x03, 0x04                           // .+..
4754                                }
4755                        }
4756                        ElseIf ((Arg1 == C00C))
4757                        {
4758                            Arg0 = Package (0x03)
4759                                {
4760                                    0x05,
4761                                    0x2B,
4762                                    0x07
4763                                }
4764                        }
4765
4766                        Local0 = DerefOf (Arg0)
4767                        M391 (Local0, Arg1, 0x00, __LINE__)
4768                    }
4769
4770                    M000 (Arg0, Arg1, Arg2)
4771                    Local0 = DerefOf (Arg0)
4772                    M391 (Local0, Arg1, 0x00, __LINE__)
4773                }
4774
4775                M000 (Arg0, Arg1, Arg2)
4776                Local0 = DerefOf (Arg0)
4777                M391 (Local0, Arg1, 0x00, __LINE__)
4778            }
4779
4780            M000 (Arg0, Arg1, Arg2)
4781            Local0 = DerefOf (Arg0)
4782            M391 (Local0, Arg1, 0x00, __LINE__)
4783        }
4784
4785        BEG0 (Z111, __METHOD__)
4786        /* Write Integer */
4787
4788        Local0 = RefOf (I000)
4789        M000 (Local0, C009, C009)
4790        M391 (I000, C009, 0x00, __LINE__)
4791        Local2 = DerefOf (Local0)
4792        M391 (Local2, C009, 0x00, __LINE__)
4793        Local0 = RefOf (S000)
4794        M000 (Local0, C009, C00A)
4795        M391 (S000, C009, 0x00, __LINE__)
4796        Local2 = DerefOf (Local0)
4797        M391 (Local2, C009, 0x00, __LINE__)
4798        Local0 = RefOf (B000)
4799        M000 (Local0, C009, C00B)
4800        M391 (B000, C009, 0x00, __LINE__)
4801        Local2 = DerefOf (Local0)
4802        M391 (Local2, C009, 0x00, __LINE__)
4803        /* Write String */
4804
4805        Local0 = RefOf (I010)
4806        M000 (Local0, C00A, C009)
4807        M391 (I010, C00A, 0x00, __LINE__)
4808        Local2 = DerefOf (Local0)
4809        M391 (Local2, C00A, 0x00, __LINE__)
4810        Local0 = RefOf (S010)
4811        M000 (Local0, C00A, C00A)
4812        M391 (S010, C00A, 0x00, __LINE__)
4813        Local2 = DerefOf (Local0)
4814        M391 (Local2, C00A, 0x00, __LINE__)
4815        Local0 = RefOf (B010)
4816        M000 (Local0, C00A, C00B)
4817        M391 (B010, C00A, 0x00, __LINE__)
4818        Local2 = DerefOf (Local0)
4819        M391 (Local2, C00A, 0x00, __LINE__)
4820        /* Write Buffer */
4821
4822        Local0 = RefOf (I020)
4823        M000 (Local0, C00B, C009)
4824        M391 (I020, C00B, 0x00, __LINE__)
4825        Local2 = DerefOf (Local0)
4826        M391 (Local2, C00B, 0x00, __LINE__)
4827        Local0 = RefOf (S020)
4828        M000 (Local0, C00B, C00A)
4829        M391 (S020, C00B, 0x00, __LINE__)
4830        Local2 = DerefOf (Local0)
4831        M391 (Local2, C00B, 0x00, __LINE__)
4832        Local0 = RefOf (B020)
4833        M000 (Local0, C00B, C00B)
4834        M391 (B020, C00B, 0x00, __LINE__)
4835        Local2 = DerefOf (Local0)
4836        M391 (Local2, C00B, 0x00, __LINE__)
4837        /* Write Package */
4838
4839        If (!OP00)
4840        {
4841            If (!Y516)
4842            {
4843                OP01 = 0x00
4844            }
4845        }
4846
4847        If (OP01)
4848        {
4849            Local0 = RefOf (I030)
4850            M000 (Local0, C00C, C009)
4851            M391 (I030, C00C, 0x00, __LINE__)
4852            Local2 = DerefOf (Local0)
4853            M391 (Local2, C00C, 0x00, __LINE__)
4854            Local0 = RefOf (S030)
4855            M000 (Local0, C00C, C00A)
4856            M391 (S030, C00C, 0x00, __LINE__)
4857            Local2 = DerefOf (Local0)
4858            M391 (Local2, C00C, 0x00, __LINE__)
4859            Local0 = RefOf (B030)
4860            M000 (Local0, C00C, C00B)
4861            M391 (B030, C00C, 0x00, __LINE__)
4862            Local2 = DerefOf (Local0)
4863            M391 (Local2, C00C, 0x00, __LINE__)
4864            Local0 = RefOf (P030)
4865            M000 (Local0, C00C, C00C)
4866            M391 (P030, C00C, 0x00, __LINE__)
4867            Local2 = DerefOf (Local0)
4868            M391 (Local2, C00C, 0x00, __LINE__)
4869        }
4870
4871        /* Write Integer */
4872
4873        M000 (RefOf (I040), C009, C009)
4874        M391 (I040, C009, 0x00, __LINE__)
4875        M000 (RefOf (S040), C009, C00A)
4876        M391 (I040, C009, 0x00, __LINE__)
4877        M000 (RefOf (B040), C009, C00B)
4878        M391 (I040, C009, 0x00, __LINE__)
4879        /* Write String */
4880
4881        M000 (RefOf (I050), C00A, C009)
4882        M391 (I050, C00A, 0x00, __LINE__)
4883        M000 (RefOf (S050), C00A, C00A)
4884        M391 (I050, C00A, 0x00, __LINE__)
4885        M000 (RefOf (B050), C00A, C00B)
4886        M391 (I050, C00A, 0x00, __LINE__)
4887        /* Write Buffer */
4888
4889        M000 (RefOf (I060), C00B, C009)
4890        M391 (I060, C00B, 0x00, __LINE__)
4891        M000 (RefOf (S060), C00B, C00A)
4892        M391 (I060, C00B, 0x00, __LINE__)
4893        M000 (RefOf (B060), C00B, C00B)
4894        M391 (I060, C00B, 0x00, __LINE__)
4895        /* Write Package */
4896
4897        If (OP01)
4898        {
4899            M000 (RefOf (I070), C00C, C009)
4900            M391 (I070, C00C, 0x00, __LINE__)
4901            M000 (RefOf (S070), C00C, C00A)
4902            M391 (I070, C00C, 0x00, __LINE__)
4903            M000 (RefOf (B070), C00C, C00B)
4904            M391 (I070, C00C, 0x00, __LINE__)
4905            M000 (RefOf (P070), C00C, C00C)
4906            M391 (I070, C00C, 0x00, __LINE__)
4907        }
4908
4909        END0 ()
4910    }
4911
4912    Method (M34E, 1, Serialized)
4913    {
4914        Name (OP00, 0x00)
4915        OP00 = Arg0
4916        Name (S000, "qwer0000")
4917        Name (B000, Buffer (0x04)
4918        {
4919             0x01, 0x77, 0x03, 0x04                           // .w..
4920        })
4921        Name (P000, Package (0x03)
4922        {
4923            0x05,
4924            0x77,
4925            0x07
4926        })
4927        Method (M000, 3, NotSerialized)
4928        {
4929            Method (M000, 3, NotSerialized)
4930            {
4931                Method (M000, 3, NotSerialized)
4932                {
4933                    Method (M000, 3, NotSerialized)
4934                    {
4935                        Local0 = ObjectType (Arg0)
4936                        If ((Local0 != Arg2))
4937                        {
4938                            ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local0, Arg2)
4939                        }
4940
4941                        If (OP00)
4942                        {
4943                            CopyObject (0x2B, Arg0)
4944                        }
4945                        Else
4946                        {
4947                            Arg0 = 0x2B
4948                        }
4949
4950                        M391 (Arg0, Arg1, 0x00, __LINE__)
4951                    }
4952
4953                    M000 (Arg0, Arg1, Arg2)
4954                    Local0 = DerefOf (Arg0)
4955                    M390 (Local0, Arg1, 0x00, __LINE__)
4956                }
4957
4958                M000 (Arg0, Arg1, Arg2)
4959                Local0 = DerefOf (Arg0)
4960                M390 (Local0, Arg1, 0x00, __LINE__)
4961            }
4962
4963            M000 (Arg0, Arg1, Arg2)
4964            Local0 = DerefOf (Arg0)
4965            M390 (Local0, Arg1, 0x00, __LINE__)
4966        }
4967
4968        BEG0 (Z111, __METHOD__)
4969        /* String */
4970
4971        Store (S000 [0x01], Local0)
4972        M000 (Local0, C009, C016)
4973        M390 (S000, C00A, 0x00, __LINE__)
4974        Local2 = DerefOf (Local0)
4975        M380 (__METHOD__, Local2, 0x00, __LINE__)
4976        /* Buffer */
4977
4978        Store (B000 [0x01], Local0)
4979        M000 (Local0, C009, C016)
4980        M390 (B000, C00B, 0x00, __LINE__)
4981        Local2 = DerefOf (Local0)
4982        M380 (__METHOD__, Local2, 0x00, __LINE__)
4983        /* Package */
4984
4985        Store (P000 [0x01], Local0)
4986        M000 (Local0, C009, C009)
4987        M390 (P000, C00C, 0x00, __LINE__)
4988        Local2 = DerefOf (Local0)
4989        M380 (__METHOD__, Local2, 0x00, __LINE__)
4990        END0 ()
4991    }
4992
4993    Method (M34F, 0, Serialized)
4994    {
4995        BEG0 (Z111, __METHOD__)
4996        RefOf (I900) = 0x77
4997        M380 (__METHOD__, I900, 0x00, __LINE__)
4998        RefOf (S900) = 0x77
4999        M4C0 (__METHOD__, S900, "0000000000000077", "00000077")
5000        RefOf (B900) = 0x77
5001        M1AA (__METHOD__, B900, C00B, Buffer (0x05)
5002            {
5003                 0x77, 0x00, 0x00, 0x00, 0x00                     // w....
5004            }, 0x01)
5005        RefOf (P953) = 0x77
5006        M380 (__METHOD__, P953, 0x00, __LINE__)
5007        RefOf (E900) = 0x77
5008        M380 (__METHOD__, E900, 0x00, __LINE__)
5009        RefOf (MX90) = 0x77
5010        M380 (__METHOD__, MX90, 0x00, __LINE__)
5011        RefOf (D900) = 0x77
5012        M380 (__METHOD__, D900, 0x00, __LINE__)
5013        If (Y508)
5014        {
5015            RefOf (TZ90) = 0x77
5016            M380 (__METHOD__, TZ90, 0x00, __LINE__)
5017        }
5018
5019        RefOf (PR90) = 0x77
5020        M380 (__METHOD__, PR90, 0x00, __LINE__)
5021        If (Y510)
5022        {
5023            RefOf (R900) = 0x77
5024            M380 (__METHOD__, R900, 0x00, __LINE__)
5025        }
5026
5027        RefOf (PW90) = 0x77
5028        M380 (__METHOD__, PW90, 0x00, __LINE__)
5029        M1AC ()
5030        M1A6 ()
5031        END0 ()
5032    }
5033
5034    /* CURRENTLY: compiler failed CopyObject(xx, RefOf(xx)) */
5035
5036    Method (M350, 0, Serialized)
5037    {
5038        /* CopyObject(0x77, RefOf(i900)) */
5039    }
5040
5041    /* Write Integer into Package and verify the obtained contents */
5042    /* arg0 - Package */
5043    Method (M351, 1, Serialized)
5044    {
5045        Name (LPN0, 0x11)
5046        Name (LPC0, 0x00)
5047        Local6 = 0x10
5048        While (LPN0)
5049        {
5050            Arg0 [LPC0] = Local6
5051            Local6++
5052            LPN0--
5053            LPC0++
5054        }
5055
5056        /* Check that elements of Package are properly changed */
5057
5058        LPN0 = 0x11
5059        LPC0 = 0x00
5060        Local6 = 0x10
5061        While (LPN0)
5062        {
5063            Store (Arg0 [LPC0], Local0)
5064            Local1 = ObjectType (Local0)
5065            If ((Local1 != C009))
5066            {
5067                ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, C009)
5068            }
5069            Else
5070            {
5071                Local1 = DerefOf (Local0)
5072                If ((Local1 != Local6))
5073                {
5074                    ERR (__METHOD__, Z111, __LINE__, 0x00, 0x00, Local1, Local6)
5075                }
5076            }
5077
5078            Local6++
5079            LPN0--
5080            LPC0++
5081        }
5082    }
5083
5084    /* Write ORef into Package */
5085    /* arg0 - Package */
5086    Method (M352, 1, NotSerialized)
5087    {
5088        Arg0 [0x00] = 0x00
5089        Arg0 [0x01] = RefOf (I900)
5090        Arg0 [0x02] = RefOf (S900)
5091        Arg0 [0x03] = RefOf (B900)
5092        Arg0 [0x04] = RefOf (P953)
5093        Arg0 [0x05] = RefOf (F900)
5094        Arg0 [0x06] = RefOf (D900)
5095        Arg0 [0x07] = RefOf (E900)
5096        Arg0 [0x08] = RefOf (M914)
5097        Arg0 [0x09] = RefOf (MX90)
5098        Arg0 [0x0A] = RefOf (R900)
5099        Arg0 [0x0B] = RefOf (PW90)
5100        Arg0 [0x0C] = RefOf (PR90)
5101        Arg0 [0x0D] = RefOf (TZ90)
5102        Arg0 [0x0E] = RefOf (BF90)
5103        Arg0 [0x0F] = 0x0F
5104        Arg0 [0x10] = 0x10
5105    }
5106
5107    /* Write IRef (Index(p955, x)) into Package */
5108    /* arg0 - Package */
5109    /* arg1 - 0 - Store, otherwise - CopyObject */
5110    Method (M353, 2, Serialized)
5111    {
5112        Name (LPN0, 0x11)
5113        Name (LPC0, 0x00)
5114        If (Arg1){        /*
5115         * While (lpN0) {
5116         *	CopyObject(Index(p955, lpC0), Index(arg0, lpC0))
5117         *	Decrement(lpN0)
5118         *	Increment(lpC0)
5119         * }
5120         * CopyObject(0, Index(arg0, 0))
5121         * CopyObject(15, Index(arg0, 15))
5122         * CopyObject(16, Index(arg0, 16))
5123         */
5124        }
5125        Else
5126        {
5127            While (LPN0)
5128            {
5129                Store (P955 [LPC0], Arg0 [LPC0])
5130                LPN0--
5131                LPC0++
5132            }
5133
5134            Arg0 [0x00] = 0x00
5135            Arg0 [0x0F] = 0x0F
5136            Arg0 [0x10] = 0x10
5137        }
5138    }
5139
5140    Method (M362, 0, Serialized)
5141    {
5142        Name (I000, 0x00)
5143        Method (M000, 1, NotSerialized)
5144        {
5145            Local0 = (0x76 + 0x01)
5146            Arg0 = Local0
5147        }
5148
5149        M000 (RefOf (I000))
5150        M380 ("m362", I000, Z111, __LINE__)
5151    }
5152
5153    Method (M363, 0, Serialized)
5154    {
5155        Name (I000, 0x00)
5156        Method (M000, 1, NotSerialized)
5157        {
5158            Arg0 = (0x76 + 0x01)
5159        }
5160
5161        M000 (RefOf (I000))
5162        M380 ("m363", I000, Z111, __LINE__)
5163    }
5164
5165    Method (M364, 0, Serialized)
5166    {
5167        Name (I000, 0x00)
5168        Method (M000, 1, NotSerialized)
5169        {
5170            Arg0 = (0x76 + 0x01)
5171        }
5172
5173        Local0 = RefOf (I000)
5174        M000 (Local0)
5175        M380 ("m364", I000, Z111, __LINE__)
5176    }
5177
5178    /*
5179     *
5180     * Auxiliary Methods
5181     *
5182     */
5183    /* Run all the ORef relevant Methods of ref1-ref4 */
5184    Method (M4D0, 0, NotSerialized)
5185    {
5186        M16F (0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00)
5187        M175 (0x00, 0x01, 0x01)
5188        M185 (0x00, 0x01, 0x01)
5189        M195 (0x00, 0x01, 0x01, 0x01, 0x00)
5190    }
5191
5192    /* Run all the IRef relevant Methods of ref1-ref4 */
5193
5194    Method (M4D1, 0, NotSerialized)
5195    {
5196        M16F (0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01)
5197        M175 (0x01, 0x00, 0x00)
5198        M185 (0x01, 0x00, 0x00)
5199        M195 (0x01, 0x00, 0x00, 0x00, 0x01)
5200    }
5201
5202    /* Run all the NamedX-ORef relevant Methods of ref1-ref4 */
5203
5204    Method (M4D2, 0, NotSerialized)
5205    {
5206        M16F (0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00)
5207        M175 (0x00, 0x01, 0x01)
5208        M185 (0x00, 0x01, 0x01)
5209        M195 (0x00, 0x01, 0x01, 0x01, 0x00)
5210    }
5211
5212    /* Run all the NamedX-IRef relevant Methods of ref1-ref4 */
5213
5214    Method (M4D3, 0, NotSerialized)
5215    {
5216        M16F (0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01)
5217        M175 (0x01, 0x00, 0x00)
5218        M185 (0x01, 0x00, 0x00)
5219        M195 (0x01, 0x00, 0x00, 0x00, 0x01)
5220    }
5221
5222    /*
5223     Method(m4d0) {}
5224     Method(m4d1) {}
5225     Method(m4d2) {}
5226     Method(m4d3) {}
5227     Method(m1e0, 1) {}
5228     */
5229    Method (MFAB, 0, Serialized)
5230    {
5231        /*
5232         * Update required: do this test for different type target objects
5233         * and reference elements (Iref/Oref; LocalX/ArgX/NamedX/...).
5234         */
5235        Name (PP00, Package (0x08)
5236        {
5237            0x80,
5238            0x81,
5239            0x82,
5240            0x83,
5241            0x84,
5242            0x85,
5243            0x86,
5244            0x87
5245        })
5246        Name (P000, Package (0x10)
5247        {
5248            0x00,
5249            0x01,
5250            0x02,
5251            0x03,
5252            0x04,
5253            0x05,
5254            0x06,
5255            0x07,
5256            0x08,
5257            0x09,
5258            0x0A,
5259            0x0B,
5260            0x0C,
5261            0x0D,
5262            0x0E,
5263            0x0F
5264        })
5265        /* Over Integers */
5266
5267        P000 [0x00] = RefOf (PP00)
5268        Store (P000 [0x00], P000 [0x01])
5269        Store (P000 [0x01], P000 [0x02])
5270        Store (P000 [0x02], P000 [0x03])
5271        Store (P000 [0x03], P000 [0x04])
5272        Store (P000 [0x04], P000 [0x05])
5273        Store (P000 [0x05], P000 [0x06])
5274        Store (P000 [0x06], P000 [0x07])
5275        Store (P000 [0x07], P000 [0x08])
5276        Store (P000 [0x08], P000 [0x09])
5277        Store (P000 [0x09], P000 [0x0A])
5278        Store (P000 [0x0A], P000 [0x0B])
5279        Store (P000 [0x0B], P000 [0x0C])
5280        Store (P000 [0x0C], P000 [0x0D])
5281        Store (P000 [0x0D], P000 [0x0E])
5282        Store (P000 [0x0E], P000 [0x0F])
5283        Local0 = P000 [0x0F]
5284        Local1 = ObjectType (Local0)
5285        If ((Local1 != C01C))
5286        {
5287            ERR ("mfab", Z111, __LINE__, 0x00, 0x00, Local1, C01C)
5288        }
5289
5290        Local1 = ObjectType (DerefOf (Local0))
5291        If ((Local1 != C01C))
5292        {
5293            ERR ("mfab", Z111, __LINE__, 0x00, 0x00, Local1, C01C)
5294        }
5295    }
5296
5297    Method (MFAD, 0, Serialized)
5298    {
5299        /*
5300         * Update required: do this test for different type target objects
5301         * and reference elements (Iref/Oref; LocalX/ArgX/NamedX/...).
5302         */
5303        Name (I000, 0xABCD0000)
5304        Name (P000, Package (0x10)
5305        {
5306            0x00,
5307            0x01,
5308            0x02,
5309            0x03,
5310            0x04,
5311            0x05,
5312            0x06,
5313            0x07,
5314            0x08,
5315            0x09,
5316            0x0A,
5317            0x0B,
5318            0x0C,
5319            0x0D,
5320            0x0E,
5321            0x0F
5322        })
5323        /* Over Integers */
5324
5325        P000 [0x00] = RefOf (I000)
5326        Store (P000 [0x00], P000 [0x01])
5327        Store (P000 [0x01], P000 [0x02])
5328        Store (P000 [0x02], P000 [0x03])
5329        Store (P000 [0x03], P000 [0x04])
5330        Store (P000 [0x04], P000 [0x05])
5331        Store (P000 [0x05], P000 [0x06])
5332        Store (P000 [0x06], P000 [0x07])
5333        Store (P000 [0x07], P000 [0x08])
5334        Store (P000 [0x08], P000 [0x09])
5335        Store (P000 [0x09], P000 [0x0A])
5336        Store (P000 [0x0A], P000 [0x0B])
5337        Store (P000 [0x0B], P000 [0x0C])
5338        Store (P000 [0x0C], P000 [0x0D])
5339        Store (P000 [0x0D], P000 [0x0E])
5340        Store (P000 [0x0E], P000 [0x0F])
5341        Store (P000 [0x0F], P000 [0x00])
5342        Local0 = P000 [0x0F]
5343        Debug = Local0
5344        If (0x00)
5345        {
5346            Local1 = ObjectType (Local0)
5347            Debug = Local1
5348            If ((Local1 != C01C))
5349            {
5350                ERR ("mfad", Z111, __LINE__, 0x00, 0x00, Local1, C01C)
5351            }
5352        }
5353        Else
5354        {
5355            /*
5356             * ObjectType here falls into the infinitive loop.
5357             * Sort this out!
5358             */
5359            ERR ("mfad", Z111, __LINE__, 0x00, 0x00, 0x00, 0x00)
5360        }
5361    }
5362
5363    Method (MFC3, 0, Serialized)
5364    {
5365        /*
5366         * Update required: do this test for different type target objects
5367         * and reference elements (Iref/Oref; LocalX/ArgX/NamedX/...).
5368         */
5369        Name (I000, 0xABCD0000)
5370        Name (P000, Package (0x10)
5371        {
5372            0x00,
5373            0x01,
5374            0x02,
5375            0x03,
5376            0x04,
5377            0x05,
5378            0x06,
5379            0x07,
5380            0x08,
5381            0x09,
5382            0x0A,
5383            0x0B,
5384            0x0C,
5385            0x0D,
5386            0x0E,
5387            0x0F
5388        })
5389        /* Over Integers */
5390
5391        P000 [0x00] = RefOf (I000)
5392        Store (P000 [0x00], P000 [0x01])
5393        Store (P000 [0x01], P000 [0x02])
5394        Store (P000 [0x02], P000 [0x03])
5395        Store (P000 [0x03], P000 [0x04])
5396        Store (P000 [0x04], P000 [0x05])
5397        Store (P000 [0x05], P000 [0x06])
5398        Store (P000 [0x06], P000 [0x07])
5399        Store (P000 [0x07], P000 [0x08])
5400        Store (P000 [0x08], P000 [0x09])
5401        Store (P000 [0x09], P000 [0x0A])
5402        Store (P000 [0x0A], P000 [0x0B])
5403        Store (P000 [0x0B], P000 [0x0C])
5404        Store (P000 [0x0C], P000 [0x0D])
5405        Store (P000 [0x0D], P000 [0x0E])
5406        Store (P000 [0x0E], P000 [0x0F])
5407        Store (P000 [0x0F], P000 [0x00])
5408        Local0 = P000 [0x0F]
5409        Debug = Local0
5410        If (0x00)
5411        {
5412            Local1 = SizeOf (Local0)
5413            Debug = Local1
5414            If ((Local1 != 0x64))
5415            {
5416                ERR ("mfc3", Z111, __LINE__, 0x00, 0x00, Local1, 0x64)
5417            }
5418        }
5419        Else
5420        {
5421            /*
5422             * SizeOf here falls into the infinitive loop.
5423             * Sort this out!
5424             */
5425            ERR ("mfc3", Z111, __LINE__, 0x00, 0x00, 0x00, 0x00)
5426        }
5427    }
5428
5429    Method (MFC4, 0, Serialized)
5430    {
5431        /*
5432         * Update required: do this test for different type target objects
5433         * and reference elements (Iref/Oref; LocalX/ArgX/NamedX/...).
5434         */
5435        Name (I000, 0xABCD0000)
5436        Name (P000, Package (0x10)
5437        {
5438            0x00,
5439            0x01,
5440            0x02,
5441            0x03,
5442            0x04,
5443            0x05,
5444            0x06,
5445            0x07,
5446            0x08,
5447            0x09,
5448            0x0A,
5449            0x0B,
5450            0x0C,
5451            0x0D,
5452            0x0E,
5453            0x0F
5454        })
5455        /* Over Integers */
5456
5457        P000 [0x00] = RefOf (I000)
5458        Store (P000 [0x00], P000 [0x01])
5459        Store (P000 [0x01], P000 [0x02])
5460        Store (P000 [0x02], P000 [0x03])
5461        Store (P000 [0x03], P000 [0x04])
5462        Store (P000 [0x04], P000 [0x05])
5463        Store (P000 [0x05], P000 [0x06])
5464        Store (P000 [0x06], P000 [0x07])
5465        Store (P000 [0x07], P000 [0x08])
5466        Store (P000 [0x08], P000 [0x09])
5467        Store (P000 [0x09], P000 [0x0A])
5468        Store (P000 [0x0A], P000 [0x0B])
5469        Store (P000 [0x0B], P000 [0x0C])
5470        Store (P000 [0x0C], P000 [0x0D])
5471        Store (P000 [0x0D], P000 [0x0E])
5472        Store (P000 [0x0E], P000 [0x0F])
5473        Store (P000 [0x0F], P000 [0x00])
5474        Local0 = P000 [0x0F]
5475        Debug = Local0
5476        If (0x01)
5477        {
5478            Local1 = DerefOf (Local0)
5479            Debug = Local1
5480            If ((Local1 != 0x64))
5481            {
5482                ERR ("mfc4", Z111, __LINE__, 0x00, 0x00, Local1, 0x64)
5483            }
5484        }
5485        Else
5486        {
5487            /*
5488             * SizeOf here falls into the infinitive loop.
5489             * Sort this out!
5490             */
5491            ERR ("mfc4", Z111, __LINE__, 0x00, 0x00, 0x00, 0x00)
5492        }
5493    }
5494
5495    /*
5496     !!!!!!!!!!!!!!!!!!!!!!!
5497     Do this test, like this - run Derefof for the chain of references (IR/OR)
5498     and for ring of them.
5499     I don't remember if we have already such test.
5500     !!!!!!!!!!!!!!!!!!!!!!!
5501     Method(m000)
5502     {
5503     *
5504     * Printing excluded while bug 206 (Store-to-Debug operation
5505     * falls into infinite loop for ring of RefOf references) is
5506     * not fixed.
5507     *
5508     Store(RefOf(Local0), Local1)
5509     Store(RefOf(Local1), Local2)
5510     Store(RefOf(Local2), Local0)
5511     Store(DerefOf(Local0), Local7)
5512     Store(Local7, Debug)
5513     Store(DerefOf(Local7), Local6)
5514     Store(Local6, Debug)
5515     Store(DerefOf(Local6), Local5)
5516     Store(Local5, Debug)
5517     }
5518     */
5519    /* Run-method */
5520    Method (REF9, 0, NotSerialized)
5521    {
5522        Debug = "TEST: REF9, Object and Index References and the call-by-reference convention"
5523        C085 = 0x01 /* create the chain of references to LocalX, then dereference them */
5524        C086 = 0x00 /* flag, run test till the first error */
5525        C088 = 0x01 /* test run mode */
5526        C089 = 0x00 /* flag of Reference, object otherwise */
5527        C08B = 0x00 /* do RefOf(ArgX) checkings */
5528        If (!C088)
5529        {
5530            Debug = "A T T E N T I O N: simple mode!"
5531        }
5532
5533        If (0x01)
5534        {
5535            SRMT ("m221")
5536            M221 ()
5537            SRMT ("m222")
5538            M222 ()
5539            SRMT ("m223")
5540            M223 ()
5541            SRMT ("m224")
5542            M224 ()
5543            SRMT ("m225")
5544            M225 ()
5545            SRMT ("m226")
5546            M226 ()
5547            SRMT ("m227")
5548            M227 ()
5549            SRMT ("m228")
5550            M228 ()
5551            SRMT ("m229")
5552            M229 ()
5553            SRMT ("m22a")
5554            M22A ()
5555            SRMT ("m22b")
5556            M22B ()
5557            SRMT ("m22c")
5558            M22C ()
5559            SRMT ("m22d")
5560            If (Y164)
5561            {
5562                M22D ()
5563            }
5564            Else
5565            {
5566                BLCK ()
5567            }
5568
5569            SRMT ("m22e")
5570            M22E ()
5571            SRMT ("m22f")
5572            M22F ()
5573            SRMT ("m230")
5574            M230 ()
5575            SRMT ("m231")
5576            M231 ()
5577            SRMT ("m232")
5578            M232 ()
5579            SRMT ("m233")
5580            M233 () /* bug 130 (m34c) */
5581            SRMT ("m234")
5582            M234 ()
5583            SRMT ("m235")
5584            M235 ()
5585            SRMT ("m236")
5586            M236 ()
5587            SRMT ("m237")
5588            M237 ()
5589            SRMT ("m238")
5590            M238 ()
5591            SRMT ("m239")
5592            M239 ()
5593            SRMT ("m23a")
5594            M23A ()
5595            SRMT ("m23b")
5596            M23B ()
5597            SRMT ("m23c")
5598            M23C ()
5599            SRMT ("m23d")
5600            M23D ()
5601            SRMT ("m23e")
5602            M23E ()
5603            SRMT ("m23f")
5604            M23F ()
5605            SRMT ("m250")
5606            M250 ()
5607            SRMT ("m251")
5608            M251 ()
5609            SRMT ("m252")
5610            M252 ()
5611            SRMT ("m253")
5612            M253 ()
5613            SRMT ("m254")
5614            M254 ()
5615            SRMT ("m255")
5616            M255 ()
5617            SRMT ("m256")
5618            M256 ()
5619            SRMT ("m257")
5620            M257 ()
5621            SRMT ("m258")
5622            M258 (0x00)
5623            SRMT ("m259")
5624            M259 ()
5625            SRMT ("m25a")
5626            M25A ()
5627            SRMT ("m25b")
5628            M25B ()
5629            SRMT ("m25c")
5630            M25C ()
5631            SRMT ("m25d")
5632            M25D ()
5633            SRMT ("m25e")
5634            M25E ()
5635            SRMT ("m25f")
5636            M25F ()
5637            SRMT ("m260")
5638            M260 ()
5639            SRMT ("m261")
5640            M261 ()
5641            SRMT ("m262")
5642            M262 ()
5643            SRMT ("m263")
5644            M263 ()
5645            SRMT ("m264")
5646            M264 ()
5647            SRMT ("m265")
5648            M265 ()
5649            SRMT ("m266")
5650            M266 ()
5651            SRMT ("m267")
5652            M267 ()
5653            SRMT ("m268")
5654            M268 ()
5655            SRMT ("m269")
5656            M269 ()
5657            SRMT ("m26a")
5658            M26A ()
5659            SRMT ("m26b")
5660            If (Y164)
5661            {
5662                M26B () /* bugs, see inside */
5663            }
5664            Else
5665            {
5666                BLCK ()
5667            }
5668
5669            SRMT ("m26c")
5670            M26C ()
5671            SRMT ("m26d")
5672            M26D ()
5673            SRMT ("m26e")
5674            M26E () /* bug 131 (m365) */
5675            SRMT ("m26f")
5676            M26F ()
5677            SRMT ("m270")
5678            M270 () /* bug 134 */
5679            SRMT ("m276")
5680            M276 ()
5681            SRMT ("mfab")
5682            If (Y603)
5683            {
5684                MFAB ()
5685            }
5686            Else
5687            {
5688                BLCK ()
5689            }
5690
5691            SRMT ("mfad")
5692            If (Y603)
5693            {
5694                MFAD ()
5695            }
5696            Else
5697            {
5698                BLCK ()
5699            }
5700
5701            SRMT ("mfc3")
5702            If (Y603)
5703            {
5704                MFC3 ()
5705            }
5706            Else
5707            {
5708                BLCK ()
5709            }
5710
5711            SRMT ("mfc4")
5712            If (Y603)
5713            {
5714                MFC4 ()
5715            }
5716            Else
5717            {
5718                BLCK ()
5719            }
5720        }
5721        /*
5722         SRMT("m23b")
5723         m23b()
5724         SRMT("m251")
5725         m251()
5726         */
5727        /*
5728         SRMT("mfab")
5729         mfab()
5730         SRMT("mfad")
5731         mfad()
5732         SRMT("mfc3")
5733         mfc3()
5734         SRMT("mfc4")
5735         mfc4()
5736         //	SRMT("m234")
5737         //	m234()
5738         //	SRMT("m26b")
5739         //	m26b()
5740         //	m251()
5741         //	m22d()
5742         //	m26b()
5743         //	m276()
5744         */
5745        Else
5746        {
5747            /* To run particular sub-tests here */
5748
5749            SRMT ("m1d5")
5750            M1D5 ()
5751        }
5752        /* SEE and do these below: */
5753    /*
5754     1. See bug 130, add this checking:
5755     see this when worked on m233()
5756     Method(m000, 1)
5757     {
5758     //		Store(DerefOf(arg0), Local2)
5759     //		Store(0x2b, Index(Local2, 1))
5760     Store(0x2b, Index(DerefOf(arg0), 1))
5761     }
5762     2. do many enclosed method calls
5763     to show that index to Str,Buf,Pckg
5764     changes the initial object nevertheless
5765     */
5766    /*
5767     Method (M001)
5768     {
5769     Name(P004, Package(Add (128, 3)) {})
5770     Name(P005, Package(Add (128, 1024)) {})
5771     }
5772     */
5773    /*
5774     Use the same object in several operands and results
5775     */
5776    }
5777