1	.text
2	.p2align 2
3
4	ldrc	r3
5	ldrc	r12
6	ldrc	#10
7	ldrc	#243
8	setdmx
9	setdmy
10	clrdmxy
11
12	movx.w	@r4,x0		movy.w	a0,@r7+
13	movx.w	@r0,x1
14	movx.w	@r1+,y0		nopy
15nopy	movx.w	@r5+r8,y1
16
17	movx.l	@r5,x1
18	movx.l	@r0,x0
19	movx.l	@r1+,y0		nopy
20nopy	movx.l	@r4+r8,y1
21
22	movx.w	a0,@r4+		movy.w	@r6+r9,y0
23	movx.w	x0,@r1
24	movx.w	a1,@r0+		nopy
25nopy	movx.w	x1,@r5+r8
26
27	movx.l	a0,@r5
28	movx.l	x0,@r0
29	movx.l	x1,@r1+		nopy
30nopy	movx.l	a1,@r4+r8
31
32	movy.w	@r7,y1		movx.w a1,@r4+r8
33	movy.w	@r3,y0
34	movy.w	@r2+,x1		nopx
35nopx	movy.w	@r6+r9,x0
36
37	movy.l	@r6,y1
38	movy.l	@r2,y0
39	movy.l	@r3+,x0		nopx
40nopx	movy.l	@r7+r9,x1
41
42	movy.w	a1,@r6+		movx.w	@r5+r8,x1
43	movy.w	y1,@r2
44	movy.w	a0,@r3+		nopx
45nopx	movy.w	y0,@r7+r9
46
47	movy.l	a1,@r7
48	movy.l	y0,@r3
49	movy.l	y1,@r2+		nopx
50nopx	movy.l	a0,@r6+r9
51
52	pabs	x1,a0
53	pabs	y0,m1
54    dct	pabs	a1,m0
55    dct	pabs	x0,x1
56    dcf	pabs	a0,y1
57    dcf	pabs	x1,a0
58    dct	pabs	y1,x0
59    dct	pabs	m0,m1
60    dcf	pabs	m1,y0
61    dcf	pabs	y0,a1
62
63	pmuls	a1,x0,m0
64	pmuls	y0,a1,m1
65	pclr	a0
66    dct	pclr	a1
67	pclr	x0		pmuls	a1,x0,m0
68	pclr	a1		pmuls	x0,y0,a0
69	pclr	a0		pmuls	x1,y1,a1
70	pclr	y0		pmuls	y0,a1,m1
71
72	psub	a0,m0,x0
73	psub	m1,x1,x1
74	psub	y0,a0,y0
75    dct	psub	a1,y1,y1
76    dct	psub	m0,x1,a0
77    dct	psub	y1,a0,a1
78    dcf	psub	x1,m1,m0
79    dcf	psub	y0,x1,m1
80    dcf	psub	m1,a0,a1
81
82	pswap	a1,m1
83	pswap	x0,a0
84	pswap	m1,y0
85	pswap	y0,x1
86    dct	pswap	a0,y1
87    dct	pswap	x1,x0
88    dct	pswap	y1,a1
89    dct	pswap	m0,m0
90    dcf	pswap	a0,a0
91    dcf	pswap	x1,m1
92    dcf	pswap	m1,x0
93    dcf	pswap	y0,y1
94
95	prnd	a0,a1
96	prnd	y1,m0
97    dct	prnd	a1,x0
98    dct	prnd	x0,y1
99    dct	prnd	m1,a0
100    dct	prnd	y0,x1
101    dcf	prnd	a0,y0
102    dcf	prnd	x1,m1
103    dcf	prnd	y1,a0
104    dcf	prnd	m0,a1
105