root/platform/s90/sub/101c/capt_seq.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF879BA8_my
  3. sub_FF966AC0_my
  4. exp_drv_task
  5. sub_FF8BE6E8_my
  6. sub_FF8B07EC_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 
   5 static long *nrflag = (long*)0x7FD0; /* S90 above "aShuttersoundta" usage @FF966918 @101a */
   6 
   7 #include "../../../generic/capt_seq.c"
   8 
   9 void __attribute__((naked,noinline)) capt_seq_task() {
  10 
  11 
  12         asm volatile (
  13         "STMFD   SP!, {R3-R9,LR}\n"
  14         "LDR     R6, =0x2C58\n"
  15         "LDR     R4, =0x39F60\n"
  16         "MOV     R9, #1\n"
  17         "MOV     R7, #0\n"
  18 "loc_FF87A26C:\n"
  19         "LDR     R0, [R6,#4]\n"
  20         "MOV     R2, #0\n"
  21         "MOV     R1, SP\n"
  22         "BL      sub_FF8382FC    \n"
  23         "TST     R0, #1\n"
  24         "BEQ     loc_FF87A298\n"
  25         "LDR     R1, =0x5B3\n"
  26         "LDR     R0, =0xFF879A7C\n"
  27         "BL      sub_FF81E88C\n"
  28         "BL      sub_FF81E844    \n"
  29         "LDMFD   SP!, {R3-R9,PC}\n"
  30 "loc_FF87A298:\n"
  31         "LDR     R0, [SP]\n"
  32         "LDR     R1, [R0]\n"
  33         "CMP     R1, #0x21\n"
  34         "ADDLS   PC, PC, R1,LSL#2\n"
  35         "B       loc_FF87A55C\n"
  36 "loc_FF87A2AC:\n"
  37         "B       loc_FF87A334\n"
  38 "loc_FF87A2B0:\n"
  39         "B       loc_FF87A3A0\n"
  40 "loc_FF87A2B4:\n"
  41         "B       loc_FF87A3DC\n"
  42 "loc_FF87A2B8:\n"
  43         "B       loc_FF87A3F0\n"
  44 "loc_FF87A2BC:\n"
  45         "B       loc_FF87A3E8\n"
  46 "loc_FF87A2C0:\n"
  47         "B       loc_FF87A3F8\n"
  48 "loc_FF87A2C4:\n"
  49         "B       loc_FF87A400\n"
  50 "loc_FF87A2C8:\n"
  51         "B       loc_FF87A408\n"
  52 "loc_FF87A2CC:\n"
  53         "B       loc_FF87A460\n"
  54 "loc_FF87A2D0:\n"
  55         "B       loc_FF87A488\n"
  56 "loc_FF87A2D4:\n"
  57         "B       loc_FF87A46C\n"
  58 "loc_FF87A2D8:\n"
  59         "B       loc_FF87A478\n"
  60 "loc_FF87A2DC:\n"
  61         "B       loc_FF87A480\n"
  62 "loc_FF87A2E0:\n"
  63         "B       loc_FF87A490\n"
  64 "loc_FF87A2E4:\n"
  65         "B       loc_FF87A498\n"
  66 "loc_FF87A2E8:\n"
  67         "B       loc_FF87A4A0\n"
  68 "loc_FF87A2EC:\n"
  69         "B       loc_FF87A4A8\n"
  70 "loc_FF87A2F0:\n"
  71         "B       loc_FF87A4B0\n"
  72 "loc_FF87A2F4:\n"
  73         "B       loc_FF87A4B8\n"
  74 "loc_FF87A2F8:\n"
  75         "B       loc_FF87A4C0\n"
  76 "loc_FF87A2FC:\n"
  77         "B       loc_FF87A4C8\n"
  78 "loc_FF87A300:\n"
  79         "B       loc_FF87A4D0\n"
  80 "loc_FF87A304:\n"
  81         "B       loc_FF87A4D8\n"
  82 "loc_FF87A308:\n"
  83         "B       loc_FF87A4E4\n"
  84 "loc_FF87A30C:\n"
  85         "B       loc_FF87A4EC\n"
  86 "loc_FF87A310:\n"
  87         "B       loc_FF87A4F8\n"
  88 "loc_FF87A314:\n"
  89         "B       loc_FF87A500\n"
  90 "loc_FF87A318:\n"
  91         "B       loc_FF87A508\n"
  92 "loc_FF87A31C:\n"
  93         "B       loc_FF87A510\n"
  94 "loc_FF87A320:\n"
  95         "B       loc_FF87A518\n"
  96 "loc_FF87A324:\n"
  97         "B       loc_FF87A520\n"
  98 "loc_FF87A328:\n"
  99         "B       loc_FF87A528\n"
 100 "loc_FF87A32C:\n"
 101         "B       loc_FF87A534\n"
 102 "loc_FF87A330:\n"
 103         "B       loc_FF87A568\n"
 104 "loc_FF87A334:\n"
 105         "BL      sub_FF87AB70\n"
 106                 "BL      shooting_expo_param_override\n"  // +          
 107         "BL      sub_FF877BC0\n"
 108 // copied over from SX10 don't know if we need it yet
 109 //  this code added to avoid some incorrect behavior if overrides are used.
 110 //  but it can cause some unexpected side effects. In this case, remove this code!
 111                  "MOV     R0, #0\n"
 112                  "STR     R0, [R4,#0x24]\n"  // fixes overrides  behavior at short shutter press
 113  //  end of my code
 114                 
 115         "LDR     R0, [R4,#0x24]\n"
 116         "CMP     R0, #0\n"
 117         "BEQ     loc_FF87A568\n"
 118         "BL      sub_FF879750\n"
 119         "MOV     R5, R0\n"
 120         "LDR     R0, [R4,#0x24]\n"
 121         "CMP     R0, #0\n"
 122         "BEQ     loc_FF87A37C\n"
 123         "MOV     R0, #0xC\n"
 124         "BL      sub_FF87F9A8\n"
 125         "TST     R0, #1\n"
 126         "STRNE   R9, [R6,#0x10]\n"
 127         "LDRNE   R0, [R5,#8]\n"
 128         "ORRNE   R0, R0, #0x40000000\n"
 129         "STRNE   R0, [R5,#8]\n"
 130         "BNE     loc_FF87A568\n"
 131 "loc_FF87A37C:\n"
 132         "MOV     R0, R5\n"
 133         "BL      sub_FF966224\n"
 134         "MOV     R0, R5\n"
 135         "BL      sub_FF879B30\n"
 136         "MOV     R0, R5\n"
 137         //"BL      sub_FF966AC0    \n"
 138                 "BL      sub_FF966AC0_my\n" // -------------->
 139                 "BL      capt_seq_hook_raw_here\n"      // +            
 140         "TST     R0, #1\n"
 141         "STRNE   R9, [R6,#0x10]\n"
 142         "B       loc_FF87A568\n"
 143 "loc_FF87A3A0:\n"
 144         "LDR     R0, [R4,#0x24]\n"
 145         "CMP     R0, #0\n"
 146         "BNE     loc_FF87A3CC\n"
 147         "MOV     R0, #0xC\n"
 148         "BL      sub_FF87F9A8\n"
 149         "TST     R0, #1\n"
 150         "LDRNE   R0, [SP]\n"
 151         "MOVNE   R1, #1\n"
 152         "LDRNE   R2, [R0,#0xC]\n"
 153         "MOVNE   R0, #1\n"
 154         "BNE     loc_FF87A458\n"
 155 "loc_FF87A3CC:\n"
 156         "LDR     R0, [SP]\n"
 157         //"BL      sub_FF879BA8\n" //- capt_seq_hook ist called in this subroutine
 158                 "BL      sub_FF879BA8_my\n" //---------->
 159 "loc_FF87A3D4:\n"
 160         "STR     R7, [R4,#0x24]\n"
 161         "B       loc_FF87A568\n"
 162 "loc_FF87A3DC:\n"
 163         "MOV     R0, #1\n"
 164         "BL      sub_FF87ADC4    \n"
 165         "B       loc_FF87A568\n"
 166 "loc_FF87A3E8:\n"
 167         "BL      sub_FF87A820\n"
 168         "B       loc_FF87A3D4\n"
 169 "loc_FF87A3F0:\n"
 170         "BL      sub_FF87AB50\n"
 171         "B       loc_FF87A3D4\n"
 172 "loc_FF87A3F8:\n"
 173         "BL      sub_FF87AB58\n"
 174         "B       loc_FF87A568\n"
 175 "loc_FF87A400:\n"
 176         "BL      sub_FF87ACE4\n"
 177         "B       loc_FF87A464\n"
 178 "loc_FF87A408:\n"
 179         "LDR     R5, [R0,#0xC]\n"
 180         "BL      sub_FF87AB60\n"
 181         "MOV     R0, R5\n"
 182         "BL      sub_FF9656B0    \n"
 183         "TST     R0, #1\n"
 184         "MOV     R8, R0\n"
 185         "BNE     loc_FF87A448\n"
 186         "BL      sub_FF88CC70    \n"
 187         "STR     R0, [R5,#0x18]\n"
 188         "MOV     R0, R5\n"
 189         "BL      sub_FF9669D8    \n"
 190         "MOV     R0, R5\n"
 191         "BL      sub_FF966DD8    \n"
 192         "MOV     R8, R0\n"
 193         "LDR     R0, [R5,#0x18]\n"
 194         "BL      sub_FF88CE84    \n"
 195 "loc_FF87A448:\n"
 196         "BL      sub_FF87AB50\n"
 197         "MOV     R2, R5\n"
 198         "MOV     R1, #9\n"
 199         "MOV     R0, R8\n"
 200 "loc_FF87A458:\n"
 201         "BL      sub_FF878128    \n"
 202         "B       loc_FF87A568\n"
 203 "loc_FF87A460:\n"
 204         "BL      sub_FF87AD44\n"
 205 "loc_FF87A464:\n"
 206         "BL      sub_FF877BC0\n"
 207         "B       loc_FF87A568\n"
 208 "loc_FF87A46C:\n"
 209         "LDR     R0, [R4,#0x54]\n"
 210         "BL      sub_FF87B624    \n"
 211         "B       loc_FF87A568\n"
 212 "loc_FF87A478:\n"
 213         "BL      sub_FF87B8D8\n"
 214         "B       loc_FF87A568\n"
 215 "loc_FF87A480:\n"
 216         "BL      sub_FF87B96C\n"
 217         "B       loc_FF87A568\n"
 218 "loc_FF87A488:\n"
 219         "BL      sub_FF87AB50\n"
 220         "B       loc_FF87A568\n"
 221 "loc_FF87A490:\n"
 222         "BL      sub_FF9658CC\n"
 223         "B       loc_FF87A568\n"
 224 "loc_FF87A498:\n"
 225         "BL      sub_FF965AE0\n"
 226         "B       loc_FF87A568\n"
 227 "loc_FF87A4A0:\n"
 228         "BL      sub_FF965B68\n"
 229         "B       loc_FF87A568\n"
 230 "loc_FF87A4A8:\n"
 231         "BL      sub_FF965C58\n"
 232         "B       loc_FF87A568\n"
 233 "loc_FF87A4B0:\n"
 234         "BL      sub_FF965D4C\n"
 235         "B       loc_FF87A568\n"
 236 "loc_FF87A4B8:\n"
 237         "MOV     R0, #0\n"
 238         "B       loc_FF87A4DC\n"
 239 "loc_FF87A4C0:\n"
 240         "BL      sub_FF965F68\n"
 241         "B       loc_FF87A568\n"
 242 "loc_FF87A4C8:\n"
 243         "BL      sub_FF965FF8\n"
 244         "B       loc_FF87A568\n"
 245 "loc_FF87A4D0:\n"
 246         "BL      sub_FF9660B8\n"
 247         "B       loc_FF87A568\n"
 248 "loc_FF87A4D8:\n"
 249         "MOV     R0, #1\n"
 250 "loc_FF87A4DC:\n"
 251         "BL      sub_FF965E18\n"
 252         "B       loc_FF87A568\n"
 253 "loc_FF87A4E4:\n"
 254         "BL      sub_FF87AFAC\n"
 255         "B       loc_FF87A568\n"
 256 "loc_FF87A4EC:\n"
 257         "BL      sub_FF87B04C\n"
 258         "BL      sub_FF87A690    \n"
 259         "B       loc_FF87A568\n"
 260 "loc_FF87A4F8:\n"
 261         "BL      sub_FF87B3C0\n"
 262         "B       loc_FF87A568\n"
 263 "loc_FF87A500:\n"
 264         "BL      sub_FF87B4DC\n"
 265         "B       loc_FF87A568\n"
 266 "loc_FF87A508:\n"
 267         "BL      sub_FF879A08\n"
 268         "B       loc_FF87A568\n"
 269 "loc_FF87A510:\n"
 270         "BL      sub_FF835FDC\n"
 271         "B       loc_FF87A568\n"
 272 "loc_FF87A518:\n"
 273         "BL      sub_FF87DD2C\n"
 274         "B       loc_FF87A568\n"
 275 "loc_FF87A520:\n"
 276         "BL      sub_FF87DD94\n"
 277         "B       loc_FF87A568\n"
 278 "loc_FF87A528:\n"
 279         "BL      sub_FF87DDF0\n"
 280         "BL      sub_FF87DDB0\n"
 281         "B       loc_FF87A568\n"
 282 "loc_FF87A534:\n"
 283         "MOV     R0, #1\n"
 284         "BL      sub_FF967640\n"
 285         "MOV     R0, #1\n"
 286         "BL      sub_FF967750\n"
 287         "LDRH    R0, [R4,#0xA0]\n"
 288         "CMP     R0, #4\n"
 289         "BNE     loc_FF87A568\n"
 290         "BL      sub_FF87DD94\n"
 291         "BL      sub_FF87E1DC\n"
 292         "B       loc_FF87A568\n"
 293 "loc_FF87A55C:\n"
 294         "LDR     R1, =0x708\n"
 295         "LDR     R0, =0xFF879A7C\n"
 296         "BL      sub_FF81E88C\n"
 297 "loc_FF87A568:\n"
 298         "LDR     R0, [SP]\n"
 299         "LDR     R1, [R0,#4]\n"
 300         "LDR     R0, [R6]\n"
 301         "BL      sub_FF88495C\n"
 302         "LDR     R5, [SP]\n"
 303         "LDR     R0, [R5,#8]\n"
 304         "CMP     R0, #0\n"
 305         "LDREQ   R1, =0x131\n"
 306         "LDREQ   R0, =0xFF879A7C\n"
 307         "BLEQ    sub_FF81E88C\n"
 308         "STR     R7, [R5,#8]\n"
 309         "B       loc_FF87A26C\n"
 310  );
 311 }
 312 
 313 
 314 void __attribute__((naked,noinline)) sub_FF879BA8_my() { //2
 315  asm volatile (
 316         "STMFD   SP!, {R3-R9,LR}\n"
 317         "LDR     R4, [R0,#0xC]\n"
 318         "LDR     R5, =0x39F60\n"
 319         "LDR     R0, [R4,#8]\n"
 320         "LDR     R6, =0x420A\n"
 321         "ORR     R0, R0, #1\n"
 322         "STR     R0, [R4,#8]\n"
 323         "LDRH    R0, [R5]\n"
 324         "LDR     R8, =0x2C58\n"
 325         "MOV     R7, #0\n"
 326         "CMP     R0, R6\n"
 327         "BEQ     loc_FF879C4C\n"
 328         "LDRH    R0, [R5,#0x9E]\n"
 329         "CMP     R0, #3\n"
 330         "BEQ     loc_FF879CAC\n"
 331         "LDR     R0, [R4,#0xC]\n"
 332         "CMP     R0, #1\n"
 333         "BLS     loc_FF879C58\n"
 334         "LDRH    R0, [R5,#0x9C]\n"
 335         "CMP     R0, #0\n"
 336         "BNE     loc_FF879CAC\n"
 337         "LDRH    R0, [R5,#0x98]\n"
 338         "CMP     R0, #2\n"
 339         "BNE     loc_FF879C64\n"
 340         "BL      sub_FF87B0FC\n"
 341         "LDRH    R0, [R5]\n"
 342         "CMP     R0, R6\n"
 343         "BEQ     loc_FF879C4C\n"
 344         "LDRH    R0, [R5,#0x9E]\n"
 345         "CMP     R0, #3\n"
 346         "BEQ     loc_FF879CAC\n"
 347         "LDR     R0, [R4,#0xC]\n"
 348         "CMP     R0, #1\n"
 349         "BLS     loc_FF879C58\n"
 350         "LDRH    R0, [R5,#0x9C]\n"
 351         "CMP     R0, #0\n"
 352         "BNE     loc_FF879CAC\n"
 353         "LDRH    R0, [R5,#0x98]\n"
 354         "CMP     R0, #2\n"
 355         "BEQ     loc_FF879C90\n"
 356         "B       loc_FF879C64\n"
 357 "loc_FF879C4C:\n"
 358         "LDRH    R0, [R5,#0x9E]\n"
 359         "CMP     R0, #3\n"
 360         "BEQ     loc_FF879CAC\n"
 361 "loc_FF879C58:\n"
 362         "LDRH    R0, [R5,#0x9C]\n"
 363         "CMP     R0, #0\n"
 364         "BNE     loc_FF879CAC\n"
 365 "loc_FF879C64:\n"
 366         "LDRH    R0, [R5,#0x98]\n"
 367         "CMP     R0, #1\n"
 368         "BNE     loc_FF879CAC\n"
 369         "LDRH    R0, [R5]\n"
 370         "CMP     R0, R6\n"
 371         "LDRNE   R0, [R4,#0xC]\n"
 372         "CMPNE   R0, #1\n"
 373         "BLS     loc_FF879CAC\n"
 374         "LDR     R0, [R4,#0x10]\n"
 375         "CMP     R0, #1\n"
 376         "BNE     loc_FF879CAC\n"
 377 "loc_FF879C90:\n"
 378         "MOV     R3, #0x268\n"
 379         "STR     R3, [SP]\n"
 380         "LDR     R0, [R8]\n"
 381         "LDR     R2, =0xEA60\n"
 382         "LDR     R3, =0xFF879A7C\n"
 383         "MOV     R1, #0x40000000\n"
 384         "BL      sub_FF87FD08\n"
 385 "loc_FF879CAC:\n"
 386         "BL      sub_FF879A08\n"
 387         "LDR     R0, [R5,#0x24]\n"
 388         "CMP     R0, #0\n"
 389         "MOVEQ   R0, #2\n"
 390         "BLEQ    sub_FF87632C\n"
 391         "BL      sub_FF87AB60\n"
 392         "LDR     R0, [R5,#0x24]\n"
 393         "CMP     R0, #0\n"
 394         "BNE     loc_FF879D64\n"
 395         "MOV     R0, #0\n"
 396         "BL      sub_FF967640\n"
 397         "MOV     R0, #0\n"
 398         "BL      sub_FF967750\n"
 399         "MOV     R0, R4\n"
 400         "BL      sub_FF966224\n"
 401         "MOV     R0, R4\n"
 402         "BL      sub_FF87AF28\n"
 403         "MOV     R0, R4\n"
 404         "BL      sub_FF9652A0\n"
 405         "CMP     R0, #0\n"
 406         "BEQ     loc_FF879D2C\n"
 407         "BL      sub_FF967680\n"
 408         "BL      sub_FF967794\n"
 409         "BL      sub_FF9677E4\n"
 410         "MOV     R0, R4\n"
 411         "BL      sub_FF9653E4    \n"
 412         "TST     R0, #1\n"
 413         "MOVNE   R2, R4\n"
 414         "LDMNEFD SP!, {R3-R9,LR}\n"
 415         "MOVNE   R1, #1\n"
 416         "BNE     sub_FF878128    \n"
 417         "B       loc_FF879D40\n"
 418 "loc_FF879D2C:\n"
 419         "MOV     R0, R4\n"
 420         "BL      sub_FF965350\n"
 421         "BL      sub_FF967680\n"
 422         "BL      sub_FF967794\n"
 423         "BL      sub_FF9677E4\n"
 424 "loc_FF879D40:\n"
 425         "MOV     R0, R4\n"
 426         "BL      sub_FF879B30\n"
 427         "MOV     R0, R4\n"
 428         "BL      sub_FF9669D8    \n"
 429         "BL      sub_FF967458    \n"
 430         "MOV     R0, R4\n"
 431         //"BL      sub_FF966AC0    \n"
 432                 "BL      sub_FF966AC0_my\n" // ------------------>
 433         "MOV     R7, R0\n"
 434                 "BL      capt_seq_hook_raw_here\n"      // +
 435         "B       loc_FF879D70\n"
 436 "loc_FF879D64:\n"
 437         "LDR     R0, [R8,#0x10]\n"
 438         "CMP     R0, #0\n"
 439         "MOVNE   R7, #0x1D\n"
 440 "loc_FF879D70:\n"
 441         "BL      sub_FF87DD94\n"
 442         "BL      sub_FF87DDDC\n"
 443         "BL      sub_FF87DE1C\n"
 444         "MOV     R2, R4\n"
 445         "MOV     R1, #1\n"
 446         "MOV     R0, R7\n"
 447         "BL      sub_FF878128    \n"
 448         "BL      sub_FF966D7C\n"
 449         "CMP     R0, #0\n"
 450         "LDRNE   R0, [R4,#8]\n"
 451         "ORRNE   R0, R0, #0x2000\n"
 452         "STRNE   R0, [R4,#8]\n"
 453         "LDRH    R0, [R5,#0x9E]\n"
 454         "CMP     R0, #3\n"
 455         "BEQ     locret_FF879DC8\n"
 456         "LDRH    R0, [R5,#0x9C]\n"
 457         "CMP     R0, #0\n"
 458         "LDREQH  R0, [R5,#0x98]\n"
 459         "CMPEQ   R0, #2\n"
 460         "MOVEQ   R0, R4\n"
 461         "LDMEQFD SP!, {R3-R9,LR}\n"
 462         "BEQ     sub_FF87B150\n"
 463 "locret_FF879DC8:\n"
 464         "LDMFD   SP!, {R3-R9,PC}\n"
 465  );
 466 }
 467 
 468 void __attribute__((naked,noinline)) sub_FF966AC0_my() { 
 469  asm volatile (
 470         "STMFD   SP!, {R0-R8,LR}\n"
 471         "MOV     R4, R0\n"
 472         "BL      sub_FF96793C    \n"
 473         "MVN     R1, #0\n"
 474         "BL      sub_FF884990\n"
 475         "LDR     R5, =0x7FD0\n"
 476         "LDR     R0, [R5,#0xC]\n"
 477         "CMP     R0, #0\n"
 478         "BNE     loc_FF966B10\n"
 479         "MOV     R1, #1\n"
 480         "MOV     R0, #0\n"
 481         "BL      sub_FF838B44    \n"
 482         "STR     R0, [R5,#0xC]\n"
 483         "MOV     R3, #0\n"
 484         "STR     R3, [SP]\n"
 485         "LDR     R3, =0xFF96644C \n"
 486         "LDR     R0, =0xFF966D40\n"
 487         "MOV     R2, #0x400\n"
 488         "MOV     R1, #0x17\n"
 489         "BL      sub_FF838B10    \n"
 490 "loc_FF966B10:\n"
 491         "MOV     R2, #4\n"
 492         "ADD     R1, SP, #8\n"
 493         "MOV     R0, #0x8A\n"
 494         "BL      sub_FF88CAE0    \n"
 495         "TST     R0, #1\n"
 496         "LDRNE   R1, =0x3C5\n"
 497         "LDRNE   R0, =0xFF9666E4\n"
 498         "BLNE    sub_FF81E88C\n"
 499         "LDR     R6, =0x3A02C\n"
 500         "LDR     R8, =0x39F60\n"
 501         "LDR     R3, [R6]\n"
 502         "LDRSH   R2, [R6,#0xC]\n"
 503         "LDRSH   R1, [R6,#0xE]\n"
 504         "LDR     R0, [R8,#0x94]\n"
 505         "BL      sub_FF92E194\n"
 506         "BL      sub_FF86157C    \n"
 507         "LDR     R3, =0x7FD8\n"
 508         "STRH    R0, [R4,#0xA4]\n"
 509         "SUB     R2, R3, #4\n"
 510         "STRD    R2, [SP]\n"
 511         "MOV     R1, R0\n"
 512         "LDRH    R0, [R8,#0x5C]\n"
 513         "LDRSH   R2, [R6,#0xC]\n"
 514         "SUB     R3, R3, #8\n"
 515         "BL      sub_FF96965C\n"
 516         "BL      wait_until_remote_button_is_released\n"  // +
 517         "BL      capt_seq_hook_set_nr\n"                  // +   
 518         "B       sub_FF966B74\n" // +  Jump back to original FW code
 519  );
 520 }
 521 
 522 void __attribute__((naked,noinline)) exp_drv_task(){
 523  asm volatile(
 524         "STMFD   SP!, {R4-R8,LR}\n"
 525         "SUB     SP, SP, #0x20\n"
 526         "LDR     R8, =0xBB8\n"
 527         "LDR     R7, =0x4440\n"
 528         "LDR     R5, =0x4372C\n"
 529         "MOV     R0, #0\n"
 530         "ADD     R6, SP, #0x10\n"
 531         "STR     R0, [SP,#0xC]\n"
 532 "loc_FF8C0EF0:\n"
 533         "LDR     R0, [R7,#0x20]\n"
 534         "MOV     R2, #0\n"
 535         "ADD     R1, SP, #0x1C\n"
 536         "BL      sub_FF8382FC    \n"
 537         "LDR     R0, [SP,#0xC]\n"
 538         "CMP     R0, #1\n"
 539         "BNE     loc_FF8C0F3C\n"
 540         "LDR     R0, [SP,#0x1C]\n"
 541         "LDR     R0, [R0]\n"
 542         "CMP     R0, #0x13\n"
 543         "CMPNE   R0, #0x14\n"
 544         "CMPNE   R0, #0x15\n"
 545         "CMPNE   R0, #0x16\n"
 546         "BEQ     loc_FF8C10A0\n"
 547         "CMP     R0, #0x28\n"
 548         "BEQ     loc_FF8C1028\n"
 549         "ADD     R1, SP, #0xC\n"
 550         "MOV     R0, #0\n"
 551         "BL      sub_FF8C0E80    \n"
 552 "loc_FF8C0F3C:\n"
 553         "LDR     R0, [SP,#0x1C]\n"
 554         "LDR     R1, [R0]\n"
 555         "CMP     R1, #0x2E\n"
 556         "BNE     loc_FF8C0F6C\n"
 557         "LDR     R0, [SP,#0x1C]\n"
 558         "BL      sub_FF8C21D8    \n"
 559         "LDR     R0, [R7,#0x1C]\n"
 560         "MOV     R1, #1\n"
 561         "BL      sub_FF88495C\n"
 562         "BL      sub_FF81E844    \n"
 563         "ADD     SP, SP, #0x20\n"
 564         "LDMFD   SP!, {R4-R8,PC}\n"
 565 "loc_FF8C0F6C:\n"
 566         "CMP     R1, #0x2D\n"
 567         "BNE     loc_FF8C0F88\n"
 568         "LDR     R2, [R0,#0x8C]!\n"
 569         "LDR     R1, [R0,#4]\n"
 570         "MOV     R0, R1\n"
 571         "BLX     R2\n"
 572         "B       loc_FF8C14C8\n"
 573 "loc_FF8C0F88:\n"
 574         "CMP     R1, #0x26\n"
 575         "BNE     loc_FF8C0FD8\n"
 576         "LDR     R0, [R7,#0x1C]\n"
 577         "MOV     R1, #0x80\n"
 578         "BL      sub_FF884990\n"
 579         "LDR     R0, =0xFF8BD618\n"
 580         "MOV     R1, #0x80\n"
 581         "BL      sub_FF95970C    \n"
 582         "LDR     R0, [R7,#0x1C]\n"
 583         "MOV     R2, R8\n"
 584         "MOV     R1, #0x80\n"
 585         "BL      sub_FF88489C    \n"
 586         "TST     R0, #1\n"
 587         "LDRNE   R1, =0xE5F\n"
 588         "BNE     loc_FF8C1094\n"
 589 "loc_FF8C0FC4:\n"
 590         "LDR     R1, [SP,#0x1C]\n"
 591         "LDR     R0, [R1,#0x90]\n"
 592         "LDR     R1, [R1,#0x8C]\n"
 593         "BLX     R1\n"
 594         "B       loc_FF8C14C8\n"
 595 "loc_FF8C0FD8:\n"
 596         "CMP     R1, #0x27\n"
 597         "BNE     loc_FF8C1020\n"
 598         "ADD     R1, SP, #0xC\n"
 599         "BL      sub_FF8C0E80    \n"
 600         "LDR     R0, [R7,#0x1C]\n"
 601         "MOV     R1, #0x100\n"
 602         "BL      sub_FF884990\n"
 603         "LDR     R0, =0xFF8BD628\n"
 604         "MOV     R1, #0x100\n"
 605         "BL      sub_FF95A09C    \n"
 606         "LDR     R0, [R7,#0x1C]\n"
 607         "MOV     R2, R8\n"
 608         "MOV     R1, #0x100\n"
 609         "BL      sub_FF88489C    \n"
 610         "TST     R0, #1\n"
 611         "BEQ     loc_FF8C0FC4\n"
 612         "LDR     R1, =0xE69\n"
 613         "B       loc_FF8C1094\n"
 614 "loc_FF8C1020:\n"
 615         "CMP     R1, #0x28\n"
 616         "BNE     loc_FF8C1038\n"
 617 "loc_FF8C1028:\n"
 618         "LDR     R0, [SP,#0x1C]\n"
 619         "ADD     R1, SP, #0xC\n"
 620         "BL      sub_FF8C0E80    \n"
 621         "B       loc_FF8C0FC4\n"
 622 "loc_FF8C1038:\n"
 623         "CMP     R1, #0x2B\n"
 624         "BNE     loc_FF8C1050\n"
 625         "BL      sub_FF8B0A7C    \n"
 626         "BL      sub_FF8B16A0    \n"
 627         "BL      sub_FF8B11F4    \n"
 628         "B       loc_FF8C0FC4\n"
 629 "loc_FF8C1050:\n"
 630         "CMP     R1, #0x2C\n"
 631         "BNE     loc_FF8C10A0\n"
 632         "LDR     R0, [R7,#0x1C]\n"
 633         "MOV     R1, #4\n"
 634         "BL      sub_FF884990\n"
 635         "LDR     R1, =0xFF8BD648\n"
 636         "LDR     R0, =0xFFFFF400\n"
 637         "MOV     R2, #4\n"
 638         "BL      sub_FF8B04F8\n"
 639         "BL      sub_FF8B0780    \n"
 640         "LDR     R0, [R7,#0x1C]\n"
 641         "MOV     R2, R8\n"
 642         "MOV     R1, #4\n"
 643         "BL      sub_FF8847B8    \n"
 644         "TST     R0, #1\n"
 645         "BEQ     loc_FF8C0FC4\n"
 646         "LDR     R1, =0xE91\n"
 647 "loc_FF8C1094:\n"
 648         "LDR     R0, =0xFF8BDC88\n"
 649         "BL      sub_FF81E88C\n"
 650         "B       loc_FF8C0FC4\n"
 651 "loc_FF8C10A0:\n"
 652         "LDR     R0, [SP,#0x1C]\n"
 653         "MOV     R4, #1\n"
 654         "LDR     R1, [R0]\n"
 655         "CMP     R1, #0x11\n"
 656         "CMPNE   R1, #0x12\n"
 657         "BNE     loc_FF8C1110\n"
 658         "LDR     R1, [R0,#0x7C]\n"
 659         "ADD     R1, R1, R1,LSL#1\n"
 660         "ADD     R1, R0, R1,LSL#2\n"
 661         "SUB     R1, R1, #8\n"
 662         "LDMIA   R1, {R2-R4}\n"
 663         "STMIA   R6, {R2-R4}\n"
 664         "BL      sub_FF8BF800\n"
 665         "LDR     R0, [SP,#0x1C]\n"
 666         "LDR     R1, [R0,#0x7C]\n"
 667         "LDR     R3, [R0,#0x8C]\n"
 668         "LDR     R2, [R0,#0x90]\n"
 669         "ADD     R0, R0, #4\n"
 670         "BLX     R3\n"
 671         "LDR     R0, [SP,#0x1C]\n"
 672         "BL      sub_FF8C25A0    \n"
 673         "LDR     R0, [SP,#0x1C]\n"
 674         "LDR     R1, [R0,#0x7C]\n"
 675         "LDR     R3, [R0,#0x94]\n"
 676         "LDR     R2, [R0,#0x98]\n"
 677         "ADD     R0, R0, #4\n"
 678         "BLX     R3\n"
 679         "B       loc_FF8C1408\n"
 680 "loc_FF8C1110:\n"
 681         "CMP     R1, #0x13\n"
 682         "CMPNE   R1, #0x14\n"
 683         "CMPNE   R1, #0x15\n"
 684         "CMPNE   R1, #0x16\n"
 685         "BNE     loc_FF8C11C8\n"
 686         "ADD     R3, SP, #0xC\n"
 687         "MOV     R2, SP\n"
 688         "ADD     R1, SP, #0x10\n"
 689         "BL      sub_FF8BFADC    \n"
 690         "CMP     R0, #1\n"
 691         "MOV     R4, R0\n"
 692         "CMPNE   R4, #5\n"
 693         "BNE     loc_FF8C1164\n"
 694         "LDR     R0, [SP,#0x1C]\n"
 695         "MOV     R2, R4\n"
 696         "LDR     R1, [R0,#0x7C]!\n"
 697         "LDR     R12, [R0,#0x10]!\n"
 698         "LDR     R3, [R0,#4]\n"
 699         "MOV     R0, SP\n"
 700         "BLX     R12\n"
 701         "B       loc_FF8C119C\n"
 702 "loc_FF8C1164:\n"
 703         "LDR     R0, [SP,#0x1C]\n"
 704         "CMP     R4, #2\n"
 705         "LDR     R3, [R0,#0x90]\n"
 706         "CMPNE   R4, #6\n"
 707         "BNE     loc_FF8C11B0\n"
 708         "LDR     R12, [R0,#0x8C]\n"
 709         "MOV     R0, SP\n"
 710         "MOV     R2, R4\n"
 711         "MOV     R1, #1\n"
 712         "BLX     R12\n"
 713         "LDR     R0, [SP,#0x1C]\n"
 714         "MOV     R2, SP\n"
 715         "ADD     R1, SP, #0x10\n"
 716         "BL      sub_FF8C0B88    \n"
 717 "loc_FF8C119C:\n"
 718         "LDR     R0, [SP,#0x1C]\n"
 719         "LDR     R2, [SP,#0xC]\n"
 720         "MOV     R1, R4\n"
 721         "BL      sub_FF8C0E20    \n"
 722         "B       loc_FF8C1408\n"
 723 "loc_FF8C11B0:\n"
 724         "LDR     R1, [R0,#0x7C]\n"
 725         "LDR     R12, [R0,#0x8C]\n"
 726         "ADD     R0, R0, #4\n"
 727         "MOV     R2, R4\n"
 728         "BLX     R12\n"
 729         "B       loc_FF8C1408\n"
 730 "loc_FF8C11C8:\n"
 731         "CMP     R1, #0x22\n"
 732         "CMPNE   R1, #0x23\n"
 733         "BNE     loc_FF8C1214\n"
 734         "LDR     R1, [R0,#0x7C]\n"
 735         "ADD     R1, R1, R1,LSL#1\n"
 736         "ADD     R1, R0, R1,LSL#2\n"
 737         "SUB     R1, R1, #8\n"
 738         "LDMIA   R1, {R2-R4}\n"
 739         "STMIA   R6, {R2-R4}\n"
 740         "BL      sub_FF8BED44    \n"
 741         "LDR     R0, [SP,#0x1C]\n"
 742         "LDR     R1, [R0,#0x7C]\n"
 743         "LDR     R3, [R0,#0x8C]\n"
 744         "LDR     R2, [R0,#0x90]\n"
 745         "ADD     R0, R0, #4\n"
 746         "BLX     R3\n"
 747         "LDR     R0, [SP,#0x1C]\n"
 748         "BL      sub_FF8BF044    \n"
 749         "B       loc_FF8C1408\n"
 750 "loc_FF8C1214:\n"
 751         "ADD     R1, R0, #4\n"
 752         "LDMIA   R1, {R2,R3,R12}\n"
 753         "STMIA   R6, {R2,R3,R12}\n"
 754         "LDR     R1, [R0]\n"
 755         "CMP     R1, #0x25\n"
 756         "ADDLS   PC, PC, R1,LSL#2\n"
 757         "B       loc_FF8C13E8\n"
 758 "loc_FF8C1230:\n"
 759         "B       loc_FF8C12C8\n"
 760 "loc_FF8C1234:\n"
 761         "B       loc_FF8C12C8\n"
 762 "loc_FF8C1238:\n"
 763         "B       loc_FF8C12D0\n"
 764 "loc_FF8C123C:\n"
 765         "B       loc_FF8C12D8\n"
 766 "loc_FF8C1240:\n"
 767         "B       loc_FF8C12D8\n"
 768 "loc_FF8C1244:\n"
 769         "B       loc_FF8C12D8\n"
 770 "loc_FF8C1248:\n"
 771         "B       loc_FF8C12C8\n"
 772 "loc_FF8C124C:\n"
 773         "B       loc_FF8C12D0\n"
 774 "loc_FF8C1250:\n"
 775         "B       loc_FF8C12D8\n"
 776 "loc_FF8C1254:\n"
 777         "B       loc_FF8C12D8\n"
 778 "loc_FF8C1258:\n"
 779         "B       loc_FF8C12F0\n"
 780 "loc_FF8C125C:\n"
 781         "B       loc_FF8C12F0\n"
 782 "loc_FF8C1260:\n"
 783         "B       loc_FF8C13DC\n"
 784 "loc_FF8C1264:\n"
 785         "B       loc_FF8C13E4\n"
 786 "loc_FF8C1268:\n"
 787         "B       loc_FF8C13E4\n"
 788 "loc_FF8C126C:\n"
 789         "B       loc_FF8C13E4\n"
 790 "loc_FF8C1270:\n"
 791         "B       loc_FF8C13E4\n"
 792 "loc_FF8C1274:\n"
 793         "B       loc_FF8C13E8\n"
 794 "loc_FF8C1278:\n"
 795         "B       loc_FF8C13E8\n"
 796 "loc_FF8C127C:\n"
 797         "B       loc_FF8C13E8\n"
 798 "loc_FF8C1280:\n"
 799         "B       loc_FF8C13E8\n"
 800 "loc_FF8C1284:\n"
 801         "B       loc_FF8C13E8\n"
 802 "loc_FF8C1288:\n"
 803         "B       loc_FF8C13E8\n"
 804 "loc_FF8C128C:\n"
 805         "B       loc_FF8C12E0\n"
 806 "loc_FF8C1290:\n"
 807         "B       loc_FF8C12E8\n"
 808 "loc_FF8C1294:\n"
 809         "B       loc_FF8C12E8\n"
 810 "loc_FF8C1298:\n"
 811         "B       loc_FF8C12FC\n"
 812 "loc_FF8C129C:\n"
 813         "B       loc_FF8C12FC\n"
 814 "loc_FF8C12A0:\n"
 815         "B       loc_FF8C1304\n"
 816 "loc_FF8C12A4:\n"
 817         "B       loc_FF8C1334\n"
 818 "loc_FF8C12A8:\n"
 819         "B       loc_FF8C1364\n"
 820 "loc_FF8C12AC:\n"
 821         "B       loc_FF8C1394\n"
 822 "loc_FF8C12B0:\n"
 823         "B       loc_FF8C13C4\n"
 824 "loc_FF8C12B4:\n"
 825         "B       loc_FF8C13C4\n"
 826 "loc_FF8C12B8:\n"
 827         "B       loc_FF8C13E8\n"
 828 "loc_FF8C12BC:\n"
 829         "B       loc_FF8C13E8\n"
 830 "loc_FF8C12C0:\n"
 831         "B       loc_FF8C13CC\n"
 832 "loc_FF8C12C4:\n"
 833         "B       loc_FF8C13D4\n"
 834 "loc_FF8C12C8:\n"
 835         "BL      sub_FF8BDB30\n"
 836         "B       loc_FF8C13E8\n"
 837 "loc_FF8C12D0:\n"
 838         "BL      sub_FF8BDDB4\n"
 839         "B       loc_FF8C13E8\n"
 840 "loc_FF8C12D8:\n"
 841         "BL      sub_FF8BDFBC\n"
 842         "B       loc_FF8C13E8\n"
 843 "loc_FF8C12E0:\n"
 844         "BL      sub_FF8BE234\n"
 845         "B       loc_FF8C13E8\n"
 846 "loc_FF8C12E8:\n"
 847         "BL      sub_FF8BE42C\n"
 848         "B       loc_FF8C13E8\n"
 849 "loc_FF8C12F0:\n" // ; jumptable FF8C1228 entries 10,11 
 850         //"BL      sub_FF8BE6E8\n"
 851                 "BL      sub_FF8BE6E8_my\n" // ----------------->
 852         "MOV     R4, #0\n"
 853         "B       loc_FF8C13E8\n"
 854 "loc_FF8C12FC:\n"
 855         "BL      sub_FF8BE828\n"
 856         "B       loc_FF8C13E8\n"
 857 "loc_FF8C1304:\n"
 858         "LDRH    R1, [R0,#4]\n"
 859         "STRH    R1, [SP,#0x10]\n"
 860         "LDRH    R1, [R5,#2]\n"
 861         "STRH    R1, [SP,#0x12]\n"
 862         "LDRH    R1, [R5,#4]\n"
 863         "STRH    R1, [SP,#0x14]\n"
 864         "LDRH    R1, [R5,#6]\n"
 865         "STRH    R1, [SP,#0x16]\n"
 866         "LDRH    R1, [R0,#0xC]\n"
 867         "STRH    R1, [SP,#0x18]\n"
 868         "BL      sub_FF8C224C    \n"
 869         "B       loc_FF8C13E8\n"
 870 "loc_FF8C1334:\n"
 871         "LDRH    R1, [R0,#4]\n"
 872         "STRH    R1, [SP,#0x10]\n"
 873         "LDRH    R1, [R5,#2]\n"
 874         "STRH    R1, [SP,#0x12]\n"
 875         "LDRH    R1, [R5,#4]\n"
 876         "STRH    R1, [SP,#0x14]\n"
 877         "LDRH    R1, [R5,#6]\n"
 878         "STRH    R1, [SP,#0x16]\n"
 879         "LDRH    R1, [R5,#8]\n"
 880         "STRH    R1, [SP,#0x18]\n"
 881         "BL      sub_FF8C23B8    \n"
 882         "B       loc_FF8C13E8\n"
 883 "loc_FF8C1364:\n"
 884         "LDRH    R1, [R5]\n"
 885         "STRH    R1, [SP,#0x10]\n"
 886         "LDRH    R1, [R0,#6]\n"
 887         "STRH    R1, [SP,#0x12]\n"
 888         "LDRH    R1, [R5,#4]\n"
 889         "STRH    R1, [SP,#0x14]\n"
 890         "LDRH    R1, [R5,#6]\n"
 891         "STRH    R1, [SP,#0x16]\n"
 892         "LDRH    R1, [R5,#8]\n"
 893         "STRH    R1, [SP,#0x18]\n"
 894         "BL      sub_FF8C2464    \n"
 895         "B       loc_FF8C13E8\n"
 896 "loc_FF8C1394:\n"
 897         "LDRH    R1, [R5]\n"
 898         "STRH    R1, [SP,#0x10]\n"
 899         "LDRH    R1, [R5,#2]\n"
 900         "STRH    R1, [SP,#0x12]\n"
 901         "LDRH    R1, [R5,#4]\n"
 902         "STRH    R1, [SP,#0x14]\n"
 903         "LDRH    R1, [R5,#6]\n"
 904         "STRH    R1, [SP,#0x16]\n"
 905         "LDRH    R1, [R0,#0xC]\n"
 906         "STRH    R1, [SP,#0x18]\n"
 907         "BL      sub_FF8C2504    \n"
 908         "B       loc_FF8C13E8\n"
 909 "loc_FF8C13C4:\n"
 910         "BL      sub_FF8BEB80\n"
 911         "B       loc_FF8C13E8\n"
 912 "loc_FF8C13CC:\n"
 913         "BL      sub_FF8BF148\n"
 914         "B       loc_FF8C13E8\n"
 915 "loc_FF8C13D4:\n"
 916         "BL      sub_FF8BF384\n"
 917         "B       loc_FF8C13E8\n"
 918 "loc_FF8C13DC:\n"
 919         "BL      sub_FF8BF500\n"
 920         "B       loc_FF8C13E8\n"
 921 "loc_FF8C13E4:\n"
 922         "BL      sub_FF8BF69C\n"
 923 "loc_FF8C13E8:\n"
 924         "LDR     R0, [SP,#0x1C]\n"
 925         "LDR     R1, [R0,#0x7C]\n"
 926         "LDR     R3, [R0,#0x8C]\n"
 927         "LDR     R2, [R0,#0x90]\n"
 928         "ADD     R0, R0, #4\n"
 929         "BLX     R3\n"
 930         "CMP     R4, #1\n"
 931         "BNE     loc_FF8C1450\n"
 932 "loc_FF8C1408:\n"
 933         "LDR     R0, [SP,#0x1C]\n"
 934         "MOV     R2, #0xC\n"
 935         "LDR     R1, [R0,#0x7C]\n"
 936         "ADD     R1, R1, R1,LSL#1\n"
 937         "ADD     R0, R0, R1,LSL#2\n"
 938         "SUB     R4, R0, #8\n"
 939         "LDR     R0, =0x4372C\n"
 940         "ADD     R1, SP, #0x10\n"
 941         "BL      sub_FFB34DD8\n"
 942         "LDR     R0, =0x43738\n"
 943         "MOV     R2, #0xC\n"
 944         "ADD     R1, SP, #0x10\n"
 945         "BL      sub_FFB34DD8\n"
 946         "LDR     R0, =0x43744\n"
 947         "MOV     R2, #0xC\n"
 948         "MOV     R1, R4\n"
 949         "BL      sub_FFB34DD8\n"
 950         "B       loc_FF8C14C8\n"
 951 "loc_FF8C1450:\n"
 952         "LDR     R0, [SP,#0x1C]\n"
 953         "LDR     R0, [R0]\n"
 954         "CMP     R0, #0xB\n"
 955         "BNE     loc_FF8C1498\n"
 956         "MOV     R3, #0\n"
 957         "STR     R3, [SP]\n"
 958         "MOV     R3, #1\n"
 959         "MOV     R2, #1\n"
 960         "MOV     R1, #1\n"
 961         "MOV     R0, #0\n"
 962         "BL      sub_FF8BD938\n"
 963         "MOV     R3, #0\n"
 964         "STR     R3, [SP]\n"
 965         "MOV     R3, #1\n"
 966         "MOV     R2, #1\n"
 967         "MOV     R1, #1\n"
 968         "MOV     R0, #0\n"
 969         "B       loc_FF8C14C4\n"
 970 "loc_FF8C1498:\n"
 971         "MOV     R3, #1\n"
 972         "MOV     R2, #1\n"
 973         "MOV     R1, #1\n"
 974         "MOV     R0, #1\n"
 975         "STR     R3, [SP]\n"
 976         "BL      sub_FF8BD938\n"
 977         "MOV     R3, #1\n"
 978         "MOV     R2, #1\n"
 979         "MOV     R1, #1\n"
 980         "MOV     R0, #1\n"
 981         "STR     R3, [SP]\n"
 982 "loc_FF8C14C4:\n"
 983         "BL      sub_FF8BDA78\n"
 984 "loc_FF8C14C8:\n"
 985         "LDR     R0, [SP,#0x1C]\n"
 986         "BL      sub_FF8C21D8    \n"
 987         "B       loc_FF8C0EF0\n"
 988                 );
 989 };
 990 
 991 void __attribute__((naked,noinline)) sub_FF8BE6E8_my(){
 992  asm volatile(
 993         "STMFD   SP!, {R4-R8,LR}\n"
 994         "LDR     R7, =0x4440\n"
 995         "MOV     R4, R0\n"
 996         "LDR     R0, [R7,#0x1C]\n"
 997         "MOV     R1, #0x3E\n"
 998         "BL      sub_FF884990\n"
 999         "LDRSH   R0, [R4,#4]\n"
1000         "MOV     R2, #0\n"
1001         "MOV     R1, #0\n"
1002         "BL      sub_FF8BD69C\n"
1003         "MOV     R6, R0\n"
1004         "LDRSH   R0, [R4,#6]\n"
1005         "BL      sub_FF8BD7AC\n"
1006         "LDRSH   R0, [R4,#8]\n"
1007         "BL      sub_FF8BD804\n"
1008         "LDRSH   R0, [R4,#0xA]\n"
1009         "BL      sub_FF8BD85C\n"
1010         "LDRSH   R0, [R4,#0xC]\n"
1011         "MOV     R1, #0\n"
1012         "BL      sub_FF8BD8B4\n"
1013         "MOV     R5, R0\n"
1014         "LDR     R0, [R4]\n"
1015         "LDR     R8, =0x43744\n"
1016         "CMP     R0, #0xB\n"
1017         "MOVEQ   R6, #0\n"
1018         "MOVEQ   R5, #0\n"
1019         "BEQ     loc_FF8BE77C\n"
1020         "CMP     R6, #1\n"
1021         "BNE     loc_FF8BE77C\n"
1022         "LDRSH   R0, [R4,#4]\n"
1023         "LDR     R1, =0xFF8BD608\n"
1024         "MOV     R2, #2\n"
1025         "BL      sub_FF959A58    \n"
1026         "STRH    R0, [R4,#4]\n"
1027         "MOV     R0, #0\n"
1028         "STR     R0, [R7,#0x28]\n"
1029         "B       loc_FF8BE784\n"
1030 "loc_FF8BE77C:\n"
1031         "LDRH    R0, [R8]\n"
1032         "STRH    R0, [R4,#4]\n"
1033 "loc_FF8BE784:\n"
1034         "CMP     R5, #1\n"
1035         "LDRNEH  R0, [R8,#8]\n"
1036         "BNE     loc_FF8BE7A0\n"
1037         "LDRSH   R0, [R4,#0xC]\n"
1038         "LDR     R1, =0xFF8BD68C\n"
1039         "MOV     R2, #0x20\n"
1040         "BL      sub_FF8C2208\n"
1041 "loc_FF8BE7A0:\n"
1042         "STRH    R0, [R4,#0xC]\n"
1043         "LDRSH   R0, [R4,#6]\n"
1044         //"BL      sub_FF8B07EC    \n"
1045                 "BL      sub_FF8B07EC_my\n" // -------------------->
1046         "LDRSH   R0, [R4,#8]\n"
1047         "MOV     R1, #1\n"
1048         "BL      sub_FF8B0F3C    \n"
1049         "MOV     R1, #0\n"
1050         "ADD     R0, R4, #8\n"
1051         "BL      sub_FF8B0FC4    \n"
1052         "LDRSH   R0, [R4,#0xE]\n"
1053         "BL      sub_FF8B8AA8    \n"
1054         "LDR     R4, =0xBB8\n"
1055         "CMP     R6, #1\n"
1056         "BNE     loc_FF8BE7F8\n"
1057         "LDR     R0, [R7,#0x1C]\n"
1058         "MOV     R2, R4\n"
1059         "MOV     R1, #2\n"
1060         "BL      sub_FF88489C    \n"
1061         "TST     R0, #1\n"
1062         "LDRNE   R1, =0x5A3\n"
1063         "LDRNE   R0, =0xFF8BDC88\n"
1064         "BLNE    sub_FF81E88C\n"
1065 "loc_FF8BE7F8:\n"
1066         "CMP     R5, #1\n"
1067         "LDMNEFD SP!, {R4-R8,PC}\n"
1068         "LDR     R0, [R7,#0x1C]\n"
1069         "MOV     R2, R4\n"
1070         "MOV     R1, #0x20\n"
1071         "BL      sub_FF88489C    \n"
1072         "TST     R0, #1\n"
1073         "LDRNE   R1, =0x5A8\n"
1074         "LDRNE   R0, =0xFF8BDC88\n"
1075         "LDMNEFD SP!, {R4-R8,LR}\n"
1076         "BNE     sub_FF81E88C\n"
1077         "LDMFD   SP!, {R4-R8,PC}\n"
1078  );
1079 };
1080 
1081 void __attribute__((naked,noinline)) sub_FF8B07EC_my()
1082 {  
1083  asm volatile(
1084         "STMFD   SP!, {R4-R6,LR}\n"
1085         "LDR     R5, =0x4150\n"
1086         "MOV     R4, R0\n"
1087         "LDR     R0, [R5,#4]\n"
1088         "CMP     R0, #1\n"
1089         "LDRNE   R1, =0x146\n"
1090         "LDRNE   R0, =0xFF8B05F0\n"
1091         "BLNE    sub_FF81E88C\n"
1092         "CMN     R4, #0xC00\n"
1093         "LDREQSH R4, [R5,#2]\n"
1094         "CMN     R4, #0xC00\n"
1095         "MOVEQ   R1, #0x14C\n"
1096         "LDREQ   R0, =0xFF8B05F0\n"
1097         "STRH    R4, [R5,#2]\n"
1098         "BLEQ    sub_FF81E88C\n"
1099         "MOV     R0, R4\n"
1100         "BL      apex2us\n"
1101         "MOV     R4, R0\n"
1102         "BL      sub_FF8F52BC\n"
1103         "MOV     R0, R4\n"
1104         "BL      sub_FF8FE188\n"
1105         "TST     R0, #1\n"
1106         "LDRNE   R1, =0x151\n"
1107         "LDMNEFD SP!, {R4-R6,LR}\n"
1108         "LDRNE   R0, =0xFF8B05F0\n"
1109         "BNE     sub_FF81E88C\n"
1110         "LDMFD   SP!, {R4-R6,PC}\n"
1111         ".ltorg"
1112      );
1113 };

/* [<][>][^][v][top][bottom][index][help] */