root/platform/m3/sub/101a/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. log_capt_seq
  2. log_capt_seq2
  3. log_capt_seq_override
  4. capt_seq_task
  5. sub_fc0daf9e_my
  6. sub_fc0dae40_my
  7. sub_fc11d71e_my
  8. log_nr_call
  9. log_remote_hook
  10. log_rh
  11. exp_drv_task
  12. sub_fc2b9a84_my
  13. sub_fc36025e_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 
   5 // debug
   6 //#define CAPTSEQ_DEBUG_LOG 1
   7 
   8 extern int active_raw_buffer;
   9 // debug
  10 extern void _LogCameraEvent(int id,const char *fmt,...);
  11 
  12 #define USE_STUBS_NRFLAG 1
  13 #define NR_AUTO (-1) // default value if NRTBL.SetDarkSubType not used is -1 (0 probalby works the same), set to enable auto
  14 
  15 #ifdef CAPTSEQ_DEBUG_LOG
  16 extern char *hook_raw_image_addr(void);
  17 
  18 void log_capt_seq(int m)
  19 {
  20     _LogCameraEvent(0x60,"cs m:%d arb:%d rb:0x%08x i:%04d",
  21                     m,
  22                     active_raw_buffer,
  23                     hook_raw_image_addr(),
  24                     get_exposure_counter());
  25 }
  26 void log_capt_seq2(int m)
  27 {
  28     _LogCameraEvent(0x60,"cs end m:%d arb:%d rb:0x%08x i:%04d",
  29                     m,
  30                     active_raw_buffer,
  31                     hook_raw_image_addr(),
  32                     get_exposure_counter());
  33 }
  34 void log_capt_seq_override(void)
  35 {
  36     _LogCameraEvent(0x60,"cs override arb:%d rb:0x%08x i:%04d",
  37                     active_raw_buffer,
  38                     hook_raw_image_addr(),
  39                     get_exposure_counter());
  40 }
  41 #endif
  42 
  43 #include "../../../generic/capt_seq.c"
  44 //-s=task_CaptSeq -c=173 -f=chdk
  45 // task_CaptSeq 0xFC0BD906
  46 void __attribute__((naked,noinline)) capt_seq_task() {
  47     asm volatile (
  48 "       push    {r3, r4, r5, r6, r7,lr}\n"
  49 "       ldr     r4, =0x059ef0\n"
  50 "       movs    r6, #0\n"
  51 "       ldr     r5, =0x0b358\n"
  52 "loc_fc0bd90e:\n"
  53 "       movs    r2, #0\n"
  54 "       mov     r1, sp\n"
  55 "       ldr     r0, [r5,#8]\n"
  56 "       blx     sub_fc3022b0\n"
  57 "       lsls    r0, r0, #0x1f\n"
  58 "       beq     loc_fc0bd930\n"
  59 "       movw    r2, #0x455\n"
  60 "       ldr   r1, =0xfc0bd504\n"
  61 "       movs    r0, #0\n"
  62 "       blx     sub_fc302410\n"
  63 "       blx     sub_fc3022c8\n"
  64 "       pop     {r3, r4, r5, r6, r7,pc}\n"
  65 "loc_fc0bd930:\n"
  66 "       ldr     r0, [sp]\n"
  67 "       ldr     r0, [r0]\n"
  68 "       cmp     r0, #1\n"
  69 "       beq     loc_fc0bd948\n"
  70 "       cmp     r0, #0x28\n"
  71 "       beq     loc_fc0bd948\n"
  72 "       cmp     r0, #0x1c\n"
  73 "       beq     loc_fc0bd948\n"
  74 "       cmp     r0, #0x20\n"
  75 "       beq     loc_fc0bd948\n"
  76 "       bl      sub_fc18b362\n"
  77 "loc_fc0bd948:\n"
  78 #ifdef CAPTSEQ_DEBUG_LOG
  79 // debug message
  80 "ldr     r0, [sp]\n"
  81 "ldr     r0, [r0]\n"
  82 "bl log_capt_seq\n"
  83 #endif
  84 "       ldr     r0, [sp]\n"
  85 "       ldr     r1, [r0]\n"
  86 "       cmp     r1, #0x2f\n"
  87 "       bcs     loc_fc0bda30\n"
  88 "       tbb.w   [pc,r1]\n"
  89 "branchtable_fc0bd950:\n" 
  90 ".byte((loc_fc0bd984 - branchtable_fc0bd950) / 2)\n"
  91 ".byte((loc_fc0bd99a - branchtable_fc0bd950) / 2)\n"
  92 ".byte((loc_fc0bd9a2 - branchtable_fc0bd950) / 2)\n"
  93 ".byte((loc_fc0bd9b0 - branchtable_fc0bd950) / 2)\n"
  94 ".byte((loc_fc0bd9aa - branchtable_fc0bd950) / 2)\n"
  95 ".byte((loc_fc0bd9ba - branchtable_fc0bd950) / 2)\n"
  96 ".byte((loc_fc0bd9c0 - branchtable_fc0bd950) / 2)\n"
  97 ".byte((loc_fc0bda0c - branchtable_fc0bd950) / 2)\n"
  98 ".byte((loc_fc0bd9d0 - branchtable_fc0bd950) / 2)\n"
  99 ".byte((loc_fc0bd9d8 - branchtable_fc0bd950) / 2)\n"
 100 ".byte((loc_fc0bd9de - branchtable_fc0bd950) / 2)\n"
 101 ".byte((loc_fc0bd9f4 - branchtable_fc0bd950) / 2)\n"
 102 ".byte((loc_fc0bd9fa - branchtable_fc0bd950) / 2)\n"
 103 ".byte((loc_fc0bda00 - branchtable_fc0bd950) / 2)\n"
 104 ".byte((loc_fc0bda06 - branchtable_fc0bd950) / 2)\n"
 105 ".byte((loc_fc0bda14 - branchtable_fc0bd950) / 2)\n"
 106 ".byte((loc_fc0bda1a - branchtable_fc0bd950) / 2)\n"
 107 ".byte((loc_fc0bda20 - branchtable_fc0bd950) / 2)\n"
 108 ".byte((loc_fc0bda26 - branchtable_fc0bd950) / 2)\n"
 109 ".byte((loc_fc0bda2c - branchtable_fc0bd950) / 2)\n"
 110 ".byte((loc_fc0bda32 - branchtable_fc0bd950) / 2)\n"
 111 ".byte((loc_fc0bda38 - branchtable_fc0bd950) / 2)\n"
 112 ".byte((loc_fc0bda3e - branchtable_fc0bd950) / 2)\n"
 113 ".byte((loc_fc0bda44 - branchtable_fc0bd950) / 2)\n"
 114 ".byte((loc_fc0bda4a - branchtable_fc0bd950) / 2)\n"
 115 ".byte((loc_fc0bda50 - branchtable_fc0bd950) / 2)\n"
 116 ".byte((loc_fc0bda58 - branchtable_fc0bd950) / 2)\n"
 117 ".byte((loc_fc0bda5e - branchtable_fc0bd950) / 2)\n"
 118 ".byte((loc_fc0bda62 - branchtable_fc0bd950) / 2)\n"
 119 ".byte((loc_fc0bda6a - branchtable_fc0bd950) / 2)\n"
 120 ".byte((loc_fc0bda70 - branchtable_fc0bd950) / 2)\n"
 121 ".byte((loc_fc0bda9a - branchtable_fc0bd950) / 2)\n"
 122 ".byte((loc_fc0bdaa0 - branchtable_fc0bd950) / 2)\n"
 123 ".byte((loc_fc0bdaa6 - branchtable_fc0bd950) / 2)\n"
 124 ".byte((loc_fc0bdaac - branchtable_fc0bd950) / 2)\n"
 125 ".byte((loc_fc0bdab2 - branchtable_fc0bd950) / 2)\n"
 126 ".byte((loc_fc0bdab8 - branchtable_fc0bd950) / 2)\n"
 127 ".byte((loc_fc0bdac0 - branchtable_fc0bd950) / 2)\n"
 128 ".byte((loc_fc0bdac6 - branchtable_fc0bd950) / 2)\n"
 129 ".byte((loc_fc0bdaea - branchtable_fc0bd950) / 2)\n"
 130 ".byte((loc_fc0bdaf0 - branchtable_fc0bd950) / 2)\n"
 131 ".byte((loc_fc0bdb28 - branchtable_fc0bd950) / 2)\n"
 132 ".byte((loc_fc0bdafc - branchtable_fc0bd950) / 2)\n"
 133 ".byte((loc_fc0bdb02 - branchtable_fc0bd950) / 2)\n"
 134 ".byte((loc_fc0bdb08 - branchtable_fc0bd950) / 2)\n"
 135 ".byte((loc_fc0bdb0e - branchtable_fc0bd950) / 2)\n"
 136 ".byte((loc_fc0bdb14 - branchtable_fc0bd950) / 2)\n"
 137 ".align 1\n"
 138 "loc_fc0bd984:\n" // case 0: preshoot, quick press shoot
 139 "       ldr     r0, [r0,#0xc]\n"
 140 "       bl      sub_fc0d47f2\n"
 141 #ifdef CAPTSEQ_DEBUG_LOG
 142 "bl log_capt_seq_override\n"
 143 #endif
 144 "bl shooting_expo_param_override\n" // +
 145 "       bl      sub_fc0d36ac\n"
 146 "       ldr     r0, [r4,#0x28]\n"
 147 "       cmp     r0, #0\n"
 148 "       beq     loc_fc0bd998\n"
 149 "       bl      sub_fc0daf9e_my\n" // -> nr?, remote hook, raw hook (quick, no half press)
 150 "loc_fc0bd998:\n"
 151 "       b       loc_fc0bdb28\n"
 152 "loc_fc0bd99a:\n" // case 1: (normal shoot)
 153 "       ldr     r0, [r0,#0x10]\n"
 154 "       bl      sub_fc0dae40_my\n" // ->  nr?, remote hook, raw hook
 155 "       b       loc_fc0bdb28\n"
 156 "loc_fc0bd9a2:\n"
 157 "       movs    r0, #1\n"
 158 "       bl      sub_fc0d4adc\n"
 159 "       b       loc_fc0bdb28\n"
 160 "loc_fc0bd9aa:\n"
 161 "       bl      sub_fc0d4534\n"
 162 "       b       loc_fc0bd9b6\n"
 163 "loc_fc0bd9b0:\n"
 164 "       ldr     r0, [r0,#0xc]\n"
 165 "       bl      sub_fc0d47da\n"
 166 "loc_fc0bd9b6:\n"
 167 "       str     r6, [r4,#0x28]\n"
 168 "       b       loc_fc0bdb28\n"
 169 "loc_fc0bd9ba:\n"
 170 "       bl      sub_fc0d47e0\n"
 171 "       b       loc_fc0bdb28\n"
 172 "loc_fc0bd9c0:\n"
 173 "       bl      sub_fc0d4a7c\n"
 174 "       bl      sub_fc0d36ac\n"
 175 "       movs    r0, #0\n"
 176 "       bl      sub_fc0a9748\n"
 177 "       b       loc_fc0bdb28\n"
 178 "loc_fc0bd9d0:\n"
 179 "       ldr     r0, [r4,#0x54]\n"
 180 "       bl      sub_fc0f8f44\n"
 181 "       b       loc_fc0bdb28\n"
 182 "loc_fc0bd9d8:\n"
 183 "       bl      sub_fc0f91d0\n"
 184 "       b       loc_fc0bdb28\n"
 185 "loc_fc0bd9de:\n"
 186 "       ldr     r0, [r0,#0xc]\n"
 187 "       bl      sub_fc0f921c\n"
 188 "       b       loc_fc0bdb28\n"
 189 ".ltorg\n"
 190 //"       .byte    0\n"
 191 //"       .byte    0\n"
 192 //" off_fc0bd9e8 dcd dword_5a0f4\n"
 193 //" off_fc0bd9ec dcd word_59ef0\n"
 194 //" off_fc0bd9f0 dcd 0x0b358\n"
 195 "loc_fc0bd9f4:\n"
 196 "       bl      sub_fc0f93ee\n"
 197 "       b       loc_fc0bdb28\n"
 198 "loc_fc0bd9fa:\n"
 199 "       bl      sub_fc0f9438\n"
 200 "       b       loc_fc0bdb28\n"
 201 "loc_fc0bda00:\n"
 202 "       bl      sub_fc0f97ee\n"
 203 "       b       loc_fc0bdb28\n"
 204 "loc_fc0bda06:\n"
 205 "       bl      sub_fc0f9884\n"
 206 "       b       loc_fc0bdb28\n"
 207 "loc_fc0bda0c:\n"
 208 "       ldr     r0, [r0,#0xc]\n"
 209 "       bl      sub_fc0d47da\n"
 210 "       b       loc_fc0bdb28\n"
 211 "loc_fc0bda14:\n"
 212 "       bl      sub_fc0da684\n"
 213 "       b       loc_fc0bdb28\n"
 214 "loc_fc0bda1a:\n"
 215 "       bl      sub_fc0da886\n"
 216 "       b       loc_fc0bdb28\n"
 217 "loc_fc0bda20:\n"
 218 "       bl      sub_fc0da930\n"
 219 "       b       loc_fc0bdb28\n"
 220 "loc_fc0bda26:\n"
 221 "       bl      sub_fc0da9e8\n"
 222 "       b       loc_fc0bdb28\n"
 223 "loc_fc0bda2c:\n"
 224 "       movs    r0, #0\n"
 225 "       b       loc_fc0bda52\n"
 226 "loc_fc0bda30:\n"
 227 "       b       loc_fc0bdb1a\n"
 228 "loc_fc0bda32:\n"
 229 "       bl      sub_fc0dab8c\n"
 230 "       b       loc_fc0bdb28\n"
 231 "loc_fc0bda38:\n"
 232 "       bl      sub_fc0dabec\n"
 233 "       b       loc_fc0bdb28\n"
 234 "loc_fc0bda3e:\n"
 235 "       bl      sub_fc0dabf0\n"
 236 "       b       loc_fc0bdb28\n"
 237 "loc_fc0bda44:\n"
 238 "       bl      sub_fc0dac00\n"
 239 "       b       loc_fc0bdb28\n"
 240 "loc_fc0bda4a:\n"
 241 "       bl      sub_fc0dac8c\n"
 242 "       b       loc_fc0bdb28\n"
 243 "loc_fc0bda50:\n"
 244 "       movs    r0, #1\n"
 245 "loc_fc0bda52:\n"
 246 "       bl      sub_fc0daa6c\n"
 247 "       b       loc_fc0bdb28\n"
 248 "loc_fc0bda58:\n"
 249 "       bl      sub_fc0d4bd4\n"
 250 "       b       loc_fc0bdb28\n"
 251 "loc_fc0bda5e:\n"
 252 "       movs    r0, #0\n"
 253 "       b       loc_fc0bda64\n"
 254 "loc_fc0bda62:\n"
 255 "       ldr     r0, [r0,#0xc]\n"
 256 "loc_fc0bda64:\n"
 257 "       bl      sub_fc0d4c08\n"
 258 "       b       loc_fc0bdb28\n"
 259 "loc_fc0bda6a:\n"
 260 "       bl      sub_fc110638\n"
 261 "       b       loc_fc0bdb28\n"
 262 "loc_fc0bda70:\n"
 263 "       ldr     r1, =0x00059f52\n"
 264 "       movs    r2, #2\n"
 265 "       movs    r0, #0x75\n"
 266 "       bl      sub_fc373498\n"
 267 "       lsls    r0, r0, #0x1f\n"
 268 "       beq     loc_fc0bda8c\n"
 269 "       movw    r2, #0x51a\n"
 270 "       ldr     r1, =0xfc0bd504\n"
 271 "       movs    r0, #0\n"
 272 "       blx     sub_fc302410\n"
 273 "loc_fc0bda8c:\n"
 274 "       ldrh.w  r0, [r4,#0x62]\n"
 275 "       cmp     r0, #1\n"
 276 "       bne     loc_fc0bdb28\n"
 277 "       bl      sub_fc110632\n"
 278 "       b       loc_fc0bdb28\n"
 279 "loc_fc0bda9a:\n"
 280 "       bl      sub_fc1106bc\n"
 281 "       b       loc_fc0bdb28\n"
 282 "loc_fc0bdaa0:\n"
 283 "       bl      sub_fc1107d8\n"
 284 "       b       loc_fc0bdb28\n"
 285 "loc_fc0bdaa6:\n"
 286 "       bl      sub_fc0d3eb8\n"
 287 "       b       loc_fc0bdb28\n"
 288 "loc_fc0bdaac:\n"
 289 "       bl      sub_fc0d4f4a\n"
 290 "       b       loc_fc0bdb28\n"
 291 "loc_fc0bdab2:\n"
 292 "       bl      sub_fc0d5004\n"
 293 "       b       loc_fc0bdb28\n"
 294 "loc_fc0bdab8:\n"
 295 "       ldr     r0, [r0,#0xc]\n"
 296 "       bl      sub_fc0dad6c\n"
 297 "       b       loc_fc0bdb28\n"
 298 "loc_fc0bdac0:\n"
 299 "       bl      sub_fc0dadbe\n"
 300 "       b       loc_fc0bdb28\n"
 301 "loc_fc0bdac6:\n"
 302 "       bl      sub_fc0d58f8\n"
 303 "       bl      sub_fc0d66b2\n"
 304 "       ldrh.w  r0, [r4,#0x1a4]\n"
 305 "       cmp     r0, #4\n"
 306 "       beq     loc_fc0bdae0\n"
 307 "       ldrh    r0, [r4]\n"
 308 "       sub.w   r1, r0, #0x8200\n"
 309 "       subs    r1, #0x36\n"
 310 "       bne     loc_fc0bdb28\n"
 311 "loc_fc0bdae0:\n"
 312 "       bl      sub_fc0d5004\n"
 313 "       bl      sub_fc0d5336\n"
 314 "       b       loc_fc0bdb28\n"
 315 "loc_fc0bdaea:\n"
 316 "       movs    r2, #0\n"
 317 "       movs    r1, #0x11\n"
 318 "       b       loc_fc0bdaf4\n"
 319 "loc_fc0bdaf0:\n"
 320 "       movs    r2, #0\n"
 321 "       movs    r1, #0x10\n"
 322 "loc_fc0bdaf4:\n"
 323 "       movs    r0, #0\n"
 324 "       bl      sub_fc0d4046\n"
 325 "       b       loc_fc0bdb28\n"
 326 "loc_fc0bdafc:\n"
 327 "       bl      sub_fc110f24\n"
 328 "       b       loc_fc0bdb28\n"
 329 "loc_fc0bdb02:\n"
 330 "       bl      sub_fc110fa0\n"
 331 "       b       loc_fc0bdb28\n"
 332 "loc_fc0bdb08:\n"
 333 "       bl      sub_fc110fe0\n"
 334 "       b       loc_fc0bdb28\n"
 335 "loc_fc0bdb0e:\n"
 336 "       bl      sub_fc110e68\n"
 337 "       b       loc_fc0bdb28\n"
 338 "loc_fc0bdb14:\n"
 339 "       bl      sub_fc110e6a\n"
 340 "       b       loc_fc0bdb28\n"
 341 "loc_fc0bdb1a:\n"
 342 "       movw    r2, #0x588\n"
 343 "       ldr     r1, =0xfc0bd504\n" //  *"SsShootTask.c"
 344 "       movs    r0, #0\n"
 345 "       blx     sub_fc302410\n" // j_DebugAssert
 346 "loc_fc0bdb28:\n"
 347 #ifdef CAPTSEQ_DEBUG_LOG
 348 // debug after message handled
 349 "ldr     r0, [sp]\n"
 350 "ldr     r0, [r0]\n"
 351 "bl log_capt_seq2\n"
 352 #endif
 353 "       ldr     r0, [sp]\n"
 354 "       ldr     r1, [r0,#4]\n"
 355 "       ldr     r0, [r5,#4]\n"
 356 "       blx     sub_fc302300\n" // j_SetEventFlag
 357 "       ldr     r7, [sp]\n"
 358 "       ldr     r0, [r7,#8]\n"
 359 "       cbnz    r0, loc_fc0bdb46\n"
 360 "       movw    r2, #0x12b\n"
 361 "       ldr     r1, =0xfc0bd504\n" //  *"SsShootTask.c"
 362 "       movs    r0, #0\n"
 363 "       blx     sub_fc302410\n" // j_DebugAssert
 364 "loc_fc0bdb46:\n"
 365 "       str     r6, [r7,#8]\n"
 366 "       b       loc_fc0bd90e\n"
 367 ".ltorg\n"
 368     );
 369 }
 370 
 371 // -s=0xfc0daf9e -c=56 -f=chdk
 372 void __attribute__((naked,noinline)) sub_fc0daf9e_my() {
 373     asm volatile (
 374 "       push    {r4,lr}\n"
 375 "       bl      sub_fc0f8b2c\n"
 376 "       mov     r4, r0\n"
 377 "       bl      sub_fc0d47e6\n"
 378 "       bl      sub_fc143ba0\n"
 379 "       mov     r1, r4\n"
 380 "       bl      sub_fc143bee\n"
 381 "       movs    r2, #4\n"
 382 "       movw    r0, #0x116\n"
 383 "       add.w   r1, r4, #0x34\n"
 384 "       bl      sub_fc373346\n"
 385 "       movs    r2, #4\n"
 386 "       movs    r0, #0x30\n"
 387 "       add.w   r1, r4, #0x38\n"
 388 "       bl      sub_fc373346\n"
 389 "       movs    r2, #4\n"
 390 "       movs    r0, #0x44\n"
 391 "       add.w   r1, r4, #8\n"
 392 "       bl      sub_fc373346\n"
 393 "       bl      sub_fc18aea2\n"
 394 "       mov     r1, #0xffffefff\n"
 395 "       blx     sub_fc3023b0\n"
 396 "       mov     r0, r4\n"
 397 "       bl      sub_fc18ab74\n"
 398 "       bl      sub_fc256d6e\n"
 399 "       bl      sub_fc0ab14a\n"
 400 "       mov     r0, r4\n"
 401 "       bl      sub_fc11d71e_my\n"              //->
 402 "       lsls    r0, r0, #0x1f\n"
 403 "       beq     loc_fc0db004\n"
 404 "       ldr     r1, =0x000132dc\n"
 405 "       movs    r0, #1\n"
 406 "       str     r0, [r1]\n"
 407 "loc_fc0db004:\n"
 408 "       pop     {r4,pc}\n"
 409 ".ltorg\n"
 410     );
 411 }
 412 
 413 //-s=0xfc0dae40 -c=211 -f=chdk
 414 void __attribute__((naked,noinline)) sub_fc0dae40_my() {
 415     asm volatile (
 416 "    push  {r3, r4, r5, r6, r7, lr}\n"
 417 "       ldr     r6, =0x059ef0\n"
 418 "       mov     r5, r0\n"
 419 "       movs    r4, #0\n"
 420 "       ldr     r0, [r6,#0x28]\n"
 421 "       cbz     r0, loc_fc0dae68\n"
 422 "       ldr     r0, =0x0132dc\n"
 423 "       ldr     r0, [r0]\n"
 424 "       cbz     r0, loc_fc0dae54\n"
 425 "       movs    r4, #0x1d\n"
 426 "loc_fc0dae54:\n"
 427 "       mov     r2, r5\n"
 428 "       movs    r1, #2\n"
 429 "       mov     r0, r4\n"
 430 "       bl      sub_fc0d4046\n"
 431 "       mov     r1, r4\n"
 432 "       mov     r0, r5\n"
 433 "       bl      sub_fc18b1ee\n"
 434 "       b       loc_fc0daf94\n"
 435 "loc_fc0dae68:\n"
 436 "       bl      sub_fc143ba0\n"
 437 "       mov     r1, r5\n"
 438 "       bl      sub_fc143bee\n"
 439 "       movs    r2, #4\n"
 440 "       movw    r0, #0x116\n"
 441 "       add.w   r1, r5, #0x34\n"
 442 "       bl      sub_fc373346\n"
 443 "       movs    r2, #4\n"
 444 "       movs    r0, #0x30\n"
 445 "       add.w   r1, r5, #0x38\n"
 446 "       bl      sub_fc373346\n"
 447 "       ldr.w   r0, [r6,#0x10C]\n"
 448 "       cbnz    r0, loc_fc0daea2\n"
 449 "       ldrh.w  r0, [r6,#0x1A2]\n"
 450 "       cmp     r0, #3\n"
 451 "       beq     loc_fc0daea8\n"
 452 "       ldr     r0, [r5,#8]\n"
 453 "       cmp     r0, #1\n"
 454 "       bhi     loc_fc0daeb8\n"
 455 "       b       loc_fc0daea8\n"
 456 "loc_fc0daea2:\n"
 457 "       ldr     r0, [r5,#0xc]\n"
 458 "       cmp     r0, #1\n"
 459 "       bne     loc_fc0daeb8\n"
 460 "loc_fc0daea8:\n"
 461 "       movs    r0, #0xc\n"
 462 "       bl      sub_fc325c14\n"
 463 "       lsls    r0, r0, #0x1f\n"
 464 "       beq     loc_fc0daeb8\n"
 465 "       bl      sub_fc0d3eae\n"
 466 "       movs    r4, #1\n"
 467 "loc_fc0daeb8:\n"
 468 "       lsls    r0, r4, #0x1f\n"
 469 "       bne     loc_fc0daf82\n"
 470 "       ldr.w   r0, [r6,#0xec]\n"
 471 "       cbz     r0, loc_fc0daedc\n"
 472 "       ldrh.w  r0, [r6,#0x1a2]\n"
 473 "       cmp     r0, #3\n"
 474 "       beq     loc_fc0daed0\n"
 475 "       ldr     r0, [r5,#8]\n"
 476 "       cmp     r0, #1\n"
 477 "       bhi     loc_fc0daf22\n"
 478 "loc_fc0daed0:\n"
 479 "       ldr.w   r0, [r6,#0x10c]\n"
 480 "       cbz     r0, loc_fc0daedc\n"
 481 "       ldr     r0, [r5,#0xc]\n"
 482 "       cmp     r0, #1\n"
 483 "       bhi     loc_fc0daf22\n"
 484 "loc_fc0daedc:\n"
 485 "       bl      sub_fc111084\n"
 486 "       cbnz    r0, loc_fc0daf22\n"
 487 "       movs    r2, #2\n"
 488 "       mov     r1, sp\n"
 489 "       movw    r0, #0x110\n"
 490 "       bl      sub_fc373498\n"
 491 "       lsls    r0, r0, #0x1f\n"
 492 "       beq     loc_fc0daefc\n"
 493 "       movs    r2, #0xcb\n"
 494 "       movs    r0, #0\n"
 495 "       ldr     r1, =0x0fc0db020\n"
 496 "       blx     sub_fc302410\n"
 497 "loc_fc0daefc:\n"
 498 "       ldrsh.w r0, [sp]\n"
 499 "       bl      sub_fc130c70\n"
 500 "       bl      sub_fc130b38\n"
 501 "       cmp     r0, #1\n"
 502 "       bls     loc_fc0daf14\n"
 503 "       movs    r0, #0\n"
 504 "       bl      sub_fc130c00\n"
 505 "       b       loc_fc0daf22\n"
 506 "loc_fc0daf14:\n"
 507 "       bl      sub_fc0d3eae\n"
 508 "       bl      sub_fc325c54\n"
 509 "       movs    r4, #1\n"
 510 "       lsls    r0, r4, #0x1f\n"
 511 "       bne     loc_fc0daf82\n"
 512 "loc_fc0daf22:\n"
 513 "       mov     r0, r5\n"
 514 "       bl      sub_fc11083e\n"
 515 "       mov     r4, r0\n"
 516 "       lsls    r0, r0, #0x1f\n"
 517 "       bne     loc_fc0daf82\n"
 518 "       bl      sub_fc18aea2\n"
 519 "       mov     r1, #0xffffefff\n"
 520 "       blx     sub_fc3023b0\n"
 521 "       bl      sub_fc256d6e\n"
 522 "       bl      sub_fc0ab14a\n"
 523 "       mov     r0, r5\n"
 524 "       bl      sub_fc11d450\n"
 525 "       mov     r4, r0\n"
 526 "       lsls    r0, r0, #0x1f\n"
 527 "       bne     loc_fc0daf82\n"
 528 "       bl      sub_fc0d47e6\n"
 529 "       mov     r0, r5\n"
 530 "       bl      sub_fc18ab74\n"
 531 "       movs    r0, #2\n"
 532 "       bl      sub_fc0d61ba\n"
 533 "       ldr.w   r0, [r6,#0xb0]\n"
 534 "       cbz     r0, loc_fc0daf6c\n"
 535 "       mov     r0, r5\n"
 536 "       bl      sub_fc11dd00\n"
 537 "       b       loc_fc0daf94\n"
 538 "loc_fc0daf6c:\n"
 539 "       ldr.w   r0, [r6,#0xb4]\n"
 540 "       cmp     r0, #0\n"
 541 "       mov     r0, r5\n"
 542 "       beq     loc_fc0daf7c\n"
 543 "       bl      sub_fc11d97e\n"
 544 "       b       loc_fc0daf94\n"
 545 "loc_fc0daf7c:\n"
 546 "       bl      sub_fc11d71e_my\n"  // SsStandardCaptureSeq.c hook
 547 "       b       loc_fc0daf94\n"
 548 "loc_fc0daf82:\n"
 549 "       movs    r1, #2\n"
 550 "       mov     r2, r5\n"
 551 "       mov     r0, r4\n"
 552 "       bl      sub_fc0d4046\n"
 553 "       mov     r1, r4\n"
 554 "       mov     r0, r5\n"
 555 "       bl      sub_fc18b324\n"
 556 "loc_fc0daf94:\n"
 557 "       bl      sub_fc0f942a\n"
 558 "       movs    r0, #0\n"
 559 "       str     r0, [r6,#0x28]\n"
 560 "    pop {r3, r4, r5, r6, r7, pc}\n"
 561 ".ltorg\n"
 562     );
 563 }
 564 
 565 // -s=0xfc11d71e -f=chdk
 566 void __attribute__((naked,noinline)) sub_fc11d71e_my() {
 567     asm volatile (
 568 "    push  {r2, r3, r4, r5, r6, r7, r8, r9, r10, lr}\n"
 569 "       ldr     r6, =0xfc11d6f9\n"
 570 "       mov     r5, r0\n"
 571 "       bl      sub_fc18ab0a\n"
 572 "       bl      sub_fc0db464\n"
 573 "       ldr     r7, =0x059ef0\n"
 574 "       ldr.w   r0, [r7,#(0x059f94 - 0x59ef0)]\n"
 575 "       cbnz    r0, loc_fc11d74c\n"
 576 "       ldrh.w  r0, [r7,#(0x05a092 - 0x59ef0)]\n"
 577 "       cmp     r0, #3\n"
 578 "       beq     loc_fc11d744\n"
 579 "       ldr     r0, [r5,#8]\n"
 580 "       cmp     r0, #1\n"
 581 "       bhi     loc_fc11d74c\n"
 582 "loc_fc11d744:\n"
 583 "       bl      sub_fc0d4bf6\n"
 584 "       bl      sub_fc0db046\n"
 585 "loc_fc11d74c:\n"
 586 "       movs    r2, #4\n"
 587 "       movw    r0, #0x137\n"
 588 "       add     r1, sp, #4\n"
 589 "       bl      sub_fc373498\n"
 590 "       lsls    r0, r0, #0x1f\n"
 591 "       beq     loc_fc11d768\n"
 592 "       movs    r0, #0\n"
 593 "       movw    r2, #0x156\n"
 594 "       ldr     r1, =0x0fc11d928\n"
 595 "       blx     sub_fc302410\n"
 596 "loc_fc11d768:\n"
 597 "    BL      wait_until_remote_button_is_released\n" // + remote hook
 598 #ifdef CAPTSEQ_DEBUG_LOG
 599 "bl log_remote_hook\n"
 600 #endif
 601 "       ldr     r0, [sp,#4]\n"
 602 "       ubfx.w  r0, r0, #8, #8\n"
 603 "       cmp     r0, #6\n"
 604 "       bne     loc_fc11d778\n"
 605 "       ldr     r0, =0xfc11d6f9\n"
 606 "       movs    r1, #0\n"
 607 "       b       loc_fc11d77c\n"
 608 "loc_fc11d778:\n"
 609 "       ldr     r0, =(0xfc18a8c4+1)\n"
 610 "       mov     r1, r5\n"
 611 "loc_fc11d77c:\n"
 612 "       bl      sub_fc15526c\n"
 613 "       ldr.w   r0, [r7,#0x18c]\n"
 614 "       cbz     r0, loc_fc11d78a\n"
 615 "       bl      sub_fc18aa20\n"
 616 "loc_fc11d78a:\n"
 617 "       movs    r0, #0\n"
 618 "       bl      sub_fc0be0b0\n"
 619 "       bl      sub_fc111132\n"
 620 "       ldr.w   r8, =0xfc11d6f9\n"
 621 "       mov     r4, r0\n"
 622 "       lsls    r0, r0, #0x1f\n"
 623 "       bne     loc_fc11d89c\n"
 624 "bl capt_seq_hook_set_nr\n"
 625 #ifdef CAPTSEQ_DEBUG_LOG
 626 "bl log_nr_call\n"
 627 #endif
 628 "       mov     r0, r5\n"
 629 "       bl      sub_fc18ac72\n" // NR evaluation
 630 "       mov     r0, r5\n"
 631 "       bl      sub_fc11103c\n"
 632 "       ldr     r1, =0x03ee78\n"
 633 "       movs    r2, #4\n"
 634 "       movs    r0, #0x90\n"
 635 "       bl      sub_fc373498\n" // GetPropertyCase
 636 "       lsls    r0, r0, #0x1f\n"
 637 "       beq     loc_fc11d7c4\n"
 638 "       movs    r0, #0\n"
 639 "       movw    r2, #0x171\n"
 640 "       ldr     r1, =0x0fc11d928\n"
 641 "       blx     sub_fc302410\n"
 642 "loc_fc11d7c4:\n"
 643 "       bl      sub_fc0be1e4\n"
 644 "       bl      sub_fc18ad04\n"
 645 "       movs    r1, #0\n"
 646 "       mov     r0, r5\n"
 647 "       bl      sub_fc11d6fa\n"
 648 "       mov     r6, r0\n"
 649 "       ldr     r0, [sp,#4]\n"
 650 "       ubfx.w  r0, r0, #8, #8\n"
 651 "       cmp     r0, #6\n"
 652 "       bne     loc_fc11d7e4\n"
 653 "       ldr     r2, =(0xfc18a9ee+1)\n"
 654 "       b       loc_fc11d7e6\n"
 655 "loc_fc11d7e4:\n"
 656 "       ldr     r2, =(0xfc18aa04+1)\n"
 657 "loc_fc11d7e6:\n"
 658 "       ldrh    r0, [r5,#0x18]\n"
 659 "       ldr     r4, =0x03ee78\n"
 660 "       cbz     r0, loc_fc11d7f4\n"
 661 "       cmp     r0, #1\n"
 662 "       beq     loc_fc11d80a\n"
 663 "       cmp     r0, #4\n"
 664 "       bne     loc_fc11d85a\n"
 665 "loc_fc11d7f4:\n"
 666 "       str     r6, [sp]\n"
 667 "       mov     r3, r2\n"
 668 "       ldr     r1, [r5,#0x38]\n"
 669 "       mov     r0, r5\n"
 670 "       ldr     r2, [r4]\n"
 671 "       bl      sub_fc18a718\n"
 672 "       mov     r4, r0\n"
 673 "       bl      sub_fc2b747e\n"
 674 "       b       loc_fc11d868\n"
 675 "loc_fc11d80a:\n"
 676 "       str     r6, [sp]\n"
 677 "       mov     r3, r2\n"
 678 "       ldr     r1, [r5,#0x38]\n"
 679 "       mov     r9, r4\n"
 680 "       ldr     r2, [r4]\n"
 681 "       mov     r0, r5\n"
 682 "       bl      sub_fc18a778\n"
 683 "       movs    r2, #1\n"
 684 "       mov     r4, r0\n"
 685 "       movs    r1, #0\n"
 686 "       movs    r0, #0x45\n"
 687 "       bl      sub_fc0ab2ec\n"
 688 "       lsls    r0, r4, #0x1f\n"
 689 "       bne     loc_fc11d868\n"
 690 "       ldr     r0, =0xfc11d6f9\n"
 691 "       movs    r1, #0\n"
 692 "       bl      sub_fc15526c\n"
 693 "       movs    r1, #1\n"
 694 "       mov     r0, r5\n"
 695 "       bl      sub_fc11d6fa\n"
 696 "       mov     r6, r0\n"
 697 "       ldr.w   r0, [r9]\n"
 698 "       mov     r4, r9\n"
 699 "       bl      sub_fc18aa88\n"
 700 "       ldr     r1, [r5,#0x38]\n"
 701 "       mov     r3, r6\n"
 702 "       ldr     r2, [r4]\n"
 703 "       mov     r0, r5\n"
 704 "       bl      sub_fc18a7e6\n"
 705 "       mov     r4, r0\n"
 706 "       bl      sub_fc18a6c2\n"
 707 "       b       loc_fc11d868\n"
 708 "loc_fc11d85a:\n"
 709 "       movs    r0, #0\n"
 710 "       movw    r2, #0x1aa\n"
 711 "       ldr     r1, =0x0fc11d928\n"
 712 "       blx     sub_fc302410\n"
 713 "       movs    r4, #0x1d\n"
 714 "loc_fc11d868:\n"
 715 "       bl      sub_fc18ad08\n"
 716 "       lsls    r0, r4, #0x1f\n"
 717 "       bne     loc_fc11d8d2\n"
 718 "       mov     r0, r5\n"
 719 "       bl      sub_fc18ad1e\n"
 720 "       ldr.w   r0, [r7,#0x108]\n"
 721 "       cbnz    r0, loc_fc11d89a\n"
 722 "       mov     r0, r5\n"
 723 "       bl      sub_fc11107e\n"
 724 "       cbnz    r0, loc_fc11d89a\n"
 725 "       mov     r0, r5\n"
 726 "       bl      sub_fc18b462\n"
 727 "       lsls    r0, r0, #0x1f\n"
 728 "       beq     loc_fc11d89a\n"
 729 "       movs    r0, #0\n"
 730 "       movw    r2, #0x1d0\n"
 731 "       ldr     r1, =0x0fc11d928\n"
 732 "       blx     sub_fc302410\n"
 733 "loc_fc11d89a:\n"
 734 "       b       loc_fc11d89e\n"
 735 "loc_fc11d89c:\n"
 736 "       b       loc_fc11d8d2\n"
 737 "loc_fc11d89e:\n"
 738 #ifdef CAPTSEQ_DEBUG_LOG
 739 "bl log_rh\n"
 740 #endif
 741 "BL capt_seq_hook_raw_here\n" //----------------------------------- ???? ----------
 742 "       mov     r0, r5\n"
 743 "       bl      sub_fc18acf4\n"
 744 "       mov     r0, r5\n"
 745 "       bl      sub_fc18acc8\n"
 746 "       cmp     r6, r8\n"
 747 "       beq     loc_fc11d8d2\n"
 748 "       bl      sub_fc18aea2\n"
 749 "       movs    r1, #4\n"
 750 "       movw    r9, #0x1dd\n"
 751 "       ldr     r3, =0x0fc11d928\n"
 752 "       movw    r2, #0x3a98\n"
 753 "       str.w   r9, [sp]\n"
 754 "       bl      sub_fc325dcc\n"
 755 "       cbz     r0, loc_fc11d8d2\n"
 756 "       movs    r0, #0\n"
 757 "       mov     r2, r9\n"
 758 "       ldr     r1, =0x0fc11d928\n"
 759 "       blx     sub_fc302410\n"
 760 "loc_fc11d8d2:\n"
 761 "       ldr.w   r0, [r7,#0x18c]\n"
 762 "       cbz     r0, loc_fc11d8e2\n"
 763 "       movs    r2, #1\n"
 764 "       movs    r1, #0\n"
 765 "       movs    r0, #0x46\n"
 766 "       bl      sub_fc0ab2ec\n"
 767 "loc_fc11d8e2:\n"
 768 "       movs    r1, #2\n"
 769 "       mov     r2, r5\n"
 770 "       mov     r0, r4\n"
 771 "       bl      sub_fc0d4046\n"
 772 "       ldr     r0, [r7,#0x28]\n"
 773 "       cmp     r0, #0\n"
 774 "       mov     r0, r8\n"
 775 "       beq     loc_fc11d908\n"
 776 "       cmp     r6, r0\n"
 777 "       beq     loc_fc11d8fc\n"
 778 "       movs    r1, #1\n"
 779 "       b       loc_fc11d8fe\n"
 780 "loc_fc11d8fc:\n"
 781 "       movs    r1, #0\n"
 782 "loc_fc11d8fe:\n"
 783 "       mov     r2, r4\n"
 784 "       mov     r0, r5\n"
 785 "       bl      sub_fc18b1ac\n"
 786 "       b       loc_fc11d91a\n"
 787 "loc_fc11d908:\n"
 788 "       cmp     r6, r0\n"
 789 "       beq     loc_fc11d910\n"
 790 "       movs    r1, #1\n"
 791 "       b       loc_fc11d912\n"
 792 "loc_fc11d910:\n"
 793 "       movs    r1, #0\n"
 794 "loc_fc11d912:\n"
 795 "       mov     r2, r4\n"
 796 "       mov     r0, r5\n"
 797 "       bl      sub_fc18b166\n"
 798 "loc_fc11d91a:\n"
 799 "       mov     r0, r4\n"
 800 "    pop {r2, r3, r4, r5, r6, r7, r8, r9, r10, pc}\n"
 801 ".ltorg\n"
 802     );
 803 }       
 804 
 805 #ifdef CAPTSEQ_DEBUG_LOG
 806 void log_nr_call(void) {
 807     _LogCameraEvent(0x60,"nr hook %d",_nrflag);
 808 }
 809 void log_remote_hook(void) {
 810     _LogCameraEvent(0x60,"remote hook");
 811 }
 812 void log_rh(void) {
 813     _LogCameraEvent(0x60,"raw hook");
 814 }
 815 #endif
 816 
 817 //exp_drv_task  -s=task_ExpDrv -c=428 -f=chdk
 818 
 819 void __attribute__((naked,noinline)) exp_drv_task() {
 820     asm volatile (
 821 // task_ExpDrv 0xFC2BC92C
 822 "    push.w  {r4, r5, r6, r7, r8,r9,r10,r11, lr}\n"
 823 //"       push.w  {r4-r11,lr}\n"
 824 "       sub     sp, sp, #0x2c\n"
 825 "       ldr.w   r9, =0x0d2d8\n"
 826 "       ldr.w   r11, =0xfffff400\n"
 827 "       movs    r0, #0\n"
 828 "       ldr     r6, =0x66ba0\n"
 829 "       add.w   r8, sp, #0x1c\n"
 830 "       movw    r10, #0xbb8\n"
 831 "       str     r0, [sp,#0xc]\n"
 832 "loc_fc2bc948:\n"
 833 "       ldr.w   r0, [r9,#(0x0d2fc - 0xd2d8)]\n"
 834 "       movs    r2, #0\n"
 835 "       add     r1, sp, #0x28\n"
 836 "       mov     r4, r9\n"
 837 "       blx     sub_fc3022b0\n"
 838 "       ldr     r0, [sp,#0xc]\n"
 839 "       cmp     r0, #1\n"
 840 "       bne     loc_fc2bc984\n"
 841 "       ldr     r0, [sp,#0x28]\n"
 842 "       ldr     r0, [r0]\n"
 843 "       cmp     r0, #0x15\n"
 844 "loc_fc2bc962:\n"
 845 "       beq     loc_fc2bca40\n"
 846 "       cmp     r0, #0x16\n"
 847 "       beq     loc_fc2bc962\n"
 848 "       cmp     r0, #0x17\n"
 849 "       beq     loc_fc2bc962\n"
 850 "       cmp     r0, #0x18\n"
 851 "       beq     loc_fc2bc962\n"
 852 "       cmp     r0, #0x19\n"
 853 "       beq     loc_fc2bc962\n"
 854 "       cmp     r0, #0x1a\n"
 855 "       beq     loc_fc2bc962\n"
 856 "       cmp     r0, #0x31\n"
 857 "       beq     loc_fc2bca46\n"
 858 "       movs    r0, #0\n"
 859 "       add     r1, sp, #0xc\n"
 860 "       bl      sub_fc2bc66a\n"
 861 "loc_fc2bc984:\n"
 862 "       ldr     r0, [sp,#0x28]\n"
 863 "       ldr     r1, [r0]\n"
 864 "       cmp     r1, #0x39\n"
 865 "       bne     loc_fc2bc9a2\n"
 866 "       bl      sub_fc2bd9cc\n"
 867 "       ldr.w   r0, [r9,#0x20]\n"
 868 "       movs    r1, #1\n"
 869 "       blx     sub_fc302300\n"
 870 "       blx     sub_fc3022c8\n"
 871 "       add     sp, sp, #0x2c\n"
 872 "       b       locret_fc2bc3bc\n"
 873 "loc_fc2bc9a2:\n"
 874 "       cmp     r1, #0x38\n"
 875 "       bne     loc_fc2bc9b4\n"
 876 "loc_fc2bc9a6:\n"
 877 "       add.w   r0, r0, #0xac\n"
 878 "       ldrd.w  r2, r1, [r0]\n"
 879 "       mov     r0, r1\n"
 880 "       blx     r2\n"
 881 "       b       loc_fc2bce2a\n"
 882 "loc_fc2bc9b4:\n"
 883 "       cmp     r1, #0x2f\n"
 884 "       bne     loc_fc2bc9ea\n"
 885 "       ldr     r0, [r4,#0x20]\n"
 886 "       movs    r1, #0x80\n"
 887 "       blx     sub_fc3023b0\n"
 888 "       ldr     r0, =0xfc2b88e3\n"
 889 "       movs    r1, #0x80\n"
 890 "       bl      sub_fc318c22\n"
 891 "       ldr     r0, [r4,#0x20]\n"
 892 "       movs    r1, #0x80\n"
 893 "       mov     r2, r10\n"
 894 "       blx     sub_fc302280\n"
 895 "       lsls    r0, r0, #0x1f\n"
 896 "       beq     loc_fc2bc9dc\n"
 897 "       movw    r2, #0x198a\n"
 898 "       b       loc_fc2bcaac\n"
 899 "loc_fc2bc9dc:\n"
 900 "       ldr     r1, [sp,#0x28]\n"
 901 "       add.w   r1, r1, #0xac\n"
 902 "       ldrd.w  r1, r0, [r1]\n"
 903 "       blx     r1\n"
 904 "       b       loc_fc2bce2a\n"
 905 "loc_fc2bc9ea:\n"
 906 "       cmp     r1, #0x30\n"
 907 "       bne     loc_fc2bca42\n"
 908 "       add     r1, sp, #0xc\n"
 909 "       bl      sub_fc2bc66a\n"
 910 "       movw    r5, #0x100\n"
 911 "       ldr     r0, [r4,#0x20]\n"
 912 "       mov     r1, r5\n"
 913 "       blx     sub_fc3023b0\n"
 914 "       ldr     r0, =0xfc2b88ed\n"
 915 "       mov     r1, r5\n"
 916 "       bl      sub_fc318dcc\n"
 917 "       ldr     r0, [r4,#0x20]\n"
 918 "       mov     r2, r10\n"
 919 "       mov     r1, r5\n"
 920 "       blx     sub_fc302280\n"
 921 "       lsls    r0, r0, #0x1f\n"
 922 "       beq     loc_fc2bc9dc\n"
 923 "       movw    r2, #0x1994\n"
 924 "       b       loc_fc2bcaac\n"
 925 /* " off_fc2bca1c dcd word_d2d8      ; ...\n"
 926 " off_fc2bca20 dcd asc_fc2b8cc8   ; ...\n"
 927 " dword_fc2bca24 dcd 0xfc2b88f7   ; ...\n"
 928 " dword_fc2bca28 dcd 0x66ba0      ; ...\n"
 929 " dword_fc2bca2c dcd 0xfc2b8901   ; ...\n"
 930 " dword_fc2bca30 dcd 0xfffff400   ; ...\n"
 931 " dword_fc2bca34 dcd 0xfc2b88d9   ; ...\n"
 932 " dword_fc2bca38 dcd 0xfc2b88e3   ; ...\n"
 933 " dword_fc2bca3c dcd 0xfc2b88ed   ; ...\n" */
 934 "loc_fc2bca40:\n"
 935 "       b       loc_fc2bcab6\n"
 936 "loc_fc2bca42:\n"
 937 "       cmp     r1, #0x31\n"
 938 "       bne     loc_fc2bca50\n"
 939 "loc_fc2bca46:\n"
 940 "       ldr     r0, [sp,#0x28]\n"
 941 "       add     r1, sp, #0xc\n"
 942 "       bl      sub_fc2bc66a\n"
 943 "       b       loc_fc2bc9dc\n"
 944 "loc_fc2bca50:\n"
 945 "       cmp     r1, #0x32\n"
 946 "       bne     loc_fc2bca6a\n"
 947 "       bl      sub_fc2bc6ae\n"
 948 "       ldr     r1, [sp,#0x28]\n"
 949 "       add.w   r1, r1, #0xac\n"
 950 "       ldrd.w  r1, r0, [r1]\n"
 951 "       blx     r1\n"
 952 "       bl      sub_fc20cf62\n"
 953 "       b       loc_fc2bce2a\n"
 954 "loc_fc2bca6a:\n"
 955 "       cmp     r1, #0x33\n"
 956 "       beq     loc_fc2bc9a6\n"
 957 "       cmp     r1, #0x36\n"
 958 "       bne     loc_fc2bca80\n"
 959 "       bl      sub_fc3604a0\n"
 960 "       bl      sub_fc20d26c\n"
 961 "       bl      sub_fc20cf62\n"
 962 "       b       loc_fc2bc9dc\n"
 963 "loc_fc2bca80:\n"
 964 "       cmp     r1, #0x37\n"
 965 "       bne     loc_fc2bcab6\n"
 966 "       ldr     r0, [r4,#0x20]\n"
 967 "       movs    r1, #4\n"
 968 "       blx     sub_fc3023b0\n"
 969 "       ldr     r1, =0xfc2b8901\n"
 970 "       movs    r2, #4\n"
 971 "       mov     r0, r11\n"
 972 "       bl      sub_fc2bda1e\n"
 973 "       bl      sub_fc360204\n"
 974 "       ldr     r0, [r4,#0x20]\n"
 975 "       movs    r1, #4\n"
 976 "       mov     r2, r10\n"
 977 "       blx     sub_fc302400\n"
 978 "       lsls    r0, r0, #0x1f\n"
 979 "       beq     loc_fc2bc9dc\n"
 980 "       movw    r2, #0x1a77\n"
 981 "loc_fc2bcaac:\n"
 982 "       ldr     r1, =0x0fc2b8cc8\n"
 983 "       movs    r0, #0\n"
 984 "       blx     sub_fc302410\n"
 985 "       b       loc_fc2bc9dc\n"
 986 "loc_fc2bcab6:\n"
 987 "       ldr     r0, [sp,#0x28]\n"
 988 "       movs    r5, #1\n"
 989 "       ldr     r1, [r0]\n"
 990 "       cmp     r1, #0x13\n"
 991 "       beq     loc_fc2bcac4\n"
 992 "       cmp     r1, #0x14\n"
 993 "       bne     loc_fc2bcb02\n"
 994 "loc_fc2bcac4:\n"
 995 "       ldr.w   r1, [r0,#0x94]\n"
 996 "       mov     r4, r8\n"
 997 "       add.w   r1, r1, r1,lsl#1\n"
 998 "       add.w   r1, r0, r1,lsl#2\n"
 999 "       subs    r1, #8\n"
1000 "       ldmia   r1!, {r2,r3,r7}\n"
1001 "       stmia   r4!, {r2,r3,r7}\n"
1002 "       bl      sub_fc2bafe2\n"
1003 "       ldr     r0, [sp,#0x28]\n"
1004 "       add.w   r0, r0, #0x94\n"
1005 "       ldrd.w  r3, r2, [r0,#0x18]\n"
1006 "       ldr     r1, [r0]\n"
1007 "       sub.w   r0, r0, #0x90\n"
1008 "       blx     r3\n"
1009 "       ldr     r0, [sp,#0x28]\n"
1010 "       bl      sub_fc2bdc48\n"
1011 "       ldr     r0, [sp,#0x28]\n"
1012 "       add.w   r0, r0, #0x94\n"
1013 "       ldr     r1, [r0]\n"
1014 "       ldrd.w  r3, r2, [r0,#0x20]\n"
1015 "       b       loc_fc2bcd4c\n"
1016 "loc_fc2bcb02:\n"
1017 "       cmp     r1, #0x15\n"
1018 "       beq     loc_fc2bcb1a\n"
1019 "       cmp     r1, #0x16\n"
1020 "       beq     loc_fc2bcb1a\n"
1021 "       cmp     r1, #0x17\n"
1022 "       beq     loc_fc2bcb1a\n"
1023 "       cmp     r1, #0x18\n"
1024 "       beq     loc_fc2bcb1a\n"
1025 "       cmp     r1, #0x19\n"
1026 "       beq     loc_fc2bcb1a\n"
1027 "       cmp     r1, #0x1a\n"
1028 "       bne     loc_fc2bcb86\n"
1029 "loc_fc2bcb1a:\n"
1030 "       bl      sub_fc3604a0\n"
1031 "       ldr     r0, [sp,#0x28]\n"
1032 "       add     r3, sp, #0xc\n"
1033 "       add     r1, sp, #0x1c\n"
1034 "       mov     r2, sp\n"
1035 "       bl      sub_fc2bb1c0\n"
1036 "       cmp     r0, #1\n"
1037 "       mov     r4, r0\n"
1038 "       beq     loc_fc2bcb34\n"
1039 "       cmp     r4, #5\n"
1040 "       bne     loc_fc2bcb54\n"
1041 "loc_fc2bcb34:\n"
1042 "       ldr     r0, [sp,#0x28]\n"
1043 "       mov     r2, r4\n"
1044 "       add.w   r0, r0, #0x94\n"
1045 "       ldrd.w  r7, r3, [r0,#0x18]\n"
1046 "       ldr     r1, [r0]\n"
1047 "       sub.w   r0, r0, #0x90\n"
1048 "       blx     r7\n"
1049 "       ldr     r2, [sp,#0xc]\n"
1050 "       mov     r1, r4\n"
1051 "       ldr     r0, [sp,#0x28]\n"
1052 "       bl      sub_fc2bc628\n"
1053 "loc_fc2bcb52:\n"
1054 "       b       loc_fc2bcd52\n"
1055 "loc_fc2bcb54:\n"
1056 "       cmp     r4, #2\n"
1057 "       beq     loc_fc2bcb5c\n"
1058 "       cmp     r4, #6\n"
1059 "       bne     loc_fc2bcb70\n"
1060 "loc_fc2bcb5c:\n"
1061 "       ldr     r0, [sp,#0x28]\n"
1062 "       add     r1, sp, #0x1c\n"
1063 "       mov     r2, sp\n"
1064 "       bl      sub_fc2bc3c0\n"
1065 "       ldr     r2, [sp,#0xc]\n"
1066 "       mov     r1, r4\n"
1067 "       ldr     r0, [sp,#0x28]\n"
1068 "       bl      sub_fc2bc628\n"
1069 "loc_fc2bcb70:\n"
1070 "       ldr     r0, [sp,#0x28]\n"
1071 "       mov     r2, r4\n"
1072 "       add.w   r0, r0, #0x94\n"
1073 "       ldrd.w  r7, r3, [r0,#0x18]\n"
1074 "       ldr     r1, [r0]\n"
1075 "       sub.w   r0, r0, #0x90\n"
1076 "       blx     r7\n"
1077 "       b       loc_fc2bcd52\n"
1078 "loc_fc2bcb86:\n"
1079 "       cmp     r1, #0x2b\n"
1080 "       beq     loc_fc2bcb8e\n"
1081 "       cmp     r1, #0x2c\n"
1082 "       bne     loc_fc2bcbfc\n"
1083 "loc_fc2bcb8e:\n"
1084 "       ldr.w   r1, [r0,#0x94]\n"
1085 "       mov     r7, r8\n"
1086 "       add.w   r1, r1, r1,lsl#1\n"
1087 "       add.w   r1, r0, r1,lsl#2\n"
1088 "       subs    r1, #8\n"
1089 "       ldmia   r1, {r1-r3}\n"
1090 "       stmia   r7!, {r1-r3}\n"
1091 "       bl      sub_fc2ba386\n"
1092 "       ldr     r0, [sp,#0x28]\n"
1093 "       add.w   r0, r0, #0x94\n"
1094 "       ldrd.w  r3, r2, [r0,#0x18]\n"
1095 "       ldr     r1, [r0]\n"
1096 "       sub.w   r0, r0, #0x90\n"
1097 "       blx     r3\n"
1098 "       bl      sub_fc3604a0\n"
1099 "       bl      sub_fc20d26c\n"
1100 "       bl      sub_fc20cf62\n"
1101 "       ldr     r0, [r4,#0x20]\n"
1102 "       movs    r1, #2\n"
1103 "       mov     r7, r10\n"
1104 "       mov     r2, r10\n"
1105 "       blx     sub_fc302280\n"
1106 "       lsls    r0, r0, #0x1f\n"
1107 "       beq     loc_fc2bcbe0\n"
1108 "       ldr     r1, =0x0fc2b8cc8\n"
1109 "       movs    r0, #0\n"
1110 "       movw    r2, #0xeae\n"
1111 "       blx     sub_fc302410\n"
1112 "loc_fc2bcbe0:\n"
1113 "       ldr     r0, [r4,#0x20]\n"
1114 "       movs    r1, #0x20\n"
1115 "       mov     r2, r7\n"
1116 "       blx     sub_fc302280\n"
1117 "       lsls    r0, r0, #0x1f\n"
1118 "       beq     loc_fc2bcb52\n"
1119 "       ldr     r1, =0x0fc2b8cc8\n"
1120 "       movs    r0, #0\n"
1121 "       movw    r2, #0xeb1\n"
1122 "       blx     sub_fc302410\n"
1123 "       b       loc_fc2bcd52\n"
1124 "loc_fc2bcbfc:\n"
1125 "       adds    r1, r0, #4\n"
1126 "       mov     r4, r8\n"
1127 "       ldmia   r1!, {r2,r3,r7}\n"
1128 "       stmia   r4!, {r2,r3,r7}\n"
1129 "       ldr     r1, [r0]\n"
1130 "       cmp     r1, #0x2f\n"
1131 "       bcs     loc_fc2bcc42\n"
1132 "       tbb.w   [pc,r1]\n"
1133 "branchtable_fc2bcc0a:\n"
1134 ".byte((loc_fc2bcc3e - branchtable_fc2bcc0a) / 2)\n"
1135 ".byte((loc_fc2bcc3e - branchtable_fc2bcc0a) / 2)\n"
1136 ".byte((loc_fc2bcc44 - branchtable_fc2bcc0a) / 2)\n"
1137 ".byte((loc_fc2bcc4a - branchtable_fc2bcc0a) / 2)\n"
1138 ".byte((loc_fc2bcc4a - branchtable_fc2bcc0a) / 2)\n"
1139 ".byte((loc_fc2bcc4a - branchtable_fc2bcc0a) / 2)\n"
1140 ".byte((loc_fc2bcc3e - branchtable_fc2bcc0a) / 2)\n"
1141 ".byte((loc_fc2bcc44 - branchtable_fc2bcc0a) / 2)\n"
1142 ".byte((loc_fc2bcc4a - branchtable_fc2bcc0a) / 2)\n"
1143 ".byte((loc_fc2bcc4a - branchtable_fc2bcc0a) / 2)\n"
1144 ".byte((loc_fc2bcc5c - branchtable_fc2bcc0a) / 2)\n"
1145 ".byte((loc_fc2bcc5c - branchtable_fc2bcc0a) / 2)\n"
1146 ".byte((loc_fc2bcc5c - branchtable_fc2bcc0a) / 2)\n"
1147 ".byte((loc_fc2bcd30 - branchtable_fc2bcc0a) / 2)\n"
1148 ".byte((loc_fc2bcd36 - branchtable_fc2bcc0a) / 2)\n"
1149 ".byte((loc_fc2bcd36 - branchtable_fc2bcc0a) / 2)\n"
1150 ".byte((loc_fc2bcd36 - branchtable_fc2bcc0a) / 2)\n"
1151 ".byte((loc_fc2bcd36 - branchtable_fc2bcc0a) / 2)\n"
1152 ".byte((loc_fc2bcd3c - branchtable_fc2bcc0a) / 2)\n"
1153 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1154 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1155 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1156 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1157 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1158 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1159 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1160 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1161 ".byte((loc_fc2bcc50 - branchtable_fc2bcc0a) / 2)\n"
1162 ".byte((loc_fc2bcc56 - branchtable_fc2bcc0a) / 2)\n"
1163 ".byte((loc_fc2bcc56 - branchtable_fc2bcc0a) / 2)\n"
1164 ".byte((loc_fc2bcc56 - branchtable_fc2bcc0a) / 2)\n"
1165 ".byte((loc_fc2bcc64 - branchtable_fc2bcc0a) / 2)\n"
1166 ".byte((loc_fc2bcc64 - branchtable_fc2bcc0a) / 2)\n"
1167 ".byte((loc_fc2bcc64 - branchtable_fc2bcc0a) / 2)\n"
1168 ".byte((loc_fc2bcc64 - branchtable_fc2bcc0a) / 2)\n"
1169 ".byte((loc_fc2bcc6a - branchtable_fc2bcc0a) / 2)\n"
1170 ".byte((loc_fc2bcc94 - branchtable_fc2bcc0a) / 2)\n"
1171 ".byte((loc_fc2bccbe - branchtable_fc2bcc0a) / 2)\n"
1172 ".byte((loc_fc2bccc2 - branchtable_fc2bcc0a) / 2)\n"
1173 ".byte((loc_fc2bccca - branchtable_fc2bcc0a) / 2)\n"
1174 ".byte((loc_fc2bccf4 - branchtable_fc2bcc0a) / 2)\n"
1175 ".byte((loc_fc2bcd1e - branchtable_fc2bcc0a) / 2)\n"
1176 ".byte((loc_fc2bcd1e - branchtable_fc2bcc0a) / 2)\n"
1177 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1178 ".byte((loc_fc2bcd40 - branchtable_fc2bcc0a) / 2)\n"
1179 ".byte((loc_fc2bcd24 - branchtable_fc2bcc0a) / 2)\n"
1180 ".byte((loc_fc2bcd2a - branchtable_fc2bcc0a) / 2)\n"
1181 ".align 1\n"
1182 "loc_fc2bcc3e:\n"
1183 "       bl      sub_fc2b8e0c\n"
1184 "loc_fc2bcc42:\n"
1185 "       b       loc_fc2bcd40\n"
1186 "loc_fc2bcc44:\n"
1187 "       bl      sub_fc2b9084\n"
1188 "       b       loc_fc2bcd40\n"
1189 "loc_fc2bcc4a:\n"
1190 "       bl      sub_fc2b92a8\n"
1191 "       b       loc_fc2bcd40\n"
1192 "loc_fc2bcc50:\n"
1193 "       bl      sub_fc2b955c\n"
1194 "       b       loc_fc2bcd40\n"
1195 "loc_fc2bcc56:\n"
1196 "       bl      sub_fc2b9718\n"
1197 "       b       loc_fc2bcd40\n"
1198 "loc_fc2bcc5c:\n"
1199 "       bl      sub_fc2b9a84_my\n" //           _______-----________
1200 "       movs    r5, #0\n"
1201 "       b       loc_fc2bcd40\n"
1202 "loc_fc2bcc64:\n"
1203 "       bl      sub_fc2b9b88\n"
1204 "       b       loc_fc2bcd40\n"
1205 "loc_fc2bcc6a:\n"
1206 "       ldrh    r1, [r0,#4]\n"
1207 "       strh.w  r1, [sp,#0x1c]\n"
1208 "       ldrh    r1, [r6,#2]\n"
1209 "       strh.w  r1, [sp,#0x1e]\n"
1210 "       ldrh    r1, [r6,#4]\n"
1211 "       strh.w  r1, [sp,#0x20]\n"
1212 "       ldrh    r1, [r6,#6]\n"
1213 "       strh.w  r1, [sp,#0x22]\n"
1214 "       ldrh    r1, [r0,#0xc]\n"
1215 "       strh.w  r1, [sp,#0x24]\n"
1216 "       ldrh    r1, [r6,#0xa]\n"
1217 "       strh.w  r1, [sp,#0x26]\n"
1218 "       bl      sub_fc2ba074\n"
1219 "       b       loc_fc2bcd40\n"
1220 "loc_fc2bcc94:\n"
1221 "       ldrh    r1, [r0,#4]\n"
1222 "       strh.w  r1, [sp,#0x1c]\n"
1223 "       ldrh    r1, [r6,#2]\n"
1224 "       strh.w  r1, [sp,#0x1e]\n"
1225 "       ldrh    r1, [r6,#4]\n"
1226 "       strh.w  r1, [sp,#0x20]\n"
1227 "       ldrh    r1, [r6,#6]\n"
1228 "       strh.w  r1, [sp,#0x22]\n"
1229 "       ldrh    r1, [r6,#8]\n"
1230 "       strh.w  r1, [sp,#0x24]\n"
1231 "       ldrh    r1, [r6,#0xa]\n"
1232 "       strh.w  r1, [sp,#0x26]\n"
1233 "       bl      sub_fc2bda96\n"
1234 "       b       loc_fc2bcd40\n"
1235 "loc_fc2bccbe:\n"
1236 "       movs    r1, #1\n"
1237 "       b       loc_fc2bccc4\n"
1238 "loc_fc2bccc2:\n"
1239 "       movs    r1, #0\n"
1240 "loc_fc2bccc4:\n"
1241 "       bl      sub_fc2ba136\n"
1242 "       b       loc_fc2bcd40\n"
1243 "loc_fc2bccca:\n"
1244 "       ldrh    r1, [r6]\n"
1245 "       strh.w  r1, [sp,#0x1c]\n"
1246 "       ldrh    r1, [r0,#6]\n"
1247 "       strh.w  r1, [sp,#0x1e]\n"
1248 "       ldrh    r1, [r6,#4]\n"
1249 "       strh.w  r1, [sp,#0x20]\n"
1250 "       ldrh    r1, [r6,#6]\n"
1251 "       strh.w  r1, [sp,#0x22]\n"
1252 "       ldrh    r1, [r6,#8]\n"
1253 "       strh.w  r1, [sp,#0x24]\n"
1254 "       ldrh    r1, [r6,#0xa]\n"
1255 "       strh.w  r1, [sp,#0x26]\n"
1256 "       bl      sub_fc2bdb66\n"
1257 "       b       loc_fc2bcd40\n"
1258 "loc_fc2bccf4:\n"
1259 "       ldrh    r1, [r6]\n"
1260 "       strh.w  r1, [sp,#0x1c]\n"
1261 "       ldrh    r1, [r6,#2]\n"
1262 "       strh.w  r1, [sp,#0x1e]\n"
1263 "       ldrh    r1, [r6,#4]\n"
1264 "       strh.w  r1, [sp,#0x20]\n"
1265 "       ldrh    r1, [r6,#6]\n"
1266 "       strh.w  r1, [sp,#0x22]\n"
1267 "       ldrh    r1, [r0,#0xc]\n"
1268 "       strh.w  r1, [sp,#0x24]\n"
1269 "       ldrh    r1, [r6,#0xa]\n"
1270 "       strh.w  r1, [sp,#0x26]\n"
1271 "       bl      sub_fc2bdbda\n"
1272 "       b       loc_fc2bcd40\n"
1273 "loc_fc2bcd1e:\n"
1274 "       bl      sub_fc2ba17a\n"
1275 "       b       loc_fc2bcd40\n"
1276 "loc_fc2bcd24:\n"
1277 "       bl      sub_fc2ba738\n"
1278 "       b       loc_fc2bcd40\n"
1279 "loc_fc2bcd2a:\n"
1280 "       bl      sub_fc2ba982\n"
1281 "       b       loc_fc2bcd40\n"
1282 "loc_fc2bcd30:\n"
1283 "       bl      sub_fc2bab9e\n"
1284 "       b       loc_fc2bcd40\n"
1285 "loc_fc2bcd36:\n"
1286 "       bl      sub_fc2bacfc\n"
1287 "       b       loc_fc2bcd40\n"
1288 "loc_fc2bcd3c:\n"
1289 "       bl      sub_fc2bae20\n"
1290 "loc_fc2bcd40:\n"
1291 "       ldr     r0, [sp,#0x28]\n"
1292 "       add.w   r0, r0, #0x94\n"
1293 "       ldrd.w  r3, r2, [r0,#0x18]\n"
1294 "       ldr     r1, [r0]\n"
1295 "loc_fc2bcd4c:\n"
1296 "       sub.w   r0, r0, #0x90\n"
1297 "       blx     r3\n"
1298 "loc_fc2bcd52:\n"
1299 "       ldr     r0, [sp,#0x28]\n"
1300 "       ldr     r0, [r0]\n"
1301 "       cmp     r0, #0x11\n"
1302 "       beq     loc_fc2bcd76\n"
1303 "       bgt     loc_fc2bcd6a\n"
1304 "       cmp     r0, #1\n"
1305 "       beq     loc_fc2bcd76\n"
1306 "       cmp     r0, #4\n"
1307 "       beq     loc_fc2bcd76\n"
1308 "       cmp     r0, #0xf\n"
1309 "       bne     loc_fc2bcda8\n"
1310 "       b       loc_fc2bcd76\n"
1311 "loc_fc2bcd6a:\n"
1312 "       cmp     r0, #0x14\n"
1313 "       beq     loc_fc2bcd76\n"
1314 "       cmp     r0, #0x1a\n"
1315 "       beq     loc_fc2bcd76\n"
1316 "       cmp     r0, #0x1d\n"
1317 "       bne     loc_fc2bcda8\n"
1318 "loc_fc2bcd76:\n"
1319 "       ldrsh.w r0, [r6]\n"
1320 "       mov     r2, r11\n"
1321 "       cmp     r0, r11\n"
1322 "       beq     loc_fc2bcd88\n"
1323 "       ldrsh.w r1, [r6,#8]\n"
1324 "       cmp     r1, r2\n"
1325 "       bne     loc_fc2bcda0\n"
1326 "loc_fc2bcd88:\n"
1327 "       add     r0, sp, #0x10\n"
1328 "       bl      sub_fc3606de\n"
1329 "       ldrh.w  r0, [sp,#0x10]\n"
1330 "       strh.w  r0, [sp,#0x1c]\n"
1331 "       ldrh.w  r0, [sp,#0x18]\n"
1332 "       strh.w  r0, [sp,#0x24]\n"
1333 "       b       loc_fc2bcda8\n"
1334 "loc_fc2bcda0:\n"
1335 "       strh.w  r0, [sp,#0x1c]\n"
1336 "       strh.w  r1, [sp,#0x24]\n"
1337 "loc_fc2bcda8:\n"
1338 "       cmp     r5, #1\n"
1339 "       ldr     r0, [sp,#0x28]\n"
1340 "       bne     loc_fc2bcde0\n"
1341 "       movs    r2, #0xc\n"
1342 "       ldr.w   r1, [r0,#0x94]\n"
1343 "       add.w   r1, r1, r1,lsl#1\n"
1344 "       add.w   r4, r0, r1,lsl#2\n"
1345 "       ldr     r0, =0x66ba0\n"
1346 "       subs    r4, #8\n"
1347 "       add     r1, sp, #0x1c\n"
1348 "       blx     sub_fc302408\n"
1349 "       ldr     r0, =0x66ba0\n"
1350 "       movs    r2, #0xc\n"
1351 "       add     r1, sp, #0x1c\n"
1352 "       adds    r0, #0xc\n"
1353 "       blx     sub_fc302408\n"
1354 "       ldr     r0, =0x66ba0\n"
1355 "       movs    r2, #0xc\n"
1356 "       mov     r1, r4\n"
1357 "       adds    r0, #0x18\n"
1358 "       blx     sub_fc302408\n"
1359 "       b       loc_fc2bce2a\n"
1360 "loc_fc2bcde0:\n"
1361 "       ldr     r0, [r0]\n"
1362 "       mov.w   r3, #1\n"
1363 "       cmp     r0, #0xc\n"
1364 "       bne     loc_fc2bce0a\n"
1365 "       movs    r2, #0\n"
1366 "       mov     r1, r3\n"
1367 "       strd.w  r2, r3, [sp]\n"
1368 "       movs    r0, #0\n"
1369 "       mov     r2, r3\n"
1370 "       bl      sub_fc2b8c0c\n"
1371 "       movs    r3, #1\n"
1372 "       movs    r2, #0\n"
1373 "       mov     r1, r3\n"
1374 "       movs    r0, #0\n"
1375 "       strd.w  r2, r3, [sp]\n"
1376 "       mov     r2, r3\n"
1377 "       b       loc_fc2bce26\n"
1378 "loc_fc2bce0a:\n"
1379 "       movs    r2, #1\n"
1380 "       strd.w  r2, r3, [sp]\n"
1381 "       mov     r3, r2\n"
1382 "       mov     r1, r2\n"
1383 "       mov     r0, r2\n"
1384 "       bl      sub_fc2b8c0c\n"
1385 "       movs    r3, #1\n"
1386 "       str     r3, [sp]\n"
1387 "       mov     r2, r3\n"
1388 "       mov     r1, r3\n"
1389 "       mov     r0, r3\n"
1390 "       str     r3, [sp,#4]\n"
1391 "loc_fc2bce26:\n"
1392 "       bl      sub_fc2b8d4c\n"
1393 "loc_fc2bce2a:\n"
1394 "       ldr     r0, [sp,#0x28]\n"
1395 "       bl      sub_fc2bd9cc\n"
1396 "       b       loc_fc2bc948\n"
1397 "locret_fc2bc3bc:\n"
1398 //      POP.W   {R4-R11,PC}
1399 "    pop.w  {r4, r5, r6, r7, r8, r9, r10, r11, pc}\n"
1400 ".ltorg\n"
1401     );
1402 }
1403 //loc_fc2b9a84: -s=0xfc28edd9 -c=  -f=chdk
1404 void __attribute__((naked,noinline)) sub_fc2b9a84_my() {
1405 asm volatile (
1406 "    push.w  {r4, r5, r6, r7, r8, lr}\n"
1407 "       ldr     r7, =0x0d2d8\n"
1408 "       movs    r1, #0x3e\n"
1409 "       mov     r4, r0\n"
1410 "       ldr     r0, [r7,#(0x0d2f8 - 0xd2d8)]\n"
1411 "       blx     sub_fc3023b0\n"
1412 "       movs    r2, #0\n"
1413 "       ldrsh.w r0, [r4,#4]\n"
1414 "       movs    r3, #1\n"
1415 "       mov     r1, r2\n"
1416 "       bl      sub_fc2b894a\n"
1417 "       mov     r6, r0\n"
1418 "       ldrsh.w r0, [r4,#6]\n"
1419 "       bl      sub_fc2b8ad2\n"
1420 "       ldrsh.w r0, [r4,#8]\n"
1421 "       bl      sub_fc2b8b16\n"
1422 "       ldrsh.w r0, [r4,#0xa]\n"
1423 "       bl      sub_fc2b8b5a\n"
1424 "       ldrsh.w r0, [r4,#0xc]\n"
1425 "       movs    r1, #0\n"
1426 "       bl      sub_fc2b8b9e\n"
1427 "       mov     r5, r0\n"
1428 "       ldr     r0, [r4]\n"
1429 "       ldr.w   r8, =0x66bb8\n"
1430 "       cmp     r0, #0xc\n"
1431 "       bne     loc_fc2b9ad8\n"
1432 "       movs    r6, #0\n"
1433 "       mov     r5, r6\n"
1434 "       b       loc_fc2b9af0\n"
1435 "loc_fc2b9ad8:\n"
1436 "       cmp     r6, #1\n"
1437 "       bne     loc_fc2b9af0\n"
1438 "       ldrsh.w r0, [r4,#4]\n"
1439 "       movs    r2, #2\n"
1440 "       ldr     r1, =0xfc2b88d9\n"
1441 "       bl      sub_fc318c3c\n"
1442 "       strh    r0, [r4,#4]\n"
1443 "       movs    r0, #0\n"
1444 "       str     r0, [r7,#(0x0d304 - 0xd2d8)]\n"
1445 "       b       loc_fc2b9af6\n"
1446 "loc_fc2b9af0:\n"
1447 "       ldrh.w  r0, [r8]\n"
1448 "       strh    r0, [r4,#4]\n"
1449 "loc_fc2b9af6:\n"
1450 "       cmp     r5, #1\n"
1451 "       bne     loc_fc2b9b08\n"
1452 "       ldrsh.w r0, [r4,#0xc]\n"
1453 "       movs    r2, #0x20\n"
1454 "       ldr     r1, =0xfc2b8935\n"
1455 "       bl      sub_fc2bda42\n"
1456 "       b       loc_fc2b9b0c\n"
1457 "loc_fc2b9b08:\n"
1458 "       ldrh.w  r0, [r8,#8]\n"
1459 "loc_fc2b9b0c:\n"
1460 "       strh    r0, [r4,#0xc]\n"
1461 "       ldrsh.w r0, [r4,#6]\n"
1462 "       bl      sub_fc36025e_my\n"
1463 "ldr pc,=0xfc2b9b17\n" //continue in ROM thumb
1464 ".ltorg\n"
1465 /*
1466 FC2B9B12       BL      sub_FC36025E
1467 FC2B9B16       LDRSH.W R0, [R4,#8]
1468 FC2B9B1A       MOVS    R1, #1
1469 
1470 */
1471  );
1472 }
1473 //loc_fc36025e:
1474 void __attribute__((naked,noinline)) sub_fc36025e_my() {
1475 asm volatile (
1476 "    push    {r4, r5, r6, lr}\n"
1477 "       ldr     r5, =0x0cd08\n"
1478 "       mov     r4, r0\n"
1479 "       ldr     r0, [r5,#(0x0cd0c - 0xcd08)]\n"
1480 "       cmp     r0, #1\n"
1481 "       beq     loc_fc360276\n"
1482 "       movs    r0, #0\n"
1483 "       movw    r2, #0x16b\n"
1484 "       ldr     r1, =0xfc36031c\n"
1485 "       blx     sub_fc302410\n"
1486 "loc_fc360276:\n"
1487 "       ldr     r0, =0xfffff400\n"
1488 "       cmp     r4, r0\n"
1489 "       bne     loc_fc360280\n"
1490 "       ldrsh.w r4, [r5,#2]\n"
1491 "loc_fc360280:\n"
1492 "       strh    r4, [r5,#2]\n"
1493 "       cmp     r4, r0\n"
1494 "       bne     loc_fc360292\n"
1495 "       movs    r0, #0\n"
1496 "       movw    r2, #0x171\n"
1497 "       ldr     r1, =0xfc36031c\n"
1498 "       blx     sub_fc302410\n"
1499 "loc_fc360292:\n"
1500 "       mov     r0, r4\n"
1501 "       bl      apex2us\n"      
1502 //"       bl      sub_fc3f41de\n"
1503 // "       mov     r4, r0\n"
1504 // "       bl      sub_fc23f5c8\n"
1505 // "       mov     r0, r4\n"
1506 "       bl      sub_fc15f942\n"
1507 "       lsls    r0, r0, #0x1f\n"
1508 "       beq     locret_fc3602b8\n"
1509 "    pop.w   {r4, r5, r6, lr}\n"
1510 "       movs    r0, #0\n"
1511 "       movw    r2, #0x176\n"
1512 "       ldr     r1, =0xfc36031c\n"
1513 //"       b.w     sub_fc3018f4\n"
1514 "ldr pc, =0xfc3018f5\n" //replace above with thumb
1515 " locret_fc3602b8:\n"
1516 "    pop     {r4, r5, r6, pc}\n"
1517 ".ltorg\n"
1518  );
1519 }
1520 

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