[*] Binary protection state of ntptime
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of ntptime
; 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/bin/ntptime @ 0x11898 */
| #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_ch;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| time_t * timer;
| int32_t var_30h;
| int32_t var_34h;
| int32_t var_38h;
| void * s;
| int32_t var_8ch;
| char * var_90h;
| int32_t var_94h;
| int32_t var_98h;
| int32_t var_9ch;
| int32_t var_a0h;
| int32_t var_a4h;
| int32_t var_a8h;
| int32_t var_ach;
| int32_t var_b0h;
| int32_t var_c0h;
| int32_t var_c4h;
| int32_t var_c8h;
| int32_t var_cch;
| int32_t var_d0h;
| int32_t var_d4h;
| int32_t var_d8h;
| int32_t var_dch;
| int32_t var_114h;
| int32_t var_128h;
| int32_t var_198h;
| int32_t var_19ch;
| r0 = argc;
| r1 = argv;
| /* [10] -r-x section size 45932 named .text */
0x00011898 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0001189c ldr fp, [pc, 0x73c] | fp = "MNT:cde:f:hm:o:rs:t:";
0x000118a0 sub sp, sp, 0x19c |
0x000118a4 mov sl, r1 | sl = r1;
0x000118a8 mov r2, 0x50 | r2 = 0x50;
0x000118ac mov r1, 0 | r1 = 0;
0x000118b0 mov r7, r0 | r7 = r0;
0x000118b4 add r0, sp, 0x40 | r0 += s;
0x000118b8 bl 0x1169c | memset (r0, r1, r2);
0x000118bc ldr r3, [pc, 0x720] | r3 = "MNT:cde:f:hm:o:rs:t:";
0x000118c0 mov r4, 0 | r4 = 0;
0x000118c4 str r3, [sp, 0x14] | var_14h = r3;
0x000118c8 mov r3, 0x800 | r3 = 0x800;
0x000118cc str r3, [sp, 0x18] | var_18h = r3;
0x000118d0 mov r2, 0x84 | r2 = 0x84;
0x000118d4 mov r3, 6 | r3 = 6;
0x000118d8 mov r1, r4 | r1 = r4;
0x000118dc add r0, sp, 0x90 | r0 += var_90h;
0x000118e0 str r3, [sp, 0x1c] | var_1ch = r3;
0x000118e4 ldr r6, [pc, 0x6fc] | r6 = *(0x11fe4);
0x000118e8 str r4, [sp, 0x20] | var_20h = r4;
0x000118ec ldr sb, [pc, 0x6f8] | sb = *(0x00011fec);
0x000118f0 bl 0x1169c | memset (r0, r1, r2);
0x000118f4 ldr r2, [sl] | r2 = *(sl);
0x000118f8 ldr r3, [pc, 0x6f0] | r3 = *(0x11fec);
0x000118fc mov r5, r4 | r5 = r4;
0x00011900 mov r8, 0 | r8 = 0;
0x00011904 str r2, [r3] | *(r3) = r2;
| do {
| label_0:
0x00011908 mov r2, fp | r2 = fp;
0x0001190c mov r1, sl | r1 = sl;
0x00011910 mov r0, r7 | r0 = r7;
0x00011914 bl 0x12458 | r0 = fcn_00012458 (r0, r1);
0x00011918 cmn r0, 1 |
| if (r0 == 1) {
0x0001191c bne 0x1197c |
0x00011920 cmp r5, 0 |
| if (r5 == 0) {
0x00011924 bne 0x11938 |
0x00011928 ldr r3, [pc, 0x6c4] |
0x0001192c ldr r3, [r3] | r3 = *(0x11ff0);
0x00011930 cmp r3, r7 |
| if (r3 == r7) {
0x00011934 beq 0x11ac8 | goto label_6;
| }
| }
0x00011938 mov r3, 6 | r3 = 6;
0x0001193c str r3, [sp, 0xc] | var_ch = r3;
0x00011940 ldr r3, [pc, 0x6b0] | r3 = *(0x11ff4);
0x00011944 ldr r2, [pc, 0x6a4] |
0x00011948 str r3, [sp, 8] | var_8h = r3;
0x0001194c ldr r3, [pc, 0x6a8] | r3 = *(0x11ff8);
0x00011950 ldr r0, [pc, 0x6a8] |
0x00011954 str r3, [sp, 4] | var_4h = r3;
0x00011958 ldr r3, [pc, 0x6a4] | r3 = stderr;
0x0001195c ldr r1, [pc, 0x6a4] | r1 = "_Mswitch_to_microsecond_mode";
0x00011960 str r3, [sp] | *(sp) = r3;
0x00011964 ldr r3, [pc, 0x674] | r3 = *(0x11fdc);
0x00011968 ldr r2, [r2] | r2 = *(0x11fec);
0x0001196c ldr r0, [r0] | r0 = "-N\t\tswitch to nanosecond mode\n";
0x00011970 bl 0x11588 | fprintf ("-N\t\tswitch to nanosecond mode\n", "_Mswitch_to_microsecond_mode", r2, r3)
0x00011974 mov r0, 2 | r0 = 2;
| label_2:
0x00011978 bl 0x117a4 | r0 = exit (r0);
| }
0x0001197c cmp r0, 0x66 |
| if (r0 == 0x66) {
0x00011980 beq 0x11a5c | goto label_7;
| }
| if (r0 > 0x66) {
0x00011984 bgt 0x119dc | goto label_8;
| }
0x00011988 cmp r0, 0x4e |
| if (r0 == 0x4e) {
0x0001198c beq 0x11a4c | goto label_9;
| }
| if (r0 > 0x4e) {
0x00011990 bgt 0x119ac | goto label_10;
| }
0x00011994 cmp r0, 0x4d |
| if (r0 != 0x4d) {
0x00011998 ldreq r3, [sp, 0x90] | r3 = var_90h;
| }
| if (r0 != 0x4d) {
0x0001199c orreq r3, r3, 0x1000 | r3 |= 0x1000;
| }
| if (r0 == 0x4d) {
0x000119a0 beq 0x11a54 | goto label_11;
| }
| label_1:
0x000119a4 add r5, r5, 1 | r5++;
0x000119a8 b 0x11908 |
| } while (1);
| label_10:
0x000119ac cmp r0, 0x63 |
| if (r0 == 0x63) {
0x000119b0 addeq r4, r4, 1 | r4++;
| goto label_12;
| }
| if (r0 == 0x63) {
| label_12:
0x000119b4 beq 0x11908 | goto label_0;
| }
0x000119b8 cmp r0, 0x65 |
| if (r0 != 0x65) {
0x000119bc bne 0x119a4 | goto label_1;
| }
0x000119c0 ldr r3, [sp, 0x90] | r3 = var_90h;
0x000119c4 ldr r0, [r6] | r0 = *(r6);
0x000119c8 orr r3, r3, 8 | r3 |= 8;
0x000119cc str r3, [sp, 0x90] | var_90h = r3;
0x000119d0 bl 0x117bc | atoi (r0);
0x000119d4 str r0, [sp, 0xa0] | var_a0h = r0;
0x000119d8 b 0x11908 | goto label_0;
| label_8:
0x000119dc cmp r0, 0x72 |
| if (r0 != 0x72) {
0x000119e0 ldreq r3, [sp, 0x20] | r3 = var_20h;
| }
| if (r0 != 0x72) {
0x000119e4 addeq r3, r3, 1 | r3++;
| }
| if (r0 == 0x72) {
0x000119e8 streq r3, [sp, 0x20] | var_20h = r3;
| goto label_13;
| }
| if (r0 == 0x72) {
| label_13:
0x000119ec beq 0x11908 | goto label_0;
| }
| if (r0 > 0x72) {
0x000119f0 bgt 0x11a20 | goto label_14;
| }
0x000119f4 cmp r0, 0x6d |
| if (r0 == 0x6d) {
0x000119f8 beq 0x11a88 | goto label_15;
| }
0x000119fc cmp r0, 0x6f |
| if (r0 != 0x6f) {
0x00011a00 bne 0x119a4 | goto label_1;
| }
0x00011a04 ldr r3, [sp, 0x90] | r3 = var_90h;
0x00011a08 ldr r0, [r6] | r0 = *(r6);
0x00011a0c orr r3, r3, 1 | r3 |= 1;
0x00011a10 str r3, [sp, 0x90] | var_90h = r3;
0x00011a14 bl 0x117bc | atoi (r0);
0x00011a18 str r0, [sp, 0x94] | var_94h = r0;
0x00011a1c b 0x11908 | goto label_0;
| label_14:
0x00011a20 cmp r0, 0x73 |
| if (r0 == 0x73) {
0x00011a24 beq 0x11aa4 | goto label_16;
| }
0x00011a28 cmp r0, 0x74 |
| if (r0 != 0x74) {
0x00011a2c bne 0x119a4 | goto label_1;
| }
0x00011a30 ldr r3, [sp, 0x90] | r3 = var_90h;
0x00011a34 ldr r0, [r6] | r0 = *(r6);
0x00011a38 orr r3, r3, 0x20 | r3 |= 0x20;
0x00011a3c str r3, [sp, 0x90] | var_90h = r3;
0x00011a40 bl 0x117bc | atoi (r0);
0x00011a44 str r0, [sp, 0xa8] | var_a8h = r0;
0x00011a48 b 0x11908 | goto label_0;
| label_9:
0x00011a4c ldr r3, [sp, 0x90] | r3 = var_90h;
0x00011a50 orr r3, r3, 0x2000 | r3 |= 0x2000;
| label_11:
0x00011a54 str r3, [sp, 0x90] | var_90h = r3;
0x00011a58 b 0x11908 | goto label_0;
| label_7:
0x00011a5c ldr r3, [sp, 0x90] | r3 = var_90h;
0x00011a60 ldr r0, [r6] | r0 = *(r6);
0x00011a64 orr r3, r3, 2 | r3 |= 2;
0x00011a68 str r3, [sp, 0x90] | var_90h = r3;
0x00011a6c bl 0x1157c | atof (r0);
0x00011a70 mov r2, r8 | r2 = r8;
0x00011a74 mov r3, sb | r3 = sb;
0x00011a78 bl 0x1c2dc | r0 = fcn_0001c2dc (r0);
0x00011a7c bl 0x1c878 | fcn_0001c878 (r0, r1);
0x00011a80 str r0, [sp, 0x98] | var_98h = r0;
0x00011a84 b 0x11908 | goto label_0;
| label_15:
0x00011a88 ldr r3, [sp, 0x90] | r3 = var_90h;
0x00011a8c ldr r0, [r6] | r0 = *(r6);
0x00011a90 orr r3, r3, 4 | r3 |= 4;
0x00011a94 str r3, [sp, 0x90] | var_90h = r3;
0x00011a98 bl 0x117bc | atoi (r0);
0x00011a9c str r0, [sp, 0x9c] | var_9ch = r0;
0x00011aa0 b 0x11908 | goto label_0;
| label_16:
0x00011aa4 ldr r3, [sp, 0x90] | r3 = var_90h;
0x00011aa8 ldr r0, [r6] | r0 = *(r6);
0x00011aac orr r3, r3, 0x10 | r3 |= 0x10;
0x00011ab0 str r3, [sp, 0x90] | var_90h = r3;
0x00011ab4 bl 0x117bc | r0 = atoi (r0);
0x00011ab8 cmp r0, 0xff |
0x00011abc str r0, [sp, 0xa4] | var_a4h = r0;
| if (r0 < 0xff) {
0x00011ac0 bls 0x11908 | goto label_0;
| }
0x00011ac4 b 0x119a4 | goto label_1;
| label_6:
0x00011ac8 ldr r6, [pc, 0x53c] | r6 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011acc ldr r3, [pc, 0x53c] | r3 = *(0x1200c);
0x00011ad0 add r2, r6, 0x1d0 | r2 = r6 + 0x1d0;
0x00011ad4 add r1, r6, 0x1bc | r1 = r6 + 0x1bc;
0x00011ad8 mov r0, 0x1f | r0 = 0x1f;
0x00011adc str r3, [r6, 0x1bc] | *((r6 + 0x1bc)) = r3;
0x00011ae0 str r5, [r6, 0x1c0] | *((r6 + 0x1c0)) = r5;
0x00011ae4 bl 0x11660 | r0 = sigaction ();
0x00011ae8 cmp r0, 0 |
| if (r0 != 0) {
0x00011aec beq 0x11b00 |
0x00011af0 ldr r0, [pc, 0x51c] | r0 = *(0x12010);
| label_3:
0x00011af4 bl 0x11498 | perror (r0);
0x00011af8 mov r0, 1 | r0 = 1;
0x00011afc b 0x11978 | goto label_2;
| }
0x00011b00 cmp r4, 0 |
| if (r4 == 0) {
0x00011b04 beq 0x11bc0 | goto label_17;
| }
0x00011b08 mov r1, 1 | r1 = 1;
0x00011b0c add r0, r6, 8 | r0 = r6 + 8;
0x00011b10 bl 0x11558 | r0 = sigsetjmp ();
0x00011b14 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00011b18 bne 0x11b74 | goto label_18;
| }
0x00011b1c ldr r5, [pc, 0x4e8] | r5 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011b20 add r6, sp, 0x40 | r6 += s;
| do {
0x00011b24 add r0, sp, 0x2c | r0 += timer;
0x00011b28 bl 0x121a8 | fcn_000121a8 (r0);
0x00011b2c str r0, [r5, 0x1e4] | *((r5 + 0x1e4)) = r0;
0x00011b30 ldr r3, [r5, 0x1e4] | r3 = *((r5 + 0x1e4));
0x00011b34 cmp r3, 0 |
| if (r3 < 0) {
0x00011b38 bge 0x11b54 |
0x00011b3c bl 0x1178c | r0 = errno_location ();
0x00011b40 ldr r3, [r0] | r3 = *(r0);
0x00011b44 cmp r3, 0x26 |
| if (r3 != 0x26) {
0x00011b48 ldreq r3, [r5] | r3 = *(r5);
| }
| if (r3 != 0x26) {
0x00011b4c subeq r3, r3, 1 | r3--;
| }
| if (r3 == 0x26) {
0x00011b50 streq r3, [r5] | *(r5) = r3;
| goto label_19;
| }
| }
| label_19:
0x00011b54 ldr r3, [r5] | r3 = *(r5);
0x00011b58 cmp r3, 0 |
| if (r3 < 0) {
0x00011b5c blt 0x11b74 | goto label_18;
| }
0x00011b60 ldr r3, [sp, 0x30] | r3 = var_30h;
0x00011b64 str r3, [r6, r4, lsl 2] | offset_0 = r4 << 2;
| *((r6 + offset_0)) = r3;
0x00011b68 add r4, r4, 1 | r4++;
0x00011b6c cmp r4, 0x14 |
0x00011b70 bne 0x11b24 |
| } while (r4 != 0x14);
| label_18:
0x00011b74 ldr r3, [pc, 0x490] |
0x00011b78 ldr r3, [r3] | r3 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011b7c cmp r3, 0 |
| if (r3 < 0) {
0x00011b80 blt 0x11bc0 | goto label_17;
| }
0x00011b84 add r4, sp, 0x198 | r4 += var_198h;
0x00011b88 ldr r1, [r4, -0x158]! | r1 = s;
0x00011b8c ldr r0, [pc, 0x484] | r0 = "sigaction___fails_to_save_SIGSYS_trap";
0x00011b90 bl 0x11438 | printf ("sigaction___fails_to_save_SIGSYS_trap", r1, r2, r3, r4)
0x00011b94 ldr r6, [pc, 0x480] | r6 = "__us__06d:";
0x00011b98 add r5, sp, 0x8c | r5 += var_8ch;
| do {
0x00011b9c ldr r1, [r4, 4]! | r1 = var_19ch;
0x00011ba0 mov r0, r6 | r0 = r6;
0x00011ba4 ldr r3, [r4, -4] | r3 = var_198h;
0x00011ba8 sub r1, r1, r3 | r1 -= r3;
0x00011bac bl 0x11438 | printf (r0, r1, r2, r3, r4, r5, "__us__06d:")
0x00011bb0 cmp r5, r4 |
0x00011bb4 bne 0x11b9c |
| } while (r5 != r4);
0x00011bb8 ldr r0, [pc, 0x460] | r0 = "_d";
0x00011bbc bl 0x114a4 | puts ("_d");
| label_17:
0x00011bc0 mov r1, 1 | r1 = 1;
0x00011bc4 ldr r0, [pc, 0x458] | r0 = *(0x12020);
0x00011bc8 bl 0x11558 | r0 = sigsetjmp ();
0x00011bcc cmp r0, 0 |
| if (r0 == 0) {
0x00011bd0 bne 0x11c08 |
0x00011bd4 add r0, sp, 0x2c | r0 += timer;
0x00011bd8 bl 0x121a8 | fcn_000121a8 (r0);
0x00011bdc ldr r4, [pc, 0x428] | r4 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011be0 str r0, [r4, 0x1e4] | *((r4 + 0x1e4)) = r0;
0x00011be4 ldr r3, [r4, 0x1e4] | r3 = *(0x121ec);
0x00011be8 cmp r3, 0 |
| if (r3 >= 0) {
0x00011bec bge 0x11c08 | goto label_20;
| }
0x00011bf0 bl 0x1178c | r0 = errno_location ();
0x00011bf4 ldr r3, [r0] | r3 = *(r0);
0x00011bf8 cmp r3, 0x26 |
| if (r3 != 0x26) {
0x00011bfc ldreq r3, [r4] | r3 = *(r4);
| }
| if (r3 != 0x26) {
0x00011c00 subeq r3, r3, 1 | r3--;
| }
| if (r3 == 0x26) {
0x00011c04 streq r3, [r4] | *(r4) = r3;
| goto label_20;
| }
| }
| label_20:
0x00011c08 mov r3, 0 | r3 = 0;
0x00011c0c mov r1, 1 | r1 = 1;
0x00011c10 ldr r0, [pc, 0x40c] | r0 = *(0x12020);
0x00011c14 str r3, [sp, 0x114] | var_114h = r3;
0x00011c18 bl 0x11558 | r0 = sigsetjmp ();
0x00011c1c cmp r0, 0 |
| if (r0 == 0) {
0x00011c20 bne 0x11c64 |
0x00011c24 add r0, sp, 0x114 | r0 += var_114h;
0x00011c28 bl 0x11810 | adjtimex ();
0x00011c2c ldr r4, [pc, 0x3d8] | r4 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011c30 str r0, [r4, 0x1e4] | *((r4 + 0x1e4)) = r0;
0x00011c34 ldr r3, [r4, 0x1e4] | r3 = *(0x121ec);
0x00011c38 cmp r3, 0 |
| if (r3 < 0) {
0x00011c3c bge 0x11c58 |
0x00011c40 bl 0x1178c | r0 = errno_location ();
0x00011c44 ldr r3, [r0] | r3 = *(r0);
0x00011c48 cmp r3, 0x26 |
| if (r3 != 0x26) {
0x00011c4c ldreq r3, [r4] | r3 = *(r4);
| }
| if (r3 != 0x26) {
0x00011c50 subeq r3, r3, 1 | r3--;
| }
| if (r3 == 0x26) {
0x00011c54 streq r3, [r4] | *(r4) = r3;
| goto label_21;
| }
| }
| label_21:
0x00011c58 ldr r2, [sp, 0x128] | r2 = var_128h;
0x00011c5c ldr r3, [pc, 0x3a8] | r3 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011c60 str r2, [r3, 0x1e8] | *((r3 + 0x1e8)) = r2;
| }
0x00011c64 ldr r4, [pc, 0x3a0] | r4 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011c68 ldr r3, [r4] | r3 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011c6c cmp r3, 0 |
| if (r3 >= 0) {
0x00011c70 bge 0x11c9c | goto label_22;
| }
0x00011c74 ldr r0, [pc, 0x3ac] | r0 = *(0x12024);
0x00011c78 bl 0x114a4 | puts (r0);
| label_5:
0x00011c7c mov r2, 0 | r2 = 0;
0x00011c80 ldr r1, [pc, 0x3a4] | r1 = "NTP_user_interface_routines_are_not_configured_in_this_kernel.";
0x00011c84 mov r0, 0x1f | r0 = 0x1f;
0x00011c88 bl 0x11660 | r0 = sigaction ();
0x00011c8c cmp r0, 0 |
| if (r0 != 0) {
0x00011c90 ldrne r0, [pc, 0x398] | r0 = "sigaction() fails to restore SIGSYS trap";
| goto label_23;
| }
| if (r0 != 0) {
| label_23:
0x00011c94 bne 0x11af4 | goto label_3;
| }
0x00011c98 b 0x11df0 | goto label_24;
| label_22:
0x00011c9c add r0, sp, 0x2c | r0 += timer;
0x00011ca0 bl 0x121a8 | fcn_000121a8 (r0);
0x00011ca4 str r0, [r4, 0x1e4] | *((r4 + 0x1e4)) = r0;
0x00011ca8 ldr r3, [r4, 0x1e4] | r3 = *((r4 + 0x1e4));
0x00011cac cmp r3, 0 |
| if (r3 >= 0) {
0x00011cb0 bge 0x11df8 | goto label_25;
| }
0x00011cb4 ldr r0, [pc, 0x378] | r0 = "sigaction() fails to restore SIGSYS trap";
0x00011cb8 bl 0x11498 | perror ("sigaction() fails to restore SIGSYS trap");
| do {
0x00011cbc add r0, sp, 0x90 | r0 += var_90h;
0x00011cc0 bl 0x11810 | adjtimex ();
0x00011cc4 ldr r4, [pc, 0x340] | r4 = "usage:__s____s__s_s_s_cdisplay_the_time_taken_to_call_ntp_gettime__us__e_esterrorestimate_of_the_error__us__f_frequencyFrequency_error___500_.._500___ppm__hdisplay_this_help_info_m_maxerrormax_possible_error__us__o_offsetcurrent_offset__ms_";
0x00011cc8 str r0, [r4, 0x1e4] | *((r4 + 0x1e4)) = r0;
0x00011ccc ldr r3, [r4, 0x1e4] | r3 = *(0x121ec);
0x00011cd0 cmp r3, 0 |
| if (r3 < 0) {
0x00011cd4 blt 0x11f10 | goto label_26;
| }
0x00011cd8 ldr r3, [sp, 0xa4] | r3 = var_a4h;
0x00011cdc str r3, [r4, 0x1e8] | *((r4 + 0x1e8)) = r3;
0x00011ce0 ldr r5, [r4, 0x1e4] | r5 = *((r4 + 0x1e4));
0x00011ce4 ldr r0, [r4, 0x1e4] | r0 = *((r4 + 0x1e4));
0x00011ce8 bl 0x12358 | fcn_00012358 (r0);
0x00011cec mov r1, r5 | r1 = r5;
0x00011cf0 mov r2, r0 | r2 = r0;
0x00011cf4 ldr r0, [pc, 0x33c] | r0 = "ntp_gettime() call fails";
0x00011cf8 bl 0x11438 | printf ("ntp_gettime() call fails", r1, r2)
0x00011cfc ldr r1, [pc, 0x338] | r1 = "ntp_adjtime___returns_code__d___s_";
0x00011d00 ldr r0, [sp, 0x90] | r0 = var_90h;
0x00011d04 bl 0x12218 | r0 = fcn_00012218 (r0, "ntp_adjtime___returns_code__d___s_");
0x00011d08 mov r1, r0 | r1 = r0;
0x00011d0c ldr r0, [pc, 0x32c] | r0 = *(0x1203c);
0x00011d10 bl 0x11438 | printf (r0, r1)
0x00011d14 ldr r0, [sp, 0x94] | r0 = var_94h;
0x00011d18 bl 0x1c1f8 | fcn_0001c1f8 (r0);
0x00011d1c ldr ip, [r4, 0x1e8] | ip = *((r4 + 0x1e8));
0x00011d20 tst ip, 0x2000 |
0x00011d24 mov r2, r0 | r2 = r0;
0x00011d28 mov r3, r1 | r3 = r1;
| if ((ip & 0x2000) != 0) {
0x00011d2c beq 0x11d44 |
0x00011d30 mov r2, 0 | r2 = 0;
0x00011d34 ldr r3, [pc, 0x308] | r3 = " modes %s,\n";
0x00011d38 bl 0x1c548 | r0 = fcn_0001c548 (r0);
0x00011d3c mov r2, r0 | r2 = r0;
0x00011d40 mov r3, r1 | r3 = r1;
| }
0x00011d44 ldr r0, [pc, 0x2fc] | r0 = *(0x12044);
0x00011d48 bl 0x11438 | printf (r0, r1, r2, r3)
0x00011d4c ldr r0, [sp, 0x98] | r0 = var_98h;
0x00011d50 bl 0x1c1f8 | fcn_0001c1f8 (r0);
0x00011d54 mov r2, 0 | r2 = 0;
0x00011d58 ldr r3, [pc, 0x2ec] | r3 = "offset__.3f";
0x00011d5c bl 0x1c2dc | fcn_0001c2dc (r0);
0x00011d60 ldr r2, [sp, 0xc8] | r2 = var_c8h;
0x00011d64 mov r3, 1 | r3 = 1;
0x00011d68 lsl r3, r3, r2 | r3 <<= r2;
0x00011d6c str r3, [sp] | *(sp) = r3;
0x00011d70 mov r2, r0 | r2 = r0;
0x00011d74 mov r3, r1 | r3 = r1;
0x00011d78 ldr r0, [pc, 0x2d0] | r0 = *(0x1204c);
0x00011d7c bl 0x11438 | printf (r0, r1, r2, r3)
0x00011d80 ldr r2, [sp, 0xa0] | r2 = var_a0h;
0x00011d84 ldr r1, [sp, 0x9c] | r1 = var_9ch;
0x00011d88 ldr r0, [pc, 0x2c4] | r0 = "us__frequency__.3f_ppm__interval__d_s_";
0x00011d8c bl 0x11438 | printf ("us__frequency__.3f_ppm__interval__d_s_", r1, r2)
0x00011d90 ldr r1, [pc, 0x2c0] | r1 = " maximum error %lu us, estimated error %lu us,\n";
0x00011d94 ldr r0, [sp, 0xa4] | r0 = var_a4h;
0x00011d98 bl 0x12218 | r0 = fcn_00012218 (r0, " maximum error %lu us, estimated error %lu us,\n");
0x00011d9c mov r1, r0 | r1 = r0;
0x00011da0 ldr r0, [pc, 0x2b4] | r0 = *(0x12058);
0x00011da4 bl 0x11438 | printf (r0, r1)
0x00011da8 ldr r0, [sp, 0xac] | r0 = var_ach;
0x00011dac bl 0x1c1f8 | r0 = fcn_0001c1f8 (r0);
0x00011db0 mov r4, r0 | r4 = r0;
0x00011db4 ldr r0, [sp, 0xb0] | r0 = var_b0h;
0x00011db8 mov r5, r1 | r5 = r1;
0x00011dbc bl 0x1c1f8 | fcn_0001c1f8 (r0);
0x00011dc0 mov r2, 0 | r2 = 0;
0x00011dc4 ldr r3, [pc, 0x280] | r3 = "offset__.3f";
0x00011dc8 bl 0x1c2dc | fcn_0001c2dc (r0);
0x00011dcc mov r3, r5 | r3 = r5;
0x00011dd0 mov r2, r4 | r2 = r4;
0x00011dd4 strd r0, r1, [sp] | __asm ("strd r0, r1, [sp]");
0x00011dd8 ldr r1, [sp, 0xa8] | r1 = var_a8h;
0x00011ddc ldr r0, [pc, 0x27c] | r0 = "status__s_";
0x00011de0 bl 0x11438 | printf (r0, r1, r2, r3)
0x00011de4 ldr r3, [sp, 0xc8] | r3 = var_c8h;
0x00011de8 cmp r3, 0 |
| if (r3 != 0) {
0x00011dec bne 0x11f34 | goto label_27;
| }
| label_24:
0x00011df0 mov r0, 0 | r0 = 0;
0x00011df4 b 0x11978 | goto label_2;
| label_25:
0x00011df8 ldr r5, [r4, 0x1e4] | r5 = *((r4 + 0x1e4));
0x00011dfc ldr r0, [r4, 0x1e4] | r0 = *((r4 + 0x1e4));
0x00011e00 bl 0x12358 | fcn_00012358 (r0);
0x00011e04 mov r1, r5 | r1 = r5;
0x00011e08 mov r2, r0 | r2 = r0;
0x00011e0c ldr r0, [pc, 0x250] | r0 = "time_constant__lu__precision__.3f_us__tolerance__.0f_ppm_";
0x00011e10 bl 0x11438 | printf ("time_constant__lu__precision__.3f_us__tolerance__.0f_ppm_", r1, r2)
0x00011e14 ldr r3, [r4, 0x1e8] | r3 = *((r4 + 0x1e8));
0x00011e18 ldr r5, [sp, 0x30] | r5 = var_30h;
0x00011e1c tst r3, 0x2000 |
| if ((r3 & 0x2000) != 0) {
0x00011e20 beq 0x11e4c |
0x00011e24 mov r1, 0x3e8 | r1 = 0x3e8;
0x00011e28 mov r0, r5 | r0 = r5;
0x00011e2c bl 0x1be20 | fcn_0001be20 (r0, r1);
0x00011e30 mvn r3, 3 | r3 = ~3;
0x00011e34 str r3, [sp, 0x14] | var_14h = r3;
0x00011e38 mov r3, 2 | r3 = 2;
0x00011e3c str r3, [sp, 0x18] | var_18h = r3;
0x00011e40 mov r3, 9 | r3 = 9;
0x00011e44 str r3, [sp, 0x1c] | var_1ch = r3;
0x00011e48 str r0, [sp, 0x30] | var_30h = r0;
| }
0x00011e4c ldr r6, [pc, 0x214] | r6 = "ntp_gettime___returns_code__d___s_";
0x00011e50 ldr sb, [sp, 0x30] | sb = var_30h;
0x00011e54 mov r8, 0 | r8 = 0;
0x00011e58 adds r0, r8, r6 | r0 = r8 + r6;
0x00011e5c mov r7, 0 | r7 = 0;
0x00011e60 adc r1, sb, r7 | __asm ("adc r1, sb, r7");
0x00011e64 ldr r2, [pc, 0x200] | r2 = *(0x12068);
0x00011e68 mov r3, 0 | r3 = 0;
0x00011e6c bl 0x1c9a8 | fcn_0001c9a8 (r0, r1);
0x00011e70 ldr r2, [sp, 0x2c] | r2 = timer;
0x00011e74 ldr r3, [pc, 0x1f4] | r3 = *(0x1206c);
0x00011e78 add r3, r2, r3 | r3 = r2 + r3;
0x00011e7c str r3, [sp, 0x24] | var_24h = r3;
0x00011e80 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00011e84 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00011e88 add r0, r0, r3 | r0 += r3;
0x00011e8c and r0, r0, r2 | r0 &= r2;
0x00011e90 str r0, [sp, 0x28] | var_28h = r0;
0x00011e94 add r0, sp, 0x24 | r0 += var_24h;
0x00011e98 bl 0x128ec | fcn_000128ec (r0);
0x00011e9c mov r3, r5 | r3 = r5;
0x00011ea0 ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x00011ea4 mov r1, r0 | r1 = r0;
0x00011ea8 ldr r0, [pc, 0x1c4] | r0 = *(0x12070);
0x00011eac bl 0x11438 | printf (r0, r1, r2, r3)
0x00011eb0 ldr r2, [sp, 0x38] | r2 = var_38h;
0x00011eb4 ldr r1, [sp, 0x34] | r1 = var_34h;
0x00011eb8 ldr r0, [pc, 0x1b8] | r0 = "time__s___._0d__";
0x00011ebc bl 0x11438 | printf ("time__s___._0d__", r1, r2)
0x00011ec0 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00011ec4 cmp r3, r8 |
| if (r3 != r8) {
0x00011ec8 bne 0x11ed8 | goto label_28;
| }
| label_4:
0x00011ecc mov r0, 0xa | r0 = 0xa;
0x00011ed0 bl 0x11420 | putchar (r0);
0x00011ed4 b 0x11cbc |
| } while (1);
| label_28:
0x00011ed8 add r4, sp, 0x24 | r4 += var_24h;
0x00011edc add r0, sp, 0x2c | r0 += timer;
0x00011ee0 ldm r4, {r4, r6, r7} | r4 = *(r4);
| r6 = *((r4 + 4));
| r7 = *((r4 + 8));
0x00011ee4 ldr r8, [sp, 0x1c] | r8 = var_1ch;
0x00011ee8 bl 0x11594 | ctime (r0);
0x00011eec str r5, [sp, 4] | var_4h = r5;
0x00011ef0 str r8, [sp] | *(sp) = r8;
0x00011ef4 mov r3, r7 | r3 = r7;
0x00011ef8 mov r2, r6 | r2 = r6;
0x00011efc mov r1, r4 | r1 = r4;
0x00011f00 str r0, [sp, 8] | var_8h = r0;
0x00011f04 ldr r0, [pc, 0x170] | r0 = " maximum error %lu us, estimated error %lu us";
0x00011f08 bl 0x11438 | printf (r0, r1, r2, r3, r4, r5)
0x00011f0c b 0x11ecc | goto label_4;
| label_26:
0x00011f10 bl 0x1178c | errno_location ();
0x00011f14 ldr r2, [pc, 0x164] | r2 = "ntptime_x._x_unixtime_x._0d__s";
0x00011f18 ldr r3, [pc, 0x164] | r3 = "Must be root to set kernel values\nntp_adjtime() call fails";
0x00011f1c ldr r0, [r0] | r0 = *(r0);
0x00011f20 cmp r0, 1 |
| if (r0 != 1) {
0x00011f24 moveq r0, r2 | r0 = r2;
| }
| if (r0 == 1) {
0x00011f28 movne r0, r3 | r0 = r3;
| }
0x00011f2c bl 0x11498 | perror (r0);
0x00011f30 b 0x11c7c | goto label_5;
| label_27:
0x00011f34 ldr r0, [sp, 0xc0] | r0 = var_c0h;
0x00011f38 bl 0x1c1f8 | fcn_0001c1f8 (r0);
0x00011f3c mov r2, 0 | r2 = 0;
0x00011f40 ldr r3, [pc, 0x104] | r3 = "offset__.3f";
0x00011f44 bl 0x1c2dc | r0 = fcn_0001c2dc (r0);
0x00011f48 mov r4, r0 | r4 = r0;
0x00011f4c ldr r0, [sp, 0xcc] | r0 = var_cch;
0x00011f50 mov r5, r1 | r5 = r1;
0x00011f54 bl 0x1c1f8 | fcn_0001c1f8 (r0);
0x00011f58 mov r2, 0 | r2 = 0;
0x00011f5c ldr r3, [pc, 0xe8] | r3 = "offset__.3f";
0x00011f60 bl 0x1c2dc | r0 = fcn_0001c2dc (r0);
0x00011f64 mov r6, r0 | r6 = r0;
0x00011f68 ldr r0, [sp, 0xc4] | r0 = var_c4h;
0x00011f6c mov r7, r1 | r7 = r1;
0x00011f70 bl 0x1c1f8 | fcn_0001c1f8 (r0);
0x00011f74 ldr ip, [pc, 0x90] | ip = *(0x0001200c);
0x00011f78 ldr ip, [ip, 0x1e8] | ip = *((ip + 0x1e8));
0x00011f7c tst ip, 0x2000 |
0x00011f80 mov r2, r0 | r2 = r0;
0x00011f84 mov r3, r1 | r3 = r1;
| if ((ip & 0x2000) != 0) {
0x00011f88 beq 0x11fa0 |
0x00011f8c mov r2, 0 | r2 = 0;
0x00011f90 ldr r3, [pc, 0xac] | r3 = " modes %s,\n";
0x00011f94 bl 0x1c548 | r0 = fcn_0001c548 (r0);
0x00011f98 mov r2, r0 | r2 = r0;
0x00011f9c mov r3, r1 | r3 = r1;
| }
0x00011fa0 strd r2, r3, [sp, 8] | __asm ("strd r2, r3, [var_ch]");
0x00011fa4 ldr r0, [pc, 0xdc] | r0 = *(0x12084);
0x00011fa8 mov r2, r4 | r2 = r4;
0x00011fac mov r3, r5 | r3 = r5;
0x00011fb0 strd r6, r7, [sp] | __asm ("strd r6, r7, [sp]");
0x00011fb4 bl 0x11438 | printf (r0, r1, r2, r3, r4, r5, r6)
0x00011fb8 ldr r3, [sp, 0xd8] | r3 = var_d8h;
0x00011fbc ldr r2, [sp, 0xd0] | r2 = var_d0h;
0x00011fc0 str r3, [sp] | *(sp) = r3;
0x00011fc4 ldr r1, [sp, 0xd4] | r1 = var_d4h;
0x00011fc8 ldr r3, [sp, 0xdc] | r3 = var_dch;
0x00011fcc ldr r0, [pc, 0xb8] | r0 = " pps frequency %.3f ppm, stability %.3f ppm, jitter %.3f us,\n";
0x00011fd0 bl 0x11438 | printf (" pps frequency %.3f ppm, stability %.3f ppm, jitter %.3f us,\n", r1, r2, r3)
0x00011fd4 mov r0, 0 | r0 = 0;
0x00011fd8 add sp, sp, 0x19c |
0x00011fdc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
[*] Function printf used 17 times ntptime