This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FFD2C4F8_my
- sub_FFD2DCB8_my
- sub_FFD2D080_my
1 #include "conf.h"
2
3 int *video_quality = &conf.video_quality;
4 int *video_mode = &conf.video_mode;
5
6 long def_table1[15]={0x20000,0x10000,0xC000,0x5800,0x2000, 0x387A, 0x1C6A, 0x1550, 0x9C5, 0x38D, 0x7813, 0x3C45, 0x2D34, 0x14B8,0x788};
7 long def_table2[15]={0x1CC39,0xE666, 0xACCD,0x4F33,0x1CCD,-0x2F5B,-0x170A,-0x1148,-0x7EB,-0x2E1,-0x59F0,-0x2BC6,-0x20D5,-0xF0C,-0x579};
8
9 long table1[15], table2[15];
10
11 void change_video_tables(int a, int b){
12 int i;
13 for (i=0;i<15;i++) {table1[i]=(def_table1[i]*a)/b; table2[i]=(def_table2[i]*a)/b;}
14 }
15
16 long CompressionRateTable[]={0x60, 0x5D, 0x5A, 0x57, 0x54, 0x51, 0x4D, 0x48, 0x42, 0x3B, 0x32, 0x29, 0x22, 0x1D, 0x17, 0x14, 0x10, 0xE, 0xB, 9, 7, 6, 5, 4, 3, 2, 1};
17
18
19 void __attribute__((naked,noinline)) movie_record_task(){
20 asm volatile(
21 "STMFD SP!, {R4,LR}\n"
22 "SUB SP, SP, #4\n"
23 "MOV R4, SP\n"
24 "B loc_FFD2BDB4\n"
25 "loc_FFD2BD04:\n"
26 "LDR R3, =0x73618\n"
27 "LDR R2, [R3]\n"
28 "CMP R2, #0\n"
29 "BNE loc_FFD2BDA0\n"
30 "SUB R3, R12, #1\n"
31 "CMP R3, #0xA\n"
32 "LDRLS PC, [PC,R3,LSL#2]\n"
33 "B loc_FFD2BDA0\n"
34 ".long loc_FFD2BD50\n"
35 ".long loc_FFD2BD58\n"
36 ".long loc_FFD2BD70\n"
37 ".long loc_FFD2BD78\n"
38 ".long loc_FFD2BD80\n"
39 ".long loc_FFD2BD60\n"
40 ".long loc_FFD2BD88\n"
41 ".long loc_FFD2BD68\n"
42 ".long loc_FFD2BDA0\n"
43 ".long loc_FFD2BD98\n"
44 ".long loc_FFD2BD90\n"
45 "loc_FFD2BD50:\n"
46
47 "BL sub_FFD2BE34\n"
48 "B loc_FFD2BD9C\n"
49 "loc_FFD2BD58:\n"
50
51 "BL unlock_optical_zoom\n"
52 "BL sub_FFD2C068\n"
53 "B loc_FFD2BD9C\n"
54 "loc_FFD2BD60:\n"
55
56 "BL sub_FFD2C4F8_my\n"
57 "B loc_FFD2BD9C\n"
58 "loc_FFD2BD68:\n"
59
60 "BL sub_FFD2C94C\n"
61 "B loc_FFD2BD9C\n"
62 "loc_FFD2BD70:\n"
63
64 "BL sub_FFD2C770\n"
65 "B loc_FFD2BD9C\n"
66 "loc_FFD2BD78:\n"
67
68 "BL sub_FFD2CB58\n"
69 "B loc_FFD2BD9C\n"
70 "loc_FFD2BD80:\n"
71
72 "BL sub_FFD2CD1C\n"
73 "B loc_FFD2BD9C\n"
74 "loc_FFD2BD88:\n"
75
76 "BL sub_FFD2CA0C\n"
77 "B loc_FFD2BD9C\n"
78 "loc_FFD2BD90:\n"
79
80 "BL sub_FFD2CAEC\n"
81 "B loc_FFD2BD9C\n"
82 "loc_FFD2BD98:\n"
83
84 "BL sub_FFD2C7C0\n"
85 "loc_FFD2BD9C:\n"
86
87 "LDR R1, [SP]\n"
88 "loc_FFD2BDA0:\n"
89
90 "LDR R3, =0x73548\n"
91 "MOV R2, #0\n"
92 "STR R2, [R1]\n"
93 "LDR R0, [R3]\n"
94 "BL sub_FFC1048C\n"
95 "loc_FFD2BDB4:\n"
96 "LDR R3, =0x73544\n"
97 "MOV R1, R4\n"
98 "LDR R0, [R3]\n"
99 "MOV R2, #0\n"
100 "BL sub_FFC10074\n"
101 "LDR R0, [SP]\n"
102 "LDR R12, [R0]\n"
103 "CMP R12, #0xC\n"
104 "MOV R1, R0\n"
105 "BNE loc_FFD2BD04\n"
106 "LDR R3, =0x7353C\n"
107 "LDR R0, [R3]\n"
108 "BL sub_FFC10E48\n"
109 "BL sub_FFC11610\n"
110 "ADD SP, SP, #4\n"
111 "LDMFD SP!, {R4,PC}\n"
112 );
113 }
114
115
116
117 void __attribute__((naked,noinline)) sub_FFD2C4F8_my(){
118 asm volatile(
119 "STMFD SP!, {R4-R11,LR}\n"
120 "LDR R5, =0x73634\n"
121 "SUB SP, SP, #0x34\n"
122 "LDR R3, [R5]\n"
123 "CMP R3, #3\n"
124 "MOV R4, R0\n"
125 "MOVEQ R3, #4\n"
126 "STREQ R3, [R5]\n"
127 "LDR R3, =0x736DC\n"
128 "MOV LR, PC\n"
129 "LDR PC, [R3]\n"
130 "LDR R2, [R5]\n"
131 "CMP R2, #4\n"
132 "BNE loc_FFD2C6A4\n"
133 "ADD R0, SP, #0x30\n"
134 "ADD R1, SP, #0x2C\n"
135 "ADD R2, SP, #0x28\n"
136 "ADD R3, SP, #0x24\n"
137 "BL sub_FFD2DCB8_my\n"
138 "CMP R0, #0\n"
139 "BNE loc_FFD2C574\n"
140 "LDR R3, =0x73620\n"
141 "LDR R2, [R3]\n"
142 "CMP R2, #1\n"
143 "BNE loc_FFD2C588\n"
144 "LDR R2, =0x73670\n"
145 "LDR R1, =0x73648\n"
146 "LDR R12, [R2]\n"
147 "LDR R3, [R1]\n"
148 "CMP R12, R3\n"
149 "BCC loc_FFD2C588\n"
150 "loc_FFD2C574:\n"
151 "BL sub_FFD2C6E8\n"
152 "BL sub_FFD2C91C\n"
153 "MOV R3, #5\n"
154 "STR R3, [R5]\n"
155 "B loc_FFD2C6A4\n"
156 "loc_FFD2C588:\n"
157
158 "LDR R12, =0x73678\n"
159 "LDR R11, =0x73684\n"
160 "LDMIB R4, {R0-R2}\n"
161 "LDR R10, [R12]\n"
162 "LDR R7, [R11]\n"
163 "LDR R4, [SP,#0x2C]\n"
164 "LDR R5, [SP,#0x28]\n"
165 "LDR R6, [SP,#0x24]\n"
166 "LDR R8, =0x73624\n"
167 "LDR R3, [SP,#0x30]\n"
168 "ADD R12, SP, #0x20\n"
169 "ADD LR, SP, #0x1C\n"
170 "MOV R9, #1\n"
171 "STMEA SP, {R4-R6,R12}\n"
172 "STR R10, [SP,#0x10]\n"
173 "STR R7, [SP,#0x14]\n"
174 "STR LR, [SP,#0x18]\n"
175 "STR R9, [R8]\n"
176 "BL sub_FFC83AE0\n"
177 "LDR R3, =0x7353C\n"
178 "MOV R1, #0x3E8\n"
179 "LDR R0, [R3]\n"
180 "BL sub_FFC10C60\n"
181 "CMP R0, #9\n"
182 "BNE loc_FFD2C5FC\n"
183 "BL sub_FFD2E478\n"
184 "LDR R3, =0x73634\n"
185 "LDR R0, =0xFFD2C4E0\n"
186 "B loc_FFD2C614\n"
187 "loc_FFD2C5FC:\n"
188 "LDR R5, [SP,#0x1C]\n"
189 "CMP R5, #0\n"
190 "BEQ loc_FFD2C620\n"
191 "BL sub_FFD2E478\n"
192 "LDR R3, =0x73634\n"
193 "LDR R0, =0xFFD2C4EC\n"
194 "loc_FFD2C614:\n"
195 "STR R9, [R3]\n"
196 "BL sub_FFD40D88\n"
197 "B loc_FFD2C6A4\n"
198 "loc_FFD2C620:\n"
199 "BL sub_FFC83C54\n"
200 "LDR R0, [SP,#0x30]\n"
201 "LDR R1, [SP,#0x20]\n"
202 "BL sub_FFD2E19C\n"
203 "LDR R4, =0x73670\n"
204 "LDR R3, [R4]\n"
205 "ADD R3, R3, #1\n"
206 "LDR R0, [SP,#0x20]\n"
207 "MOV R1, R11\n"
208 "STR R3, [R4]\n"
209 "MOV R2, R5\n"
210 "BL sub_FFD2D080_my\n"
211 "LDR R3, =0x7365C\n"
212 "LDR R4, [R4]\n"
213 "LDR R1, [R3]\n"
214 "MOV R0, R4\n"
215 "BL sub_FFEB1BB0\n"
216 "CMP R0, #0\n"
217 "BEQ loc_FFD2C680\n"
218 "LDR R6, =0x73628\n"
219 "LDR R3, [R6]\n"
220 "CMP R3, #1\n"
221 "BNE loc_FFD2C698\n"
222 "B loc_FFD2C684\n"
223 "loc_FFD2C680:\n"
224 "LDR R6, =0x73628\n"
225 "loc_FFD2C684:\n"
226 "MOV R0, R4\n"
227 "LDR R3, =0x736B8\n"
228 "MOV LR, PC\n"
229 "LDR PC, [R3]\n"
230 "STR R5, [R6]\n"
231 "loc_FFD2C698:\n"
232 "LDR R2, =0x73624\n"
233 "MOV R3, #0\n"
234 "STR R3, [R2]\n"
235 "loc_FFD2C6A4:\n"
236
237 "ADD SP, SP, #0x34\n"
238 "LDMFD SP!, {R4-R11,PC}\n"
239 );
240 }
241
242
243 void __attribute__((naked,noinline)) sub_FFD2DCB8_my(){
244 asm volatile(
245 "STMFD SP!, {R4-R11,LR}\n"
246 "LDR R5, =0x73984\n"
247 "SUB SP, SP, #0x14\n"
248 "LDR LR, [R5]\n"
249 "LDR R12, =0x7399C\n"
250 "ADD LR, LR, #1\n"
251 "LDR R4, [R12]\n"
252 "STR LR, [R5]\n"
253 "LDR R12, =0x73A18\n"
254 "STR R0, [SP,#0x10]\n"
255 "STR R1, [SP,#0xC]\n"
256 "STR R2, [SP,#8]\n"
257 "STR R3, [SP,#4]\n"
258 "CMP LR, R4\n"
259 "LDR R11, [R12]\n"
260 "MOVHI R0, #0x80000001\n"
261 "BHI loc_FFD2E150\n"
262 "LDR R3, =0x73A00\n"
263 "MOV R0, LR\n"
264 "LDR R1, [R3]\n"
265 "BL sub_FFEB1BB0\n"
266 "CMP R0, #1\n"
267 "BNE loc_FFD2DED8\n"
268 "LDR R0, =0x73A20\n"
269 "LDR R1, =0x73970\n"
270 "LDR R3, [R0]\n"
271 "LDR R2, [R1]\n"
272 "CMP R3, R2\n"
273 "LDREQ R3, =0x73A1C\n"
274 "LDREQ R5, [R3]\n"
275 "MOVNE R5, R2\n"
276 "LDR R3, =0x73984\n"
277 "LDR R2, =0x73A00\n"
278 "LDR R0, [R3]\n"
279 "LDR R1, [R2]\n"
280 "BL sub_FFEB1520\n"
281 "LDR R3, =0x73978\n"
282 "ADD R0, R0, #1\n"
283 "AND R0, R0, #1\n"
284 "STR R5, [R3,R0,LSL#2]\n"
285 "LDR R3, =0x7396C\n"
286 "LDR R2, [R3]\n"
287 "CMP R5, R2\n"
288 "BHI loc_FFD2DD88\n"
289 "LDR R4, =0x739BC\n"
290 "LDR R3, [R4]\n"
291 "ADD R3, R5, R3\n"
292 "ADD R3, R3, #8\n"
293 "CMP R2, R3\n"
294 "BCS loc_FFD2DD8C\n"
295 "loc_FFD2DD80:\n"
296
297 "MOV R0, #0x80000003\n"
298 "B loc_FFD2E150\n"
299 "loc_FFD2DD88:\n"
300 "LDR R4, =0x739BC\n"
301 "loc_FFD2DD8C:\n"
302 "LDR R3, [R4]\n"
303 "LDR R2, =0x73A20\n"
304 "ADD R1, R5, R3\n"
305 "LDR R3, [R2]\n"
306 "ADD R2, R1, #8\n"
307 "CMP R2, R3\n"
308 "BLS loc_FFD2DDD8\n"
309 "LDR R2, =0x73A1C\n"
310 "LDR R0, =0x7396C\n"
311 "RSB R3, R3, R1\n"
312 "LDR R1, [R2]\n"
313 "ADD R3, R3, #8\n"
314 "LDR R2, [R0]\n"
315 "ADD R1, R1, R3\n"
316 "CMP R2, R1\n"
317 "BCC loc_FFD2DD80\n"
318 "LDR R3, =0x73970\n"
319 "STR R1, [R3]\n"
320 "B loc_FFD2DDE0\n"
321 "loc_FFD2DDD8:\n"
322 "LDR R3, =0x73970\n"
323 "STR R2, [R3]\n"
324 "loc_FFD2DDE0:\n"
325 "LDR R3, [R4]\n"
326 "LDR R12, =0x739D0\n"
327 "ADD R3, R3, #0x18\n"
328 "LDR R2, [R12,#4]\n"
329 "MOV R0, R3\n"
330 "MOV R1, #0\n"
331 "CMP R1, R2\n"
332 "BHI loc_FFD2E024\n"
333 "BNE loc_FFD2DE10\n"
334 "LDR R3, [R12]\n"
335 "CMP R0, R3\n"
336 "BHI loc_FFD2E024\n"
337 "loc_FFD2DE10:\n"
338 "LDR R4, [R4]\n"
339 "LDR LR, =0x739D8\n"
340 "STR R4, [SP]\n"
341 "LDR R12, =0x739D0\n"
342 "LDR R3, =0x73984\n"
343 "LDMIA LR, {R7,R8}\n"
344 "LDMIA R12, {R5,R6}\n"
345 "LDR R10, [R3]\n"
346 "LDR R2, =0x73A00\n"
347 "MOV R3, R4\n"
348 "MOV R4, #0\n"
349 "ADDS R7, R7, R3\n"
350 "ADC R8, R8, R4\n"
351 "LDR R9, [R2]\n"
352 "SUBS R5, R5, R3\n"
353 "SBC R6, R6, R4\n"
354 "MVN R2, #0\n"
355 "MVN R1, #0x17\n"
356 "ADDS R5, R5, R1\n"
357 "MOV R4, #0\n"
358 "MOV R3, #0x18\n"
359 "ADC R6, R6, R2\n"
360 "ADDS R7, R7, R3\n"
361 "ADC R8, R8, R4\n"
362 "STMIA R12, {R5,R6}\n"
363 "SUB R0, R10, #1\n"
364 "MOV R1, R9\n"
365 "STMIA LR, {R7,R8}\n"
366 "BL sub_FFEB1520\n"
367 "CMP R10, #1\n"
368 "MLA R0, R9, R0, R0\n"
369 "BEQ loc_FFD2DED8\n"
370 "SUB R3, R0, #1\n"
371 "MOV R3, R3,LSL#4\n"
372 "ADD R4, R11, #0x10\n"
373 "ADD R5, R11, #0x14\n"
374 "LDR R1, [R5,R3]\n"
375 "LDR R2, [R4,R3]\n"
376 "LDR LR, =0x62773130\n"
377 "ADD R2, R2, R1\n"
378 "MOV R3, R0,LSL#4\n"
379 "ADD R2, R2, #8\n"
380 "MOV R0, #0\n"
381 "ADD R12, R11, #0xC\n"
382 "ADD R1, R11, #8\n"
383 "STR LR, [R1,R3]\n"
384 "STR R0, [R12,R3]\n"
385 "STR R2, [R4,R3]\n"
386 "LDR R0, [SP]\n"
387 "STR R0, [R5,R3]\n"
388 "loc_FFD2DED8:\n"
389
390 "LDR R2, =0x73970\n"
391 "LDR R3, =0x73A20\n"
392 "LDR R1, [R2]\n"
393 "LDR R0, [R3]\n"
394 "ADD R3, R1, #9\n"
395 "CMP R3, R0\n"
396 "BLS loc_FFD2DF14\n"
397 "LDR R2, =0x73A1C\n"
398 "LDR R3, [R2]\n"
399 "ADD R3, R3, R1\n"
400 "RSB R3, R0, R3\n"
401 "LDR R0, [SP,#0x10]\n"
402 "ADD R3, R3, #8\n"
403 "STR R3, [R0]\n"
404 "B loc_FFD2DF20\n"
405 "loc_FFD2DF14:\n"
406 "ADD R3, R1, #8\n"
407 "LDR R1, [SP,#0x10]\n"
408 "STR R3, [R1]\n"
409 "loc_FFD2DF20:\n"
410 "LDR R2, [SP,#0x10]\n"
411 "LDR R1, =0x739CC\n"
412 "LDR R3, =0x73A20\n"
413 "LDR R12, [R2]\n"
414 "LDR R2, [R1]\n"
415 "LDR R0, [R3]\n"
416 "ADD R3, R12, R2\n"
417 "CMP R3, R0\n"
418 "BLS loc_FFD2DF74\n"
419 "LDR R2, [SP,#0xC]\n"
420 "RSB R0, R12, R0\n"
421 "STR R0, [R2]\n"
422 "LDR R2, =0x73A1C\n"
423 "LDR R3, [R1]\n"
424 "LDR R1, [R2]\n"
425 "RSB R3, R0, R3\n"
426 "LDR R0, [SP,#8]\n"
427 "STR R1, [R0]\n"
428 "LDR R1, [SP,#4]\n"
429 "STR R3, [R1]\n"
430 "B loc_FFD2DF90\n"
431 "loc_FFD2DF74:\n"
432 "LDR R0, [SP,#0xC]\n"
433 "STR R2, [R0]\n"
434 "LDR R1, [SP,#4]\n"
435 "MOV R3, #0\n"
436 "STR R3, [R1]\n"
437 "LDR R2, [SP,#8]\n"
438 "STR R3, [R2]\n"
439 "loc_FFD2DF90:\n"
440 "LDR R0, =0x73970\n"
441 "LDR R1, =0x7396C\n"
442 "LDR R3, [R0]\n"
443 "LDR R2, [R1]\n"
444 "CMP R3, R2\n"
445 "BHI loc_FFD2DFBC\n"
446 "LDR R0, [SP,#0xC]\n"
447 "LDR R3, [R0]\n"
448 "ADD R3, R12, R3\n"
449 "CMP R2, R3\n"
450 "BCC loc_FFD2DD80\n"
451 "loc_FFD2DFBC:\n"
452 "LDR R1, [SP,#8]\n"
453 "LDR R2, [R1]\n"
454 "CMP R2, #0\n"
455 "BEQ loc_FFD2DFF0\n"
456 "LDR R3, =0x7396C\n"
457 "LDR R1, [R3]\n"
458 "CMP R2, R1\n"
459 "BHI loc_FFD2DFF0\n"
460 "LDR R0, [SP,#4]\n"
461 "LDR R3, [R0]\n"
462 "ADD R3, R2, R3\n"
463 "CMP R1, R3\n"
464 "BCC loc_FFD2DD80\n"
465 "loc_FFD2DFF0:\n"
466
467 "LDR R3, =0x739CC\n"
468 "LDR R0, =0x739D0\n"
469 "LDR R2, [R3]\n"
470 "LDR R3, [R0,#4]\n"
471 "ADD R2, R2, #0x18\n"
472 "MOV R1, R2\n"
473 "MOV R2, #0\n"
474 "CMP R2, R3\n"
475 "BHI loc_FFD2E024\n"
476 "BNE loc_FFD2E02C\n"
477 "LDR R3, [R0]\n"
478 "CMP R1, R3\n"
479 "BLS loc_FFD2E02C\n"
480 "loc_FFD2E024:\n"
481
482 "MOV R0, #0x80000005\n"
483 "B loc_FFD2E150\n"
484 "loc_FFD2E02C:\n"
485
486 "LDR R1, =0x739B4\n"
487 "LDR R0, =0x73A00\n"
488 "LDR R3, [R1]\n"
489 "LDR R2, [R0]\n"
490 "ADD R3, R3, R2,LSL#4\n"
491 "ADD R3, R3, R3,LSL#2\n"
492 "LDR R12, =0x739D0\n"
493 "MOV R3, R3,LSL#1\n"
494 "ADD R3, R3, #0xA0\n"
495 "LDR R2, [R12,#4]\n"
496 "MOV R0, R3\n"
497 "MOV R1, #0\n"
498 "CMP R1, R2\n"
499 "BHI loc_FFD2E074\n"
500 "BNE loc_FFD2E098\n"
501 "LDR R3, [R12]\n"
502 "CMP R0, R3\n"
503 "BLS loc_FFD2E098\n"
504 "loc_FFD2E074:\n"
505 "LDR R4, =0x739E8\n"
506 "LDR R1, [R4]\n"
507 "CMP R1, #0\n"
508 "BNE loc_FFD2E098\n"
509 "MOV R0, #0x3140\n"
510 "ADD R0, R0, #8\n"
511 "BL sub_FFD44F90\n"
512 "MOV R3, #1\n"
513 "STR R3, [R4]\n"
514 "loc_FFD2E098:\n"
515
516 "LDR R1, =0x739B4\n"
517 "LDR R0, =0x73A00\n"
518 "LDR R2, [R1]\n"
519 "LDR R3, [R0]\n"
520 "LDR R0, =0x739D8\n"
521 "ADD R2, R2, R3,LSL#4\n"
522 "MVN R3, #0x9F\n"
523 "ADD R2, R2, R2,LSL#2\n"
524 "ADD R3, R3, #0x40000000\n"
525 "SUB R3, R3, R2,LSL#1\n"
526 "LDR R1, [R0,#4]\n"
527 "MOV R4, R3\n"
528 "MOV R5, #0\n"
529 "CMP R1, R5\n"
530 "BHI loc_FFD2E0E4\n"
531 "BNE loc_FFD2E108\n"
532 "LDR R3, [R0]\n"
533 "CMP R3, R4\n"
534 "BLS loc_FFD2E108\n"
535 "loc_FFD2E0E4:\n"
536 "LDR R4, =0x739E8\n"
537 "LDR R1, [R4]\n"
538 "CMP R1, #0\n"
539 "BNE loc_FFD2E108\n"
540 "MOV R0, #0x3140\n"
541 "ADD R0, R0, #8\n"
542 "BL sub_FFD44F90\n"
543 "MOV R3, #1\n"
544 "STR R3, [R4]\n"
545 "loc_FFD2E108:\n"
546
547 "LDR R3, =0x739D8\n"
548 "LDR R12, =0x739CC\n"
549 "LDMIA R3, {R1,R2}\n"
550 "LDR R0, [R12]\n"
551 "MOV R4, #0\n"
552 "MOV R3, #0x18\n"
553 "ADDS R1, R1, R0\n"
554 "ADC R2, R2, #0\n"
555 "ADDS R1, R1, R3\n"
556 "ADC R2, R2, R4\n"
557 "CMP R2, #0\n"
558 "BHI loc_FFD2E144\n"
559 "BNE loc_FFD2E14C\n"
560 "CMP R1, #0x40000000\n"
561
562
563 "B loc_FFD2E14C\n"
564
565 "loc_FFD2E144:\n"
566 "MOV R0, #0x80000007\n"
567 "B loc_FFD2E150\n"
568 "loc_FFD2E14C:\n"
569
570 "MOV R0, #0\n"
571 "loc_FFD2E150:\n"
572
573 "ADD SP, SP, #0x14\n"
574 "LDMFD SP!, {R4-R11,PC}\n"
575
576 );
577 }
578
579
580
581
582 void __attribute__((naked,noinline)) sub_FFD2D080_my(){
583 asm volatile(
584 "CMP R2, #1\n"
585 "STMFD SP!, {R4-R7,LR}\n"
586 "MOV R7, R0\n"
587 "MOV R6, R1\n"
588 "MOVEQ R3, #0x79\n"
589 "STREQ R3, [R6]\n"
590 "LDMEQFD SP!, {R4-R7,PC}\n"
591 "LDR R12, =0x736E8\n"
592 "LDR R0, [R12]\n"
593 "LDR R3, =0x736F0\n"
594 "CMP R0, #0\n"
595 "LDR R1, [R3]\n"
596 "BEQ loc_FFD2D0C8\n"
597 "LDR R2, =0x736F4\n"
598 "LDR R3, [R2]\n"
599 "CMP R3, #1\n"
600 "BNE loc_FFD2D0DC\n"
601 "B loc_FFD2D0CC\n"
602 "loc_FFD2D0C8:\n"
603 "LDR R2, =0x736F4\n"
604 "loc_FFD2D0CC:\n"
605 "MOV R3, #0\n"
606 "STR R3, [R2]\n"
607 "STR R7, [R12]\n"
608 "B loc_FFD2D190\n"
609 "loc_FFD2D0DC:\n"
610 "LDR R3, =0x736EC\n"
611 "LDR R2, [R3]\n"
612 "LDR R5, =table1\n"
613 "MOV LR, R2,LSL#2\n"
614 "LDR R3, [R5,LR]\n"
615 "LDR R4, =table2\n"
616 "RSB R12, R3, R0\n"
617 "LDR R2, [R4,LR]\n"
618 "CMP R12, #0\n"
619 "RSB R0, R2, R0\n"
620 "BLE loc_FFD2D13C\n"
621 "ADD R3, R5, #0x14\n"
622 "LDR R2, [R3,LR]\n"
623 "CMP R2, R12\n"
624 "ADDGE R1, R1, #1\n"
625 "BGE loc_FFD2D130\n"
626 "ADD R3, R5, #0x28\n"
627 "LDR R2, [R3,LR]\n"
628 "CMP R2, R12\n"
629 "ADDGE R1, R1, #2\n"
630 "ADDLT R1, R1, #3\n"
631 "loc_FFD2D130:\n"
632
633
634 "CMP R1, #0x1A\n"
635 "MOVGE R1, #0x1A\n"
636
637 "B loc_FFD2D174\n"
638 "loc_FFD2D13C:\n"
639 "CMP R0, #0\n"
640 "BGE loc_FFD2D174\n"
641 "ADD R3, R4, #0x14\n"
642 "LDR R2, [R3,LR]\n"
643 "CMP R2, R0\n"
644 "SUBLE R1, R1, #1\n"
645 "BLE loc_FFD2D16C\n"
646 "ADD R3, R4, #0x28\n"
647 "LDR R2, [R3,LR]\n"
648 "CMP R2, R0\n"
649 "SUBLE R1, R1, #2\n"
650 "SUBGT R1, R1, #3\n"
651 "loc_FFD2D16C:\n"
652 "CMP R1, #0\n"
653 "MOVLT R1, #0\n"
654 "loc_FFD2D174:\n"
655
656 "LDR R0, =0x736F0\n"
657 "LDR R3, [R0]\n"
658 "CMP R1, R3\n"
659 "LDRNE R2, =0x736F4\n"
660 "MOVNE R3, #1\n"
661 "STRNE R1, [R0]\n"
662 "STRNE R3, [R2]\n"
663 "loc_FFD2D190:\n"
664 "LDR R3, =0x736F0\n"
665
666 "LDR R1, =video_mode\n"
667 "LDR R0, [R3]\n"
668 "LDR R2, =CompressionRateTable\n"
669 "LDR R12, [R1]\n"
670 "LDR R12, [R12]\n"
671 "LDR LR, [R2,R0,LSL#2]\n"
672 "LDR R3, =0x736E8\n"
673 "CMP R12, #1\n"
674 "STR R7, [R3]\n"
675 "STR LR, [R6]\n"
676
677
678 "LDREQ R3, =video_quality\n"
679 "LDREQ R3, [R3]\n"
680 "LDREQ R3, [R3]\n"
681
682 "STREQ R3, [R6]\n"
683 "BL mute_on_zoom\n"
684 "LDMFD SP!, {R4-R7,PC}\n"
685
686 );
687 }
688