[*] Binary protection state of mtdinfo

  
  	Partial RELRO  No Canary found   NX disabled  No PIE       No RPATH     No RUNPATH   No Symbols


[*] Function printf tear down of mtdinfo

    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/mtdinfo @ 0x110f4 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) fcn.000110f4 ()                                  | void fcn_000110f4 (int32_t arg_fch, int32_t arg1, int32_t arg2) {
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_ch;
                                                             |     int32_t var_14h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x000110f4 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x000110f8 mov sl, r2                                    |     sl = r2;
    0x000110fc sub sp, sp, 0x14                              |     
    0x00011100 mov fp, r0                                    |     
    0x00011104 ldr r0, [pc, 0x1dc]                           |     r0 = *(0x112e4);
    0x00011108 mov sb, r1                                    |     sb = r1;
    0x0001110c bl 0x10a74                                    |     puts (r0);
    0x00011110 ldr r2, [sl, 8]                               |     r2 = *((sl + 8));
    0x00011114 mov r3, 0                                     |     r3 = 0;
    0x00011118 str r3, [sp, 0xc]                             |     var_ch = r3;
    0x0001111c mov r1, 0xa                                   |     r1 = 0xa;
    0x00011120 mov r3, 1                                     |     r3 = 1;
                                                             |     do {
    0x00011124 cmp r2, r3                                    |         
                                                             |         if (r2 <= r3) {
    0x00011128 bhi 0x11234                                   |             
    0x0001112c cmn sb, 1                                     |             
                                                             |             if (sb == 1) {
    0x00011130 movne r5, 0                                   |                 r5 = 0;
                                                             |             }
                                                             |             if (sb == 1) {
    0x00011134 movne r6, r5                                  |                 r6 = r5;
                                                             |             }
                                                             |             if (sb != 1) {
    0x00011138 moveq r6, sb                                  |                 r6 = sb;
                                                             |             }
                                                             |             if (sb != 1) {
    0x0001113c moveq r5, 0x13                                |                 r5 = 0x13;
                                                             |             }
    0x00011140 mov r7, r5                                    |             r7 = r5;
    0x00011144 mov r8, r6                                    |             r8 = r6;
    0x00011148 mov r4, 0                                     |             r4 = 0;
                                                             | label_0:
    0x0001114c ldr r3, [sl, 8]                               |             r3 = *((sl + 8));
    0x00011150 cmp r3, r4                                    |             
                                                             |             if (r3 > r4) {
    0x00011154 bhi 0x11248                                   |                 goto label_1;
                                                             |             }
    0x00011158 tst r4, 3                                     |             
                                                             |             if ((r4 & 3) != 0) {
    0x0001115c beq 0x11168                                   |                 
    0x00011160 mov r0, 0xa                                   |                 r0 = 0xa;
    0x00011164 bl 0x109fc                                    |                 putchar (r0);
                                                             |             }
    0x00011168 subs r3, r5, 0x5f                             |             r3 = r5 - 0x5f;
                                                             |             if (r3 == r5) {
    0x0001116c movne r3, 1                                   |                 r3 = 1;
                                                             |             }
    0x00011170 cmn r6, 1                                     |             
                                                             |             if (r6 == 1) {
    0x00011174 movne r3, 0                                   |                 r3 = 0;
                                                             |             }
    0x00011178 cmp r3, 0                                     |             
                                                             |             if (r3 != 0) {
    0x0001117c beq 0x111c4                                   |                 
    0x00011180 bl 0x10b88                                    |                 errno_location ();
    0x00011184 ldr r4, [pc, 0x160]                           |                 
    0x00011188 ldr r2, [pc, 0x160]                           |                 r2 = stderr;
    0x0001118c ldr r1, [pc, 0x160]                           |                 r1 = "mtdinfo";
    0x00011190 str r5, [r0]                                  |                 *(r0) = r5;
    0x00011194 ldr r0, [r4]                                  |                 r0 = "Eraseblock map:";
    0x00011198 bl 0x10abc                                    |                 fprintf ("Eraseblock map:", "mtdinfo", r2, r3, "Eraseblock map:", r5)
    0x0001119c mov r0, r5                                    |                 r0 = r5;
    0x000111a0 ldr r4, [r4]                                  |                 r4 = "Eraseblock map:";
    0x000111a4 bl 0x10a2c                                    |                 strerror (r0);
    0x000111a8 str r5, [sp]                                  |                 *(sp) = r5;
    0x000111ac ldr r3, [pc, 0x144]                           |                 r3 = "%s: error!: could not read locked block info\n";
    0x000111b0 mov r2, 9                                     |                 r2 = 9;
    0x000111b4 ldr r1, [pc, 0x140]                           |                 r1 = *(0x112f8);
    0x000111b8 str r0, [sp, 4]                               |                 var_4h = r0;
    0x000111bc mov r0, r4                                    |                 r0 = r4;
    0x000111c0 bl 0x10abc                                    |                 fprintf (r0, r1, r2, "%s: error!: could not read locked block info\n", r4, r5)
                                                             |             }
    0x000111c4 ldrb r3, [fp, 0xfc]                           |             r3 = *(arg_fch);
    0x000111c8 tst r3, 2                                     |             
                                                             |             if ((r3 & 2) != 0) {
    0x000111cc beq 0x1122c                                   |                 
    0x000111d0 subs r3, r7, 0x5f                             |                 r3 = r7 - 0x5f;
                                                             |                 if (r3 == r7) {
    0x000111d4 movne r3, 1                                   |                     r3 = 1;
                                                             |                 }
    0x000111d8 cmn r8, 1                                     |                 
                                                             |                 if (r8 == 1) {
    0x000111dc movne r3, 0                                   |                     r3 = 0;
                                                             |                 }
    0x000111e0 cmp r3, 0                                     |                 
                                                             |                 if (r3 == 0) {
    0x000111e4 beq 0x1122c                                   |                     goto label_2;
                                                             |                 }
    0x000111e8 bl 0x10b88                                    |                 errno_location ();
    0x000111ec ldr r4, [pc, 0xf8]                            |                 
    0x000111f0 ldr r2, [pc, 0xf8]                            |                 r2 = stderr;
    0x000111f4 ldr r1, [pc, 0x104]                           |                 r1 = "%*serror %d (%s)\n";
    0x000111f8 str r7, [r0]                                  |                 *(r0) = r7;
    0x000111fc ldr r0, [r4]                                  |                 r0 = "Eraseblock map:";
    0x00011200 bl 0x10abc                                    |                 fprintf ("Eraseblock map:", "%*serror %d (%s)\n", r2, r3, "Eraseblock map:")
    0x00011204 mov r0, r7                                    |                 r0 = r7;
    0x00011208 ldr r4, [r4]                                  |                 r4 = "Eraseblock map:";
    0x0001120c bl 0x10a2c                                    |                 strerror (r0);
    0x00011210 str r7, [sp]                                  |                 *(sp) = r7;
    0x00011214 ldr r3, [pc, 0xdc]                            |                 r3 = "%s: error!: could not read locked block info\n";
    0x00011218 mov r2, 9                                     |                 r2 = 9;
    0x0001121c ldr r1, [pc, 0xd8]                            |                 r1 = *(0x112f8);
    0x00011220 str r0, [sp, 4]                               |                 var_4h = r0;
    0x00011224 mov r0, r4                                    |                 r0 = r4;
    0x00011228 bl 0x10abc                                    |                 fprintf (r0, r1, r2, "%s: error!: could not read locked block info\n")
                                                             |             }
                                                             | label_2:
    0x0001122c add sp, sp, 0x14                              |             
    0x00011230 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |             
                                                             |         }
    0x00011234 ldr r0, [sp, 0xc]                             |         r0 = var_ch;
    0x00011238 mul r3, r1, r3                                |         r3 = r1 * r3;
    0x0001123c add r0, r0, 1                                 |         r0++;
    0x00011240 str r0, [sp, 0xc]                             |         var_ch = r0;
    0x00011244 b 0x11124                                     |         
                                                             |     } while (1);
                                                             | label_1:
    0x00011248 ldm sl, {r1, r2}                              |     r1 = *(sl);
                                                             |     r2 = *((sl + 4));
    0x0001124c ldr r0, [pc, 0xb0]                            |     r0 = "%s: error!: could not read bad block info\n";
    0x00011250 mla r3, r2, r4, r1                            |     __asm ("mla r3, r2, r4, r1");
    0x00011254 mov r2, r4                                    |     r2 = r4;
    0x00011258 ldr r1, [sp, 0xc]                             |     r1 = var_ch;
    0x0001125c bl 0x10a20                                    |     printf ("%s: error!: could not read bad block info\n", r1, r2, r3)
    0x00011260 cmn r6, 1                                     |     
                                                             |     if (r6 != 1) {
    0x00011264 beq 0x11290                                   |         
    0x00011268 mov r2, r4                                    |         r2 = r4;
    0x0001126c mov r1, sb                                    |         r1 = sb;
    0x00011270 mov r0, fp                                    |         r0 = fp;
    0x00011274 bl 0x141ac                                    |         r0 = fcn_000141ac (r0, r1);
    0x00011278 cmp r0, 1                                     |         
    0x0001127c mov r6, r0                                    |         r6 = r0;
                                                             |         if (r0 != 1) {
    0x00011280 ldreq r0, [pc, 0x80]                          |             r0 = *(0x00011308);
                                                             |         }
                                                             |         if (r0 == 1) {
    0x00011284 beq 0x11294                                   |             goto label_3;
                                                             |         }
    0x00011288 bl 0x10b88                                    |         r0 = errno_location ();
    0x0001128c ldr r5, [r0]                                  |         r5 = *(r0);
                                                             |     }
    0x00011290 ldr r0, [pc, 0x74]                            |     r0 = *(0x11308);
                                                             | label_3:
    0x00011294 bl 0x10a20                                    |     printf (r0, r1, r2, r3, r4, r5)
    0x00011298 cmn r8, 1                                     |     
                                                             |     if (r8 != 1) {
    0x0001129c beq 0x112c8                                   |         
    0x000112a0 mov r2, r4                                    |         r2 = r4;
    0x000112a4 mov r1, sb                                    |         r1 = sb;
    0x000112a8 mov r0, fp                                    |         r0 = fp;
    0x000112ac bl 0x14220                                    |         r0 = fcn_00014220 (r0, r1);
    0x000112b0 cmp r0, 1                                     |         
    0x000112b4 mov r8, r0                                    |         r8 = r0;
                                                             |         if (r0 != 1) {
    0x000112b8 ldreq r0, [pc, 0x50]                          |             r0 = "BAD ";
                                                             |         }
                                                             |         if (r0 == 1) {
    0x000112bc beq 0x112cc                                   |             goto label_4;
                                                             |         }
    0x000112c0 bl 0x10b88                                    |         r0 = errno_location ();
    0x000112c4 ldr r7, [r0]                                  |         r7 = *(r0);
                                                             |     }
    0x000112c8 ldr r0, [pc, 0x44]                            |     r0 = "BAD ";
                                                             | label_4:
    0x000112cc bl 0x10a20                                    |     printf ("BAD ")
    0x000112d0 add r4, r4, 1                                 |     r4++;
    0x000112d4 tst r4, 3                                     |     
                                                             |     if ((r4 & 3) != 0) {
    0x000112d8 bne 0x1114c                                   |         goto label_0;
                                                             |     }
    0x000112dc mov r0, 0xa                                   |     r0 = 0xa;
    0x000112e0 bl 0x109fc                                    |     putchar (r0);
    0x000112e4 b 0x1114c                                     |     goto label_0;
                                                             | }
    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/mtdinfo @ 0x11318 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) fcn.00011318 ()                                  | void fcn_00011318 (int32_t arg1, int32_t arg2) {
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_8h;
                                                             |     void * s;
                                                             |     int32_t var_18h;
                                                             |     int32_t var_1ch;
                                                             |     int32_t var_20h;
                                                             |     int32_t var_24h;
                                                             |     int32_t var_30h;
                                                             |     int32_t var_38h;
                                                             |     int32_t var_3ch;
                                                             |     int32_t var_40h;
                                                             |     int32_t var_44h;
                                                             |     int32_t var_48h;
                                                             |     int32_t var_89h;
                                                             |     int32_t var_d8h;
                                                             |     int32_t var_d8h_2;
                                                             |     int32_t var_118h;
                                                             |     int32_t var_11ch;
                                                             |     int32_t var_120h;
                                                             |     int32_t var_124h;
                                                             |     int32_t var_128h;
                                                             |     int32_t var_130h;
                                                             |     int32_t var_134h;
                                                             |     int32_t var_13ch;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x00011318 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x0001131c sub sp, sp, 0x13c                             |     
    0x00011320 mov r7, r2                                    |     r7 = r2;
    0x00011324 add r8, sp, 0x38                              |     r8 += var_38h;
    0x00011328 mov r5, r1                                    |     r5 = r1;
    0x0001132c mov r2, r8                                    |     r2 = r8;
    0x00011330 mov r1, r7                                    |     r1 = r7;
    0x00011334 bl 0x137fc                                    |     r0 = fcn_000137fc (r0, r1);
    0x00011338 subs r6, r0, 0                                |     r6 = r0 - 0;
                                                             |     if (r6 == r0) {
    0x0001133c beq 0x113ac                                   |         goto label_7;
                                                             |     }
    0x00011340 bl 0x10b88                                    |     errno_location ();
    0x00011344 ldr r5, [pc, 0x3b8]                           |     r5 = *(0x11700);
    0x00011348 mov r3, r7                                    |     r3 = r7;
    0x0001134c ldr r2, [pc, 0x3b4]                           |     r2 = stderr;
    0x00011350 ldr r4, [r0]                                  |     r4 = *(r0);
    0x00011354 ldr r0, [r5]                                  |     r0 = *(0x11700);
    0x00011358 cmp r4, 0x13                                  |     
                                                             |     if (r4 != 0x13) {
    0x0001135c bne 0x11378                                   |         goto label_8;
                                                             |     }
    0x00011360 ldr r1, [pc, 0x3a4]                           |     r1 = "mtdinfo";
    0x00011364 bl 0x10abc                                    |     fprintf (r0, "mtdinfo")
                                                             |     do {
    0x00011368 mvn r6, 0                                     |         r6 = ~0;
                                                             | label_3:
    0x0001136c mov r0, r6                                    |         r0 = r6;
    0x00011370 add sp, sp, 0x13c                             |         
    0x00011374 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |         
                                                             | label_8:
    0x00011378 ldr r1, [pc, 0x390]                           |         r1 = "_s:_error_:_mtd_d_does_not_correspond_to_any_existing_MTD_device";
    0x0001137c bl 0x10abc                                    |         fprintf (r0, "_s:_error_:_mtd_d_does_not_correspond_to_any_existing_MTD_device")
    0x00011380 mov r0, r4                                    |         r0 = r4;
    0x00011384 ldr r5, [r5]                                  |         r5 = *(r5);
    0x00011388 bl 0x10a2c                                    |         strerror (r0);
    0x0001138c str r4, [sp]                                  |         *(sp) = r4;
    0x00011390 ldr r3, [pc, 0x37c]                           |         r3 = "_s:_error_:_cannot_get_information_about_MTD_device__d";
    0x00011394 mov r2, 9                                     |         r2 = 9;
    0x00011398 ldr r1, [pc, 0x378]                           |         r1 = *(0x11714);
    0x0001139c str r0, [sp, 4]                               |         var_4h = r0;
    0x000113a0 mov r0, r5                                    |         r0 = r5;
    0x000113a4 bl 0x10abc                                    |         fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about_MTD_device__d", r4)
    0x000113a8 b 0x11368                                     |         
                                                             |     } while (1);
                                                             | label_7:
    0x000113ac ldr r1, [sp, 0x38]                            |     r1 = var_38h;
    0x000113b0 ldr r0, [pc, 0x364]                           |     r0 = "%*serror %d (%s)\n";
    0x000113b4 bl 0x10a20                                    |     printf ("%*serror %d (%s)\n", r1)
    0x000113b8 add r1, sp, 0x89                              |     r1 += var_89h;
    0x000113bc ldr r0, [pc, 0x35c]                           |     r0 = "mtd_d";
    0x000113c0 bl 0x10a20                                    |     printf ("mtd_d", r1)
    0x000113c4 add r1, sp, 0x48                              |     r1 += var_48h;
    0x000113c8 ldr r0, [pc, 0x354]                           |     r0 = "Name:                           %s\n";
    0x000113cc bl 0x10a20                                    |     printf ("Name:                           %s\n", r1)
    0x000113d0 ldr r0, [pc, 0x350]                           |     r0 = "Type:                           %s\n";
    0x000113d4 bl 0x10a20                                    |     printf ("Type:                           %s\n")
    0x000113d8 ldr r0, [sp, 0x11c]                           |     r0 = var_11ch;
    0x000113dc mov r2, r6                                    |     r2 = r6;
    0x000113e0 asr r1, r0, 0x1f                              |     r1 = r0 >> 0x1f;
    0x000113e4 bl 0x14d9c                                    |     fcn_00014d9c (r0, r1);
    0x000113e8 mov r0, 0xa                                   |     r0 = 0xa;
    0x000113ec bl 0x109fc                                    |     putchar (r0);
    0x000113f0 ldr r1, [sp, 0x118]                           |     r1 = var_118h;
    0x000113f4 ldr r0, [pc, 0x330]                           |     r0 = "Eraseblock size:                ";
    0x000113f8 bl 0x10a20                                    |     printf ("Eraseblock size:                ", r1)
    0x000113fc mov r2, r6                                    |     r2 = r6;
    0x00011400 ldrd r0, r1, [r8, 0xd8]                       |     __asm ("ldrd r0, r1, [var_d8h]");
    0x00011404 bl 0x14d9c                                    |     fcn_00014d9c (r0, r1);
    0x00011408 ldr r0, [pc, 0x320]                           |     r0 = "Amount_of_eraseblocks:___________d__";
    0x0001140c bl 0x10a74                                    |     puts ("Amount_of_eraseblocks:___________d__");
    0x00011410 ldr r1, [sp, 0x120]                           |     r1 = var_120h;
    0x00011414 ldr r7, [pc, 0x318]                           |     r7 = *(0x11730);
    0x00011418 ldr r4, [pc, 0x318]                           |     r4 = "byte";
    0x0001141c cmp r1, 1                                     |     
                                                             |     if (r1 > 1) {
    0x00011420 movle r2, r7                                  |         r2 = r7;
                                                             |     }
                                                             |     if (r1 <= 1) {
    0x00011424 movgt r2, r4                                  |         r2 = r4;
                                                             |     }
    0x00011428 ldr r0, [pc, 0x30c]                           |     r0 = "bytes";
    0x0001142c bl 0x10a20                                    |     printf ("bytes", r1, r2, r3, "byte")
    0x00011430 ldrb r3, [r5, 0xc]                            |     r3 = *((r5 + 0xc));
    0x00011434 tst r3, 1                                     |     
                                                             |     if ((r3 & 1) == 0) {
    0x00011438 beq 0x11588                                   |         goto label_9;
                                                             |     }
    0x0001143c ldr r1, [sp, 0x124]                           |     r1 = var_124h;
    0x00011440 ldr r0, [pc, 0x2f8]                           |     r0 = "Minimum input/output unit size: %d %s\n";
    0x00011444 cmp r1, 1                                     |     
                                                             |     if (r1 > 1) {
    0x00011448 movle r2, r7                                  |         r2 = r7;
                                                             |     }
                                                             |     if (r1 <= 1) {
    0x0001144c movgt r2, r4                                  |         r2 = r4;
                                                             |     }
    0x00011450 bl 0x10a20                                    |     printf ("Minimum input/output unit size: %d %s\n", r1, r2)
                                                             |     do {
                                                             | label_0:
    0x00011454 ldr r1, [sp, 0x128]                           |         r1 = var_128h;
    0x00011458 cmp r1, 0                                     |         
                                                             |         if (r1 > 0) {
    0x0001145c ble 0x11468                                   |             
    0x00011460 ldr r0, [pc, 0x2dc]                           |             r0 = "Sub_page_size:___________________d__s";
    0x00011464 bl 0x10a20                                    |             printf ("Sub_page_size:___________________d__s")
                                                             |         }
    0x00011468 ldr r3, [sp, 0x130]                           |         r3 = var_130h;
    0x0001146c cmp r3, 0                                     |         
                                                             |         if (r3 > 0) {
    0x00011470 ble 0x11480                                   |             
    0x00011474 ldr r1, [sp, 0x128]                           |             r1 = var_128h;
    0x00011478 ldr r0, [pc, 0x2c8]                           |             r0 = "OOB size:                       %d bytes\n";
    0x0001147c bl 0x10a20                                    |             printf ("OOB size:                       %d bytes\n", r1)
                                                             |         }
    0x00011480 ldrb r3, [r5, 0xc]                            |         r3 = *((r5 + 0xc));
    0x00011484 tst r3, 1                                     |         
                                                             |         if ((r3 & 1) != 0) {
    0x00011488 beq 0x1149c                                   |             
    0x0001148c ldr r2, [sp, 0x40]                            |             r2 = var_40h;
    0x00011490 ldr r1, [sp, 0x3c]                            |             r1 = var_3ch;
    0x00011494 ldr r0, [pc, 0x2b0]                           |             r0 = "Additional erase regions:       %d\n";
    0x00011498 bl 0x10a20                                    |             printf ("Additional erase regions:       %d\n", r1, r2)
                                                             |         }
    0x0001149c ldrb r3, [sp, 0x134]                          |         r3 = var_134h;
    0x000114a0 ldr r4, [pc, 0x2a8]                           |         r4 = "Character device major/minor:   %d:%d\n";
    0x000114a4 ldr r7, [pc, 0x2a8]                           |         r7 = "true";
    0x000114a8 tst r3, 2                                     |         
                                                             |         if ((r3 & 2) == 0) {
    0x000114ac movne r1, r4                                  |             r1 = r4;
                                                             |         }
                                                             |         if ((r3 & 2) != 0) {
    0x000114b0 moveq r1, r7                                  |             r1 = r7;
                                                             |         }
    0x000114b4 ldr r0, [pc, 0x29c]                           |         r0 = "false";
    0x000114b8 bl 0x10a20                                    |         printf ("false", r1, r2, r3, "Character device major/minor:   %d:%d\n")
    0x000114bc ldrb r3, [sp, 0x134]                          |         r3 = var_134h;
    0x000114c0 ldr r0, [pc, 0x294]                           |         r0 = "Bad_blocks_are_allowed:__________s";
    0x000114c4 tst r3, 1                                     |         
                                                             |         if ((r3 & 1) == 0) {
    0x000114c8 movne r1, r4                                  |             r1 = r4;
                                                             |         }
    0x000114cc ldr r4, [pc, 0x28c]                           |         r4 = "Device_is_writable:______________s";
                                                             |         if ((r3 & 1) != 0) {
    0x000114d0 moveq r1, r7                                  |             r1 = r7;
                                                             |         }
    0x000114d4 bl 0x10a20                                    |         printf ("Bad_blocks_are_allowed:__________s", r1, r2, r3, "Device_is_writable:______________s")
    0x000114d8 ldrb r3, [r4]                                 |         r3 = *(r4);
    0x000114dc tst r3, 2                                     |         
                                                             |         if ((r3 & 2) != 0) {
    0x000114e0 beq 0x11504                                   |             
    0x000114e4 ldrb r3, [r5, 0xc]                            |             r3 = *((r5 + 0xc));
    0x000114e8 tst r3, 1                                     |             
                                                             |             if ((r3 & 1) != 0) {
    0x000114ec bne 0x115a4                                   |                 goto label_10;
                                                             |             }
    0x000114f0 ldr r3, [pc, 0x20c]                           |             r3 = *(0x11700);
    0x000114f4 ldr r2, [pc, 0x20c]                           |             r2 = stderr;
    0x000114f8 ldr r1, [pc, 0x264]                           |             r1 = *(0x11760);
    0x000114fc ldr r0, [r3]                                  |             r0 = *(0x11700);
    0x00011500 bl 0x10abc                                    |             fprintf (r0, r1, r2, r3)
                                                             |         }
                                                             | label_1:
    0x00011504 ldr r5, [r4, 4]                               |         r5 = *((r4 + 4));
    0x00011508 cmp r5, 0                                     |         
                                                             |         if (r5 == 0) {
    0x0001150c beq 0x11664                                   |             goto label_4;
                                                             |         }
    0x00011510 ldrb r3, [r4]                                 |         r3 = *(r4);
    0x00011514 tst r3, 4                                     |         
                                                             |         if ((r3 & 4) == 0) {
    0x00011518 bne 0x11528                                   |             
    0x0001151c ldr r3, [sp, 0x130]                           |             r3 = var_130h;
    0x00011520 cmp r3, 0                                     |             
                                                             |             if (r3 == 0) {
    0x00011524 beq 0x11664                                   |                 goto label_4;
                                                             |             }
                                                             |         }
    0x00011528 mov r2, 0x10                                  |         r2 = 0x10;
    0x0001152c mov r1, 0                                     |         r1 = 0;
    0x00011530 add r0, sp, 0x14                              |         r0 += s;
    0x00011534 bl 0x10b34                                    |         memset (r0, r1, r2);
    0x00011538 mov r0, r5                                    |         r0 = r5;
    0x0001153c mov r1, 0x80000                               |         r1 = 0x80000;
    0x00011540 bl 0x10b4c                                    |         r0 = open64 ();
    0x00011544 cmn r0, 1                                     |         
    0x00011548 mov r5, r0                                    |         r5 = r0;
                                                             |         if (r0 == 1) {
    0x0001154c beq 0x11610                                   |             goto label_11;
                                                             |         }
                                                             | label_2:
    0x00011550 ldr r3, [sp, 0x130]                           |         r3 = var_130h;
    0x00011554 cmp r3, 0                                     |         
                                                             |         if (r3 != 0) {
    0x00011558 bne 0x116f0                                   |             goto label_12;
                                                             |         }
    0x0001155c ldr r2, [sp, 0x11c]                           |         r2 = var_11ch;
    0x00011560 mov r1, r5                                    |         r1 = r5;
    0x00011564 str r2, [sp, 0x18]                            |         var_18h = r2;
    0x00011568 ldr r2, [sp, 0x118]                           |         r2 = var_118h;
    0x0001156c mov r0, r8                                    |         r0 = r8;
    0x00011570 str r2, [sp, 0x1c]                            |         var_1ch = r2;
    0x00011574 add r2, sp, 0x14                              |         r2 += s;
    0x00011578 str r3, [sp, 0x14]                            |         s = r3;
    0x0001157c str r3, [sp, 0x20]                            |         var_20h = r3;
    0x00011580 bl 0x110f4                                    |         fcn_000110f4 (r0, r1, r2);
    0x00011584 b 0x116d0                                     |         goto label_13;
                                                             | label_9:
    0x00011588 ldr r3, [sp, 0x44]                            |         r3 = var_44h;
    0x0001158c sub r3, r3, 4                                 |         r3 -= 4;
    0x00011590 bics r3, r3, 4                                |         __asm ("bics r3, r3, 4");
    0x00011594 bne 0x11454                                   |         
                                                             |     } while (r3 != 0);
    0x00011598 ldr r0, [pc, 0x1c8]                           |     r0 = "_s:_error_:_cannot_provide_UBI_info__becasue_sub_page_size_is_not_known";
    0x0001159c bl 0x10a74                                    |     puts ("_s:_error_:_cannot_provide_UBI_info__becasue_sub_page_size_is_not_known");
    0x000115a0 b 0x11454                                     |     goto label_0;
                                                             | label_10:
    0x000115a4 mov r5, 0                                     |     r5 = 0;
    0x000115a8 mov r3, 1                                     |     r3 = 1;
    0x000115ac add r1, sp, 0x11c                             |     r1 += var_11ch;
    0x000115b0 str r5, [sp, 8]                               |     var_8h = r5;
    0x000115b4 str r3, [sp, 4]                               |     var_4h = r3;
    0x000115b8 str r5, [sp]                                  |     *(sp) = r5;
    0x000115bc add r0, sp, 0x14                              |     r0 += s;
    0x000115c0 ldm r1, {r1, r2, r3}                          |     r1 = *(r1);
                                                             |     r2 = *((r1 + 4));
                                                             |     r3 = *((r1 + 8));
    0x000115c4 bl 0x1192c                                    |     fcn_0001192c (r0, r1, r2, r3, r4);
    0x000115c8 ldr r1, [sp, 0x20]                            |     r1 = var_20h;
    0x000115cc ldr r0, [pc, 0x198]                           |     r0 = "Sub-page size:                  unknown";
    0x000115d0 bl 0x10a20                                    |     printf ("Sub-page size:                  unknown", r1)
    0x000115d4 ldr r1, [sp, 0x24]                            |     r1 = var_24h;
    0x000115d8 ldr r0, [pc, 0x190]                           |     r0 = "Default UBI VID header offset:  %d\n";
    0x000115dc bl 0x10a20                                    |     printf ("Default UBI VID header offset:  %d\n", r1)
    0x000115e0 ldr r0, [pc, 0x18c]                           |     r0 = "Default UBI data offset:        %d\n";
    0x000115e4 bl 0x10a20                                    |     printf ("Default UBI data offset:        %d\n")
    0x000115e8 ldr r0, [sp, 0x14]                            |     r0 = s;
    0x000115ec mov r2, r5                                    |     r2 = r5;
    0x000115f0 asr r1, r0, 0x1f                              |     r1 = r0 >> 0x1f;
    0x000115f4 bl 0x14d9c                                    |     fcn_00014d9c (r0, r1);
    0x000115f8 mov r0, 0xa                                   |     r0 = 0xa;
    0x000115fc bl 0x109fc                                    |     putchar (r0);
    0x00011600 ldr r1, [sp, 0x30]                            |     r1 = var_30h;
    0x00011604 ldr r0, [pc, 0x16c]                           |     r0 = "Default UBI LEB size:           ";
    0x00011608 bl 0x10a20                                    |     printf ("Default UBI LEB size:           ", r1)
    0x0001160c b 0x11504                                     |     goto label_1;
                                                             | label_11:
    0x00011610 bl 0x10b88                                    |     errno_location ();
    0x00011614 ldr sb, [pc, 0xe8]                            |     sb = obj.stderr;
    0x00011618 ldr r3, [r4, 4]                               |     r3 = *((r4 + 4));
    0x0001161c ldr r2, [pc, 0xe4]                            |     r2 = stderr;
    0x00011620 ldr r1, [pc, 0x154]                           |     r1 = "Maximum_UBI_volumes_count:_______d";
    0x00011624 ldr r7, [r0]                                  |     r7 = *(r0);
    0x00011628 ldr r0, [sb]                                  |     r0 = *(sb);
    0x0001162c bl 0x10abc                                    |     fprintf (r0, "Maximum_UBI_volumes_count:_______d", r2, r3)
    0x00011630 mov r0, r7                                    |     r0 = r7;
    0x00011634 ldr sb, [sb]                                  |     sb = *(sb);
    0x00011638 bl 0x10a2c                                    |     strerror (r0);
    0x0001163c ldr r3, [pc, 0xd0]                            |     r3 = "_s:_error_:_cannot_get_information_about_MTD_device__d";
    0x00011640 str r7, [sp]                                  |     *(sp) = r7;
    0x00011644 mov r2, 9                                     |     r2 = 9;
    0x00011648 ldr r1, [pc, 0xc8]                            |     r1 = *(0x11714);
    0x0001164c str r0, [sp, 4]                               |     var_4h = r0;
    0x00011650 mov r0, sb                                    |     r0 = sb;
    0x00011654 bl 0x10abc                                    |     fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about_MTD_device__d")
    0x00011658 ldr r3, [sp, 0x130]                           |     r3 = var_130h;
    0x0001165c cmp r3, 0                                     |     
                                                             |     if (r3 == 0) {
    0x00011660 beq 0x11550                                   |         goto label_2;
                                                             |     }
                                                             | label_4:
    0x00011664 mov r0, 0xa                                   |     r0 = 0xa;
    0x00011668 bl 0x109fc                                    |     putchar (r0);
    0x0001166c b 0x1136c                                     |     goto label_3;
                                                             |     do {
    0x00011670 mov r1, r7                                    |         r1 = r7;
    0x00011674 mov r0, sb                                    |         r0 = sb;
    0x00011678 bl 0x10a20                                    |         printf (r0, r1)
    0x0001167c add r2, sp, 0x14                              |         r2 += s;
    0x00011680 mov r1, r7                                    |         r1 = r7;
    0x00011684 mov r0, r5                                    |         r0 = r5;
    0x00011688 bl 0x14104                                    |         r0 = fcn_00014104 (r0, r1);
    0x0001168c cmp r0, 0                                     |         
                                                             |         if (r0 != 0) {
    0x00011690 bne 0x116e4                                   |             goto label_14;
                                                             |         }
    0x00011694 add r1, sp, 0x14                              |         r1 += s;
    0x00011698 ldm r1, {r1, r2, r3}                          |         r1 = *(r1);
                                                             |         r2 = *((r1 + 4));
                                                             |         r3 = *((r1 + 8));
    0x0001169c mov r0, fp                                    |         r0 = fp;
    0x000116a0 bl 0x10a20                                    |         printf (r0, r1)
    0x000116a4 ldrb r3, [r4]                                 |         r3 = *(r4);
    0x000116a8 tst r3, 4                                     |         
                                                             |         if ((r3 & 4) != 0) {
    0x000116ac beq 0x116c0                                   |             
    0x000116b0 add r2, sp, 0x14                              |             r2 += s;
    0x000116b4 mov r1, r5                                    |             r1 = r5;
    0x000116b8 mov r0, r8                                    |             r0 = r8;
    0x000116bc bl 0x110f4                                    |             fcn_000110f4 (r0, r1, r2);
                                                             |         }
                                                             | label_5:
    0x000116c0 add r7, r7, 1                                 |         r7++;
                                                             | label_6:
    0x000116c4 ldr r3, [sp, 0x130]                           |         r3 = var_130h;
    0x000116c8 cmp r7, r3                                    |         
    0x000116cc blt 0x11670                                   |         
                                                             |     } while (r7 < r3);
                                                             | label_13:
    0x000116d0 cmn r5, 1                                     |     
                                                             |     if (r5 == 1) {
    0x000116d4 beq 0x11664                                   |         goto label_4;
                                                             |     }
    0x000116d8 mov r0, r5                                    |     r0 = r5;
    0x000116dc bl 0x10bdc                                    |     close (r0);
    0x000116e0 b 0x11664                                     |     goto label_4;
                                                             | label_14:
    0x000116e4 mov r0, sl                                    |     r0 = sl;
    0x000116e8 bl 0x10a74                                    |     puts (r0);
    0x000116ec b 0x116c0                                     |     goto label_5;
                                                             | label_12:
    0x000116f0 mov r7, 0                                     |     r7 = 0;
    0x000116f4 ldr sb, [pc, 0x84]                            |     sb = "Eraseblock region %i: ";
    0x000116f8 ldr sl, [pc, 0x84]                            |     sl = " info is unavailable";
    0x000116fc ldr fp, [pc, 0x84]                            |     fp = "offset:__x_size:__x_numblocks:__x";
    0x00011700 b 0x116c4                                     |     goto label_6;
                                                             | }
    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/mtdinfo @ 0x1178c */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) fcn.0001178c ()                                  | void fcn_0001178c (int32_t arg1, int32_t arg2) {
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_ch;
                                                             |     int32_t var_10h;
                                                             |     int32_t var_114h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x0001178c push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x00011790 mov r4, r1                                    |     r4 = r1;
    0x00011794 sub sp, sp, 0x114                             |     
    0x00011798 mov r6, r0                                    |     r6 = r0;
    0x0001179c ldr r1, [r1]                                  |     r1 = *(r1);
    0x000117a0 ldr r0, [pc, 0x158]                           |     r0 = *(0x118fc);
    0x000117a4 str r2, [sp, 0xc]                             |     var_ch = r2;
    0x000117a8 bl 0x10a20                                    |     printf (r0, r1, r2, r3, r4, r5, r6)
    0x000117ac ldr r3, [r4]                                  |     r3 = *(r4);
    0x000117b0 cmp r3, 0                                     |     
    0x000117b4 bne 0x117c8                                   |     
                                                             |     while (r3 == 0) {
                                                             | label_0:
    0x000117b8 mov r5, 0                                     |         r5 = 0;
                                                             | label_2:
    0x000117bc mov r0, r5                                    |         r0 = r5;
    0x000117c0 add sp, sp, 0x114                             |         
    0x000117c4 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |         
    0x000117c8 ldr sb, [r4, 4]                               |         sb = *((r4 + 4));
    0x000117cc ldr sl, [pc, 0x130]                           |         sl = "Present MTD devices:            mtd%d";
    0x000117d0 ldr fp, [pc, 0x130]                           |         fp = ", mtd%d";
    0x000117d4 mov r8, 1                                     |         r8 = 1;
                                                             | label_3:
    0x000117d8 ldr r2, [r4, 8]                               |         r2 = *((r4 + 8));
    0x000117dc cmp r2, sb                                    |         
                                                             |         if (r2 >= sb) {
    0x000117e0 bge 0x11848                                   |             goto label_5;
                                                             |         }
    0x000117e4 mov r0, 0xa                                   |         r0 = 0xa;
    0x000117e8 bl 0x109fc                                    |         putchar (r0);
    0x000117ec ldrb r3, [r4, 0xc]                            |         r3 = *((r4 + 0xc));
    0x000117f0 ldr r1, [pc, 0x114]                           |         r1 = ", mtd%d";
    0x000117f4 tst r3, 1                                     |         
    0x000117f8 ldr r3, [pc, 0x110]                           |         r3 = "yes";
    0x000117fc ldr r0, [pc, 0x110]                           |         r0 = "no";
                                                             |         if ((r3 & 1) != 0) {
    0x00011800 moveq r1, r3                                  |             r1 = r3;
                                                             |         }
    0x00011804 bl 0x10a20                                    |         printf ("no", ", mtd%d", r2, r3)
    0x00011808 ldr r3, [sp, 0xc]                             |         r3 = var_ch;
    0x0001180c cmp r3, 0                                     |         
    0x00011810 beq 0x117b8                                   |         
                                                             |     }
    0x00011814 mov r0, 0xa                                   |     r0 = 0xa;
    0x00011818 bl 0x109fc                                    |     putchar (r0);
    0x0001181c ldr r7, [r4, 4]                               |     r7 = *((r4 + 4));
                                                             | label_1:
    0x00011820 ldr r3, [r4, 8]                               |     r3 = *((r4 + 8));
    0x00011824 cmp r3, r7                                    |     
                                                             |     if (r3 < r7) {
    0x00011828 blt 0x117b8                                   |         goto label_0;
                                                             |     }
    0x0001182c mov r1, r7                                    |     r1 = r7;
    0x00011830 mov r0, r6                                    |     r0 = r6;
    0x00011834 bl 0x1373c                                    |     r0 = fcn_0001373c (r0, r1);
    0x00011838 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001183c bne 0x118e4                                   |         goto label_6;
                                                             |     }
                                                             | label_4:
    0x00011840 add r7, r7, 1                                 |     r7++;
    0x00011844 b 0x11820                                     |     goto label_1;
                                                             | label_5:
    0x00011848 add r2, sp, 0x10                              |     r2 += var_10h;
    0x0001184c mov r1, sb                                    |     r1 = sb;
    0x00011850 mov r0, r6                                    |     r0 = r6;
    0x00011854 bl 0x137fc                                    |     r0 = fcn_000137fc (r0, r1);
    0x00011858 cmn r0, 1                                     |     
    0x0001185c mov r5, r0                                    |     r5 = r0;
                                                             |     if (r0 == 1) {
    0x00011860 bne 0x118b8                                   |         
    0x00011864 bl 0x10b88                                    |         r0 = errno_location ();
    0x00011868 ldr r7, [r0]                                  |         r7 = *(r0);
    0x0001186c cmp r7, 0x13                                  |         
                                                             |         if (r7 == 0x13) {
    0x00011870 beq 0x118cc                                   |             goto label_7;
                                                             |         }
    0x00011874 ldr r4, [pc, 0x9c]                            |         
    0x00011878 mov r3, sb                                    |         r3 = sb;
    0x0001187c ldr r2, [pc, 0x98]                            |         r2 = stderr;
    0x00011880 ldr r1, [pc, 0x98]                            |         r1 = "mtdinfo";
    0x00011884 ldr r0, [r4]                                  |         r0 = "Sysfs interface supported:      %s\n";
    0x00011888 bl 0x10abc                                    |         fprintf ("Sysfs interface supported:      %s\n", "mtdinfo", r2, r3, "Sysfs interface supported:      %s\n")
    0x0001188c mov r0, r7                                    |         r0 = r7;
    0x00011890 ldr r4, [r4]                                  |         r4 = "Sysfs interface supported:      %s\n";
    0x00011894 bl 0x10a2c                                    |         strerror (r0);
    0x00011898 str r7, [sp]                                  |         *(sp) = r7;
    0x0001189c ldr r3, [pc, 0x80]                            |         r3 = "%s: error!: libmtd failed to get MTD device %d information\n";
    0x000118a0 mov r2, 9                                     |         r2 = 9;
    0x000118a4 ldr r1, [pc, 0x7c]                            |         r1 = *(0x11924);
    0x000118a8 str r0, [sp, 4]                               |         var_4h = r0;
    0x000118ac mov r0, r4                                    |         r0 = r4;
    0x000118b0 bl 0x10abc                                    |         fprintf (r0, r1, r2, "%s: error!: libmtd failed to get MTD device %d information\n")
    0x000118b4 b 0x117bc                                     |         goto label_2;
                                                             |     }
    0x000118b8 cmp r8, 0                                     |     
    0x000118bc mov r1, sb                                    |     r1 = sb;
                                                             |     if (r8 != 0) {
    0x000118c0 bne 0x118d4                                   |         goto label_8;
                                                             |     }
    0x000118c4 mov r0, fp                                    |     r0 = fp;
    0x000118c8 bl 0x10a20                                    |     printf (r0)
                                                             |     do {
                                                             | label_7:
    0x000118cc add sb, sb, 1                                 |         sb++;
    0x000118d0 b 0x117d8                                     |         goto label_3;
                                                             | label_8:
    0x000118d4 mov r0, sl                                    |         r0 = sl;
    0x000118d8 bl 0x10a20                                    |         printf (r0)
    0x000118dc mov r8, 0                                     |         r8 = 0;
    0x000118e0 b 0x118cc                                     |         
                                                             |     } while (1);
                                                             | label_6:
    0x000118e4 mov r2, r7                                    |     r2 = r7;
    0x000118e8 mov r1, r4                                    |     r1 = r4;
    0x000118ec mov r0, r6                                    |     r0 = r6;
    0x000118f0 bl 0x11318                                    |     r0 = fcn_00011318 (r0, r1);
    0x000118f4 subs r5, r0, 0                                |     r5 = r0 - 0;
                                                             |     if (r5 == r0) {
    0x000118f8 beq 0x11840                                   |         goto label_4;
                                                             |     }
    0x000118fc b 0x117bc                                     |     goto label_2;
                                                             | }
    ; assembly                                                           | /* r2dec pseudo code output */
                                                                         | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/mtdinfo @ 0x14d9c */
                                                                         | #include <stdint.h>
                                                                         |  
                                                                         | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                                         |  
    ; (fcn) fcn.00014d9c ()                                              | void fcn_00014d9c (void * arg1, int32_t arg2) {
                                                                         |     int32_t var_0h;
                                                                         |     int32_t var_0h_2;
                                                                         |     int32_t var_ch;
                                                                         |     r0 = arg1;
                                                                         |     r1 = arg2;
    0x00014d9c ldr r3, [pc, 0x144]                                       |     r3 = *(0x14ee4);
    0x00014da0 cmp r2, 0                                                 |     
    0x00014da4 push {r0, r1, r2, r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x00014da8 ldr r6, [pc, 0x13c]                                       |     r6 = "__";
    0x00014dac mov r4, r0                                                |     r4 = r0;
                                                                         |     if (r2 != 0) {
    0x00014db0 moveq r6, r3                                              |         r6 = r3;
                                                                         |     }
    0x00014db4 mov r8, r2                                                |     r8 = r2;
    0x00014db8 mov r3, r1                                                |     r3 = r1;
    0x00014dbc mov r2, r0                                                |     r2 = r0;
    0x00014dc0 ldr r0, [pc, 0x128]                                       |     r0 = "_";
    0x00014dc4 mov r5, r1                                                |     r5 = r1;
    0x00014dc8 bl 0x10a20                                                |     printf (r0, r1, r2, r3, r4, r5, "__")
    0x00014dcc cmp r4, 0x40000001                                        |     
    0x00014dd0 sbcs r3, r5, 0                                            |     __asm ("sbcs r3, r5, 0");
                                                                         |     if (r4 < 0x40000001) {
    0x00014dd4 blt 0x14e28                                               |         goto label_1;
                                                                         |     }
    0x00014dd8 add r3, pc, 0xf8                                          |     r3 = pc + 0xf8;
    0x00014ddc ldrd r2, r3, [r3]                                         |     __asm ("ldrd r2, r3, [r3]");
    0x00014de0 bic r0, r4, 0xc0000000                                    |     r0 = BIT_MASK (r4, 0xc0000000);
    0x00014de4 mov r1, 0                                                 |     r1 = 0;
    0x00014de8 bl 0x15c6c                                                |     fcn_00015c6c (r0);
    0x00014dec lsr r7, r4, 0x1e                                          |     r7 = r4 >> 0x1e;
    0x00014df0 orr r7, r7, r5, lsl 2                                     |     r7 |= (r5 << 2);
    0x00014df4 asr sb, r5, 0x1e                                          |     sb = r5 >> 0x1e;
    0x00014df8 mov r2, r7                                                |     r2 = r7;
    0x00014dfc mov r3, sb                                                |     r3 = sb;
    0x00014e00 strd r0, r1, [sp]                                         |     __asm ("strd r0, r1, [sp]");
    0x00014e04 ldr r0, [pc, 0xe8]                                        |     r0 = "%lld bytes";
    0x00014e08 mov r1, r6                                                |     r1 = r6;
                                                                         |     do {
                                                                         | label_0:
    0x00014e0c bl 0x10a20                                                |         printf (r0, r1, r2, r3)
    0x00014e10 cmp r8, 0                                                 |         
                                                                         |         if (r8 == 0) {
    0x00014e14 beq 0x14ed0                                               |             goto label_2;
                                                                         |         }
    0x00014e18 mov r0, 0x29                                              |         r0 = 0x29;
    0x00014e1c add sp, sp, 0xc                                           |         
    0x00014e20 pop {r4, r5, r6, r7, r8, sb, sl, fp, lr}                  |         
    0x00014e24 b 0x109fc                                                 |         void (*0x109fc)() ();
                                                                         | label_1:
    0x00014e28 mov r2, 0x100000                                          |         r2 = 0x100000;
    0x00014e2c mov r3, 0                                                 |         r3 = 0;
    0x00014e30 cmp r2, r4                                                |         
    0x00014e34 sbcs r3, r3, r5                                           |         __asm ("sbcs r3, r3, r5");
                                                                         |         if (r2 >= r4) {
    0x00014e38 bge 0x14e7c                                               |             goto label_3;
                                                                         |         }
    0x00014e3c ldr sl, [pc, 0xb4]                                        |         sl = *(0x00014ef8);
    0x00014e40 mov fp, 0                                                 |         
    0x00014e44 add r3, pc, 0x94                                          |         r3 = pc + 0x94;
    0x00014e48 ldrd r2, r3, [r3]                                         |         __asm ("ldrd r2, r3, [r3]");
    0x00014e4c and r0, sl, r4                                            |         r0 = sl & r4;
    0x00014e50 and r1, fp, r5                                            |         r1 = fp & r5;
    0x00014e54 bl 0x15c6c                                                |         fcn_00015c6c (r0);
    0x00014e58 lsr r7, r4, 0x14                                          |         r7 = r4 >> 0x14;
    0x00014e5c orr r7, r7, r5, lsl 12                                    |         r7 |= (r5 << 12);
    0x00014e60 asr sb, r5, 0x14                                          |         sb = r5 >> 0x14;
    0x00014e64 mov r2, r7                                                |         r2 = r7;
    0x00014e68 mov r3, sb                                                |         r3 = sb;
    0x00014e6c strd r0, r1, [sp]                                         |         __asm ("strd r0, r1, [sp]");
    0x00014e70 ldr r0, [pc, 0x84]                                        |         r0 = *(0x14ef8);
    0x00014e74 mov r1, r6                                                |         r1 = r6;
    0x00014e78 b 0x14e0c                                                 |         
                                                                         |     } while (1);
                                                                         | label_3:
    0x00014e7c mov r2, 0x400                                             |     r2 = 0x400;
    0x00014e80 mov r3, 0                                                 |     r3 = 0;
    0x00014e84 cmp r2, r4                                                |     
    0x00014e88 sbcs r3, r3, r5                                           |     __asm ("sbcs r3, r3, r5");
                                                                         |     if (r2 < r4) {
    0x00014e8c bge 0x14ed0                                               |         
    0x00014e90 ldr sl, [pc, 0x68]                                        |         sl = *(0x00014f00);
    0x00014e94 mov fp, 0                                                 |         
    0x00014e98 mov r2, 0x66                                              |         r2 = 0x66;
    0x00014e9c mov r3, 0                                                 |         r3 = 0;
    0x00014ea0 and r0, sl, r4                                            |         r0 = sl & r4;
    0x00014ea4 and r1, fp, r5                                            |         r1 = fp & r5;
    0x00014ea8 bl 0x15c6c                                                |         fcn_00015c6c (r0);
    0x00014eac lsr r7, r4, 0xa                                           |         r7 = r4 >> 0xa;
    0x00014eb0 orr r7, r7, r5, lsl 22                                    |         r7 |= (r5 << 22);
    0x00014eb4 asr sb, r5, 0xa                                           |         sb = r5 >> 0xa;
    0x00014eb8 mov r2, r7                                                |         r2 = r7;
    0x00014ebc mov r3, sb                                                |         r3 = sb;
    0x00014ec0 strd r0, r1, [sp]                                         |         __asm ("strd r0, r1, [sp]");
    0x00014ec4 ldr r0, [pc, 0x38]                                        |         r0 = *(0x14f00);
    0x00014ec8 mov r1, r6                                                |         r1 = r6;
    0x00014ecc b 0x14e0c                                                 |         goto label_0;
                                                                         |     }
                                                                         | label_2:
    0x00014ed0 add sp, sp, 0xc                                           |     
    0x00014ed4 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}                  |     
                                                                         | }
    ; assembly                                       | /* r2dec pseudo code output */
                                                     | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/mtdinfo @ 0x15588 */
                                                     | #include <stdint.h>
                                                     |  
                                                     | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                     |  
    ; (fcn) fcn.00015588 ()                          | void fcn_00015588 (char * arg1, int32_t arg2) {
                                                     |     int32_t var_0h;
                                                     |     int32_t var_4h;
                                                     |     int32_t var_8h;
                                                     |     int32_t var_8h_2;
                                                     |     int32_t var_10h;
                                                     |     int32_t var_10h_2;
                                                     |     int32_t var_18h;
                                                     |     int32_t var_1ch;
                                                     |     int32_t var_20h;
                                                     |     int32_t var_24h;
                                                     |     int32_t var_28h;
                                                     |     int32_t var_2ch;
                                                     |     int32_t var_38h;
                                                     |     int32_t var_48h;
                                                     |     int32_t var_58h;
                                                     |     int32_t var_58h_2;
                                                     |     int32_t var_a0h;
                                                     |     char * src;
                                                     |     int32_t var_144h;
                                                     |     r0 = arg1;
                                                     |     r1 = arg2;
    0x00015588 push {r4, r5, r6, r7, r8, sb, lr}     |     
    0x0001558c sub sp, sp, 0x144                     |     
    0x00015590 mov r2, 0                             |     r2 = 0;
    0x00015594 mov r3, 0                             |     r3 = 0;
    0x00015598 mov r4, r1                            |     r4 = r1;
    0x0001559c add r1, sp, 0x38                      |     r1 += var_38h;
    0x000155a0 mov r6, r0                            |     r6 = r0;
    0x000155a4 strd r2, r3, [sp, 0x10]               |     __asm ("strd r2, r3, [var_10h]");
    0x000155a8 bl 0x10a38                            |     r0 = stat64 ();
    0x000155ac cmp r0, 0                             |     
                                                     |     if (r0 != 0) {
    0x000155b0 beq 0x15618                           |         
    0x000155b4 bl 0x10b88                            |         errno_location ();
    0x000155b8 ldr r8, [pc, 0x450]                   |         
    0x000155bc mov r3, r6                            |         r3 = r6;
    0x000155c0 ldr r2, [pc, 0x44c]                   |         r2 = stderr;
    0x000155c4 ldr r1, [pc, 0x44c]                   |         r1 = "libmtd";
    0x000155c8 ldr r7, [r0]                          |         r7 = *(r0);
    0x000155cc mov r5, r0                            |         r5 = r0;
    0x000155d0 ldr r0, [r8]                          |         r0 = *(0x15a0c);
    0x000155d4 bl 0x10abc                            |         fprintf (r0, "libmtd", r2, r3, r4, r5)
    0x000155d8 mov r0, r7                            |         r0 = r7;
    0x000155dc ldr r8, [r8]                          |         r8 = *(0x15a0c);
    0x000155e0 bl 0x10a2c                            |         strerror (r0);
    0x000155e4 ldr r3, [pc, 0x430]                   |         r3 = "%s: error!: cannot open \"%s\"\n";
    0x000155e8 str r7, [sp]                          |         *(sp) = r7;
    0x000155ec mov r2, 8                             |         r2 = 8;
    0x000155f0 ldr r1, [pc, 0x428]                   |         r1 = *(0x15a1c);
    0x000155f4 str r0, [sp, 4]                       |         var_4h = r0;
    0x000155f8 mov r0, r8                            |         r0 = r8;
    0x000155fc bl 0x10abc                            |         fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n")
    0x00015600 ldr r3, [r5]                          |         r3 = *(r5);
    0x00015604 cmp r3, 2                             |         
                                                     |         if (r3 != 2) {
    0x00015608 bne 0x15618                           |             goto label_5;
                                                     |         }
    0x0001560c ldr r1, [pc, 0x400]                   |         r1 = stderr;
    0x00015610 ldr r0, [pc, 0x40c]                   |         r0 = "%*serror %d (%s)\n";
    0x00015614 bl 0x10a20                            |         printf ("%*serror %d (%s)\n", r1)
                                                     |     }
                                                     | label_5:
    0x00015618 ldr r3, [sp, 0x48]                    |     r3 = var_48h;
    0x0001561c and r3, r3, 0xf000                    |     r3 &= 0xf000;
    0x00015620 cmp r3, 0x2000                        |     
                                                     |     if (r3 == 0x2000) {
    0x00015624 beq 0x15654                           |         goto label_6;
                                                     |     }
    0x00015628 bl 0x10b88                            |     errno_location ();
    0x0001562c mov r3, 0x16                          |     r3 = 0x16;
    0x00015630 ldr r2, [pc, 0x3dc]                   |     r2 = stderr;
    0x00015634 ldr r1, [pc, 0x3ec]                   |     r1 = "%s: MTD subsystem is old and does not support sysfs, so MTD character device nodes have to exist\n";
    0x00015638 str r3, [r0]                          |     *(r0) = r3;
    0x0001563c ldr r0, [pc, 0x3cc]                   |     
    0x00015640 mov r3, r6                            |     r3 = r6;
    0x00015644 ldr r0, [r0]                          |     r0 = *(0x15a0c);
    0x00015648 bl 0x10abc                            |     fprintf (r0, "%s: MTD subsystem is old and does not support sysfs, so MTD character device nodes have to exist\n", r2, r3)
                                                     |     do {
                                                     | label_0:
    0x0001564c mvn r5, 0                             |         r5 = ~0;
    0x00015650 b 0x15738                             |         goto label_4;
                                                     | label_6:
    0x00015654 mov r2, 0x100                         |         r2 = 0x100;
    0x00015658 mov r1, 0                             |         r1 = 0;
    0x0001565c mov r0, r4                            |         r0 = r4;
    0x00015660 bl 0x10b34                            |         memset (r0, r1, r2);
    0x00015664 ldrd r8, sb, [sp, 0x58]               |         __asm ("ldrd r8, sb, [var_58h]");
    0x00015668 mov r1, sb                            |         r1 = sb;
    0x0001566c mov r0, r8                            |         r0 = r8;
    0x00015670 bl 0x10a5c                            |         gnu_dev_major ();
    0x00015674 mov r1, sb                            |         r1 = sb;
    0x00015678 mov r5, r0                            |         r5 = r0;
    0x0001567c str r0, [r4, 4]                       |         *((r4 + 4)) = r0;
    0x00015680 mov r0, r8                            |         r0 = r8;
    0x00015684 bl 0x10a8c                            |         gnu_dev_minor ();
    0x00015688 cmp r5, 0x5a                          |         
    0x0001568c str r0, [r4, 8]                       |         *((r4 + 8)) = r0;
                                                     |         if (r5 == 0x5a) {
    0x00015690 beq 0x156cc                           |             goto label_7;
                                                     |         }
    0x00015694 bl 0x10b88                            |         errno_location ();
    0x00015698 mov r3, 0x16                          |         r3 = 0x16;
    0x0001569c ldr r2, [pc, 0x370]                   |         r2 = stderr;
    0x000156a0 ldr r1, [pc, 0x384]                   |         r1 = "%s: error!: \"%s\" is not a character device\n";
    0x000156a4 str r3, [r0]                          |         *(r0) = r3;
    0x000156a8 mov r3, 0x5a                          |         r3 = 0x5a;
    0x000156ac str r3, [sp, 4]                       |         var_4h = r3;
    0x000156b0 ldr r0, [pc, 0x358]                   |         
    0x000156b4 ldr r3, [r4, 4]                       |         r3 = *((r4 + 4));
    0x000156b8 str r3, [sp]                          |         *(sp) = r3;
    0x000156bc mov r3, r6                            |         r3 = r6;
    0x000156c0 ldr r0, [r0]                          |         r0 = *(0x15a0c);
    0x000156c4 bl 0x10abc                            |         fprintf (r0, "%s: error!: \"%s\" is not a character device\n", r2, r3)
    0x000156c8 b 0x1564c                             |         
                                                     |     } while (1);
                                                     | label_7:
    0x000156cc add r0, r0, r0, lsr 31                |     r0 += (r0 >> 31);
    0x000156d0 asr r0, r0, 1                         |     r0 >>= 1;
    0x000156d4 str r0, [r4]                          |     *(r4) = r0;
    0x000156d8 mov r1, 0                             |     r1 = 0;
    0x000156dc mov r0, r6                            |     r0 = r6;
    0x000156e0 bl 0x10b4c                            |     r0 = open64 ();
    0x000156e4 cmn r0, 1                             |     
    0x000156e8 mov r5, r0                            |     r5 = r0;
                                                     |     if (r0 == 1) {
    0x000156ec bne 0x15744                           |         
    0x000156f0 bl 0x10b88                            |         errno_location ();
    0x000156f4 ldr r7, [pc, 0x314]                   |         r7 = *(0x15a0c);
    0x000156f8 mov r3, r6                            |         r3 = r6;
    0x000156fc ldr r2, [pc, 0x310]                   |         r2 = stderr;
    0x00015700 ldr r1, [pc, 0x310]                   |         r1 = "libmtd";
    0x00015704 ldr r4, [r0]                          |         r4 = *(r0);
    0x00015708 ldr r0, [r7]                          |         r0 = *(0x15a0c);
    0x0001570c bl 0x10abc                            |         fprintf (r0, "libmtd", r2, r3, r4)
    0x00015710 mov r0, r4                            |         r0 = r4;
    0x00015714 ldr r6, [r7]                          |         r6 = *(0x15a0c);
    0x00015718 bl 0x10a2c                            |         strerror (r0);
    0x0001571c str r4, [sp]                          |         *(sp) = r4;
    0x00015720 ldr r3, [pc, 0x2f4]                   |         r3 = "%s: error!: cannot open \"%s\"\n";
    0x00015724 mov r2, 8                             |         r2 = 8;
    0x00015728 ldr r1, [pc, 0x2f0]                   |         r1 = *(0x15a1c);
    0x0001572c str r0, [sp, 4]                       |         var_4h = r0;
    0x00015730 mov r0, r6                            |         r0 = r6;
    0x00015734 bl 0x10abc                            |         fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n", r4)
                                                     | label_4:
    0x00015738 mov r0, r5                            |         r0 = r5;
    0x0001573c add sp, sp, 0x144                     |         
    0x00015740 pop {r4, r5, r6, r7, r8, sb, pc}      |         
                                                     |     }
    0x00015744 add r2, sp, 0x18                      |     r2 += var_18h;
    0x00015748 ldr r1, [pc, 0x2e0]                   |     r1 = "%s: error!: \"%s\" has major number %d, MTD devices have major %d\n";
    0x0001574c bl 0x10a14                            |     r0 = ioctl (r0, "%s: error!: \"%s\" has major number %d, MTD devices have major %d\n");
    0x00015750 subs r8, r0, 0                        |     r8 = r0 - 0;
                                                     |     if (r8 == r0) {
    0x00015754 beq 0x157a8                           |         goto label_8;
                                                     |     }
    0x00015758 bl 0x10b88                            |     errno_location ();
    0x0001575c ldr r6, [pc, 0x2ac]                   |     
    0x00015760 ldr r2, [pc, 0x2ac]                   |     r2 = stderr;
    0x00015764 ldr r1, [pc, 0x2c8]                   |     r1 = *(0x15a30);
    0x00015768 ldr r4, [r0]                          |     r4 = *(r0);
    0x0001576c ldr r0, [r6]                          |     r0 = *(0x15a0c);
    0x00015770 bl 0x10abc                            |     fprintf (r0, r1, r2, r3, r4, r5, r6)
    0x00015774 mov r0, r4                            |     r0 = r4;
    0x00015778 ldr r6, [r6]                          |     r6 = *(0x15a0c);
    0x0001577c bl 0x10a2c                            |     strerror (r0);
    0x00015780 ldr r3, [pc, 0x294]                   |     r3 = "%s: error!: cannot open \"%s\"\n";
    0x00015784 ldr r1, [pc, 0x294]                   |     r1 = *(0x15a1c);
    0x00015788 mov r2, 8                             |     r2 = 8;
    0x0001578c str r4, [sp]                          |     *(sp) = r4;
    0x00015790 str r0, [sp, 4]                       |     var_4h = r0;
    0x00015794 mov r0, r6                            |     r0 = r6;
                                                     |     do {
                                                     | label_1:
    0x00015798 bl 0x10abc                            |         fprintf (r0, r1, r2, "%s: error!: cannot open \"%s\"\n", r4)
                                                     | label_2:
    0x0001579c mov r0, r5                            |         r0 = r5;
    0x000157a0 bl 0x10bdc                            |         close (r0);
    0x000157a4 b 0x1564c                             |         goto label_0;
                                                     | label_8:
    0x000157a8 add r2, sp, 0x10                      |         r2 += var_10h;
    0x000157ac ldr r1, [pc, 0x284]                   |         r1 = "_s:_error_:_MEMGETINFO_ioctl_request_failed";
    0x000157b0 mov r0, r5                            |         r0 = r5;
    0x000157b4 bl 0x10a14                            |         r0 = ioctl (r0, "_s:_error_:_MEMGETINFO_ioctl_request_failed");
    0x000157b8 cmn r0, 1                             |         
                                                     |         if (r0 == 1) {
    0x000157bc ldrbne r3, [r4, 0xfc]                 |             r3 = *((r4 + 0xfc));
                                                     |         }
                                                     |         if (r0 == 1) {
    0x000157c0 orrne r3, r3, 2                       |             r3 |= 2;
                                                     |         }
                                                     |         if (r0 != 1) {
    0x000157c4 bne 0x15820                           |             goto label_9;
                                                     |         }
    0x000157c8 bl 0x10b88                            |         r0 = errno_location ();
    0x000157cc ldr r7, [r0]                          |         r7 = *(r0);
    0x000157d0 cmp r7, 0x5f                          |         
                                                     |         if (r7 != 0x5f) {
    0x000157d4 streq r8, [r0]                        |             *(r0) = r8;
                                                     |         }
                                                     |         if (r7 != 0x5f) {
    0x000157d8 ldrbeq r3, [r4, 0xfc]                 |             r3 = *((r4 + 0xfc));
                                                     |         }
    0x000157dc biceq r3, r3, 2                       |         __asm ("biceq r3, r3, 2");
                                                     |         if (r7 == 0x5f) {
    0x000157e0 beq 0x15820                           |             goto label_9;
                                                     |         }
    0x000157e4 ldr r4, [pc, 0x224]                   |         
    0x000157e8 ldr r2, [pc, 0x224]                   |         r2 = stderr;
    0x000157ec ldr r1, [pc, 0x248]                   |         r1 = *(0x15a38);
    0x000157f0 ldr r0, [r4]                          |         r0 = *(0x15a0c);
    0x000157f4 bl 0x10abc                            |         fprintf (r0, r1, r2, r3, r4)
    0x000157f8 mov r0, r7                            |         r0 = r7;
    0x000157fc ldr r4, [r4]                          |         r4 = *(0x15a0c);
    0x00015800 bl 0x10a2c                            |         strerror (r0);
    0x00015804 str r7, [sp]                          |         *(sp) = r7;
    0x00015808 ldr r3, [pc, 0x20c]                   |         r3 = "%s: error!: cannot open \"%s\"\n";
    0x0001580c mov r2, 8                             |         r2 = 8;
    0x00015810 ldr r1, [pc, 0x208]                   |         r1 = *(0x15a1c);
    0x00015814 str r0, [sp, 4]                       |         var_4h = r0;
    0x00015818 mov r0, r4                            |         r0 = r4;
    0x0001581c b 0x15798                             |         
                                                     |     } while (1);
                                                     | label_9:
    0x00015820 strb r3, [r4, 0xfc]                   |     *((r4 + 0xfc)) = r3;
    0x00015824 ldr r3, [sp, 0x28]                    |     r3 = var_28h;
    0x00015828 ldrb r7, [sp, 0x18]                   |     r7 = var_18h;
    0x0001582c ldr r0, [sp, 0x20]                    |     r0 = var_20h;
    0x00015830 ldr r2, [sp, 0x24]                    |     r2 = var_24h;
    0x00015834 ldr ip, [sp, 0x2c]                    |     ip = var_2ch;
    0x00015838 mov r1, 0                             |     r1 = 0;
    0x0001583c cmp r3, 0                             |     
    0x00015840 str r7, [r4, 0xc]                     |     *((r4 + 0xc)) = r7;
    0x00015844 strd r0, r1, [r4, 0xd8]               |     __asm ("strd r0, r1, [r4, 0xd8]");
    0x00015848 str r2, [r4, 0xe4]                    |     *((r4 + 0xe4)) = r2;
    0x0001584c str r3, [r4, 0xe8]                    |     *((r4 + 0xe8)) = r3;
    0x00015850 str ip, [r4, 0xf0]                    |     *((r4 + 0xf0)) = ip;
                                                     |     if (r3 > 0) {
    0x00015854 bgt 0x15878                           |         goto label_10;
                                                     |     }
    0x00015858 str r3, [sp, 4]                       |     var_4h = r3;
    0x0001585c str r6, [sp]                          |     *(sp) = r6;
    0x00015860 ldr r2, [pc, 0x1ac]                   |     r2 = stderr;
    0x00015864 ldr r3, [r4]                          |     r3 = *(r4);
    0x00015868 ldr r1, [pc, 0x1d0]                   |     r1 = "%s: error!: MEMGETBADBLOCK ioctl failed\n";
                                                     |     do {
    0x0001586c ldr r0, [pc, 0x19c]                   |         
    0x00015870 ldr r0, [r0]                          |         r0 = *(0x15a0c);
    0x00015874 b 0x15798                             |         goto label_1;
                                                     | label_10:
    0x00015878 cmp r2, r3                            |         
    0x0001587c cmpge r2, 0                           |         __asm ("cmpge r2, 0");
                                                     |         if (r2 > r3) {
    0x00015880 bgt 0x1589c                           |             goto label_11;
                                                     |         }
    0x00015884 str r2, [sp, 4]                       |         var_4h = r2;
    0x00015888 str r6, [sp]                          |         *(sp) = r6;
    0x0001588c ldr r2, [pc, 0x180]                   |         r2 = stderr;
    0x00015890 ldr r3, [r4]                          |         r3 = *(r4);
    0x00015894 ldr r1, [pc, 0x1a8]                   |         r1 = "_s:_error_:_mtd_d___s__has_insane_min._I_O_unit_size__d";
    0x00015898 b 0x1586c                             |         
                                                     |     } while (1);
                                                     | label_11:
    0x0001589c orrs r3, r0, r1                       |     r3 = r0 | r1;
                                                     |     if (r3 != r0) {
    0x000158a0 beq 0x158b4                           |         
    0x000158a4 asr r3, r2, 0x1f                      |         r3 = r2 >> 0x1f;
    0x000158a8 cmp r0, r2                            |         
    0x000158ac sbcs ip, r1, r3                       |         __asm ("sbcs ip, r1, r3");
                                                     |         if (r0 >= r2) {
    0x000158b0 bge 0x158d8                           |             goto label_12;
                                                     |         }
                                                     |     }
    0x000158b4 strd r0, r1, [sp, 8]                  |     __asm ("strd r0, r1, [var_8h]");
    0x000158b8 ldr r0, [pc, 0x150]                   |     
    0x000158bc str r6, [sp]                          |     *(sp) = r6;
    0x000158c0 ldr r2, [pc, 0x14c]                   |     r2 = stderr;
    0x000158c4 ldr r3, [r4]                          |     r3 = *(r4);
    0x000158c8 ldr r1, [pc, 0x178]                   |     r1 = "%s: error!: mtd%d (%s) has insane eraseblock size %d\n";
    0x000158cc ldr r0, [r0]                          |     r0 = *(0x15a0c);
    0x000158d0 bl 0x10abc                            |     fprintf (r0, "%s: error!: mtd%d (%s) has insane eraseblock size %d\n", r2, r3, r4, r5, r6)
    0x000158d4 b 0x1579c                             |     goto label_2;
                                                     | label_12:
    0x000158d8 bl 0x15c6c                            |     fcn_00015c6c (r0);
    0x000158dc str r0, [r4, 0xe0]                    |     *((r4 + 0xe0)) = r0;
    0x000158e0 cmp r7, 8                             |     
                                                     |     if (r7 > 8) {
                                                     |         /* switch table (9 cases) at 0x158ec */
    0x000158e4 ldrls pc, [pc, r7, lsl 2]             |         offset_0 = r7 << 2;
                                                     |         pc = *((pc + offset_0));
                                                     |     }
    0x000158e8 b 0x1579c                             |     goto label_2;
    0x00015910 ldr r0, [pc, 0xf8]                    |     
    0x00015914 str r6, [sp]                          |     *(sp) = r6;
    0x00015918 ldr r2, [pc, 0xf4]                    |     r2 = stderr;
    0x0001591c ldr r3, [r4]                          |     r3 = *(r4);
    0x00015920 ldr r1, [pc, 0x124]                   |     r1 = "%s: error!: mtd%d (%s) has insane size %lld\n";
    0x00015924 ldr r0, [r0]                          |     r0 = *(0x15a0c);
    0x00015928 bl 0x10abc                            |     fprintf (r0, "%s: error!: mtd%d (%s) has insane size %lld\n", r2, r3, r4, r5, r6)
    0x0001592c b 0x1579c                             |     goto label_2;
    0x00015930 ldr r1, [pc, 0x118]                   |     r1 = "_s:_error_:_mtd_d___s__is_removable_and_is_not_present";
                                                     | label_3:
    0x00015934 add r0, r4, 0x10                      |     r0 = r4 + 0x10;
    0x00015938 bl 0x10a08                            |     strcpy (r0, "_s:_error_:_mtd_d___s__is_removable_and_is_not_present");
    0x0001593c ldr r3, [sp, 0x1c]                    |     r3 = var_1ch;
    0x00015940 mov r0, r5                            |     r0 = r5;
    0x00015944 tst r3, 0x400                         |     
                                                     |     if ((r3 & 0x400) == 0) {
    0x00015948 ldrbne r3, [r4, 0xfc]                 |         r3 = *((r4 + 0xfc));
                                                     |     }
                                                     |     if ((r3 & 0x400) == 0) {
    0x0001594c orrne r3, r3, 1                       |         r3 |= 1;
                                                     |     }
                                                     |     if ((r3 & 0x400) == 0) {
    0x00015950 strbne r3, [r4, 0xfc]                 |         *((r4 + 0xfc)) = r3;
                                                     |     }
    0x00015954 ldr r3, [r4, 0xe8]                    |     r3 = *((r4 + 0xe8));
    0x00015958 str r3, [r4, 0xec]                    |     *((r4 + 0xec)) = r3;
    0x0001595c bl 0x10bdc                            |     close (r0);
    0x00015960 mov r0, r6                            |     r0 = r6;
    0x00015964 bl 0x153bc                            |     r0 = fcn_000153bc (r0);
    0x00015968 bic r0, r0, r0, asr 31                |     r0 = BIT_MASK (r0, r0);
    0x0001596c str r0, [r4, 0xf4]                    |     *((r4 + 0xf4)) = r0;
    0x00015970 add r0, sp, 0xa0                      |     r0 += var_a0h;
    0x00015974 bl 0x150e0                            |     fcn_000150e0 (r0);
    0x00015978 subs r5, r0, 0                        |     r5 -= var_a0h;
                                                     |     if (r5 != var_a0h) {
    0x0001597c bne 0x1564c                           |         goto label_0;
                                                     |     }
                                                     |     do {
    0x00015980 add r0, sp, 0xa0                      |         r0 += var_a0h;
    0x00015984 bl 0x14f7c                            |         r0 = fcn_00014f7c (r0);
    0x00015988 cmp r0, 0                             |         
                                                     |         if (r0 == 0) {
    0x0001598c bne 0x159f0                           |             
    0x00015990 ldr r3, [pc, 0xbc]                    |             r3 = "ram";
    0x00015994 ldr r0, [pc, 0x74]                    |             
    0x00015998 str r3, [sp]                          |             *(sp) = r3;
    0x0001599c ldr r2, [pc, 0x70]                    |             r2 = stderr;
    0x000159a0 ldr r3, [r4]                          |             r3 = *(r4);
    0x000159a4 ldr r1, [pc, 0xac]                    |             r1 = "_proc_mtd";
    0x000159a8 ldr r0, [r0]                          |             r0 = *(0x15a0c);
    0x000159ac bl 0x10abc                            |             r0 = fprintf (r0, "_proc_mtd", r2, "ram")
    0x000159b0 bl 0x10b88                            |             errno_location ();
    0x000159b4 mov r3, 2                             |             r3 = 2;
    0x000159b8 str r3, [r0]                          |             *(r0) = r3;
    0x000159bc b 0x1564c                             |             goto label_0;
    0x000159c0 ldr r1, [pc, 0x94]                    |             r1 = "_s:_error_:_mtd_d_not_found_in___s_";
    0x000159c4 b 0x15934                             |             goto label_3;
    0x000159c8 ldr r1, [pc, 0x90]                    |             r1 = *(0x15a5c);
    0x000159cc b 0x15934                             |             goto label_3;
    0x000159d0 ldr r1, [pc, 0x8c]                    |             r1 = *(0x15a60);
    0x000159d4 b 0x15934                             |             goto label_3;
    0x000159d8 ldr r1, [pc, 0x88]                    |             r1 = "nand";
    0x000159dc b 0x15934                             |             goto label_3;
    0x000159e0 ldr r1, [pc, 0x84]                    |             r1 = "mlc_nand";
    0x000159e4 b 0x15934                             |             goto label_3;
    0x000159e8 ldr r1, [pc, 0x80]                    |             r1 = "dataflash";
    0x000159ec b 0x15934                             |             goto label_3;
                                                     |         }
    0x000159f0 ldr r3, [r4]                          |         r3 = *(r4);
    0x000159f4 ldr r2, [sp, 0xa0]                    |         r2 = var_a0h;
    0x000159f8 cmp r2, r3                            |         
    0x000159fc bne 0x15980                           |         
                                                     |     } while (r2 != r3);
    0x00015a00 add r1, sp, 0xb0                      |     r1 += src;
    0x00015a04 add r0, r4, 0x51                      |     r0 = r4 + 0x51;
    0x00015a08 bl 0x10a08                            |     strcpy (r0, r1);
    0x00015a0c b 0x15738                             |     goto label_4;
                                                     | }
    ; assembly                                           | /* r2dec pseudo code output */
                                                         | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/usr/sbin/mtdinfo @ 0x10c64 */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) main ()                                      | int32_t main (int32_t argc, char ** argv) {
                                                         |     int32_t var_0h;
                                                         |     int32_t var_4h;
                                                         |     int32_t var_8h;
                                                         |     int32_t var_18h;
                                                         |     r0 = argc;
                                                         |     r1 = argv;
    0x00010c64 push {r4, r5, r6, r7, r8, sb, sl, lr}     |     
    0x00010c68 ldr sb, [pc, 0x284]                       |     sb = "ubi_info";
    0x00010c6c ldr sl, [pc, 0x284]                       |     sl = "auMhV";
    0x00010c70 ldr r5, [pc, 0x284]                       |     r5 = "auMhV";
    0x00010c74 sub sp, sp, 0x18                          |     
    0x00010c78 mov r6, r0                                |     r6 = r0;
    0x00010c7c mov r8, r1                                |     r8 = r1;
                                                         | label_0:
    0x00010c80 mov r7, 0                                 |     r7 = 0;
    0x00010c84 str r7, [sp]                              |     *(sp) = r7;
    0x00010c88 mov r3, sb                                |     r3 = sb;
    0x00010c8c mov r2, sl                                |     r2 = sl;
    0x00010c90 mov r1, r8                                |     r1 = r8;
    0x00010c94 mov r0, r6                                |     r0 = r6;
    0x00010c98 bl 0x10a44                                |     r0 = getopt_long ();
    0x00010c9c cmn r0, 1                                 |     
    0x00010ca0 mov r4, r0                                |     r4 = r0;
                                                         |     if (r0 == 1) {
    0x00010ca4 beq 0x10d74                               |         goto label_3;
                                                         |     }
    0x00010ca8 cmp r0, 0x56                              |     
                                                         |     if (r0 == 0x56) {
    0x00010cac beq 0x10d3c                               |         goto label_4;
                                                         |     }
                                                         |     if (r0 > 0x56) {
    0x00010cb0 bgt 0x10cd8                               |         goto label_5;
                                                         |     }
    0x00010cb4 cmp r0, 0x3a                              |     
                                                         |     if (r0 == 0x3a) {
    0x00010cb8 beq 0x10d50                               |         goto label_6;
                                                         |     }
    0x00010cbc cmp r0, 0x4d                              |     
                                                         |     if (r0 == 0x4d) {
    0x00010cc0 beq 0x10d0c                               |         goto label_7;
                                                         |     }
                                                         |     do {
    0x00010cc4 ldr r3, [pc, 0x234]                       |         r3 = *(0x10efc);
    0x00010cc8 ldr r0, [pc, 0x234]                       |         r0 = stderr;
    0x00010ccc ldr r1, [r3]                              |         r1 = *(0x10efc);
    0x00010cd0 bl 0x10bb8                                |         fputs (r0, r1);
    0x00010cd4 b 0x10d64                                 |         goto label_8;
                                                         | label_5:
    0x00010cd8 cmp r0, 0x68                              |         
                                                         |         if (r0 == 0x68) {
    0x00010cdc beq 0x10d18                               |             goto label_9;
                                                         |         }
    0x00010ce0 cmp r0, 0x75                              |         
                                                         |         if (r0 == 0x75) {
    0x00010ce4 beq 0x10d00                               |             goto label_10;
                                                         |         }
    0x00010ce8 cmp r0, 0x61                              |         
    0x00010cec bne 0x10cc4                               |         
                                                         |     } while (r0 != 0x61);
    0x00010cf0 ldrb r3, [r5]                             |     r3 = *(r5);
    0x00010cf4 orr r3, r3, 1                             |     r3 |= 1;
                                                         |     do {
                                                         | label_1:
    0x00010cf8 strb r3, [r5]                             |         *(r5) = r3;
    0x00010cfc b 0x10c80                                 |         goto label_0;
                                                         | label_10:
    0x00010d00 ldrb r3, [r5]                             |         r3 = *(r5);
    0x00010d04 orr r3, r3, 2                             |         r3 |= 2;
    0x00010d08 b 0x10cf8                                 |         
                                                         |     } while (1);
                                                         | label_7:
    0x00010d0c ldrb r3, [r5]                             |     r3 = *(r5);
    0x00010d10 orr r3, r3, 4                             |     r3 |= 4;
    0x00010d14 b 0x10cf8                                 |     goto label_1;
                                                         | label_9:
    0x00010d18 ldr r3, [pc, 0x1e8]                       |     r3 = "Use__h_for_help";
    0x00010d1c ldr r2, [pc, 0x1e8]                       |     r2 = *(0x10f08);
    0x00010d20 str r3, [sp]                              |     *(sp) = r3;
    0x00010d24 ldr r1, [pc, 0x1e4]                       |     r1 = "2.1.0";
    0x00010d28 mov r3, 0xa                               |     r3 = 0xa;
    0x00010d2c ldr r0, [pc, 0x1e0]                       |     r0 = "mtdinfo";
    0x00010d30 bl 0x10a20                                |     printf ("mtdinfo", "2.1.0", r2, "Use__h_for_help")
                                                         |     do {
    0x00010d34 mov r0, r7                                |         r0 = r7;
    0x00010d38 bl 0x10b94                                |         exit (r0);
                                                         | label_4:
    0x00010d3c ldr r2, [pc, 0x1c8]                       |         r2 = *(0x10f08);
    0x00010d40 ldr r1, [pc, 0x1c8]                       |         r1 = "2.1.0";
    0x00010d44 ldr r0, [pc, 0x1cc]                       |         r0 = "%1$s version %2$s - a tool to print MTD information.\n\nUsage: %1$s <MTD node file path> [--map | -M] [--ubi-info | -u]\n       %1$s --all [--ubi-info | -u]\n       %1$s [--help | --version]\n\nOptions:\n-u, --ubi-info                  print what would UBI layout be if it was put\n                                on this MTD device\n-M, --map                       print eraseblock map\n-a, --all                       print information about all MTD devices\n                                Note: `--all' may give less info per device\n                                than, e.g., `mtdinfo /dev/mtdX'\n-h, --help                      print help message\n-V, --version                   print program version\n\nExamples:\n  %1$s /dev/mtd0             print information MTD device /dev/mtd0\n  %1$s /dev/mtd0 -u          print information MTD device /dev/mtd0\n  %4$*3$s                    and include UBI layout information\n  %1$s -a                    print information about all MTD devices\n";
    0x00010d48 bl 0x10a20                                |         printf ("%1$s version %2$s - a tool to print MTD information.\n\nUsage: %1$s <MTD node file path> [--map | -M] [--ubi-info | -u]\n       %1$s --all [--ubi-info | -u]\n       %1$s [--help | --version]\n\nOptions:\n-u, --ubi-info                  print what would UBI layout be if it was put\n                                on this MTD device\n-M, --map                       print eraseblock map\n-a, --all                       print information about all MTD devices\n                                Note: `--all' may give less info per device\n                                than, e.g., `mtdinfo /dev/mtdX'\n-h, --help                      print help message\n-V, --version                   print program version\n\nExamples:\n  %1$s /dev/mtd0             print information MTD device /dev/mtd0\n  %1$s /dev/mtd0 -u          print information MTD device /dev/mtd0\n  %4$*3$s                    and include UBI layout information\n  %1$s -a                    print information about all MTD devices\n", "2.1.0", r2)
    0x00010d4c b 0x10d34                                 |         
                                                         |     } while (1);
                                                         | label_6:
    0x00010d50 ldr r3, [pc, 0x1a8]                       |     r3 = *(0x10efc);
    0x00010d54 ldr r2, [pc, 0x1b4]                       |     r2 = "2.1.0";
    0x00010d58 ldr r1, [pc, 0x1bc]                       |     r1 = "%s (mtd-utils) %s\n";
    0x00010d5c ldr r0, [r3]                              |     r0 = *(0x10efc);
    0x00010d60 bl 0x10abc                                |     fprintf (r0, "%s (mtd-utils) %s\n", "2.1.0", r3)
                                                         | label_8:
    0x00010d64 mvn r4, 0                                 |     r4 = ~0;
                                                         | label_2:
    0x00010d68 mov r0, r4                                |     r0 = r4;
    0x00010d6c add sp, sp, 0x18                          |     
    0x00010d70 pop {r4, r5, r6, r7, r8, sb, sl, pc}      |     
                                                         | label_3:
    0x00010d74 ldr r3, [pc, 0x1a4]                       |     
    0x00010d78 sub r2, r6, 1                             |     r2 = r6 - 1;
    0x00010d7c ldr r3, [r3]                              |     r3 = "_s:_error_:_parameter_is_missing";
    0x00010d80 cmp r2, r3                                |     
                                                         |     if (r2 != r3) {
    0x00010d84 bne 0x10dd4                               |         goto label_11;
                                                         |     }
    0x00010d88 ldr r2, [r8, r2, lsl 2]                   |     offset_0 = r2 << 2;
                                                         |     r2 = *((r8 + offset_0));
    0x00010d8c ldr r3, [pc, 0x168]                       |     r3 = "auMhV";
    0x00010d90 str r2, [r3, 4]                           |     *((r3 + 4)) = r2;
                                                         |     do {
    0x00010d94 ldr r5, [pc, 0x160]                       |         r5 = "auMhV";
    0x00010d98 ldrb r3, [r5]                             |         r3 = *(r5);
    0x00010d9c tst r3, 1                                 |         
                                                         |         if ((r3 & 1) != 0) {
    0x00010da0 beq 0x10db4                               |             
    0x00010da4 ldr r2, [r5, 4]                           |             r2 = *((r5 + 4));
    0x00010da8 cmp r2, 0                                 |             
                                                         |             if (r2 == 0) {
    0x00010dac movne r2, 0                               |                 r2 = 0;
                                                         |             }
                                                         |             if (r2 != 0) {
    0x00010db0 strne r2, [r5, 4]                         |                 *((r5 + 4)) = r2;
                                                         |                 goto label_12;
                                                         |             }
                                                         |         }
                                                         | label_12:
    0x00010db4 tst r3, 4                                 |         
                                                         |         if ((r3 & 4) == 0) {
    0x00010db8 beq 0x10df4                               |             goto label_13;
                                                         |         }
    0x00010dbc ldr r3, [r5, 4]                           |         r3 = *((r5 + 4));
    0x00010dc0 cmp r3, 0                                 |         
                                                         |         if (r3 != 0) {
    0x00010dc4 bne 0x10df4                               |             goto label_13;
                                                         |         }
    0x00010dc8 ldr r2, [pc, 0x140]                       |         r2 = "2.1.0";
    0x00010dcc ldr r1, [pc, 0x150]                       |         r1 = optind;
    0x00010dd0 b 0x10de4                                 |         goto label_14;
                                                         | label_11:
    0x00010dd4 cmp r6, r3                                |         
    0x00010dd8 ble 0x10d94                               |         
                                                         |     } while (r6 <= r3);
    0x00010ddc ldr r2, [pc, 0x12c]                       |     r2 = "2.1.0";
    0x00010de0 ldr r1, [pc, 0x140]                       |     r1 = "%s: error!: -M requires MTD device node name\n";
                                                         | label_14:
    0x00010de4 ldr r3, [pc, 0x114]                       |     r3 = *(0x10efc);
    0x00010de8 ldr r0, [r3]                              |     r0 = *(0x10efc);
                                                         |     do {
    0x00010dec bl 0x10abc                                |         fprintf (r0, "%s: error!: -M requires MTD device node name\n", "2.1.0", r3)
    0x00010df0 b 0x10d68                                 |         goto label_2;
                                                         | label_13:
    0x00010df4 bl 0x134e0                                |         r0 = fcn_000134e0 ();
    0x00010df8 subs r6, r0, 0                            |         r6 = r0 - 0;
                                                         |         if (r6 != r0) {
    0x00010dfc bne 0x10e54                               |             goto label_15;
                                                         |         }
    0x00010e00 bl 0x10b88                                |         errno_location ();
    0x00010e04 ldr r6, [pc, 0xf4]                        |         r6 = *(0x10efc);
    0x00010e08 ldr r2, [pc, 0x100]                       |         r2 = "2.1.0";
    0x00010e0c ldr r5, [r0]                              |         r5 = *(r0);
    0x00010e10 ldr r0, [r6]                              |         r0 = *(0x10efc);
    0x00010e14 cmp r5, 0                                 |         
                                                         |         if (r5 != 0) {
    0x00010e18 ldreq r1, [pc, 0x10c]                     |             r1 = "%s: error!: MTD is not present in the system\n";
                                                         |         }
                                                         |         if (r5 == 0) {
    0x00010e1c ldrne r1, [pc, 0x10c]                     |             r1 = "%s: error!: cannot open libmtd\n";
                                                         |         }
    0x00010e20 beq 0x10dec                               |         
                                                         |     } while (r5 == 0);
                                                         |     do {
    0x00010e24 bl 0x10abc                                |         fprintf (r0, r1)
    0x00010e28 mov r0, r5                                |         r0 = r5;
    0x00010e2c ldr r6, [r6]                              |         r6 = *(r6);
    0x00010e30 bl 0x10a2c                                |         strerror (r0);
    0x00010e34 str r5, [sp]                              |         *(sp) = r5;
    0x00010e38 ldr r3, [pc, 0xc8]                        |         r3 = "Use__h_for_help";
    0x00010e3c mov r2, 9                                 |         r2 = 9;
    0x00010e40 ldr r1, [pc, 0xec]                        |         r1 = "%s: error!: cannot open libmtd\n";
    0x00010e44 str r0, [sp, 4]                           |         var_4h = r0;
    0x00010e48 mov r0, r6                                |         r0 = r6;
    0x00010e4c bl 0x10abc                                |         fprintf (r0, "%s: error!: cannot open libmtd\n", r2, "Use__h_for_help", r4, r5)
    0x00010e50 b 0x10d68                                 |         goto label_2;
                                                         | label_15:
    0x00010e54 add r1, sp, 8                             |         r1 += var_8h;
    0x00010e58 bl 0x137bc                                |         r0 = fcn_000137bc (r0, r1);
    0x00010e5c cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x00010e60 beq 0x10e80                               |             goto label_16;
                                                         |         }
    0x00010e64 bl 0x10b88                                |         errno_location ();
    0x00010e68 ldr r6, [pc, 0x90]                        |         r6 = *(0x10efc);
    0x00010e6c ldr r2, [pc, 0x9c]                        |         r2 = "2.1.0";
    0x00010e70 ldr r1, [pc, 0xc0]                        |         r1 = "%*serror %d (%s)\n";
    0x00010e74 ldr r5, [r0]                              |         r5 = *(r0);
    0x00010e78 ldr r0, [r6]                              |         r0 = *(0x10efc);
    0x00010e7c b 0x10e24                                 |         
                                                         |     } while (1);
                                                         | label_16:
    0x00010e80 ldrb r3, [r5]                             |     r3 = *(r5);
    0x00010e84 tst r3, 1                                 |     
                                                         |     if ((r3 & 1) != 0) {
    0x00010e88 bne 0x10ed0                               |         goto label_17;
                                                         |     }
    0x00010e8c ldr r1, [r5, 4]                           |     r1 = *((r5 + 4));
    0x00010e90 cmp r1, 0                                 |     
                                                         |     if (r1 == 0) {
    0x00010e94 beq 0x10ed0                               |         goto label_17;
                                                         |     }
    0x00010e98 mov r0, r6                                |     r0 = r6;
    0x00010e9c bl 0x11054                                |     r0 = fcn_00011054 (r0);
    0x00010ea0 subs r2, r0, 0                            |     r2 = r0 - 0;
                                                         |     if (r2 < r0) {
    0x00010ea4 blt 0x10ee8                               |         goto label_18;
                                                         |     }
    0x00010ea8 add r1, sp, 8                             |     r1 += var_8h;
    0x00010eac mov r0, r6                                |     r0 = r6;
    0x00010eb0 bl 0x11318                                |     r0 = fcn_00011318 (r0, r1);
                                                         |     do {
    0x00010eb4 cmp r0, 0                                 |         
    0x00010eb8 mov r5, r0                                |         r5 = r0;
                                                         |         if (r0 != 0) {
    0x00010ebc bne 0x10ee8                               |             goto label_18;
                                                         |         }
    0x00010ec0 mov r0, r6                                |         r0 = r6;
    0x00010ec4 bl 0x13464                                |         fcn_00013464 (r0);
    0x00010ec8 mov r4, r5                                |         r4 = r5;
    0x00010ecc b 0x10d68                                 |         goto label_2;
                                                         | label_17:
    0x00010ed0 ldrb r2, [r5]                             |         r2 = *(r5);
    0x00010ed4 add r1, sp, 8                             |         r1 += var_8h;
    0x00010ed8 and r2, r2, 1                             |         r2 &= 1;
    0x00010edc mov r0, r6                                |         r0 = r6;
    0x00010ee0 bl 0x1178c                                |         fcn_0001178c (r0, r1);
    0x00010ee4 b 0x10eb4                                 |         
                                                         |     } while (1);
                                                         | label_18:
    0x00010ee8 mov r0, r6                                |     r0 = r6;
    0x00010eec bl 0x13464                                |     fcn_00013464 (r0);
    0x00010ef0 b 0x10d68                                 |     goto label_2;
                                                         | }

[*] Function printf used 59 times mtdinfo