[*] Binary protection state of ubidetach

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


[*] Function fprintf tear down of ubidetach

    ; 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/ubidetach @ 0x10f7c */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) fcn.00010f7c ()                                  | void fcn_00010f7c (int32_t arg1, int32_t arg2) {
                                                             |     int32_t var_0h;
                                                             |     char * * endptr;
                                                             |     int32_t var_10h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x00010f7c push {r0, r1, r2, r3, r4, r5, r6, lr}         |     
    0x00010f80 mov r6, r1                                    |     r6 = r1;
    0x00010f84 mov r2, 0                                     |     r2 = 0;
    0x00010f88 add r1, sp, 0xc                               |     r1 += endptr;
    0x00010f8c mov r4, r0                                    |     r4 = r0;
    0x00010f90 bl 0x108bc                                    |     strtoul (r0, r1, r2);
    0x00010f94 ldrb r3, [r4]                                 |     r3 = *(r4);
    0x00010f98 cmp r3, 0                                     |     
    0x00010f9c mov r5, r0                                    |     r5 = r0;
                                                             |     if (r3 != 0) {
    0x00010fa0 beq 0x10fb4                                   |         
    0x00010fa4 ldr r3, [sp, 0xc]                             |         r3 = endptr;
    0x00010fa8 ldrb r3, [r3]                                 |         r3 = *(r3);
    0x00010fac cmp r3, 0                                     |         
                                                             |         if (r3 == 0) {
    0x00010fb0 beq 0x10fd8                                   |             goto label_0;
                                                             |         }
                                                             |     }
    0x00010fb4 ldr r0, [pc, 0x28]                            |     
    0x00010fb8 str r4, [sp]                                  |     *(sp) = r4;
    0x00010fbc ldr r3, [pc, 0x24]                            |     r3 = stderr;
    0x00010fc0 ldr r2, [pc, 0x24]                            |     r2 = "strtoul";
    0x00010fc4 ldr r1, [pc, 0x24]                            |     r1 = "ubidetach";
    0x00010fc8 ldr r0, [r0]                                  |     r0 = *(0x10fe0);
    0x00010fcc bl 0x108ec                                    |     fprintf (r0, "ubidetach", "strtoul", r3, r4)
    0x00010fd0 mov r3, 1                                     |     r3 = 1;
    0x00010fd4 str r3, [r6]                                  |     *(r6) = r3;
                                                             | label_0:
    0x00010fd8 mov r0, r5                                    |     r0 = r5;
    0x00010fdc add sp, sp, 0x10                              |     
    0x00010fe0 pop {r4, r5, r6, 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/ubidetach @ 0x10ff4 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00010ff4 ()                  | void fcn_00010ff4 (int32_t arg1, int32_t arg2) {
                                             |     int32_t var_0h;
                                             |     int32_t var_4h;
                                             |     int32_t var_8h;
                                             |     char * buf;
                                             |     char * s;
                                             |     int32_t var_4ch;
                                             |     r0 = arg1;
                                             |     r1 = arg2;
    0x00010ff4 push {r4, r5, r6, r7, lr}     |     
    0x00010ff8 mov r6, r1                    |     r6 = r1;
    0x00010ffc sub sp, sp, 0x4c              |     
    0x00011000 mov r1, 0                     |     r1 = 0;
    0x00011004 mov r5, r0                    |     r5 = r0;
    0x00011008 bl 0x10958                    |     r0 = open64 ();
    0x0001100c cmn r0, 1                     |     
    0x00011010 mov r4, r0                    |     r4 = r0;
                                             |     if (r0 == 1) {
    0x00011014 beq 0x11170                   |         goto label_2;
                                             |     }
    0x00011018 mov r2, 0x32                  |     r2 = 0x32;
    0x0001101c add r1, sp, 0x14              |     r1 += buf;
    0x00011020 bl 0x10904                    |     r0 = read (r0, r1, r2);
    0x00011024 cmn r0, 1                     |     
                                             |     if (r0 != 1) {
    0x00011028 bne 0x11080                   |         goto label_3;
                                             |     }
    0x0001102c bl 0x10988                    |     errno_location ();
    0x00011030 ldr r7, [pc, 0x144]           |     r7 = *(0x11178);
    0x00011034 mov r3, r5                    |     r3 = r5;
    0x00011038 ldr r2, [pc, 0x140]           |     r2 = stderr;
    0x0001103c ldr r1, [pc, 0x140]           |     r1 = "libubi";
    0x00011040 ldr r6, [r0]                  |     r6 = *(r0);
    0x00011044 ldr r0, [r7]                  |     r0 = *(0x11178);
    0x00011048 bl 0x108ec                    |     fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x0001104c mov r0, r6                    |     r0 = r6;
    0x00011050 ldr r5, [r7]                  |     r5 = *(0x11178);
    0x00011054 bl 0x10868                    |     strerror (r0);
    0x00011058 str r6, [sp]                  |     *(sp) = r6;
    0x0001105c ldr r3, [pc, 0x124]           |     r3 = "_s:_error_:_cannot_read___s_";
    0x00011060 mov r2, 8                     |     r2 = 8;
    0x00011064 ldr r1, [pc, 0x120]           |     r1 = *(0x11188);
    0x00011068 str r0, [sp, 4]               |     var_4h = r0;
    0x0001106c mov r0, r5                    |     r0 = r5;
    0x00011070 bl 0x108ec                    |     fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4, r5, r6)
                                             |     do {
    0x00011074 mov r0, r4                    |         r0 = r4;
    0x00011078 bl 0x109d0                    |         close (r0);
    0x0001107c b 0x1116c                     |         goto label_4;
                                             | label_3:
    0x00011080 cmp r0, 0x32                  |         
                                             |         if (r0 != 0x32) {
    0x00011084 bne 0x110b0                   |             goto label_5;
                                             |         }
    0x00011088 ldr r2, [pc, 0xf0]            |         r2 = stderr;
    0x0001108c ldr r1, [pc, 0xfc]            |         r1 = "_serror__d___s_";
    0x00011090 mov r3, r5                    |         r3 = r5;
                                             | label_0:
    0x00011094 ldr r0, [pc, 0xe0]            |         
    0x00011098 ldr r0, [r0]                  |         r0 = *(0x11178);
    0x0001109c bl 0x108ec                    |         r0 = fprintf (r0, "_serror__d___s_", r2, r3)
                                             | label_1:
    0x000110a0 bl 0x10988                    |         errno_location ();
    0x000110a4 mov r3, 0x16                  |         r3 = 0x16;
    0x000110a8 str r3, [r0]                  |         *(r0) = r3;
    0x000110ac b 0x11074                     |         
                                             |     } while (1);
                                             | label_5:
    0x000110b0 add r3, sp, 0x48              |     r3 += s;
    0x000110b4 add r0, r3, r0                |     r0 = r3 + r0;
    0x000110b8 mov r3, 0                     |     r3 = 0;
    0x000110bc strb r3, [r0, -0x34]          |     buf = r3;
    0x000110c0 mov r2, r6                    |     r2 = r6;
    0x000110c4 ldr r1, [pc, 0xc8]            |     r1 = "_s:_error_:_contents_of___s__is_too_long";
    0x000110c8 add r0, sp, 0x14              |     r0 += buf;
    0x000110cc bl 0x10934                    |     r0 = sscanf (r0, "_s:_error_:_contents_of___s__is_too_long", r2);
    0x000110d0 cmp r0, 1                     |     
                                             |     if (r0 == 1) {
    0x000110d4 movne r3, r5                  |         r3 = r5;
                                             |     }
                                             |     if (r0 == 1) {
    0x000110d8 ldrne r2, [pc, 0xa0]          |         r2 = "libubi";
                                             |     }
                                             |     if (r0 != 1) {
    0x000110dc ldrne r1, [pc, 0xb4]          |         r1 = "_s:_error_:_cannot_read_integer_from___s_";
                                             |         goto label_6;
                                             |     }
                                             |     if (r0 != 1) {
                                             | label_6:
    0x000110e0 bne 0x11094                   |         goto label_0;
                                             |     }
    0x000110e4 ldrd r2, r3, [r6]             |     __asm ("ldrd r2, r3, [r6]");
    0x000110e8 cmp r2, 0                     |     
    0x000110ec sbcs r1, r3, 0                |     __asm ("sbcs r1, r3, 0");
                                             |     if (r2 < 0) {
    0x000110f0 bge 0x11114                   |         
    0x000110f4 strd r2, r3, [sp]             |         __asm ("strd r2, r3, [sp]");
    0x000110f8 ldr r3, [pc, 0x7c]            |         r3 = *(0x11178);
    0x000110fc str r5, [sp, 8]               |         var_8h = r5;
    0x00011100 ldr r2, [pc, 0x78]            |         r2 = stderr;
    0x00011104 ldr r1, [pc, 0x90]            |         r1 = "_s:_error_:_cannot_read_integer_from___s_";
    0x00011108 ldr r0, [r3]                  |         r0 = *(0x11178);
    0x0001110c bl 0x108ec                    |         fprintf (r0, "_s:_error_:_cannot_read_integer_from___s_", r2, r3, r4, r5)
    0x00011110 b 0x110a0                     |         goto label_1;
                                             |     }
    0x00011114 mov r0, r4                    |     r0 = r4;
    0x00011118 bl 0x109d0                    |     r0 = close (r0);
    0x0001111c subs r4, r0, 0                |     r4 = r0 - 0;
                                             |     if (r4 != r0) {
    0x00011120 beq 0x11170                   |         
    0x00011124 bl 0x10988                    |         errno_location ();
    0x00011128 ldr r6, [pc, 0x4c]            |         r6 = *(0x11178);
    0x0001112c mov r3, r5                    |         r3 = r5;
    0x00011130 ldr r2, [pc, 0x48]            |         r2 = stderr;
    0x00011134 ldr r1, [pc, 0x64]            |         r1 = "_s:_error_:_negative_value__lld_in___s_";
    0x00011138 ldr r4, [r0]                  |         r4 = *(r0);
    0x0001113c ldr r0, [r6]                  |         r0 = *(0x11178);
    0x00011140 bl 0x108ec                    |         fprintf (r0, "_s:_error_:_negative_value__lld_in___s_", r2, r3, r4, r5, r6)
    0x00011144 mov r0, r4                    |         r0 = r4;
    0x00011148 ldr r5, [r6]                  |         r5 = *(0x11178);
    0x0001114c bl 0x10868                    |         strerror (r0);
    0x00011150 str r4, [sp]                  |         *(sp) = r4;
    0x00011154 ldr r3, [pc, 0x2c]            |         r3 = "_s:_error_:_cannot_read___s_";
    0x00011158 mov r2, 8                     |         r2 = 8;
    0x0001115c ldr r1, [pc, 0x28]            |         r1 = *(0x11188);
    0x00011160 str r0, [sp, 4]               |         var_4h = r0;
    0x00011164 mov r0, r5                    |         r0 = r5;
    0x00011168 bl 0x108ec                    |         fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4)
                                             | label_4:
    0x0001116c mvn r4, 0                     |         r4 = ~0;
                                             |     }
                                             | label_2:
    0x00011170 mov r0, r4                    |     r0 = r4;
    0x00011174 add sp, sp, 0x4c              |     
    0x00011178 pop {r4, r5, r6, r7, 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/ubidetach @ 0x111a4 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.000111a4 ()                  | void fcn_000111a4 (int32_t arg1, int32_t arg2) {
                                             |     int32_t var_0h;
                                             |     int32_t var_0h_2;
                                             |     int32_t var_8h;
                                             |     int32_t var_10h;
                                             |     int32_t var_10h_2;
                                             |     int32_t var_1ch;
                                             |     r0 = arg1;
                                             |     r1 = arg2;
    0x000111a4 push {r4, r5, lr}             |     
    0x000111a8 sub sp, sp, 0x1c              |     
    0x000111ac mov r4, r1                    |     r4 = r1;
    0x000111b0 add r1, sp, 0x10              |     r1 += var_10h;
    0x000111b4 mov r5, r0                    |     r5 = r0;
    0x000111b8 bl 0x10ff4                    |     r0 = fcn_00010ff4 (r0, r1);
    0x000111bc cmp r0, 0                     |     
                                             |     if (r0 == 0) {
    0x000111c0 bne 0x11200                   |         
    0x000111c4 ldrd r2, r3, [sp, 0x10]       |         __asm ("ldrd r2, r3, [var_10h]");
    0x000111c8 cmp r2, 0x80000000            |         
    0x000111cc sbcs r1, r3, 0                |         __asm ("sbcs r1, r3, 0");
                                             |         if (r2 >= 0x80000000) {
    0x000111d0 strlt r2, [r4]                |             *(r4) = r2;
                                             |         }
                                             |         if (r2 < 0x80000000) {
    0x000111d4 blt 0x11204                   |             goto label_0;
                                             |         }
    0x000111d8 strd r2, r3, [sp]             |         __asm ("strd r2, r3, [sp]");
    0x000111dc ldr r3, [pc, 0x28]            |         r3 = *(0x11208);
    0x000111e0 str r5, [sp, 8]               |         var_8h = r5;
    0x000111e4 ldr r2, [pc, 0x24]            |         r2 = stderr;
    0x000111e8 ldr r0, [r3]                  |         r0 = *(0x11208);
    0x000111ec ldr r1, [pc, 0x20]            |         r1 = "libubi";
    0x000111f0 bl 0x108ec                    |         r0 = fprintf (r0, "libubi", r2, r3, r4, r5)
    0x000111f4 bl 0x10988                    |         errno_location ();
    0x000111f8 mov r3, 0x16                  |         r3 = 0x16;
    0x000111fc str r3, [r0]                  |         *(r0) = r3;
                                             |     }
    0x00011200 mvn r0, 0                     |     r0 = ~0;
                                             | label_0:
    0x00011204 add sp, sp, 0x1c              |     
    0x00011208 pop {r4, r5, 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/ubidetach @ 0x112b0 */
                                                                 | #include <stdint.h>
                                                                 |  
    ; (fcn) fcn.000112b0 ()                                      | void fcn_000112b0 (int32_t arg1, int32_t arg2) {
                                                                 |     int32_t var_0h;
                                                                 |     int32_t var_4h;
                                                                 |     void * buf;
                                                                 |     int32_t var_10h;
                                                                 |     r0 = arg1;
                                                                 |     r1 = arg2;
    0x000112b0 push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr}     |     
    0x000112b4 mov r8, r1                                        |     r8 = r1;
    0x000112b8 mov r1, 0                                         |     r1 = 0;
    0x000112bc mov r5, r0                                        |     r5 = r0;
    0x000112c0 mov r7, r2                                        |     r7 = r2;
    0x000112c4 bl 0x10958                                        |     r0 = open64 ();
    0x000112c8 cmn r0, 1                                         |     
    0x000112cc mov r4, r0                                        |     r4 = r0;
                                                                 |     if (r0 == 1) {
    0x000112d0 beq 0x11418                                       |         goto label_2;
                                                                 |     }
    0x000112d4 mov r2, r7                                        |     r2 = r7;
    0x000112d8 mov r1, r8                                        |     r1 = r8;
    0x000112dc bl 0x10904                                        |     r0 = read (r0, r1, r2);
    0x000112e0 cmn r0, 1                                         |     
    0x000112e4 mov r6, r0                                        |     r6 = r0;
                                                                 |     if (r0 != 1) {
    0x000112e8 bne 0x11340                                       |         goto label_3;
                                                                 |     }
                                                                 | label_0:
    0x000112ec bl 0x10988                                        |     errno_location ();
    0x000112f0 ldr r7, [pc, 0x12c]                               |     r7 = *(0x11420);
    0x000112f4 mov r3, r5                                        |     r3 = r5;
    0x000112f8 ldr r2, [pc, 0x128]                               |     r2 = stderr;
    0x000112fc ldr r1, [pc, 0x128]                               |     r1 = "libubi";
    0x00011300 ldr r6, [r0]                                      |     r6 = *(r0);
    0x00011304 ldr r0, [r7]                                      |     r0 = *(0x11420);
    0x00011308 bl 0x108ec                                        |     fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x0001130c mov r0, r6                                        |     r0 = r6;
    0x00011310 ldr r5, [r7]                                      |     r5 = *(0x11420);
    0x00011314 bl 0x10868                                        |     strerror (r0);
    0x00011318 str r6, [sp]                                      |     *(sp) = r6;
    0x0001131c ldr r3, [pc, 0x10c]                               |     r3 = "_s:_error_:_cannot_read___s_";
    0x00011320 mov r2, 8                                         |     r2 = 8;
    0x00011324 ldr r1, [pc, 0x108]                               |     r1 = *(0x11430);
    0x00011328 str r0, [sp, 4]                                   |     var_4h = r0;
    0x0001132c mov r0, r5                                        |     r0 = r5;
    0x00011330 bl 0x108ec                                        |     fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4, r5, r6)
                                                                 |     do {
    0x00011334 mov r0, r4                                        |         r0 = r4;
    0x00011338 bl 0x109d0                                        |         close (r0);
    0x0001133c b 0x11414                                         |         goto label_4;
                                                                 | label_3:
    0x00011340 cmp r7, r0                                        |         
                                                                 |         if (r7 != r0) {
    0x00011344 bne 0x11370                                       |             goto label_5;
                                                                 |         }
    0x00011348 ldr r0, [pc, 0xd4]                                |         
    0x0001134c mov r3, r5                                        |         r3 = r5;
    0x00011350 ldr r2, [pc, 0xd0]                                |         r2 = stderr;
    0x00011354 ldr r1, [pc, 0xdc]                                |         r1 = "_serror__d___s_";
    0x00011358 ldr r0, [r0]                                      |         r0 = *(0x11420);
    0x0001135c bl 0x108ec                                        |         r0 = fprintf (r0, "_serror__d___s_", r2, r3)
                                                                 | label_1:
    0x00011360 bl 0x10988                                        |         errno_location ();
    0x00011364 mov r3, 0x16                                      |         r3 = 0x16;
    0x00011368 str r3, [r0]                                      |         *(r0) = r3;
    0x0001136c b 0x11334                                         |         
                                                                 |     } while (1);
                                                                 | label_5:
    0x00011370 mov r3, 0                                         |     r3 = 0;
    0x00011374 strb r3, [r8, r0]                                 |     *((r8 + r0)) = r3;
    0x00011378 mov r2, 1                                         |     r2 = 1;
    0x0001137c add r1, sp, 0xc                                   |     r1 += buf;
    0x00011380 mov r0, r4                                        |     r0 = r4;
    0x00011384 bl 0x10904                                        |     r0 = read (r0, r1, r2);
    0x00011388 cmp r0, 1                                         |     
                                                                 |     if (r0 == 1) {
    0x0001138c beq 0x112ec                                       |         goto label_0;
                                                                 |     }
    0x00011390 cmp r0, 0                                         |     
                                                                 |     if (r0 != 0) {
    0x00011394 beq 0x113b8                                       |         
    0x00011398 ldr r0, [pc, 0x84]                                |         
    0x0001139c str r7, [sp]                                      |         *(sp) = r7;
    0x000113a0 mov r3, r5                                        |         r3 = r5;
    0x000113a4 ldr r2, [pc, 0x7c]                                |         r2 = stderr;
    0x000113a8 ldr r1, [pc, 0x8c]                                |         r1 = "_s:_error_:_contents_of___s__is_too_long";
    0x000113ac ldr r0, [r0]                                      |         r0 = *(0x11420);
    0x000113b0 bl 0x108ec                                        |         fprintf (r0, "_s:_error_:_contents_of___s__is_too_long", r2, r3)
    0x000113b4 b 0x11360                                         |         goto label_1;
                                                                 |     }
    0x000113b8 mov r0, r4                                        |     r0 = r4;
    0x000113bc bl 0x109d0                                        |     r0 = close (r0);
    0x000113c0 cmp r0, 0                                         |     
                                                                 |     if (r0 != 0) {
    0x000113c4 moveq r4, r6                                      |         r4 = r6;
                                                                 |     }
                                                                 |     if (r0 != 0) {
    0x000113c8 beq 0x11418                                       |         
    0x000113cc bl 0x10988                                        |         errno_location ();
    0x000113d0 ldr r6, [pc, 0x4c]                                |         r6 = *(0x11420);
    0x000113d4 mov r3, r5                                        |         r3 = r5;
    0x000113d8 ldr r2, [pc, 0x48]                                |         r2 = stderr;
    0x000113dc ldr r1, [pc, 0x5c]                                |         r1 = "%s: error!: file \"%s\" contains too much data (> %d bytes)\n";
    0x000113e0 ldr r4, [r0]                                      |         r4 = *(r0);
    0x000113e4 ldr r0, [r6]                                      |         r0 = *(0x11420);
    0x000113e8 bl 0x108ec                                        |         fprintf (r0, "%s: error!: file \"%s\" contains too much data (> %d bytes)\n", r2, r3, r4, r5, r6)
    0x000113ec mov r0, r4                                        |         r0 = r4;
    0x000113f0 ldr r5, [r6]                                      |         r5 = *(0x11420);
    0x000113f4 bl 0x10868                                        |         strerror (r0);
    0x000113f8 str r4, [sp]                                      |         *(sp) = r4;
    0x000113fc ldr r3, [pc, 0x2c]                                |         r3 = "_s:_error_:_cannot_read___s_";
    0x00011400 mov r2, 8                                         |         r2 = 8;
    0x00011404 ldr r1, [pc, 0x28]                                |         r1 = *(0x11430);
    0x00011408 str r0, [sp, 4]                                   |         var_4h = r0;
    0x0001140c mov r0, r5                                        |         r0 = r5;
    0x00011410 bl 0x108ec                                        |         fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4)
                                                                 | label_4:
    0x00011414 mvn r4, 0                                         |         r4 = ~0;
                                                                 |     }
                                                                 | label_2:
    0x00011418 mov r0, r4                                        |     r0 = r4;
    0x0001141c add sp, sp, 0x10                                  |     
    0x00011420 pop {r4, r5, r6, r7, r8, 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/ubidetach @ 0x11444 */
                                                                 | #include <stdint.h>
                                                                 |  
    ; (fcn) fcn.00011444 ()                                      | void fcn_00011444 (int32_t arg1, int32_t arg2) {
                                                                 |     int32_t var_0h;
                                                                 |     int32_t var_4h;
                                                                 |     int32_t var_8h;
                                                                 |     r0 = arg1;
                                                                 |     r1 = arg2;
    0x00011444 push {r0, r1, r4, r5, r6, r7, r8, sb, sl, lr}     |     
    0x00011448 mov r7, r1                                        |     r7 = r1;
    0x0001144c mov sl, r0                                        |     sl = r0;
    0x00011450 bl 0x109a0                                        |     r0 = strlen (r0);
    0x00011454 mov r4, r0                                        |     r4 = r0;
    0x00011458 mov sb, r0                                        |     sb = r0;
    0x0001145c mov r0, r7                                        |     r0 = r7;
    0x00011460 bl 0x109a0                                        |     r0 = strlen (r0);
    0x00011464 add r6, r4, r0                                    |     r6 = r4 + r0;
    0x00011468 add r6, r6, 2                                     |     r6 += 2;
    0x0001146c mov r8, r0                                        |     r8 = r0;
    0x00011470 mov r0, r6                                        |     r0 = r6;
    0x00011474 bl 0x108b0                                        |     r0 = malloc (r0);
    0x00011478 subs r5, r0, 0                                    |     r5 = r0 - 0;
                                                                 |     if (r5 != r0) {
    0x0001147c bne 0x114d4                                       |         goto label_0;
                                                                 |     }
    0x00011480 bl 0x10988                                        |     errno_location ();
    0x00011484 ldr r7, [pc, 0x80]                                |     r7 = *(0x11508);
    0x00011488 mov r3, r6                                        |     r3 = r6;
    0x0001148c ldr r2, [pc, 0x7c]                                |     r2 = stderr;
    0x00011490 ldr r1, [pc, 0x7c]                                |     r1 = "libubi";
    0x00011494 ldr r4, [r0]                                      |     r4 = *(r0);
    0x00011498 ldr r0, [r7]                                      |     r0 = *(0x11508);
    0x0001149c bl 0x108ec                                        |     fprintf (r0, "libubi", r2, r3, r4)
    0x000114a0 mov r0, r4                                        |     r0 = r4;
    0x000114a4 ldr r6, [r7]                                      |     r6 = *(0x11508);
    0x000114a8 bl 0x10868                                        |     strerror (r0);
    0x000114ac str r4, [sp]                                      |     *(sp) = r4;
    0x000114b0 ldr r3, [pc, 0x60]                                |     r3 = "_s:_error_:_cannot_allocate__d_bytes";
    0x000114b4 mov r2, 8                                         |     r2 = 8;
    0x000114b8 ldr r1, [pc, 0x5c]                                |     r1 = *(0x11518);
    0x000114bc str r0, [sp, 4]                                   |     var_4h = r0;
    0x000114c0 mov r0, r6                                        |     r0 = r6;
    0x000114c4 bl 0x108ec                                        |     fprintf (r0, r1, r2, "_s:_error_:_cannot_allocate__d_bytes", r4)
                                                                 |     do {
    0x000114c8 mov r0, r5                                        |         r0 = r5;
    0x000114cc add sp, sp, 8                                     |         
    0x000114d0 pop {r4, r5, r6, r7, r8, sb, sl, pc}              |         
                                                                 | label_0:
    0x000114d4 mov r2, r4                                        |         r2 = r4;
    0x000114d8 mov r1, sl                                        |         r1 = sl;
    0x000114dc bl 0x10898                                        |         memcpy (r0, r1, r2);
    0x000114e0 add r3, r5, r4                                    |         r3 = r5 + r4;
    0x000114e4 ldrb r3, [r3, -1]                                 |         r3 = *((r3 - 1));
    0x000114e8 add r2, r8, 1                                     |         r2 = r8 + 1;
    0x000114ec cmp r3, 0x2f                                      |         
                                                                 |         if (r3 == 0x2f) {
    0x000114f0 addne r4, r4, 1                                   |             r4++;
                                                                 |         }
                                                                 |         if (r3 == 0x2f) {
    0x000114f4 movne r3, 0x2f                                    |             r3 = 0x2f;
                                                                 |         }
                                                                 |         if (r3 == 0x2f) {
    0x000114f8 strbne r3, [r5, sb]                               |             *((r5 + sb)) = r3;
                                                                 |         }
    0x000114fc mov r1, r7                                        |         r1 = r7;
    0x00011500 add r0, r5, r4                                    |         r0 = r5 + r4;
    0x00011504 bl 0x10898                                        |         memcpy (r0, r1, r2);
    0x00011508 b 0x114c8                                         |         
                                                                 |     } while (1);
                                                                 | }
    ; 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/ubidetach @ 0x11520 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00011520 ()                  | void fcn_00011520 (int32_t arg1) {
                                             |     int32_t var_0h;
                                             |     int32_t var_4h;
                                             |     int32_t var_8h;
                                             |     int32_t var_18h;
                                             |     int32_t var_28h;
                                             |     int32_t var_28h_2;
                                             |     int32_t var_74h;
                                             |     r0 = arg1;
    0x00011520 push {r4, r5, r6, r7, lr}     |     
    0x00011524 sub sp, sp, 0x74              |     
    0x00011528 add r1, sp, 8                 |     r1 += var_8h;
    0x0001152c mov r5, r0                    |     r5 = r0;
    0x00011530 bl 0x10874                    |     r0 = stat64 ();
    0x00011534 cmp r0, 0                     |     
                                             |     if (r0 >= 0) {
    0x00011538 bge 0x11590                   |         goto label_2;
                                             |     }
    0x0001153c bl 0x10988                    |     errno_location ();
    0x00011540 ldr r6, [pc, 0xc8]            |     r6 = *(0x1160c);
    0x00011544 ldr r2, [pc, 0xc8]            |     r2 = stderr;
    0x00011548 ldr r1, [pc, 0xc8]            |     r1 = "libubi";
    0x0001154c mov r3, r5                    |     r3 = r5;
    0x00011550 ldr r4, [r0]                  |     r4 = *(r0);
                                             |     do {
                                             | label_1:
    0x00011554 ldr r0, [r6]                  |         r0 = *(r6);
    0x00011558 bl 0x108ec                    |         fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x0001155c mov r0, r4                    |         r0 = r4;
    0x00011560 ldr r5, [r6]                  |         r5 = *(r6);
    0x00011564 bl 0x10868                    |         strerror (r0);
    0x00011568 str r4, [sp]                  |         *(sp) = r4;
    0x0001156c ldr r3, [pc, 0xa8]            |         r3 = "_s:_error_:_cannot_stat___s_";
    0x00011570 mov r2, 8                     |         r2 = 8;
    0x00011574 ldr r1, [pc, 0xa4]            |         r1 = *(0x1161c);
    0x00011578 str r0, [sp, 4]               |         var_4h = r0;
    0x0001157c mov r0, r5                    |         r0 = r5;
    0x00011580 bl 0x108ec                    |         fprintf (r0, r1, r2, "_s:_error_:_cannot_stat___s_", r4)
    0x00011584 mvn r0, 0                     |         r0 = ~0;
                                             | label_0:
    0x00011588 add sp, sp, 0x74              |         
    0x0001158c pop {r4, r5, r6, r7, pc}      |         
                                             | label_2:
    0x00011590 ldr r3, [sp, 0x18]            |         r3 = var_18h;
    0x00011594 and r3, r3, 0xf000            |         r3 &= 0xf000;
    0x00011598 cmp r3, 0x2000                |         
                                             |         if (r3 == 0x2000) {
    0x0001159c beq 0x115c0                   |             goto label_3;
                                             |         }
    0x000115a0 bl 0x10988                    |         errno_location ();
    0x000115a4 mov r4, 0x16                  |         r4 = 0x16;
    0x000115a8 ldr r6, [pc, 0x60]            |         r6 = *(0x1160c);
    0x000115ac mov r3, r5                    |         r3 = r5;
    0x000115b0 ldr r2, [pc, 0x5c]            |         r2 = stderr;
    0x000115b4 ldr r1, [pc, 0x68]            |         r1 = "_serror__d___s_";
    0x000115b8 str r4, [r0]                  |         *(r0) = r4;
    0x000115bc b 0x11554                     |         
                                             |     } while (1);
                                             | label_3:
    0x000115c0 ldrd r6, r7, [sp, 0x28]       |     __asm ("ldrd r6, r7, [var_28h]");
    0x000115c4 mov r1, r7                    |     r1 = r7;
    0x000115c8 mov r0, r6                    |     r0 = r6;
    0x000115cc bl 0x1088c                    |     gnu_dev_major ();
    0x000115d0 mov r1, r7                    |     r1 = r7;
    0x000115d4 mov r4, r0                    |     r4 = r0;
    0x000115d8 mov r0, r6                    |     r0 = r6;
    0x000115dc bl 0x108c8                    |     gnu_dev_minor ();
    0x000115e0 cmp r4, 0x5a                  |     
                                             |     if (r4 != 0x5a) {
    0x000115e4 addeq r0, r0, r0, lsr 31      |         r0 += (r0 >> 31);
                                             |     }
    0x000115e8 asreq r0, r0, 1               |     __asm ("asreq r0, r0, 1");
                                             |     if (r4 == 0x5a) {
    0x000115ec beq 0x11588                   |         goto label_0;
                                             |     }
    0x000115f0 bl 0x10988                    |     errno_location ();
    0x000115f4 mov r4, 0x16                  |     r4 = 0x16;
    0x000115f8 ldr r6, [pc, 0x10]            |     r6 = *(0x1160c);
    0x000115fc mov r3, r5                    |     r3 = r5;
    0x00011600 ldr r2, [pc, 0xc]             |     r2 = stderr;
    0x00011604 ldr r1, [pc, 0x1c]            |     r1 = "_s:_error_:___s__is_not_a_character_device";
    0x00011608 str r4, [r0]                  |     *(r0) = r4;
    0x0001160c b 0x11554                     |     goto label_1;
                                             | }
    ; 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/ubidetach @ 0x1162c */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.0001162c ()              | void fcn_0001162c (int32_t arg1, int32_t arg2) {
                                         |     int32_t var_0h;
                                         |     int32_t var_4h;
                                         |     char * s;
                                         |     int32_t var_40h;
                                         |     r0 = arg1;
                                         |     r1 = arg2;
    0x0001162c push {r4, r5, r6, lr}     |     
    0x00011630 sub sp, sp, 0x40          |     
    0x00011634 mov r4, r1                |     r4 = r1;
    0x00011638 mov r5, r2                |     r5 = r2;
    0x0001163c add r1, sp, 0xc           |     r1 += s;
    0x00011640 mov r2, 0x32              |     r2 = 0x32;
    0x00011644 mov r6, r0                |     r6 = r0;
    0x00011648 bl 0x112b0                |     r0 = fcn_000112b0 (r0, r1);
    0x0001164c cmp r0, 0                 |     
                                         |     if (r0 < 0) {
    0x00011650 blt 0x11698               |         goto label_1;
                                         |     }
    0x00011654 mov r3, r5                |     r3 = r5;
    0x00011658 mov r2, r4                |     r2 = r4;
    0x0001165c ldr r1, [pc, 0x8c]        |     r1 = *(0x116ec);
    0x00011660 add r0, sp, 0xc           |     r0 += s;
    0x00011664 bl 0x10934                |     r0 = sscanf (r0, r1, r2);
    0x00011668 cmp r0, 2                 |     
                                         |     if (r0 == 2) {
    0x0001166c beq 0x116a0               |         goto label_2;
                                         |     }
    0x00011670 bl 0x10988                |     errno_location ();
    0x00011674 mov r3, 0x16              |     r3 = 0x16;
    0x00011678 ldr r2, [pc, 0x74]        |     r2 = "%d:%d\n";
    0x0001167c ldr r1, [pc, 0x74]        |     r1 = "libubi";
    0x00011680 str r3, [r0]              |     *(r0) = r3;
    0x00011684 ldr r0, [pc, 0x70]        |     
    0x00011688 mov r3, r6                |     r3 = r6;
    0x0001168c ldr r0, [r0]              |     r0 = "_s:_error_:___s__does_not_have_major:minor_format";
    0x00011690 bl 0x108ec                |     fprintf ("_s:_error_:___s__does_not_have_major:minor_format", "libubi", "%d:%d\n", r3)
                                         | label_0:
    0x00011694 mvn r0, 0                 |     r0 = ~0;
                                         |     do {
                                         | label_1:
    0x00011698 add sp, sp, 0x40          |         
    0x0001169c pop {r4, r5, r6, pc}      |         
                                         | label_2:
    0x000116a0 ldr r3, [r4]              |         r3 = *(r4);
    0x000116a4 cmp r3, 0                 |         
                                         |         if (r3 < 0) {
    0x000116a8 blt 0x116bc               |             goto label_3;
                                         |         }
    0x000116ac ldr r3, [r5]              |         r3 = *(r5);
    0x000116b0 cmp r3, 0                 |         
                                         |         if (r3 < 0) {
    0x000116b4 movge r0, 0               |             r0 = 0;
                                         |         }
    0x000116b8 bge 0x11698               |         
                                         |     } while (r3 >= 0);
                                         | label_3:
    0x000116bc bl 0x10988                |     errno_location ();
    0x000116c0 mov r3, 0x16              |     r3 = 0x16;
    0x000116c4 ldr r2, [pc, 0x28]        |     r2 = "%d:%d\n";
    0x000116c8 ldr r1, [pc, 0x30]        |     r1 = stderr;
    0x000116cc str r3, [r0]              |     *(r0) = r3;
    0x000116d0 ldr r0, [pc, 0x24]        |     
    0x000116d4 ldr r3, [r5]              |     r3 = *(r5);
    0x000116d8 str r6, [sp, 4]           |     var_4h = r6;
    0x000116dc str r3, [sp]              |     *(sp) = r3;
    0x000116e0 ldr r3, [r4]              |     r3 = *(r4);
    0x000116e4 ldr r0, [r0]              |     r0 = "_s:_error_:___s__does_not_have_major:minor_format";
    0x000116e8 bl 0x108ec                |     fprintf ("_s:_error_:___s__does_not_have_major:minor_format", r1, "%d:%d\n", r3, r4, r5, r6)
    0x000116ec b 0x11694                 |     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/ubidetach @ 0x11758 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) fcn.00011758 ()                      | void fcn_00011758 (int32_t arg1) {
                                                 |     int32_t var_0h;
                                                 |     int32_t var_4h;
                                                 |     int32_t var_8h;
                                                 |     r0 = arg1;
    0x00011758 push {r0, r1, r4, r5, r6, lr}     |     
    0x0001175c ldr r5, [pc, 0x50]                |     
    0x00011760 mov r6, r0                        |     r6 = r0;
    0x00011764 bl 0x10988                        |     errno_location ();
    0x00011768 mov r3, r6                        |     r3 = r6;
    0x0001176c ldr r2, [pc, 0x44]                |     r2 = stderr;
    0x00011770 ldr r1, [pc, 0x44]                |     r1 = "libubi";
    0x00011774 ldr r4, [r0]                      |     r4 = *(r0);
    0x00011778 ldr r0, [r5]                      |     r0 = *(0x117b0);
    0x0001177c bl 0x108ec                        |     fprintf (r0, "libubi", r2, r3, r4)
    0x00011780 mov r0, r4                        |     r0 = r4;
    0x00011784 ldr r5, [r5]                      |     r5 = *(0x117b0);
    0x00011788 bl 0x10868                        |     strerror (r0);
    0x0001178c str r4, [sp]                      |     *(sp) = r4;
    0x00011790 ldr r3, [pc, 0x28]                |     r3 = "_s:_error_:_cannot_open___s_";
    0x00011794 mov r2, 8                         |     r2 = 8;
    0x00011798 ldr r1, [pc, 0x24]                |     r1 = *(0x117c0);
    0x0001179c str r0, [sp, 4]                   |     var_4h = r0;
    0x000117a0 mov r0, r5                        |     r0 = r5;
    0x000117a4 bl 0x108ec                        |     fprintf (r0, r1, r2, "_s:_error_:_cannot_open___s_", r4)
    0x000117a8 mvn r0, 0                         |     r0 = ~0;
    0x000117ac add sp, sp, 8                     |     
    0x000117b0 pop {r4, r5, r6, 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/ubidetach @ 0x118ec */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) fcn.000118ec ()                              | void fcn_000118ec () {
                                                         |     int32_t var_0h;
                                                         |     int32_t var_4h;
                                                         |     int32_t var_ch;
                                                         |     int32_t var_10h;
    0x000118ec push {r0, r1, r2, r3, r4, r5, r6, lr}     |     
    0x000118f0 mov r1, 0x68                              |     r1 = 0x68;
    0x000118f4 mov r0, 1                                 |     r0 = 1;
    0x000118f8 bl 0x108e0                                |     r0 = calloc (r0, r1);
    0x000118fc subs r4, r0, 0                            |     r4 = r0 - 0;
                                                         |     if (r4 == r0) {
    0x00011900 beq 0x11970                               |         goto label_1;
                                                         |     }
    0x00011904 ldr r1, [pc, 0x2fc]                       |     r1 = *(0x11c04);
    0x00011908 ldr r0, [pc, 0x2fc]                       |     r0 = "class_misc_ubi_ctrl_";
    0x0001190c bl 0x11444                                |     r0 = fcn_00011444 ("class_misc_ubi_ctrl_", r1);
    0x00011910 cmp r0, 0                                 |     
    0x00011914 str r0, [r4, 4]                           |     *((r4 + 4)) = r0;
                                                         |     if (r0 == 0) {
    0x00011918 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x0001191c ldr r1, [pc, 0x2ec]                       |     r1 = "/sys";
    0x00011920 bl 0x11444                                |     r0 = fcn_00011444 (r0, "/sys");
    0x00011924 cmp r0, 0                                 |     
    0x00011928 str r0, [r4, 8]                           |     *((r4 + 8)) = r0;
                                                         |     if (r0 == 0) {
    0x0001192c beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011930 ldr r1, [pc, 0x2dc]                       |     r1 = "dev";
    0x00011934 ldr r0, [pc, 0x2d0]                       |     r0 = "class_misc_ubi_ctrl_";
    0x00011938 bl 0x11444                                |     r0 = fcn_00011444 ("class_misc_ubi_ctrl_", "dev");
    0x0001193c cmp r0, 0                                 |     
    0x00011940 str r0, [r4, 0xc]                         |     *((r4 + 0xc)) = r0;
                                                         |     if (r0 == 0) {
    0x00011944 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011948 mov r1, 0                                 |     r1 = 0;
    0x0001194c bl 0x10958                                |     r0 = open64 ();
    0x00011950 cmn r0, 1                                 |     
                                                         |     if (r0 != 1) {
    0x00011954 bne 0x1197c                               |         goto label_2;
                                                         |     }
    0x00011958 bl 0x10988                                |     errno_location ();
    0x0001195c mov r3, 0                                 |     r3 = 0;
    0x00011960 str r3, [r0]                              |     *(r0) = r3;
                                                         |     do {
                                                         | label_0:
    0x00011964 mov r0, r4                                |         r0 = r4;
    0x00011968 bl 0x11818                                |         fcn_00011818 (r0);
    0x0001196c mov r4, 0                                 |         r4 = 0;
                                                         | label_1:
    0x00011970 mov r0, r4                                |         r0 = r4;
    0x00011974 add sp, sp, 0x10                          |         
    0x00011978 pop {r4, r5, r6, pc}                      |         
                                                         | label_2:
    0x0001197c bl 0x109d0                                |         r0 = close (r0);
    0x00011980 cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x00011984 beq 0x119d4                               |             goto label_3;
                                                         |         }
    0x00011988 bl 0x10988                                |         errno_location ();
    0x0001198c ldr r6, [pc, 0x284]                       |         
    0x00011990 ldr r3, [r4, 0xc]                         |         r3 = *((r4 + 0xc));
    0x00011994 ldr r2, [pc, 0x280]                       |         r2 = stderr;
    0x00011998 ldr r1, [pc, 0x280]                       |         r1 = "libubi";
    0x0001199c ldr r5, [r0]                              |         r5 = *(r0);
    0x000119a0 ldr r0, [r6]                              |         r0 = "class_ubi";
    0x000119a4 bl 0x108ec                                |         fprintf ("class_ubi", "libubi", r2, r3, r4, r5, "class_ubi")
    0x000119a8 mov r0, r5                                |         r0 = r5;
    0x000119ac ldr r6, [r6]                              |         r6 = "class_ubi";
    0x000119b0 bl 0x10868                                |         strerror (r0);
    0x000119b4 str r5, [sp]                              |         *(sp) = r5;
    0x000119b8 ldr r3, [pc, 0x264]                       |         r3 = "%s: error!: close failed on \"%s\"\n";
    0x000119bc mov r2, 8                                 |         r2 = 8;
    0x000119c0 ldr r1, [pc, 0x260]                       |         r1 = *(0x11c24);
    0x000119c4 str r0, [sp, 4]                           |         var_4h = r0;
    0x000119c8 mov r0, r6                                |         r0 = r6;
    0x000119cc bl 0x108ec                                |         fprintf (r0, r1, r2, "%s: error!: close failed on \"%s\"\n", r4, r5)
    0x000119d0 b 0x11964                                 |         
                                                         |     } while (1);
                                                         | label_3:
    0x000119d4 ldr r1, [pc, 0x250]                       |     r1 = "_serror__d___s_";
    0x000119d8 ldr r0, [r4, 0xc]                         |     r0 = *((r4 + 0xc));
    0x000119dc bl 0x11444                                |     r0 = fcn_00011444 (r0, "_serror__d___s_");
    0x000119e0 cmp r0, 0                                 |     
    0x000119e4 str r0, [r4, 0x10]                        |     *((r4 + 0x10)) = r0;
                                                         |     if (r0 == 0) {
    0x000119e8 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x000119ec ldr r1, [pc, 0x23c]                       |     r1 = "ubi_d";
    0x000119f0 ldr r0, [r4, 0xc]                         |     r0 = *((r4 + 0xc));
    0x000119f4 bl 0x11444                                |     r0 = fcn_00011444 (r0, "ubi_d");
    0x000119f8 cmp r0, 0                                 |     
    0x000119fc str r0, [r4, 0x14]                        |     *((r4 + 0x14)) = r0;
                                                         |     if (r0 == 0) {
    0x00011a00 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011a04 ldr r1, [pc, 0x204]                       |     r1 = "/sys";
    0x00011a08 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011a0c bl 0x11444                                |     r0 = fcn_00011444 (r0, "/sys");
    0x00011a10 cmp r0, 0                                 |     
    0x00011a14 str r0, [r4, 0x18]                        |     *((r4 + 0x18)) = r0;
                                                         |     if (r0 == 0) {
    0x00011a18 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011a1c ldr r1, [pc, 0x210]                       |     r1 = "version";
    0x00011a20 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011a24 bl 0x11444                                |     r0 = fcn_00011444 (r0, "version");
    0x00011a28 cmp r0, 0                                 |     
    0x00011a2c str r0, [r4, 0x1c]                        |     *((r4 + 0x1c)) = r0;
                                                         |     if (r0 == 0) {
    0x00011a30 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011a34 ldr r1, [pc, 0x1fc]                       |     r1 = "avail_eraseblocks";
    0x00011a38 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011a3c bl 0x11444                                |     r0 = fcn_00011444 (r0, "avail_eraseblocks");
    0x00011a40 cmp r0, 0                                 |     
    0x00011a44 str r0, [r4, 0x20]                        |     *((r4 + 0x20)) = r0;
                                                         |     if (r0 == 0) {
    0x00011a48 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011a4c ldr r1, [pc, 0x1e8]                       |     r1 = "total_eraseblocks";
    0x00011a50 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011a54 bl 0x11444                                |     r0 = fcn_00011444 (r0, "total_eraseblocks");
    0x00011a58 cmp r0, 0                                 |     
    0x00011a5c str r0, [r4, 0x24]                        |     *((r4 + 0x24)) = r0;
                                                         |     if (r0 == 0) {
    0x00011a60 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011a64 ldr r1, [pc, 0x1d4]                       |     r1 = "bad_peb_count";
    0x00011a68 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011a6c bl 0x11444                                |     r0 = fcn_00011444 (r0, "bad_peb_count");
    0x00011a70 cmp r0, 0                                 |     
    0x00011a74 str r0, [r4, 0x28]                        |     *((r4 + 0x28)) = r0;
                                                         |     if (r0 == 0) {
    0x00011a78 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011a7c ldr r1, [pc, 0x1c0]                       |     r1 = "eraseblock_size";
    0x00011a80 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011a84 bl 0x11444                                |     r0 = fcn_00011444 (r0, "eraseblock_size");
    0x00011a88 cmp r0, 0                                 |     
    0x00011a8c str r0, [r4, 0x2c]                        |     *((r4 + 0x2c)) = r0;
                                                         |     if (r0 == 0) {
    0x00011a90 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011a94 ldr r1, [pc, 0x1ac]                       |     r1 = "max_ec";
    0x00011a98 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011a9c bl 0x11444                                |     r0 = fcn_00011444 (r0, "max_ec");
    0x00011aa0 cmp r0, 0                                 |     
    0x00011aa4 str r0, [r4, 0x30]                        |     *((r4 + 0x30)) = r0;
                                                         |     if (r0 == 0) {
    0x00011aa8 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011aac ldr r1, [pc, 0x198]                       |     r1 = "reserved_for_bad";
    0x00011ab0 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011ab4 bl 0x11444                                |     r0 = fcn_00011444 (r0, "reserved_for_bad");
    0x00011ab8 cmp r0, 0                                 |     
    0x00011abc str r0, [r4, 0x34]                        |     *((r4 + 0x34)) = r0;
                                                         |     if (r0 == 0) {
    0x00011ac0 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011ac4 ldr r1, [pc, 0x184]                       |     r1 = "max_vol_count";
    0x00011ac8 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011acc bl 0x11444                                |     r0 = fcn_00011444 (r0, "max_vol_count");
    0x00011ad0 cmp r0, 0                                 |     
    0x00011ad4 str r0, [r4, 0x38]                        |     *((r4 + 0x38)) = r0;
                                                         |     if (r0 == 0) {
    0x00011ad8 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011adc ldr r1, [pc, 0x170]                       |     r1 = "min_io_size";
    0x00011ae0 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011ae4 bl 0x11444                                |     r0 = fcn_00011444 (r0, "min_io_size");
    0x00011ae8 cmp r0, 0                                 |     
    0x00011aec str r0, [r4, 0x3c]                        |     *((r4 + 0x3c)) = r0;
                                                         |     if (r0 == 0) {
    0x00011af0 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011af4 ldr r1, [pc, 0x15c]                       |     r1 = "mtd_num";
    0x00011af8 ldr r0, [r4, 0xc]                         |     r0 = *((r4 + 0xc));
    0x00011afc bl 0x11444                                |     r0 = fcn_00011444 (r0, "mtd_num");
    0x00011b00 cmp r0, 0                                 |     
    0x00011b04 str r0, [r4, 0x40]                        |     *((r4 + 0x40)) = r0;
                                                         |     if (r0 == 0) {
    0x00011b08 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011b0c ldr r1, [pc, 0x148]                       |     r1 = "ubi_d__d";
    0x00011b10 bl 0x11444                                |     r0 = fcn_00011444 (r0, "ubi_d__d");
    0x00011b14 cmp r0, 0                                 |     
    0x00011b18 str r0, [r4, 0x44]                        |     *((r4 + 0x44)) = r0;
                                                         |     if (r0 == 0) {
    0x00011b1c beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011b20 ldr r1, [pc, 0xe8]                        |     r1 = "/sys";
    0x00011b24 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011b28 bl 0x11444                                |     r0 = fcn_00011444 (r0, "/sys");
    0x00011b2c cmp r0, 0                                 |     
    0x00011b30 str r0, [r4, 0x48]                        |     *((r4 + 0x48)) = r0;
                                                         |     if (r0 == 0) {
    0x00011b34 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011b38 ldr r1, [pc, 0x120]                       |     r1 = "type";
    0x00011b3c ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011b40 bl 0x11444                                |     r0 = fcn_00011444 (r0, "type");
    0x00011b44 cmp r0, 0                                 |     
    0x00011b48 str r0, [r4, 0x4c]                        |     *((r4 + 0x4c)) = r0;
                                                         |     if (r0 == 0) {
    0x00011b4c beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011b50 ldr r1, [pc, 0x10c]                       |     r1 = "alignment";
    0x00011b54 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011b58 bl 0x11444                                |     r0 = fcn_00011444 (r0, "alignment");
    0x00011b5c cmp r0, 0                                 |     
    0x00011b60 str r0, [r4, 0x50]                        |     *((r4 + 0x50)) = r0;
                                                         |     if (r0 == 0) {
    0x00011b64 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011b68 ldr r1, [pc, 0xf8]                        |     r1 = "data_bytes";
    0x00011b6c ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011b70 bl 0x11444                                |     r0 = fcn_00011444 (r0, "data_bytes");
    0x00011b74 cmp r0, 0                                 |     
    0x00011b78 str r0, [r4, 0x54]                        |     *((r4 + 0x54)) = r0;
                                                         |     if (r0 == 0) {
    0x00011b7c beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011b80 ldr r1, [pc, 0xe4]                        |     r1 = "reserved_ebs";
    0x00011b84 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011b88 bl 0x11444                                |     r0 = fcn_00011444 (r0, "reserved_ebs");
    0x00011b8c cmp r0, 0                                 |     
    0x00011b90 str r0, [r4, 0x58]                        |     *((r4 + 0x58)) = r0;
                                                         |     if (r0 == 0) {
    0x00011b94 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011b98 ldr r1, [pc, 0xd0]                        |     r1 = "usable_eb_size";
    0x00011b9c ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011ba0 bl 0x11444                                |     r0 = fcn_00011444 (r0, "usable_eb_size");
    0x00011ba4 cmp r0, 0                                 |     
    0x00011ba8 str r0, [r4, 0x5c]                        |     *((r4 + 0x5c)) = r0;
                                                         |     if (r0 == 0) {
    0x00011bac beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011bb0 ldr r1, [pc, 0xbc]                        |     r1 = "corrupted";
    0x00011bb4 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011bb8 bl 0x11444                                |     r0 = fcn_00011444 (r0, "corrupted");
    0x00011bbc cmp r0, 0                                 |     
    0x00011bc0 str r0, [r4, 0x60]                        |     *((r4 + 0x60)) = r0;
                                                         |     if (r0 == 0) {
    0x00011bc4 beq 0x11964                               |         goto label_0;
                                                         |     }
    0x00011bc8 add r1, sp, 0xc                           |     r1 += var_ch;
    0x00011bcc ldr r0, [r4, 0x14]                        |     r0 = *((r4 + 0x14));
    0x00011bd0 bl 0x111a4                                |     r0 = fcn_000111a4 (r0, r1);
    0x00011bd4 cmp r0, 0                                 |     
                                                         |     if (r0 != 0) {
    0x00011bd8 bne 0x11964                               |         goto label_0;
                                                         |     }
    0x00011bdc ldr r3, [sp, 0xc]                         |     r3 = var_ch;
    0x00011be0 cmp r3, 1                                 |     
                                                         |     if (r3 == 1) {
    0x00011be4 beq 0x11970                               |         goto label_1;
                                                         |     }
    0x00011be8 ldr r0, [pc, 0x28]                        |     
    0x00011bec str r3, [sp]                              |     *(sp) = r3;
    0x00011bf0 ldr r2, [pc, 0x24]                        |     r2 = stderr;
    0x00011bf4 mov r3, 1                                 |     r3 = 1;
    0x00011bf8 ldr r1, [pc, 0x78]                        |     r1 = "name";
    0x00011bfc ldr r0, [r0]                              |     r0 = "class_ubi";
    0x00011c00 bl 0x108ec                                |     fprintf ("class_ubi", "name", r2, r3)
    0x00011c04 b 0x11964                                 |     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/ubidetach @ 0x11da8 */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) fcn.00011da8 ()                              | void fcn_00011da8 (int32_t arg1, void * s) {
                                                         |     int32_t var_0h;
                                                         |     int32_t var_4h;
                                                         |     int32_t var_ch;
                                                         |     int32_t var_10h;
                                                         |     int32_t var_110h;
                                                         |     r0 = arg1;
                                                         |     r1 = s;
    0x00011da8 push {r4, r5, r6, r7, r8, sb, sl, lr}     |     
    0x00011dac mov r4, r1                                |     r4 = r1;
    0x00011db0 sub sp, sp, 0x110                         |     
    0x00011db4 mov r5, r0                                |     r5 = r0;
    0x00011db8 mov r2, 0x18                              |     r2 = 0x18;
    0x00011dbc mov r1, 0                                 |     r1 = 0;
    0x00011dc0 mov r0, r4                                |     r0 = r4;
    0x00011dc4 bl 0x1094c                                |     memset (r0, r1, r2);
    0x00011dc8 add r2, r4, 0x14                          |     r2 = r4 + 0x14;
    0x00011dcc add r1, r4, 0x10                          |     r1 = r4 + 0x10;
    0x00011dd0 ldr r0, [r5, 8]                           |     r0 = *((r5 + 8));
    0x00011dd4 bl 0x1162c                                |     r0 = fcn_0001162c (r0, r1);
    0x00011dd8 cmp r0, 0                                 |     
                                                         |     if (r0 == 0) {
    0x00011ddc mvnne r3, 0                               |         r3 = ~0;
                                                         |     }
                                                         |     if (r0 == 0) {
    0x00011de0 strne r3, [r4, 0x14]                      |         *((r4 + 0x14)) = r3;
                                                         |     }
                                                         |     if (r0 == 0) {
    0x00011de4 strne r3, [r4, 0x10]                      |         *((r4 + 0x10)) = r3;
                                                         |     }
    0x00011de8 ldr r0, [r5, 0xc]                         |     r0 = *((r5 + 0xc));
    0x00011dec bl 0x10964                                |     r0 = opendir ();
    0x00011df0 subs r8, r0, 0                            |     r8 = r0 - 0;
                                                         |     if (r8 == r0) {
    0x00011df4 beq 0x11f54                               |         goto label_2;
                                                         |     }
    0x00011df8 mvn r3, 0x80000000                        |     r3 = ~0x80000000;
    0x00011dfc str r3, [r4, 4]                           |     *((r4 + 4)) = r3;
    0x00011e00 bl 0x10988                                |     errno_location ();
    0x00011e04 ldr sl, [pc, 0x17c]                       |     sl = "ubi_d_s";
    0x00011e08 mov sb, 0                                 |     sb = 0;
    0x00011e0c mov r7, r0                                |     r7 = r0;
                                                         |     do {
                                                         | label_0:
    0x00011e10 str sb, [r7]                              |         *(r7) = sb;
    0x00011e14 mov r0, r8                                |         r0 = r8;
    0x00011e18 bl 0x10928                                |         r0 = readdir64 ();
    0x00011e1c cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x00011e20 beq 0x11eb0                               |             goto label_3;
                                                         |         }
    0x00011e24 add r6, r0, 0x13                          |         r6 = r0 + 0x13;
    0x00011e28 mov r0, r6                                |         r0 = r6;
    0x00011e2c bl 0x109a0                                |         r0 = strlen (r0);
    0x00011e30 cmp r0, 0xfe                              |         
                                                         |         if (r0 >= 0xfe) {
    0x00011e34 bls 0x11e68                               |             
    0x00011e38 ldr r0, [pc, 0x14c]                       |             
    0x00011e3c str r6, [sp]                              |             *(sp) = r6;
    0x00011e40 ldr r2, [pc, 0x148]                       |             r2 = stderr;
    0x00011e44 ldr r3, [r5, 0xc]                         |             r3 = *((r5 + 0xc));
    0x00011e48 ldr r1, [pc, 0x144]                       |             r1 = "libubi";
    0x00011e4c ldr r0, [r0]                              |             r0 = "ubi_d_s";
    0x00011e50 bl 0x108ec                                |             fprintf ("ubi_d_s", "libubi", r2, r3, r4, r5, r6)
    0x00011e54 mov r3, 0x16                              |             r3 = 0x16;
    0x00011e58 str r3, [r7]                              |             *(r7) = r3;
                                                         | label_1:
    0x00011e5c mov r0, r8                                |             r0 = r8;
    0x00011e60 bl 0x109b8                                |             closedir ();
    0x00011e64 b 0x11f54                                 |             goto label_2;
                                                         |         }
    0x00011e68 add r3, sp, 0x10                          |         r3 += var_10h;
    0x00011e6c add r2, sp, 0xc                           |         r2 += var_ch;
    0x00011e70 mov r1, sl                                |         r1 = sl;
    0x00011e74 mov r0, r6                                |         r0 = r6;
    0x00011e78 bl 0x10934                                |         r0 = sscanf (r0, r1, r2);
    0x00011e7c cmp r0, 1                                 |         
    0x00011e80 bne 0x11e10                               |         
                                                         |     } while (r0 != 1);
    0x00011e84 ldr r3, [r4]                              |     r3 = *(r4);
    0x00011e88 ldr r2, [r4, 8]                           |     r2 = *((r4 + 8));
    0x00011e8c add r3, r3, 1                             |     r3++;
    0x00011e90 str r3, [r4]                              |     *(r4) = r3;
    0x00011e94 ldr r3, [sp, 0xc]                         |     r3 = var_ch;
    0x00011e98 cmp r2, r3                                |     
    0x00011e9c ldr r2, [r4, 4]                           |     r2 = *((r4 + 4));
                                                         |     if (r2 >= r3) {
    0x00011ea0 strlt r3, [r4, 8]                         |         *((r4 + 8)) = r3;
                                                         |     }
    0x00011ea4 cmp r3, r2                                |     
                                                         |     if (r3 >= r2) {
    0x00011ea8 strlt r3, [r4, 4]                         |         *((r4 + 4)) = r3;
                                                         |     }
    0x00011eac b 0x11e10                                 |     goto label_0;
                                                         | label_3:
    0x00011eb0 ldr r6, [r7]                              |     r6 = *(r7);
    0x00011eb4 cmp r6, 0                                 |     
                                                         |     if (r6 != 0) {
    0x00011eb8 beq 0x11f00                               |         
    0x00011ebc ldr r4, [pc, 0xc8]                        |         
    0x00011ec0 ldr r3, [r5, 0xc]                         |         r3 = *((r5 + 0xc));
    0x00011ec4 ldr r2, [pc, 0xc4]                        |         r2 = stderr;
    0x00011ec8 ldr r1, [pc, 0xc8]                        |         r1 = "%s: error!: invalid entry in %s: \"%s\"\n";
    0x00011ecc ldr r0, [r4]                              |         r0 = "ubi_d_s";
    0x00011ed0 bl 0x108ec                                |         fprintf ("ubi_d_s", "%s: error!: invalid entry in %s: \"%s\"\n", r2, r3, "ubi_d_s")
    0x00011ed4 mov r0, r6                                |         r0 = r6;
    0x00011ed8 ldr r4, [r4]                              |         r4 = "ubi_d_s";
    0x00011edc bl 0x10868                                |         strerror (r0);
    0x00011ee0 str r6, [sp]                              |         *(sp) = r6;
    0x00011ee4 ldr r3, [pc, 0xb0]                        |         r3 = "_s:_error_:_readdir_failed_on___s_";
    0x00011ee8 mov r2, 8                                 |         r2 = 8;
    0x00011eec ldr r1, [pc, 0xac]                        |         r1 = *(0x11f9c);
    0x00011ef0 str r0, [sp, 4]                           |         var_4h = r0;
    0x00011ef4 mov r0, r4                                |         r0 = r4;
    0x00011ef8 bl 0x108ec                                |         fprintf (r0, r1, r2, "_s:_error_:_readdir_failed_on___s_", r4, r5, r6)
    0x00011efc b 0x11e5c                                 |         goto label_1;
                                                         |     }
    0x00011f00 mov r0, r8                                |     r0 = r8;
    0x00011f04 bl 0x109b8                                |     r0 = closedir ();
    0x00011f08 cmp r0, 0                                 |     
                                                         |     if (r0 != 0) {
    0x00011f0c beq 0x11f5c                               |         
    0x00011f10 ldr r6, [pc, 0x74]                        |         r6 = "ubi_d_s";
    0x00011f14 ldr r4, [r7]                              |         r4 = *(r7);
    0x00011f18 ldr r3, [r5, 0xc]                         |         r3 = *((r5 + 0xc));
    0x00011f1c ldr r2, [pc, 0x6c]                        |         r2 = stderr;
    0x00011f20 ldr r1, [pc, 0x7c]                        |         r1 = "_serror__d___s_";
    0x00011f24 ldr r0, [r6]                              |         r0 = "ubi_d_s";
    0x00011f28 bl 0x108ec                                |         fprintf ("ubi_d_s", "_serror__d___s_", r2, r3, r4, r5, "ubi_d_s")
    0x00011f2c mov r0, r4                                |         r0 = r4;
    0x00011f30 ldr r5, [r6]                              |         r5 = "ubi_d_s";
    0x00011f34 bl 0x10868                                |         strerror (r0);
    0x00011f38 str r4, [sp]                              |         *(sp) = r4;
    0x00011f3c ldr r3, [pc, 0x58]                        |         r3 = "_s:_error_:_readdir_failed_on___s_";
    0x00011f40 mov r2, 8                                 |         r2 = 8;
    0x00011f44 ldr r1, [pc, 0x54]                        |         r1 = *(0x11f9c);
    0x00011f48 str r0, [sp, 4]                           |         var_4h = r0;
    0x00011f4c mov r0, r5                                |         r0 = r5;
    0x00011f50 bl 0x108ec                                |         fprintf (r0, r1, r2, "_s:_error_:_readdir_failed_on___s_", r4)
                                                         | label_2:
    0x00011f54 mvn r0, 0                                 |         r0 = ~0;
    0x00011f58 b 0x11f80                                 |         
                                                         |     } else {
    0x00011f5c ldr r3, [r4, 4]                           |         r3 = *((r4 + 4));
    0x00011f60 add r1, r4, 0xc                           |         r1 = r4 + 0xc;
    0x00011f64 cmn r3, 0x80000001                        |         
                                                         |         if (r3 != 0x80000001) {
    0x00011f68 streq r0, [r4, 4]                         |             *((r4 + 4)) = r0;
                                                         |         }
    0x00011f6c ldr r0, [r5, 0x14]                        |         r0 = *((r5 + 0x14));
    0x00011f70 bl 0x111a4                                |         r0 = fcn_000111a4 (r0, r1);
    0x00011f74 adds r0, r0, 0                            |         r0 += 0;
                                                         |         if (r0 == r0) {
    0x00011f78 movne r0, 1                               |             r0 = 1;
                                                         |         }
    0x00011f7c rsb r0, r0, 0                             |         r0 -= ;
                                                         |     }
    0x00011f80 add sp, sp, 0x110                         |     
    0x00011f84 pop {r4, r5, r6, r7, r8, sb, sl, 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/ubidetach @ 0x120d8 */
                                                             | #include <stdint.h>
                                                             |  
                                                             | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                             |  
    ; (fcn) fcn.000120d8 ()                                  | void fcn_000120d8 (int32_t arg2, char * s) {
                                                             |     int32_t var_b4h;
                                                             |     int32_t var_ach;
                                                             |     int32_t var_a8h;
                                                             |     int32_t var_a4h;
                                                             |     int32_t var_a0h;
                                                             |     int32_t var_9ch;
                                                             |     int32_t var_8ch;
                                                             |     int32_t var_7ch;
                                                             |     int32_t var_6ch;
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_sp_b4h;
                                                             |     int32_t var_sp_6ch;
                                                             |     int32_t var_20h_2;
                                                             |     int32_t var_20h;
                                                             |     r1 = arg2;
                                                             |     r0 = s;
    0x000120d8 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x000120dc add fp, sp, 0x20                              |     
    0x000120e0 sub sp, sp, 0x9c                              |     
    0x000120e4 mov r6, r0                                    |     r6 = r0;
    0x000120e8 ldr r0, [r0, 0x40]                            |     r0 = *((r0 + 0x40));
    0x000120ec mov r5, r1                                    |     r5 = r1;
    0x000120f0 bl 0x109a0                                    |     strlen (r0);
    0x000120f4 sub r1, fp, 0x8c                              |     r1 -= var_8ch;
    0x000120f8 add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x000120fc bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012100 sub sp, sp, r0                                |     
    0x00012104 mov r0, r5                                    |     r0 = r5;
    0x00012108 bl 0x10874                                    |     r0 = stat64 ();
    0x0001210c cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00012110 beq 0x12168                                   |         goto label_5;
                                                             |     }
    0x00012114 bl 0x10988                                    |     errno_location ();
    0x00012118 ldr r6, [pc, 0x1e8]                           |     r6 = *(0x12304);
    0x0001211c mov r3, r5                                    |     r3 = r5;
    0x00012120 ldr r2, [pc, 0x1e4]                           |     r2 = stderr;
    0x00012124 ldr r1, [pc, 0x1e4]                           |     r1 = "libubi";
    0x00012128 ldr r4, [r0]                                  |     r4 = *(r0);
    0x0001212c ldr r0, [r6]                                  |     r0 = *(0x12304);
    0x00012130 bl 0x108ec                                    |     fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x00012134 mov r0, r4                                    |     r0 = r4;
    0x00012138 ldr r5, [r6]                                  |     r5 = *(0x12304);
    0x0001213c bl 0x10868                                    |     strerror (r0);
    0x00012140 str r4, [sp]                                  |     *(sp) = r4;
    0x00012144 ldr r3, [pc, 0x1c8]                           |     r3 = "%s: error!: cannot get information about \"%s\"\n";
    0x00012148 mov r2, 8                                     |     r2 = 8;
    0x0001214c ldr r1, [pc, 0x1c4]                           |     r1 = *(0x12314);
    0x00012150 str r0, [sp, 4]                               |     var_4h = r0;
    0x00012154 mov r0, r5                                    |     r0 = r5;
    0x00012158 bl 0x108ec                                    |     fprintf (r0, r1, r2, "%s: error!: cannot get information about \"%s\"\n", r4)
                                                             |     do {
                                                             | label_0:
    0x0001215c mvn r0, 0                                     |         r0 = ~0;
                                                             | label_4:
    0x00012160 sub sp, fp, 0x20                              |         
    0x00012164 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |         
                                                             | label_5:
    0x00012168 ldr r3, [fp, -0x7c]                           |         r3 = var_7ch;
    0x0001216c and r3, r3, 0xf000                            |         r3 &= 0xf000;
    0x00012170 cmp r3, 0x2000                                |         
                                                             |         if (r3 == 0x2000) {
    0x00012174 beq 0x121a0                                   |             goto label_6;
                                                             |         }
    0x00012178 ldr r0, [pc, 0x188]                           |         
    0x0001217c mov r3, r5                                    |         r3 = r5;
    0x00012180 ldr r2, [pc, 0x184]                           |         r2 = stderr;
    0x00012184 ldr r1, [pc, 0x190]                           |         r1 = "_serror__d___s_";
    0x00012188 ldr r0, [r0]                                  |         r0 = *(0x12304);
    0x0001218c bl 0x108ec                                    |         r0 = fprintf (r0, "_serror__d___s_", r2, r3)
    0x00012190 bl 0x10988                                    |         errno_location ();
    0x00012194 mov r3, 0x16                                  |         r3 = 0x16;
                                                             | label_1:
    0x00012198 str r3, [r0]                                  |         *(r0) = r3;
    0x0001219c b 0x1215c                                     |         
                                                             |     } while (1);
                                                             | label_6:
    0x000121a0 ldrd r2, r3, [fp, -0x6c]                      |     __asm ("ldrd r2, r3, [var_6ch]");
    0x000121a4 mov r1, r3                                    |     r1 = r3;
    0x000121a8 mov r0, r2                                    |     r0 = r2;
    0x000121ac strd r2, r3, [fp, -0xb4]                      |     __asm ("strd r2, r3, [var_b4h]");
    0x000121b0 bl 0x1088c                                    |     gnu_dev_major ();
    0x000121b4 ldrd r2, r3, [fp, -0xb4]                      |     __asm ("ldrd r2, r3, [var_b4h]");
    0x000121b8 mov r1, r3                                    |     r1 = r3;
    0x000121bc mov sb, r0                                    |     sb = r0;
    0x000121c0 mov r0, r2                                    |     r0 = r2;
    0x000121c4 bl 0x108c8                                    |     gnu_dev_minor ();
    0x000121c8 sub r1, fp, 0xa4                              |     r1 -= var_a4h;
    0x000121cc mov r7, r0                                    |     r7 = r0;
    0x000121d0 mov r0, r6                                    |     r0 = r6;
    0x000121d4 bl 0x11da8                                    |     r0 = fcn_00011da8 (r0, r1);
    0x000121d8 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000121dc addeq r8, sp, 8                               |         r8 += var_b4h;
                                                             |     }
                                                             |     if (r0 != 0) {
    0x000121e0 ldreq r4, [fp, -0xa0]                         |         r4 = var_a0h;
                                                             |     }
                                                             |     if (r0 == 0) {
    0x000121e4 addeq sl, r6, 0x18                            |         sl = r6 + 0x18;
                                                             |         goto label_7;
                                                             |     }
                                                             |     if (r0 != 0) {
                                                             | label_7:
    0x000121e8 bne 0x1215c                                   |         goto label_0;
                                                             |     }
                                                             |     do {
    0x000121ec ldr r3, [fp, -0x9c]                           |         r3 = var_9ch;
    0x000121f0 cmp r4, r3                                    |         
                                                             |         if (r4 > r3) {
    0x000121f4 bgt 0x1226c                                   |             goto label_8;
                                                             |         }
    0x000121f8 sub r3, fp, 0xa8                              |         r3 -= var_a8h;
    0x000121fc sub r2, fp, 0xac                              |         r2 -= var_ach;
    0x00012200 mov r1, r4                                    |         r1 = r4;
    0x00012204 mov r0, sl                                    |         r0 = sl;
    0x00012208 bl 0x11704                                    |         r0 = fcn_00011704 (r0, r1);
    0x0001220c cmp r0, 0                                     |         
                                                             |         if (r0 == 0) {
    0x00012210 beq 0x12260                                   |             goto label_9;
                                                             |         }
    0x00012214 bl 0x10988                                    |         r0 = errno_location ();
    0x00012218 ldr r3, [r0]                                  |         r3 = *(r0);
    0x0001221c cmp r3, 2                                     |         
                                                             |         if (r3 != 2) {
    0x00012220 bne 0x1222c                                   |             goto label_10;
                                                             |         }
                                                             | label_2:
    0x00012224 add r4, r4, 1                                 |         r4++;
    0x00012228 b 0x121ec                                     |         
                                                             |     } while (1);
                                                             | label_10:
    0x0001222c cmp r3, 0                                     |     
                                                             |     if (r3 != 0) {
    0x00012230 bne 0x1215c                                   |         goto label_0;
                                                             |     }
                                                             | label_3:
    0x00012234 ldr r0, [pc, 0xcc]                            |     
    0x00012238 mov r3, r5                                    |     r3 = r5;
    0x0001223c str r7, [sp, 4]                               |     var_4h = r7;
    0x00012240 str sb, [sp]                                  |     *(sp) = sb;
    0x00012244 ldr r2, [pc, 0xc0]                            |     r2 = stderr;
    0x00012248 ldr r1, [pc, 0xd0]                            |     r1 = "_s:_error_:___s__is_not_a_character_device";
    0x0001224c ldr r0, [r0]                                  |     r0 = *(0x12304);
    0x00012250 bl 0x108ec                                    |     r0 = fprintf (r0, "_s:_error_:___s__is_not_a_character_device", r2, r3)
    0x00012254 bl 0x10988                                    |     errno_location ();
    0x00012258 mov r3, 0x13                                  |     r3 = 0x13;
    0x0001225c b 0x12198                                     |     goto label_1;
                                                             | label_9:
    0x00012260 ldr r3, [fp, -0xac]                           |     r3 = var_ach;
    0x00012264 cmp r3, sb                                    |     
                                                             |     if (r3 != sb) {
    0x00012268 bne 0x12224                                   |         goto label_2;
                                                             |     }
                                                             | label_8:
    0x0001226c ldr r3, [fp, -0x9c]                           |     r3 = var_9ch;
    0x00012270 cmp r4, r3                                    |     
                                                             |     if (r4 > r3) {
    0x00012274 bgt 0x12234                                   |         goto label_3;
                                                             |     }
    0x00012278 cmp r7, 0                                     |     
                                                             |     if (r7 == 0) {
    0x0001227c moveq r0, 1                                   |         r0 = 1;
                                                             |         goto label_11;
                                                             |     }
                                                             |     if (r7 == 0) {
                                                             | label_11:
    0x00012280 beq 0x12160                                   |         goto label_4;
                                                             |     }
    0x00012284 sub r3, r7, 1                                 |     r3 = r7 - 1;
    0x00012288 mov r2, r4                                    |     r2 = r4;
    0x0001228c ldr r1, [r6, 0x40]                            |     r1 = *((r6 + 0x40));
    0x00012290 mov r0, r8                                    |     r0 = r8;
    0x00012294 bl 0x1097c                                    |     sprintf (r0, r1, r2);
    0x00012298 mov r1, 0                                     |     r1 = 0;
    0x0001229c mov r0, r8                                    |     r0 = r8;
    0x000122a0 bl 0x10958                                    |     r0 = open64 ();
    0x000122a4 cmn r0, 1                                     |     
                                                             |     if (r0 == 1) {
    0x000122a8 beq 0x12234                                   |         goto label_3;
                                                             |     }
    0x000122ac bl 0x109d0                                    |     r0 = close (r0);
    0x000122b0 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000122b4 beq 0x12300                                   |         
    0x000122b8 bl 0x10988                                    |         errno_location ();
    0x000122bc ldr r5, [pc, 0x44]                            |         
    0x000122c0 mov r3, r8                                    |         r3 = r8;
    0x000122c4 ldr r2, [pc, 0x40]                            |         r2 = stderr;
    0x000122c8 ldr r1, [pc, 0x54]                            |         r1 = "_s:_error_:___s__has_major:minor__d:_d__but_this_does_not_correspond_to_any_existing_UBI_device_or_volume";
    0x000122cc ldr r4, [r0]                                  |         r4 = *(r0);
    0x000122d0 ldr r0, [r5]                                  |         r0 = *(0x12304);
    0x000122d4 bl 0x108ec                                    |         fprintf (r0, "_s:_error_:___s__has_major:minor__d:_d__but_this_does_not_correspond_to_any_existing_UBI_device_or_volume", r2, r3, r4, r5)
    0x000122d8 mov r0, r4                                    |         r0 = r4;
    0x000122dc ldr r5, [r5]                                  |         r5 = *(0x12304);
    0x000122e0 bl 0x10868                                    |         strerror (r0);
    0x000122e4 str r4, [sp]                                  |         *(sp) = r4;
    0x000122e8 ldr r3, [pc, 0x24]                            |         r3 = "%s: error!: cannot get information about \"%s\"\n";
    0x000122ec mov r2, 8                                     |         r2 = 8;
    0x000122f0 ldr r1, [pc, 0x20]                            |         r1 = *(0x12314);
    0x000122f4 str r0, [sp, 4]                               |         var_4h = r0;
    0x000122f8 mov r0, r5                                    |         r0 = r5;
    0x000122fc bl 0x108ec                                    |         fprintf (r0, r1, r2, "%s: error!: cannot get information about \"%s\"\n", r4)
                                                             |     }
    0x00012300 mov r0, 2                                     |     r0 = 2;
    0x00012304 b 0x12160                                     |     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/ubidetach @ 0x12734 */
                                                             | #include <stdint.h>
                                                             |  
                                                             | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                             |  
    ; (fcn) fcn.00012734 ()                                  | void fcn_00012734 (int32_t arg1, int32_t arg2) {
                                                             |     int32_t var_128h;
                                                             |     int32_t var_124h;
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     char * s;
                                                             |     int32_t var_20h_2;
                                                             |     int32_t var_20h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x00012734 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x00012738 add sl, r2, 4                                 |     sl = r2 + 4;
    0x0001273c add fp, sp, 0x20                              |     
    0x00012740 sub sp, sp, 0x114                             |     
    0x00012744 mov r6, r1                                    |     r6 = r1;
    0x00012748 mov r5, r0                                    |     r5 = r0;
    0x0001274c mov r4, r2                                    |     r4 = r2;
    0x00012750 mov r1, 0                                     |     r1 = 0;
    0x00012754 mov r2, 0x54                                  |     r2 = 0x54;
    0x00012758 mov r0, sl                                    |     r0 = sl;
    0x0001275c bl 0x1094c                                    |     memset (r0, r1, r2);
    0x00012760 str r6, [r4]                                  |     *(r4) = r6;
    0x00012764 mov r1, r6                                    |     r1 = r6;
    0x00012768 mov r0, r5                                    |     r0 = r5;
    0x0001276c bl 0x126e0                                    |     r0 = fcn_000126e0 (r0, r1);
    0x00012770 cmp r0, 0                                     |     
    0x00012774 bne 0x12780                                   |     
                                                             |     while (r8 == r0) {
                                                             | label_0:
    0x00012778 mvn r0, 0                                     |         r0 = ~0;
    0x0001277c b 0x12a44                                     |         goto label_3;
    0x00012780 ldr r0, [r5, 0xc]                             |         r0 = *((r5 + 0xc));
    0x00012784 bl 0x10964                                    |         r0 = opendir ();
    0x00012788 subs r8, r0, 0                                |         r8 = r0 - 0;
    0x0001278c beq 0x12778                                   |         
                                                             |     }
    0x00012790 mvn r3, 0x80000000                            |     r3 = ~0x80000000;
    0x00012794 str r3, [r4, 0xc]                             |     *((r4 + 0xc)) = r3;
    0x00012798 bl 0x10988                                    |     r0 = errno_location ();
    0x0001279c mov sb, r0                                    |     sb = r0;
                                                             |     do {
                                                             | label_1:
    0x000127a0 mov r3, 0                                     |         r3 = 0;
    0x000127a4 str r3, [sb]                                  |         *(sb) = r3;
    0x000127a8 mov r0, r8                                    |         r0 = r8;
    0x000127ac bl 0x10928                                    |         r0 = readdir64 ();
    0x000127b0 cmp r0, 0                                     |         
                                                             |         if (r0 == 0) {
    0x000127b4 beq 0x12850                                   |             goto label_4;
                                                             |         }
    0x000127b8 add r7, r0, 0x13                              |         r7 = r0 + 0x13;
    0x000127bc mov r0, r7                                    |         r0 = r7;
    0x000127c0 bl 0x109a0                                    |         r0 = strlen (r0);
    0x000127c4 cmp r0, 0xfe                                  |         
                                                             |         if (r0 >= 0xfe) {
    0x000127c8 bls 0x127f4                                   |             
    0x000127cc ldr r0, [pc, 0x278]                           |             
    0x000127d0 str r7, [sp]                                  |             *(sp) = r7;
    0x000127d4 ldr r2, [pc, 0x274]                           |             r2 = stderr;
    0x000127d8 ldr r3, [r5, 0xc]                             |             r3 = *((r5 + 0xc));
    0x000127dc ldr r1, [pc, 0x270]                           |             r1 = "libubi";
    0x000127e0 ldr r0, [r0]                                  |             r0 = *(0x12a48);
    0x000127e4 bl 0x108ec                                    |             fprintf (r0, "libubi", r2, r3)
                                                             | label_2:
    0x000127e8 mov r0, r8                                    |             r0 = r8;
    0x000127ec bl 0x109b8                                    |             closedir ();
    0x000127f0 b 0x12778                                     |             goto label_0;
                                                             |         }
    0x000127f4 sub r3, fp, 0x124                             |         r3 -= var_124h;
    0x000127f8 str r3, [sp]                                  |         *(sp) = r3;
    0x000127fc sub r2, fp, 0x128                             |         r2 -= var_128h;
    0x00012800 sub r3, fp, 0x12c                             |         r3 -= s;
    0x00012804 ldr r1, [pc, 0x24c]                           |         r1 = "%s: error!: invalid entry in %s: \"%s\"\n";
    0x00012808 mov r0, r7                                    |         r0 = r7;
    0x0001280c bl 0x10934                                    |         r0 = sscanf (r0, "%s: error!: invalid entry in %s: \"%s\"\n", r2);
    0x00012810 cmp r0, 2                                     |         
    0x00012814 bne 0x127a0                                   |         
                                                             |     } while (r0 != 2);
    0x00012818 ldr r3, [fp, -0x128]                          |     r3 = var_128h;
    0x0001281c cmp r3, r6                                    |     
                                                             |     if (r3 != r6) {
    0x00012820 bne 0x127a0                                   |         goto label_1;
                                                             |     }
    0x00012824 ldr r3, [r4, 8]                               |     r3 = *((r4 + 8));
    0x00012828 ldr r2, [r4, 0x10]                            |     r2 = *((r4 + 0x10));
    0x0001282c add r3, r3, 1                                 |     r3++;
    0x00012830 str r3, [r4, 8]                               |     *((r4 + 8)) = r3;
    0x00012834 ldr r3, [fp, -0x12c]                          |     r3 = s;
    0x00012838 cmp r2, r3                                    |     
    0x0001283c ldr r2, [r4, 0xc]                             |     r2 = *((r4 + 0xc));
                                                             |     if (r2 >= r3) {
    0x00012840 strlt r3, [r4, 0x10]                          |         *((r4 + 0x10)) = r3;
                                                             |     }
    0x00012844 cmp r3, r2                                    |     
                                                             |     if (r3 >= r2) {
    0x00012848 strlt r3, [r4, 0xc]                           |         *((r4 + 0xc)) = r3;
                                                             |     }
    0x0001284c b 0x127a0                                     |     goto label_1;
                                                             | label_4:
    0x00012850 ldr r7, [sb]                                  |     r7 = *(sb);
    0x00012854 cmp r7, 0                                     |     
                                                             |     if (r7 != 0) {
    0x00012858 beq 0x128a0                                   |         
    0x0001285c ldr r4, [pc, 0x1e8]                           |         
    0x00012860 ldr r3, [r5, 0xc]                             |         r3 = *((r5 + 0xc));
    0x00012864 ldr r2, [pc, 0x1e4]                           |         r2 = stderr;
    0x00012868 ldr r1, [pc, 0x1ec]                           |         r1 = "ubi%d_%d%s";
    0x0001286c ldr r0, [r4]                                  |         r0 = *(0x12a48);
    0x00012870 bl 0x108ec                                    |         fprintf (r0, "ubi%d_%d%s", r2, r3, r4)
    0x00012874 mov r0, r7                                    |         r0 = r7;
    0x00012878 ldr r4, [r4]                                  |         r4 = *(0x12a48);
    0x0001287c bl 0x10868                                    |         strerror (r0);
    0x00012880 str r7, [sp]                                  |         *(sp) = r7;
    0x00012884 ldr r3, [pc, 0x1d4]                           |         r3 = "_s:_error_:_readdir_failed_on___s_";
    0x00012888 mov r2, 8                                     |         r2 = 8;
    0x0001288c ldr r1, [pc, 0x1d0]                           |         r1 = *(0x12a60);
    0x00012890 str r0, [sp, 4]                               |         var_4h = r0;
    0x00012894 mov r0, r4                                    |         r0 = r4;
    0x00012898 bl 0x108ec                                    |         fprintf (r0, r1, r2, "_s:_error_:_readdir_failed_on___s_")
    0x0001289c b 0x127e8                                     |         goto label_2;
                                                             |     }
    0x000128a0 mov r0, r8                                    |     r0 = r8;
    0x000128a4 bl 0x109b8                                    |     r0 = closedir ();
    0x000128a8 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000128ac beq 0x128f8                                   |         
    0x000128b0 ldr r6, [pc, 0x194]                           |         r6 = *(0x12a48);
    0x000128b4 ldr r4, [sb]                                  |         r4 = *(sb);
    0x000128b8 ldr r3, [r5, 0xc]                             |         r3 = *((r5 + 0xc));
    0x000128bc ldr r2, [pc, 0x18c]                           |         r2 = stderr;
    0x000128c0 ldr r1, [pc, 0x1a0]                           |         r1 = "_serror__d___s_";
    0x000128c4 ldr r0, [r6]                                  |         r0 = *(0x12a48);
    0x000128c8 bl 0x108ec                                    |         fprintf (r0, "_serror__d___s_", r2, r3, r4, r5, r6)
    0x000128cc mov r0, r4                                    |         r0 = r4;
    0x000128d0 ldr r5, [r6]                                  |         r5 = *(0x12a48);
    0x000128d4 bl 0x10868                                    |         strerror (r0);
    0x000128d8 str r4, [sp]                                  |         *(sp) = r4;
    0x000128dc ldr r3, [pc, 0x17c]                           |         r3 = "_s:_error_:_readdir_failed_on___s_";
    0x000128e0 mov r2, 8                                     |         r2 = 8;
    0x000128e4 ldr r1, [pc, 0x178]                           |         r1 = *(0x12a60);
    0x000128e8 str r0, [sp, 4]                               |         var_4h = r0;
    0x000128ec mov r0, r5                                    |         r0 = r5;
    0x000128f0 bl 0x108ec                                    |         fprintf (r0, r1, r2, "_s:_error_:_readdir_failed_on___s_", r4)
    0x000128f4 b 0x12778                                     |         goto label_0;
                                                             |     }
    0x000128f8 ldr r3, [r4, 0xc]                             |     r3 = *((r4 + 0xc));
    0x000128fc add r2, r4, 0x14                              |     r2 = r4 + 0x14;
    0x00012900 cmn r3, 0x80000001                            |     
                                                             |     if (r3 != 0x80000001) {
    0x00012904 streq r0, [r4, 0xc]                           |         *((r4 + 0xc)) = r0;
                                                             |     }
    0x00012908 add r3, r4, 0x18                              |     r3 = r4 + 0x18;
    0x0001290c mov r1, r6                                    |     r1 = r6;
    0x00012910 add r0, r5, 0x18                              |     r0 = r5 + 0x18;
    0x00012914 bl 0x11704                                    |     r0 = fcn_00011704 (r0, r1);
    0x00012918 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001291c bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012920 mov r2, sl                                    |     r2 = sl;
    0x00012924 mov r1, r6                                    |     r1 = r6;
    0x00012928 ldr r0, [r5, 0x3c]                            |     r0 = *((r5 + 0x3c));
    0x0001292c bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x00012930 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012934 bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012938 add r2, r4, 0x20                              |     r2 = r4 + 0x20;
    0x0001293c mov r1, r6                                    |     r1 = r6;
    0x00012940 ldr r0, [r5, 0x1c]                            |     r0 = *((r5 + 0x1c));
    0x00012944 bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x00012948 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001294c bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012950 add r2, r4, 0x1c                              |     r2 = r4 + 0x1c;
    0x00012954 mov r1, r6                                    |     r1 = r6;
    0x00012958 ldr r0, [r5, 0x20]                            |     r0 = *((r5 + 0x20));
    0x0001295c bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x00012960 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012964 bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012968 add r2, r4, 0x38                              |     r2 = r4 + 0x38;
    0x0001296c mov r1, r6                                    |     r1 = r6;
    0x00012970 ldr r0, [r5, 0x24]                            |     r0 = *((r5 + 0x24));
    0x00012974 bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x00012978 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001297c bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012980 add r2, r4, 0x3c                              |     r2 = r4 + 0x3c;
    0x00012984 mov r1, r6                                    |     r1 = r6;
    0x00012988 ldr r0, [r5, 0x28]                            |     r0 = *((r5 + 0x28));
    0x0001298c bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x00012990 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012994 bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012998 add r2, r4, 0x48                              |     r2 = r4 + 0x48;
    0x0001299c mov r1, r6                                    |     r1 = r6;
    0x000129a0 ldr r0, [r5, 0x30]                            |     r0 = *((r5 + 0x30));
    0x000129a4 bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x000129a8 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000129ac bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x000129b0 ldr r8, [r5, 0x2c]                            |     r8 = *((r5 + 0x2c));
    0x000129b4 mov sb, sp                                    |     sb = sp;
    0x000129b8 mov r0, r8                                    |     r0 = r8;
    0x000129bc bl 0x109a0                                    |     strlen (r0);
    0x000129c0 mov r2, r6                                    |     r2 = r6;
    0x000129c4 mov r1, r8                                    |     r1 = r8;
    0x000129c8 add r0, r0, 0x39                              |     r0 += 0x39;
    0x000129cc bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x000129d0 sub sp, sp, r0                                |     
    0x000129d4 add r7, sp, 8                                 |     r7 += s;
    0x000129d8 mov r0, r7                                    |     r0 = r7;
    0x000129dc bl 0x1097c                                    |     sprintf (r0, r1, r2);
    0x000129e0 add r1, r4, 0x40                              |     r1 = r4 + 0x40;
    0x000129e4 mov r0, r7                                    |     r0 = r7;
    0x000129e8 bl 0x10ff4                                    |     fcn_00010ff4 (r0, r1);
    0x000129ec mov sp, sb                                    |     
    0x000129f0 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000129f4 bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x000129f8 add r2, r4, 0x4c                              |     r2 = r4 + 0x4c;
    0x000129fc mov r1, r6                                    |     r1 = r6;
    0x00012a00 ldr r0, [r5, 0x34]                            |     r0 = *((r5 + 0x34));
    0x00012a04 bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x00012a08 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012a0c bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012a10 add r2, r4, 0x50                              |     r2 = r4 + 0x50;
    0x00012a14 mov r1, r6                                    |     r1 = r6;
    0x00012a18 ldr r0, [r5, 0x38]                            |     r0 = *((r5 + 0x38));
    0x00012a1c bl 0x11218                                    |     r0 = fcn_00011218 (r0, r1);
    0x00012a20 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012a24 bne 0x12778                                   |         goto label_0;
                                                             |     }
    0x00012a28 ldr r3, [r4, 0x3c]                            |     r3 = *((r4 + 0x3c));
    0x00012a2c ldr r2, [r4, 0x20]                            |     r2 = *((r4 + 0x20));
    0x00012a30 smull r6, r7, r2, r3                          |     r6:r7 = r2 * r3;
    0x00012a34 ldr r2, [r4, 0x1c]                            |     r2 = *((r4 + 0x1c));
    0x00012a38 strd r6, r7, [r4, 0x30]                       |     __asm ("strd r6, r7, [r4, 0x30]");
    0x00012a3c smull r6, r7, r2, r3                          |     r6:r7 = r2 * r3;
    0x00012a40 strd r6, r7, [r4, 0x28]                       |     __asm ("strd r6, r7, [r4, 0x28]");
                                                             | label_3:
    0x00012a44 sub sp, fp, 0x20                              |     
    0x00012a48 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/ubidetach @ 0x12c5c */
                                                             | #include <stdint.h>
                                                             |  
                                                             | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                             |  
    ; (fcn) fcn.00012c5c ()                                  | void fcn_00012c5c (int32_t arg1, int32_t arg2) {
                                                             |     char * s1;
                                                             |     int32_t var_0h;
                                                             |     int32_t var_20h_2;
                                                             |     int32_t var_20h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x00012c5c push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x00012c60 add sb, r3, 8                                 |     sb = r3 + 8;
    0x00012c64 add fp, sp, 0x20                              |     
    0x00012c68 sub sp, sp, 0x3c                              |     
    0x00012c6c mov r5, r1                                    |     r5 = r1;
    0x00012c70 mov r6, r2                                    |     r6 = r2;
    0x00012c74 mov r1, 0                                     |     r1 = 0;
    0x00012c78 mov r2, 0xb0                                  |     r2 = 0xb0;
    0x00012c7c mov r7, r0                                    |     r7 = r0;
    0x00012c80 mov r0, sb                                    |     r0 = sb;
    0x00012c84 mov r4, r3                                    |     r4 = r3;
    0x00012c88 bl 0x1094c                                    |     memset (r0, r1, r2);
    0x00012c8c ldr sl, [r7, 0x48]                            |     sl = *((r7 + 0x48));
    0x00012c90 stm r4, {r5, r6}                              |     *(r4) = r5;
                                                             |     *((r4 + 4)) = r6;
    0x00012c94 mov r0, sl                                    |     r0 = sl;
    0x00012c98 bl 0x109a0                                    |     strlen (r0);
    0x00012c9c mov r8, sp                                    |     r8 = sp;
    0x00012ca0 mov r3, r6                                    |     r3 = r6;
    0x00012ca4 mov r2, r5                                    |     r2 = r5;
    0x00012ca8 mov r1, sl                                    |     r1 = sl;
    0x00012cac add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x00012cb0 bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012cb4 sub sp, sp, r0                                |     
    0x00012cb8 mov r0, sp                                    |     r0 = sp;
    0x00012cbc bl 0x1097c                                    |     sprintf (r0, r1, r2);
    0x00012cc0 mov r0, sp                                    |     r0 = sp;
    0x00012cc4 add r2, r4, 0xc                               |     r2 = r4 + 0xc;
    0x00012cc8 mov r1, sb                                    |     r1 = sb;
    0x00012ccc bl 0x1162c                                    |     fcn_0001162c (r0, r1);
    0x00012cd0 mov sp, r8                                    |     
    0x00012cd4 cmp r0, 0                                     |     
    0x00012cd8 beq 0x12cec                                   |     
                                                             |     while (r8 < r0) {
                                                             | label_0:
    0x00012cdc mvn r8, 0                                     |         r8 = ~0;
                                                             | label_1:
    0x00012ce0 mov r0, r8                                    |         r0 = r8;
    0x00012ce4 sub sp, fp, 0x20                              |         
    0x00012ce8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |         
    0x00012cec ldr sb, [r7, 0x44]                            |         sb = *((r7 + 0x44));
    0x00012cf0 mov r0, sb                                    |         r0 = sb;
    0x00012cf4 bl 0x109a0                                    |         strlen (r0);
    0x00012cf8 mov r3, r6                                    |         r3 = r6;
    0x00012cfc mov r2, r5                                    |         r2 = r5;
    0x00012d00 mov r1, sb                                    |         r1 = sb;
    0x00012d04 add r0, r0, 0x6b                              |         r0 += 0x6b;
    0x00012d08 bic r0, r0, 7                                 |         r0 = BIT_MASK (r0, 7);
    0x00012d0c sub sp, sp, r0                                |         
    0x00012d10 mov r0, sp                                    |         r0 = sp;
    0x00012d14 bl 0x1097c                                    |         sprintf (r0, r1, r2);
    0x00012d18 mov r0, sp                                    |         r0 = sp;
    0x00012d1c mov r2, 0x32                                  |         r2 = 0x32;
    0x00012d20 sub r1, fp, 0x58                              |         r1 -= s1;
    0x00012d24 bl 0x112b0                                    |         fcn_000112b0 (r0, r1);
    0x00012d28 mov sp, r8                                    |         
    0x00012d2c subs r8, r0, 0                                |         r8 = r0 - 0;
    0x00012d30 blt 0x12cdc                                   |         
                                                             |     }
    0x00012d34 mov r2, r8                                    |     r2 = r8;
    0x00012d38 ldr r1, [pc, 0x174]                           |     r1 = *(0x12eb0);
    0x00012d3c sub r0, fp, 0x58                              |     r0 -= s1;
    0x00012d40 bl 0x10910                                    |     r0 = strncmp (r0, r1, r2);
    0x00012d44 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012d48 moveq r3, 4                                   |         r3 = 4;
                                                             |     }
                                                             |     if (r0 != 0) {
    0x00012d4c beq 0x12d6c                                   |         
    0x00012d50 mov r2, r8                                    |         r2 = r8;
    0x00012d54 ldr r1, [pc, 0x15c]                           |         r1 = "static\n";
    0x00012d58 sub r0, fp, 0x58                              |         r0 -= s1;
    0x00012d5c bl 0x10910                                    |         r0 = strncmp (r0, "static\n", r2);
    0x00012d60 cmp r0, 0                                     |         
                                                             |         if (r0 != 0) {
    0x00012d64 bne 0x12e8c                                   |             goto label_2;
                                                             |         }
    0x00012d68 mov r3, 3                                     |         r3 = 3;
                                                             |     }
    0x00012d6c str r3, [r4, 0x10]                            |     *((r4 + 0x10)) = r3;
    0x00012d70 mov r2, r6                                    |     r2 = r6;
    0x00012d74 add r3, r4, 0x14                              |     r3 = r4 + 0x14;
    0x00012d78 mov r1, r5                                    |     r1 = r5;
    0x00012d7c ldr r0, [r7, 0x4c]                            |     r0 = *((r7 + 0x4c));
    0x00012d80 bl 0x11260                                    |     r0 = fcn_00011260 (r0, r1);
    0x00012d84 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012d88 bne 0x12cdc                                   |         goto label_0;
                                                             |     }
    0x00012d8c ldr r8, [r7, 0x50]                            |     r8 = *((r7 + 0x50));
    0x00012d90 mov sb, sp                                    |     sb = sp;
    0x00012d94 mov r0, r8                                    |     r0 = r8;
    0x00012d98 bl 0x109a0                                    |     strlen (r0);
    0x00012d9c mov r3, r6                                    |     r3 = r6;
    0x00012da0 mov r2, r5                                    |     r2 = r5;
    0x00012da4 mov r1, r8                                    |     r1 = r8;
    0x00012da8 add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x00012dac bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012db0 sub sp, sp, r0                                |     
    0x00012db4 mov r0, sp                                    |     r0 = sp;
    0x00012db8 bl 0x1097c                                    |     sprintf (r0, r1, r2);
    0x00012dbc mov r0, sp                                    |     r0 = sp;
    0x00012dc0 add r1, r4, 0x18                              |     r1 = r4 + 0x18;
    0x00012dc4 bl 0x10ff4                                    |     fcn_00010ff4 (r0, r1);
    0x00012dc8 mov sp, sb                                    |     
    0x00012dcc cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012dd0 bne 0x12cdc                                   |         goto label_0;
                                                             |     }
    0x00012dd4 add r3, r4, 0x28                              |     r3 = r4 + 0x28;
    0x00012dd8 mov r2, r6                                    |     r2 = r6;
    0x00012ddc mov r1, r5                                    |     r1 = r5;
    0x00012de0 ldr r0, [r7, 0x54]                            |     r0 = *((r7 + 0x54));
    0x00012de4 bl 0x11260                                    |     r0 = fcn_00011260 (r0, r1);
    0x00012de8 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012dec bne 0x12cdc                                   |         goto label_0;
                                                             |     }
    0x00012df0 add r3, r4, 0x2c                              |     r3 = r4 + 0x2c;
    0x00012df4 mov r2, r6                                    |     r2 = r6;
    0x00012df8 mov r1, r5                                    |     r1 = r5;
    0x00012dfc ldr r0, [r7, 0x58]                            |     r0 = *((r7 + 0x58));
    0x00012e00 bl 0x11260                                    |     r0 = fcn_00011260 (r0, r1);
    0x00012e04 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012e08 bne 0x12cdc                                   |         goto label_0;
                                                             |     }
    0x00012e0c add r3, r4, 0x30                              |     r3 = r4 + 0x30;
    0x00012e10 mov r2, r6                                    |     r2 = r6;
    0x00012e14 mov r1, r5                                    |     r1 = r5;
    0x00012e18 ldr r0, [r7, 0x5c]                            |     r0 = *((r7 + 0x5c));
    0x00012e1c bl 0x11260                                    |     r0 = fcn_00011260 (r0, r1);
    0x00012e20 subs r8, r0, 0                                |     r8 = r0 - 0;
                                                             |     if (r8 != r0) {
    0x00012e24 bne 0x12cdc                                   |         goto label_0;
                                                             |     }
    0x00012e28 ldr r1, [r4, 0x28]                            |     r1 = *((r4 + 0x28));
    0x00012e2c ldr r0, [r4, 0x2c]                            |     r0 = *((r4 + 0x2c));
    0x00012e30 ldr r7, [r7, 0x60]                            |     r7 = *((r7 + 0x60));
    0x00012e34 smull r2, r3, r0, r1                          |     r2:r3 = r0 * r1;
    0x00012e38 mov r0, r7                                    |     r0 = r7;
    0x00012e3c strd r2, r3, [r4, 0x20]                       |     __asm ("strd r2, r3, [r4, 0x20]");
    0x00012e40 bl 0x109a0                                    |     strlen (r0);
    0x00012e44 mov r3, r6                                    |     r3 = r6;
    0x00012e48 mov r2, r5                                    |     r2 = r5;
    0x00012e4c mov r1, r7                                    |     r1 = r7;
    0x00012e50 add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x00012e54 bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012e58 sub sp, sp, r0                                |     
    0x00012e5c mov r0, sp                                    |     r0 = sp;
    0x00012e60 bl 0x1097c                                    |     sprintf (r0, r1, r2);
    0x00012e64 mov r0, sp                                    |     r0 = sp;
    0x00012e68 mov r2, 0x81                                  |     r2 = 0x81;
    0x00012e6c add r1, r4, 0x34                              |     r1 = r4 + 0x34;
    0x00012e70 bl 0x112b0                                    |     fcn_000112b0 (r0, r1);
    0x00012e74 mov sp, sb                                    |     
    0x00012e78 cmp r0, 0                                     |     
                                                             |     if (r0 < 0) {
    0x00012e7c blt 0x12cdc                                   |         goto label_0;
                                                             |     }
    0x00012e80 add r4, r4, r0                                |     r4 += r0;
    0x00012e84 strb r8, [r4, 0x33]                           |     *((r4 + 0x33)) = r8;
    0x00012e88 b 0x12ce0                                     |     goto label_1;
                                                             | label_2:
    0x00012e8c ldr r0, [pc, 0x28]                            |     
    0x00012e90 sub r3, fp, 0x58                              |     r3 -= s1;
    0x00012e94 ldr r2, [pc, 0x24]                            |     r2 = stderr;
    0x00012e98 ldr r1, [pc, 0x24]                            |     r1 = "libubi";
    0x00012e9c ldr r0, [r0]                                  |     r0 = "dynamic\n";
    0x00012ea0 bl 0x108ec                                    |     r0 = fprintf ("dynamic\n", "libubi", r2, r3)
    0x00012ea4 bl 0x10988                                    |     errno_location ();
    0x00012ea8 mov r3, 0x16                                  |     r3 = 0x16;
    0x00012eac str r3, [r0]                                  |     *(r0) = r3;
    0x00012eb0 b 0x12cdc                                     |     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/ubidetach @ 0x109e8 */
                                                         | #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;
                                                         |     int32_t var_20h;
                                                         |     r0 = argc;
                                                         |     r1 = argv;
                                                         |     /* [10] -r-x section size 10480 named .text */
    0x000109e8 push {r4, r5, r6, r7, r8, sb, sl, lr}     |     
    0x000109ec ldr sb, [pc, 0x3f4]                       |     sb = "devn";
    0x000109f0 ldr sl, [pc, 0x3f4]                       |     sl = "p:m:d:hV";
    0x000109f4 ldr r6, [pc, 0x3f4]                       |     r6 = "p:m:d:hV";
    0x000109f8 sub sp, sp, 0x20                          |     
    0x000109fc mov r5, r0                                |     r5 = r0;
    0x00010a00 mov r8, r1                                |     r8 = r1;
                                                         | label_0:
    0x00010a04 mov r7, 0                                 |     r7 = 0;
    0x00010a08 str r7, [sp]                              |     *(sp) = r7;
    0x00010a0c mov r3, sb                                |     r3 = sb;
    0x00010a10 mov r2, sl                                |     r2 = sl;
    0x00010a14 mov r1, r8                                |     r1 = r8;
    0x00010a18 mov r0, r5                                |     r0 = r5;
    0x00010a1c str r7, [sp, 8]                           |     var_8h = r7;
    0x00010a20 bl 0x10880                                |     r0 = getopt_long ();
    0x00010a24 cmn r0, 1                                 |     
    0x00010a28 mov r4, r0                                |     r4 = r0;
                                                         |     if (r0 == 1) {
    0x00010a2c beq 0x10b6c                               |         goto label_11;
                                                         |     }
    0x00010a30 cmp r0, 0x64                              |     
                                                         |     if (r0 == 0x64) {
    0x00010a34 beq 0x10ab0                               |         goto label_12;
                                                         |     }
                                                         |     if (r0 > 0x64) {
    0x00010a38 bgt 0x10a60                               |         goto label_13;
                                                         |     }
    0x00010a3c cmp r0, 0x3a                              |     
                                                         |     if (r0 == 0x3a) {
    0x00010a40 beq 0x10b54                               |         goto label_14;
                                                         |     }
    0x00010a44 cmp r0, 0x56                              |     
                                                         |     if (r0 == 0x56) {
    0x00010a48 beq 0x10b40                               |         goto label_15;
                                                         |     }
                                                         |     do {
    0x00010a4c ldr r3, [pc, 0x3a0]                       |         r3 = optarg;
    0x00010a50 ldr r0, [pc, 0x3a0]                       |         r0 = stderr;
    0x00010a54 ldr r1, [r3]                              |         r1 = optarg;
    0x00010a58 bl 0x109ac                                |         fputs (r0, r1);
    0x00010a5c b 0x10af4                                 |         goto label_3;
                                                         | label_13:
    0x00010a60 cmp r0, 0x6d                              |         
                                                         |         if (r0 == 0x6d) {
    0x00010a64 beq 0x10b04                               |             goto label_16;
                                                         |         }
    0x00010a68 cmp r0, 0x70                              |         
                                                         |         if (r0 == 0x70) {
    0x00010a6c beq 0x10aa0                               |             goto label_17;
                                                         |         }
    0x00010a70 cmp r0, 0x68                              |         
    0x00010a74 bne 0x10a4c                               |         
                                                         |     } while (r0 != 0x68);
    0x00010a78 ldr r1, [pc, 0x37c]                       |     r1 = "Use -h for help\n";
    0x00010a7c ldr r0, [pc, 0x37c]                       |     r0 = "ubidetach_version_2.1.0___tool_to_remove_UBI_devices__detach_MTD_devices_from_UBI_";
    0x00010a80 bl 0x1085c                                |     printf ("ubidetach_version_2.1.0___tool_to_remove_UBI_devices__detach_MTD_devices_from_UBI_", "Use -h for help\n");
    0x00010a84 ldr r1, [pc, 0x378]                       |     r1 = "%s\n\n";
    0x00010a88 ldr r0, [pc, 0x370]                       |     r0 = "ubidetach_version_2.1.0___tool_to_remove_UBI_devices__detach_MTD_devices_from_UBI_";
    0x00010a8c bl 0x1085c                                |     printf ("ubidetach_version_2.1.0___tool_to_remove_UBI_devices__detach_MTD_devices_from_UBI_", "%s\n\n");
    0x00010a90 ldr r0, [pc, 0x370]                       |     r0 = "Usage: ubidetach [<UBI control device node file name>]\n\t[-d <UBI device number>] [-m <MTD device number>] [-p <path to device>]\n\t[--devn=<UBI device number>] [--mtdn=<MTD device number>]\n\t[--dev-path=<path to device>]\nUBI control device defaults to /dev/ubi_ctrl if not supplied.\nExample 1: ubidetach -p /dev/mtd0 - detach MTD device /dev/mtd0\nExample 2: ubidetach -d 2 - delete UBI device 2 (ubi2)\nExample 3: ubidetach -m 0 - detach MTD device 0 (mtd0)";
    0x00010a94 bl 0x108a4                                |     puts ("Usage: ubidetach [<UBI control device node file name>]\n\t[-d <UBI device number>] [-m <MTD device number>] [-p <path to device>]\n\t[--devn=<UBI device number>] [--mtdn=<MTD device number>]\n\t[--dev-path=<path to device>]\nUBI control device defaults to /dev/ubi_ctrl if not supplied.\nExample 1: ubidetach -p /dev/mtd0 - detach MTD device /dev/mtd0\nExample 2: ubidetach -d 2 - delete UBI device 2 (ubi2)\nExample 3: ubidetach -m 0 - detach MTD device 0 (mtd0)");
                                                         | label_2:
    0x00010a98 mov r0, r7                                |     r0 = r7;
    0x00010a9c bl 0x10994                                |     exit (r0);
                                                         | label_17:
    0x00010aa0 ldr r2, [r6]                              |     r2 = *(r6);
    0x00010aa4 ldr r3, [pc, 0x360]                       |     r3 = "-d, --devn=<UBI device number>  UBI device number to delete\n-p, --dev-path=<path to device> or alternatively, MTD device node path to detach\n-m, --mtdn=<MTD device number>  or alternatively, MTD device number to detach\n-h, --help                      print help message\n-V, --version                   print program version";
    0x00010aa8 str r2, [r3, 0xc]                         |     *((r3 + 0xc)) = r2;
    0x00010aac b 0x10a04                                 |     goto label_0;
                                                         | label_12:
    0x00010ab0 add r1, sp, 8                             |     r1 += var_8h;
    0x00010ab4 ldr r0, [r6]                              |     r0 = *(r6);
    0x00010ab8 bl 0x10f7c                                |     fcn_00010f7c (r0, r1);
    0x00010abc ldr r3, [pc, 0x348]                       |     r3 = "-d, --devn=<UBI device number>  UBI device number to delete\n-p, --dev-path=<path to device> or alternatively, MTD device node path to detach\n-m, --mtdn=<MTD device number>  or alternatively, MTD device number to detach\n-h, --help                      print help message\n-V, --version                   print program version";
    0x00010ac0 str r0, [r3]                              |     *(r3) = r0;
    0x00010ac4 ldr r3, [sp, 8]                           |     r3 = var_8h;
    0x00010ac8 cmp r3, 0                                 |     
                                                         |     if (r3 != 0) {
    0x00010acc lsreq r0, r0, 0x1f                        |         r0 >>= 0x1f;
                                                         |     }
                                                         |     if (r3 == 0) {
    0x00010ad0 movne r0, 1                               |         r0 = 1;
                                                         |     }
    0x00010ad4 cmp r0, 0                                 |     
                                                         |     if (r0 == 0) {
    0x00010ad8 beq 0x10a04                               |         goto label_0;
                                                         |     }
    0x00010adc ldr r3, [r6]                              |     r3 = *(r6);
    0x00010ae0 ldr r2, [pc, 0x328]                       |     r2 = *(0x10e0c);
    0x00010ae4 ldr r1, [pc, 0x328]                       |     r1 = "ubidetach";
                                                         | label_1:
    0x00010ae8 ldr r0, [pc, 0x304]                       |     
    0x00010aec ldr r0, [r0]                              |     r0 = optarg;
    0x00010af0 bl 0x108ec                                |     fprintf (r0, "ubidetach", r2, r3)
                                                         | label_3:
    0x00010af4 mvn r4, 0                                 |     r4 = ~0;
                                                         | label_5:
    0x00010af8 mov r0, r4                                |     r0 = r4;
    0x00010afc add sp, sp, 0x20                          |     
    0x00010b00 pop {r4, r5, r6, r7, r8, sb, sl, pc}      |     
                                                         | label_16:
    0x00010b04 add r1, sp, 8                             |     r1 += var_8h;
    0x00010b08 ldr r0, [r6]                              |     r0 = *(r6);
    0x00010b0c bl 0x10f7c                                |     fcn_00010f7c (r0, r1);
    0x00010b10 ldr r3, [pc, 0x2f4]                       |     r3 = "-d, --devn=<UBI device number>  UBI device number to delete\n-p, --dev-path=<path to device> or alternatively, MTD device node path to detach\n-m, --mtdn=<MTD device number>  or alternatively, MTD device number to detach\n-h, --help                      print help message\n-V, --version                   print program version";
    0x00010b14 str r0, [r3, 4]                           |     *((r3 + 4)) = r0;
    0x00010b18 ldr r3, [sp, 8]                           |     r3 = var_8h;
    0x00010b1c cmp r3, 0                                 |     
                                                         |     if (r3 != 0) {
    0x00010b20 lsreq r0, r0, 0x1f                        |         r0 >>= 0x1f;
                                                         |     }
                                                         |     if (r3 == 0) {
    0x00010b24 movne r0, 1                               |         r0 = 1;
                                                         |     }
    0x00010b28 cmp r0, 0                                 |     
                                                         |     if (r0 == 0) {
    0x00010b2c beq 0x10a04                               |         goto label_0;
                                                         |     }
    0x00010b30 ldr r3, [r6]                              |     r3 = *(r6);
    0x00010b34 ldr r2, [pc, 0x2d4]                       |     r2 = *(0x10e0c);
    0x00010b38 ldr r1, [pc, 0x2d8]                       |     r1 = "%s: error!: bad UBI device number: \"%s\"\n";
    0x00010b3c b 0x10ae8                                 |     goto label_1;
                                                         | label_15:
    0x00010b40 ldr r2, [pc, 0x2d4]                       |     r2 = "_s:_error_:_bad_MTD_device_number:___s_";
    0x00010b44 ldr r1, [pc, 0x2c4]                       |     r1 = *(0x10e0c);
    0x00010b48 ldr r0, [pc, 0x2d0]                       |     r0 = "_.1.0";
    0x00010b4c bl 0x1085c                                |     printf ("_.1.0", r1, "_s:_error_:_bad_MTD_device_number:___s_");
    0x00010b50 b 0x10a98                                 |     goto label_2;
                                                         | label_14:
    0x00010b54 ldr r2, [pc, 0x2b4]                       |     r2 = *(0x10e0c);
    0x00010b58 ldr r1, [pc, 0x2c4]                       |     r1 = "_s__mtd_utils___s";
                                                         |     do {
                                                         | label_10:
    0x00010b5c ldr r3, [pc, 0x290]                       |         r3 = optarg;
    0x00010b60 ldr r0, [r3]                              |         r0 = optarg;
    0x00010b64 bl 0x108ec                                |         fprintf (r0, "_s__mtd_utils___s", r2, r3)
    0x00010b68 b 0x10af4                                 |         goto label_3;
                                                         | label_11:
    0x00010b6c ldr r3, [pc, 0x2b4]                       |         
    0x00010b70 ldr r3, [r3]                              |         r3 = "%s: error!: parameter is missing\n";
    0x00010b74 cmp r5, r3                                |         
                                                         |         if (r5 != r3) {
    0x00010b78 bne 0x10bc0                               |             goto label_18;
                                                         |         }
    0x00010b7c ldr r3, [pc, 0x288]                       |         r3 = "-d, --devn=<UBI device number>  UBI device number to delete\n-p, --dev-path=<path to device> or alternatively, MTD device node path to detach\n-m, --mtdn=<MTD device number>  or alternatively, MTD device number to detach\n-h, --help                      print help message\n-V, --version                   print program version";
    0x00010b80 ldr r2, [pc, 0x2a4]                       |         r2 = optind;
                                                         | label_4:
    0x00010b84 str r2, [r3, 8]                           |         *((r3 + 8)) = r2;
    0x00010b88 ldr r3, [pc, 0x27c]                       |         r3 = "-d, --devn=<UBI device number>  UBI device number to delete\n-p, --dev-path=<path to device> or alternatively, MTD device node path to detach\n-m, --mtdn=<MTD device number>  or alternatively, MTD device number to detach\n-h, --help                      print help message\n-V, --version                   print program version";
    0x00010b8c ldr r2, [r3, 4]                           |         r2 = *(0x10e0c);
    0x00010b90 ldr r6, [r3]                              |         r6 = "-d, --devn=<UBI device number>  UBI device number to delete\n-p, --dev-path=<path to device> or alternatively, MTD device node path to detach\n-m, --mtdn=<MTD device number>  or alternatively, MTD device number to detach\n-h, --help                      print help message\n-V, --version                   print program version";
    0x00010b94 cmn r2, 1                                 |         
    0x00010b98 mov r5, r3                                |         r5 = r3;
                                                         |         if (r2 != 1) {
    0x00010b9c bne 0x10dc8                               |             goto label_19;
                                                         |         }
    0x00010ba0 cmn r6, 1                                 |         
                                                         |         if (r6 != 1) {
    0x00010ba4 bne 0x10bec                               |             goto label_20;
                                                         |         }
    0x00010ba8 ldr r3, [r3, 0xc]                         |         r3 = *((r3 + 0xc));
    0x00010bac cmp r3, 0                                 |         
                                                         |         if (r3 != 0) {
    0x00010bb0 bne 0x10c04                               |             goto label_9;
                                                         |         }
    0x00010bb4 ldr r2, [pc, 0x254]                       |         r2 = *(0x10e0c);
    0x00010bb8 ldr r1, [pc, 0x270]                       |         r1 = "_dev_ubi_ctrl";
    0x00010bbc b 0x10b5c                                 |         
                                                         |     } while (1);
                                                         | label_18:
    0x00010bc0 sub r5, r5, 1                             |     r5--;
    0x00010bc4 cmp r3, r5                                |     
                                                         |     if (r3 != r5) {
    0x00010bc8 ldreq r2, [r8, r3, lsl 2]                 |         offset_0 = r3 << 2;
                                                         |         r2 = *((r8 + offset_0));
                                                         |     }
                                                         |     if (r3 == r5) {
    0x00010bcc ldreq r3, [pc, 0x238]                     |         r3 = *(0x00010e0c);
                                                         |         goto label_21;
                                                         |     }
                                                         |     if (r3 == r5) {
                                                         | label_21:
    0x00010bd0 beq 0x10b84                               |         goto label_4;
                                                         |     }
    0x00010bd4 ldr r2, [pc, 0x234]                       |     r2 = *(0x10e0c);
    0x00010bd8 ldr r1, [pc, 0x254]                       |     r1 = "_s:_error_:_neither_MTD_nor_UBI_devices_were_specified__use__h_for_help_";
                                                         |     do {
    0x00010bdc ldr r3, [pc, 0x210]                       |         r3 = optarg;
    0x00010be0 ldr r0, [r3]                              |         r0 = optarg;
                                                         | label_6:
    0x00010be4 bl 0x108ec                                |         fprintf (r0, "_s:_error_:_neither_MTD_nor_UBI_devices_were_specified__use__h_for_help_", r2, r3)
    0x00010be8 b 0x10af8                                 |         goto label_5;
                                                         | label_20:
    0x00010bec ldr r3, [r3, 0xc]                         |         r3 = *((r3 + 0xc));
    0x00010bf0 cmp r3, 0                                 |         
                                                         |         if (r3 == 0) {
    0x00010bf4 beq 0x10c04                               |             goto label_9;
                                                         |         }
                                                         | label_8:
    0x00010bf8 ldr r2, [pc, 0x210]                       |         r2 = *(0x10e0c);
    0x00010bfc ldr r1, [pc, 0x234]                       |         r1 = "_s:_error_:_more_then_one_UBI_control_device_specified__use__h_for_help_";
    0x00010c00 b 0x10bdc                                 |         
                                                         |     } while (1);
                                                         | label_9:
    0x00010c04 bl 0x118ec                                |     r0 = fcn_000118ec ();
    0x00010c08 subs r6, r0, 0                            |     r6 = r0 - 0;
                                                         |     if (r6 != r0) {
    0x00010c0c bne 0x10c64                               |         goto label_22;
                                                         |     }
    0x00010c10 bl 0x10988                                |     errno_location ();
    0x00010c14 ldr r6, [pc, 0x1d8]                       |     r6 = optarg;
    0x00010c18 ldr r2, [pc, 0x1f0]                       |     r2 = *(0x10e0c);
    0x00010c1c ldr r5, [r0]                              |     r5 = *(r0);
    0x00010c20 ldr r0, [r6]                              |     r0 = optarg;
    0x00010c24 cmp r5, 0                                 |     
                                                         |     if (r5 == 0) {
    0x00010c28 ldreq r1, [pc, 0x20c]                     |         r1 = "%s: error!: UBI is not present in the system\n";
                                                         |         goto label_23;
                                                         |     }
                                                         |     if (r5 == 0) {
                                                         | label_23:
    0x00010c2c beq 0x10be4                               |         goto label_6;
                                                         |     }
    0x00010c30 ldr r1, [pc, 0x208]                       |     r1 = "%s: error!: UBI is not present in the system\n";
    0x00010c34 bl 0x108ec                                |     fprintf (r0, "%s: error!: UBI is not present in the system\n")
    0x00010c38 mov r0, r5                                |     r0 = r5;
    0x00010c3c ldr r6, [r6]                              |     r6 = *(r6);
    0x00010c40 bl 0x10868                                |     strerror (r0);
    0x00010c44 str r5, [sp]                              |     *(sp) = r5;
    0x00010c48 ldr r3, [pc, 0x1f4]                       |     r3 = "_s:_error_:_cannot_open_libubi";
    0x00010c4c mov r2, 0xb                               |     r2 = 0xb;
    0x00010c50 ldr r1, [pc, 0x1f0]                       |     r1 = *(0x10e44);
    0x00010c54 str r0, [sp, 4]                           |     var_4h = r0;
    0x00010c58 mov r0, r6                                |     r0 = r6;
    0x00010c5c bl 0x108ec                                |     fprintf (r0, r1, r2, "_s:_error_:_cannot_open_libubi", r4, r5)
    0x00010c60 b 0x10af8                                 |     goto label_5;
                                                         | label_22:
    0x00010c64 add r1, sp, 8                             |     r1 += var_8h;
    0x00010c68 bl 0x11da8                                |     r0 = fcn_00011da8 (r0, r1);
    0x00010c6c cmp r0, 0                                 |     
                                                         |     if (r0 == 0) {
    0x00010c70 beq 0x10cbc                               |         goto label_24;
                                                         |     }
    0x00010c74 bl 0x10988                                |     errno_location ();
    0x00010c78 ldr r7, [pc, 0x174]                       |     
    0x00010c7c ldr r2, [pc, 0x18c]                       |     r2 = *(0x10e0c);
    0x00010c80 ldr r1, [pc, 0x1c4]                       |     r1 = "_serror__d___s_";
    0x00010c84 ldr r5, [r0]                              |     r5 = *(r0);
    0x00010c88 ldr r0, [r7]                              |     r0 = optarg;
    0x00010c8c bl 0x108ec                                |     fprintf (r0, "_serror__d___s_", r2, r3, r4, r5)
    0x00010c90 mov r0, r5                                |     r0 = r5;
    0x00010c94 ldr r7, [r7]                              |     r7 = optarg;
    0x00010c98 bl 0x10868                                |     strerror (r0);
    0x00010c9c ldr r3, [pc, 0x1a0]                       |     r3 = "_s:_error_:_cannot_open_libubi";
    0x00010ca0 ldr r1, [pc, 0x1a0]                       |     r1 = *(0x10e44);
    0x00010ca4 mov r2, 0xb                               |     r2 = 0xb;
    0x00010ca8 str r5, [sp]                              |     *(sp) = r5;
    0x00010cac str r0, [sp, 4]                           |     var_4h = r0;
    0x00010cb0 mov r0, r7                                |     r0 = r7;
                                                         |     do {
    0x00010cb4 bl 0x108ec                                |         fprintf (r0, r1, r2, "_s:_error_:_cannot_open_libubi", r4, r5)
    0x00010cb8 b 0x10cdc                                 |         goto label_25;
                                                         | label_24:
    0x00010cbc ldr r3, [sp, 0x18]                        |         r3 = var_18h;
    0x00010cc0 cmn r3, 1                                 |         
                                                         |         if (r3 == 1) {
    0x00010cc4 bne 0x10ce8                               |             
    0x00010cc8 ldr r3, [pc, 0x124]                       |             r3 = optarg;
    0x00010ccc ldr r2, [pc, 0x13c]                       |             r2 = *(0x10e0c);
    0x00010cd0 ldr r1, [pc, 0x178]                       |             r1 = "_s:_error_:_cannot_get_UBI_information";
    0x00010cd4 ldr r0, [r3]                              |             r0 = optarg;
    0x00010cd8 bl 0x108ec                                |             fprintf (r0, "_s:_error_:_cannot_get_UBI_information", r2, r3)
                                                         | label_25:
    0x00010cdc mov r0, r6                                |             r0 = r6;
    0x00010ce0 bl 0x11818                                |             fcn_00011818 (r0);
    0x00010ce4 b 0x10af8                                 |             goto label_5;
                                                         |         }
    0x00010ce8 ldr r2, [r5]                              |         r2 = *(r5);
    0x00010cec ldr r1, [r5, 8]                           |         r1 = *((r5 + 8));
    0x00010cf0 cmn r2, 1                                 |         
                                                         |         if (r2 == 1) {
    0x00010cf4 beq 0x10d50                               |             goto label_26;
                                                         |         }
    0x00010cf8 mov r0, r6                                |         r0 = r6;
    0x00010cfc bl 0x11d4c                                |         r0 = fcn_00011d4c (r0);
    0x00010d00 cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x00010d04 beq 0x10db8                               |             goto label_27;
                                                         |         }
    0x00010d08 bl 0x10988                                |         errno_location ();
    0x00010d0c ldr r8, [pc, 0xe0]                        |         r8 = optarg;
    0x00010d10 ldr r3, [r5]                              |         r3 = *(r5);
    0x00010d14 ldr r2, [pc, 0xf4]                        |         r2 = *(0x10e0c);
    0x00010d18 ldr r1, [pc, 0x134]                       |         r1 = "_s:_error_:_MTD_detach_detach_feature_is_not_supported_by_your_kernel";
    0x00010d1c ldr r7, [r0]                              |         r7 = *(r0);
                                                         | label_7:
    0x00010d20 ldr r0, [r8]                              |         r0 = *(r8);
    0x00010d24 bl 0x108ec                                |         fprintf (r0, "_s:_error_:_MTD_detach_detach_feature_is_not_supported_by_your_kernel", r2, r3)
    0x00010d28 mov r0, r7                                |         r0 = r7;
    0x00010d2c ldr r5, [r8]                              |         r5 = *(r8);
    0x00010d30 bl 0x10868                                |         strerror (r0);
    0x00010d34 str r7, [sp]                              |         *(sp) = r7;
    0x00010d38 ldr r3, [pc, 0x104]                       |         r3 = "_s:_error_:_cannot_open_libubi";
    0x00010d3c mov r2, 0xb                               |         r2 = 0xb;
    0x00010d40 ldr r1, [pc, 0x100]                       |         r1 = *(0x10e44);
    0x00010d44 str r0, [sp, 4]                           |         var_4h = r0;
    0x00010d48 mov r0, r5                                |         r0 = r5;
    0x00010d4c b 0x10cb4                                 |         
                                                         |     } while (1);
                                                         | label_26:
    0x00010d50 ldr r2, [r5, 0xc]                         |     r2 = *((r5 + 0xc));
    0x00010d54 cmp r2, 0                                 |     
                                                         |     if (r2 != 0) {
    0x00010d58 beq 0x10d88                               |         
    0x00010d5c mov r0, r6                                |         r0 = r6;
    0x00010d60 bl 0x12090                                |         r0 = fcn_00012090 (r0, r1);
    0x00010d64 cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x00010d68 beq 0x10db8                               |             goto label_27;
                                                         |         }
    0x00010d6c bl 0x10988                                |         errno_location ();
    0x00010d70 ldr r8, [pc, 0x7c]                        |         r8 = optarg;
    0x00010d74 ldr r3, [r5, 0xc]                         |         r3 = *((r5 + 0xc));
    0x00010d78 ldr r2, [pc, 0x90]                        |         r2 = *(0x10e0c);
    0x00010d7c ldr r1, [pc, 0xd4]                        |         r1 = "%s: error!: cannot remove ubi%d\n";
    0x00010d80 ldr r7, [r0]                              |         r7 = *(r0);
    0x00010d84 b 0x10d20                                 |         goto label_7;
                                                         |     }
    0x00010d88 ldr r2, [r5, 4]                           |     r2 = *((r5 + 4));
    0x00010d8c mov r0, r6                                |     r0 = r6;
    0x00010d90 bl 0x1203c                                |     r0 = fcn_0001203c (r0, r1);
    0x00010d94 cmp r0, 0                                 |     
                                                         |     if (r0 != 0) {
    0x00010d98 beq 0x10db8                               |         
    0x00010d9c bl 0x10988                                |         errno_location ();
    0x00010da0 ldr r8, [pc, 0x4c]                        |         r8 = optarg;
    0x00010da4 ldr r3, [r5, 4]                           |         r3 = *((r5 + 4));
    0x00010da8 ldr r2, [pc, 0x60]                        |         r2 = *(0x10e0c);
    0x00010dac ldr r1, [pc, 0xa8]                        |         r1 = "_s:_error_:_cannot_detach___s_";
    0x00010db0 ldr r7, [r0]                              |         r7 = *(r0);
    0x00010db4 b 0x10d20                                 |         goto label_7;
                                                         |     }
                                                         | label_27:
    0x00010db8 mov r0, r6                                |     r0 = r6;
    0x00010dbc bl 0x11818                                |     fcn_00011818 (r0);
    0x00010dc0 mov r4, 0                                 |     r4 = 0;
    0x00010dc4 b 0x10af8                                 |     goto label_5;
                                                         | label_19:
    0x00010dc8 cmn r6, 1                                 |     
                                                         |     if (r6 != 1) {
    0x00010dcc bne 0x10bf8                               |         goto label_8;
                                                         |     }
    0x00010dd0 ldr r3, [r3, 0xc]                         |     r3 = *((r3 + 0xc));
    0x00010dd4 cmp r3, 0                                 |     
                                                         |     if (r3 == 0) {
    0x00010dd8 beq 0x10c04                               |         goto label_9;
                                                         |     }
    0x00010ddc ldr r2, [pc, 0x2c]                        |     r2 = *(0x10e0c);
    0x00010de0 ldr r1, [pc, 0x78]                        |     r1 = "_s:_error_:_cannot_detach_mtd_d";
    0x00010de4 b 0x10b5c                                 |     goto label_10;
                                                         | }

[*] Function fprintf used 52 times ubidetach