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