10c1bc742181ded4930842b46e9507372f0b1b963James Dong/*
278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Copyright (C) 2007-2008 ARM Limited
378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Licensed under the Apache License, Version 2.0 (the "License");
578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * you may not use this file except in compliance with the License.
678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * You may obtain a copy of the License at
778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *      http://www.apache.org/licenses/LICENSE-2.0
978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Unless required by applicable law or agreed to in writing, software
1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * distributed under the License is distributed on an "AS IS" BASIS,
1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * See the License for the specific language governing permissions and
1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * limitations under the License.
1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar */
1778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar/*
180c1bc742181ded4930842b46e9507372f0b1b963James Dong *
190c1bc742181ded4930842b46e9507372f0b1b963James Dong */
200c1bc742181ded4930842b46e9507372f0b1b963James Dong
210c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 24, 1
220c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 25, 1
230c1bc742181ded4930842b46e9507372f0b1b963James Dong
240c1bc742181ded4930842b46e9507372f0b1b963James Dong    .arm
250c1bc742181ded4930842b46e9507372f0b1b963James Dong    .fpu neon
260c1bc742181ded4930842b46e9507372f0b1b963James Dong    .text
270c1bc742181ded4930842b46e9507372f0b1b963James Dong
28e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .extern   armVCM4P10_CAVLCCoeffTokenTables
29e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .extern   armVCM4P10_SuffixToLevel
30e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .extern   armVCM4P10_CAVLCTotalZeros2x2Tables
31e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .extern   armVCM4P10_CAVLCTotalZeroTables
32e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .extern   armVCM4P10_CAVLCRunBeforeTables
33e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .extern   armVCM4P10_ZigZag_2x2
34e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .extern   armVCM4P10_ZigZag_4x4
35e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel
36e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .hidden   armVCM4P10_CAVLCCoeffTokenTables
37e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .hidden   armVCM4P10_SuffixToLevel
38e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .hidden   armVCM4P10_CAVLCTotalZeros2x2Tables
39e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .hidden   armVCM4P10_CAVLCTotalZeroTables
40e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .hidden   armVCM4P10_CAVLCRunBeforeTables
41e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .hidden   armVCM4P10_ZigZag_2x2
42e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel    .hidden   armVCM4P10_ZigZag_4x4
43e17bb5cafdbc6089716d8e8c5afbb00f207a59bbArd Biesheuvel
440c1bc742181ded4930842b46e9507372f0b1b963James Dong    .global armVCM4P10_DecodeCoeffsToPair
450c1bc742181ded4930842b46e9507372f0b1b963James Dong    .func   armVCM4P10_DecodeCoeffsToPair
460c1bc742181ded4930842b46e9507372f0b1b963James DongarmVCM4P10_DecodeCoeffsToPair:
470c1bc742181ded4930842b46e9507372f0b1b963James Dong    PUSH     {r4-r12,lr}
480c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      sp,sp,#0x40
490c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r10,[r0,#0]
500c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r12,[r1,#0]
5122e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDR      r6, .LarmVCM4P10_CAVLCCoeffTokenTables
5222e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP0: ADD      r6, pc
530c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r4,[sp,#0x68]
540c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r9,[r10,#2]
550c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10,#1]
560c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r11,[r10],#3
570c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r12,r12,#8
580c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r6,[r6,r4,LSL #2]
590c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r9,r9,r8,LSL #8
600c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r11,r9,r11,LSL #16
610c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r8,r11,r12
620c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVS     r7,#0x1e
630c1bc742181ded4930842b46e9507372f0b1b963James Dong    AND      r7,r7,r8,LSR #27
640c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#8
650c1bc742181ded4930842b46e9507372f0b1b963James DongL0x44:
660c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L1
670c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
680c1bc742181ded4930842b46e9507372f0b1b963James DongL1:
690c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRH     r7,[r6,r7]
700c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDCC    r12,r12,#8
710c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r12,r12,#4
720c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRCS    r11,r8,r11,LSL #8
730c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSRS     r8,r7,#1
740c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCS      L0x74
750c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r8,r11,r12
760c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#0xa
770c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r7,r7,r8,LSR #29
780c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r7,r7,#1
790c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x44
800c1bc742181ded4930842b46e9507372f0b1b963James DongL0x74:
810c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r12,r12,r7,LSR #13
820c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r7,r8,#0xf000
830c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSRS     r5,r7,#2
840c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRB     r5,[r2,#0]
850c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0x344
860c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r7,#0x44
870c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGE      L0x33c
880c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r0,[sp,#0]
890c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r1,[sp,#4]
900c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r3,[sp,#8]
910c1bc742181ded4930842b46e9507372f0b1b963James Dong    ANDS     r1,r7,#3
920c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r2,sp,#0xc
930c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0xd8
940c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,r1
950c1bc742181ded4930842b46e9507372f0b1b963James DongL0xac:
960c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r7,r11,r12
970c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#7
980c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L2
990c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
1000c1bc742181ded4930842b46e9507372f0b1b963James DongL2:
1010c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDCC    r12,r12,#8
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r7,r7,#31
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRCS    r11,r8,r11,LSL #8
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r0,r0,#1
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r8,#1
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r8,r8,r7,LSL #1
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRH     r8,[r2],#2
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      L0xac
1090c1bc742181ded4930842b46e9507372f0b1b963James DongL0xd8:
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r0,r5,r1
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0x1b8
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r4,#1
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r5,#0xa
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVLE    r4,#0
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r1,#3
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVLT    r1,#4
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVGE    r1,#2
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVGE    r4,#0
1190c1bc742181ded4930842b46e9507372f0b1b963James DongL0xfc:
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r7,r11,r12
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong    CLZ      r7,r7
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r12,r12,r7
1230c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#7
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L3
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r11,r8,r11,LSL #8
1270c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#8
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L3
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
1300c1bc742181ded4930842b46e9507372f0b1b963James DongL3:
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDCC    r12,r12,#8
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRCS    r11,r8,r11,LSL #8
1330c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r7,#0x10
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGE      L0x33c
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVS     lr,r4
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQEQ    r7,#0xe
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVEQ    lr,#4
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQ      r7,#0xf
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVEQ    lr,#0xc
1400c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQEQ    r4,#0
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDEQ    r7,r7,#0xf
1420c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQ      lr,#0
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0x184
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSL      r3,r11,r12
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r12,r12,lr
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#8
1470c1bc742181ded4930842b46e9507372f0b1b963James Dong    RSB      r9,lr,#0x20
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L4
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r11,r8,r11,LSL #8
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#8
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L4
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
1540c1bc742181ded4930842b46e9507372f0b1b963James DongL4:
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDCC    r12,r12,#8
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r3,r3,r9
1570c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRCS    r11,r8,r11,LSL #8
1580c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSL      r7,r7,r4
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r7,r3,r7
1600c1bc742181ded4930842b46e9507372f0b1b963James DongL0x184:
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r7,r7,r1
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r1,#2
1630c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSRS     r8,r7,#1
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong    RSBCS    r8,r8,#0
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRH     r8,[r2],#2
16622e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDR      r9, .LarmVCM4P10_SuffixToLevel
16722e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP1: ADD      r9, pc
1680c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRSB    r8,[r9,r4]
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQ      r4,#0
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVEQ    r4,#1
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r7,r8
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDCS    r4,r4,#1
1730c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r0,r0,#1
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      L0xfc
1750c1bc742181ded4930842b46e9507372f0b1b963James DongL0x1b8:
1760c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r8,[sp,#0x6c]
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r0,r5,#1
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r1,r8,r5
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r4,sp,#0x2c
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      lr,r5
1810c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      lr,lr,#1
1820c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0x2b0
1830c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQ      r8,#4
18422e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDREQ    r6, .LarmVCM4P10_CAVLCTotalZeros2x2Tables
18522e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDRNE    r6, .LarmVCM4P10_CAVLCTotalZeroTables
18622e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP2: ADD      r6, pc
1870c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r6,[r6,r5,LSL #2]
1880c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r8,r11,r12
1890c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVS     r7,#0x1e
1900c1bc742181ded4930842b46e9507372f0b1b963James Dong    AND      r7,r7,r8,LSR #27
1910c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#8
1920c1bc742181ded4930842b46e9507372f0b1b963James DongL0x1f4:
1930c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L5
1940c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
1950c1bc742181ded4930842b46e9507372f0b1b963James DongL5:
1960c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRH     r7,[r6,r7]
1970c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDCC    r12,r12,#8
1980c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r12,r12,#4
1990c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRCS    r11,r8,r11,LSL #8
2000c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSRS     r8,r7,#1
2010c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCS      L0x224
2020c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r8,r11,r12
2030c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#0xa
2040c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r7,r7,r8,LSR #29
2050c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r7,r7,#1
2060c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x1f4
2070c1bc742181ded4930842b46e9507372f0b1b963James DongL0x224:
2080c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r12,r12,r7,LSR #13
2090c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r7,r8,#0xf000
2100c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r7,#0x10
2110c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGE      L0x33c
21222e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDR      r3, .LarmVCM4P10_CAVLCRunBeforeTables
21322e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP3: ADD      r3, pc
2140c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r4,sp,#0x2c
2150c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVS     r1,r7
2160c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      lr,lr,r1
2170c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0x2b0
2180c1bc742181ded4930842b46e9507372f0b1b963James DongL0x248:
2190c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r0,r0,#1
2200c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r6,[r3,r1,LSL #2]
2210c1bc742181ded4930842b46e9507372f0b1b963James Dong    BLT      L0x2bc
2220c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r8,r11,r12
2230c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOVS     r7,#0xe
2240c1bc742181ded4930842b46e9507372f0b1b963James Dong    AND      r7,r7,r8,LSR #28
2250c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#8
2260c1bc742181ded4930842b46e9507372f0b1b963James DongL0x264:
2270c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L6
2280c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r10],#1
2290c1bc742181ded4930842b46e9507372f0b1b963James DongL6:
2300c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRH     r7,[r6,r7]
2310c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDCC    r12,r12,#8
2320c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r12,r12,#3
2330c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRCS    r11,r8,r11,LSL #8
2340c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSRS     r8,r7,#1
2350c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCS      L0x294
2360c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSLS     r8,r11,r12
2370c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r12,r12,#9
2380c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r7,r7,r8,LSR #29
2390c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r7,r7,#1
2400c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x264
2410c1bc742181ded4930842b46e9507372f0b1b963James DongL0x294:
2420c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r12,r12,r7,LSR #13
2430c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r7,r8,#0xf000
2440c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r7,#0xf
2450c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGE      L0x33c
2460c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r1,r1,r7
2470c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRB     r7,[r4],#1
2480c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      L0x248
2490c1bc742181ded4930842b46e9507372f0b1b963James DongL0x2b0:
2500c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r0,r0,#1
2510c1bc742181ded4930842b46e9507372f0b1b963James Dong    BLT      L7
2520c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRB     r1,[r4],#1
2530c1bc742181ded4930842b46e9507372f0b1b963James DongL7:
2540c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      L0x2b0
2550c1bc742181ded4930842b46e9507372f0b1b963James DongL0x2bc:
2560c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRB     r1,[r4],#1
2570c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r8,[sp,#0x6c]
2580c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQ      r8,#0xf
2590c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADDEQ    lr,lr,#1
2600c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r4,r4,r5
2610c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r2,r2,r5
2620c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r2,r2,r5
2630c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r3,[sp,#8]
2640c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r0,[r3,#0]
2650c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQ      r8,#4
26622e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDREQ    r6, .LarmVCM4P10_ZigZag_2x2
26722e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDRNE    r6, .LarmVCM4P10_ZigZag_4x4
26822e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP4: ADD      r6, pc
2690c1bc742181ded4930842b46e9507372f0b1b963James DongL0x2ec:
2700c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r9,[r4],#1
2710c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r8,[r6,lr]
2720c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      lr,lr,#1
2730c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      lr,lr,r9
2740c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRSH    r9,[r2],#2
2750c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r5,r5,#1
2760c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORREQ    r8,r8,#0x20
2770c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r1,r9,#0x80
2780c1bc742181ded4930842b46e9507372f0b1b963James Dong    CMP      r1,#0x100
2790c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRCS    r8,r8,#0x10
2800c1bc742181ded4930842b46e9507372f0b1b963James Dong    TEQ      r5,#0
2810c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRB     r8,[r0],#1
2820c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRB     r9,[r0],#1
2830c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r9,r9,#8
2840c1bc742181ded4930842b46e9507372f0b1b963James Dong    BCC      L8
2850c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRB     r9,[r0],#1
2860c1bc742181ded4930842b46e9507372f0b1b963James DongL8:
2870c1bc742181ded4930842b46e9507372f0b1b963James Dong    BNE      L0x2ec
2880c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r0,[r3,#0]
2890c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r0,[sp,#0]
2900c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r1,[sp,#4]
2910c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x344
2920c1bc742181ded4930842b46e9507372f0b1b963James DongL0x33c:
2930c1bc742181ded4930842b46e9507372f0b1b963James Dong    MVN      r0,#1
2940c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x35c
2950c1bc742181ded4930842b46e9507372f0b1b963James DongL0x344:
2960c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r10,r10,r12,LSR #3
2970c1bc742181ded4930842b46e9507372f0b1b963James Dong    AND      r12,r12,#7
2980c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r10,r10,#4
2990c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r12,[r1,#0]
3000c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r10,[r0,#0]
3010c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,#0
3020c1bc742181ded4930842b46e9507372f0b1b963James DongL0x35c:
3030c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      sp,sp,#0x40
3040c1bc742181ded4930842b46e9507372f0b1b963James Dong    POP      {r4-r12,pc}
3050c1bc742181ded4930842b46e9507372f0b1b963James Dong    .endfunc
3060c1bc742181ded4930842b46e9507372f0b1b963James Dong
30722e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_CAVLCCoeffTokenTables:
30822e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word   armVCM4P10_CAVLCCoeffTokenTables-(P0+8)
30922e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_SuffixToLevel:
31022e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word   armVCM4P10_SuffixToLevel-(P1+8)
31122e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_CAVLCTotalZeros2x2Tables:
31222e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word   (armVCM4P10_CAVLCTotalZeros2x2Tables - 4)-(P2+8)
31322e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_CAVLCTotalZeroTables:
31422e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word   (armVCM4P10_CAVLCTotalZeroTables - 4)-(P2+8)
31522e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_CAVLCRunBeforeTables:
31622e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word   (armVCM4P10_CAVLCRunBeforeTables - 4)-(P3+8)
31722e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_ZigZag_2x2:
31822e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word   armVCM4P10_ZigZag_2x2-(P4+8)
31922e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_ZigZag_4x4:
32022e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word   armVCM4P10_ZigZag_4x4-(P4+8)
3210c1bc742181ded4930842b46e9507372f0b1b963James Dong
32222e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .end
323