; generated by Component: ARM Compiler 5.05 update 2 (build 169) Tool: ArmCC [4d0f38]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\json_util.o --asm_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --list_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --depend=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\json_util.d --cpu=Cortex-M4.fp --apcs=interwork -O0 --diag_suppress=9931,1,1293 -I..\..\..\..\Board\fire_F429 -I..\..\..\..\Demos\fire\ov2640 -I..\..\..\..\include -I..\..\..\..\libraries\utilities -I..\..\..\..\libraries\utilities\json_c -I..\..\..\..\MICO\core -I..\..\..\..\MICO\security -I..\..\..\..\MICO\system -I..\..\..\..\MICO\system\command_console -I..\..\..\..\Platform\include -I..\..\..\..\Platform\Cortex-M4 -I..\..\..\..\Platform\Cortex-M4\CMSIS -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries -I..\..\..\..\Platform\MCU\STM32F4xx\wlan_bus_driver -I..\..\..\..\Platform\Drivers\spi_flash -I..\..\..\..\Platform\Drivers -I..\..\..\..\libraries\daemons\homekit_server -I..\..\..\..\libraries\daemons\http_server -I..\..\..\..\Platform\Drivers\malloc -I..\..\..\..\Platform\Drivers\SDRAM -I..\..\..\..\Platform\Drivers\ov5640 -IG:\GIT_OSC\STM32_develop\F429-V2\develop\6-WIFI\STM32-WiFi\3.wifi_ov5640\Projects\STM32F429\demo\RVMDK\RTE -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -IC:\Keil_v5\ARM\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0 -D__UVISION_VERSION=515 -DSTM32F429xx -DUSE_STDPERIPH_DRIVER -DDEBUG -DHSE_VALUE=25000000 -DOV5640 --omf_browse=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\json_util.crf ..\..\..\..\libraries\utilities\json_c\json_util.c]
                          THUMB

                          AREA ||i.json_parse_int64||, CODE, READONLY, ALIGN=2

                          REQUIRE _scanf_int
                          REQUIRE _printf_percent
                          REQUIRE _printf_d
                          REQUIRE _printf_int_dec
                  json_parse_int64 PROC
;;;133    
;;;134    int json_parse_int64(const char *buf, int64_t *retval)
000000  e92d4ff0          PUSH     {r4-r11,lr}
;;;135    {
000004  b09b              SUB      sp,sp,#0x6c
000006  4680              MOV      r8,r0
000008  4689              MOV      r9,r1
;;;136    	int32_t num64;
;;;137    	if (sscanf(buf, "%d", &num64) != 1)
00000a  aa1a              ADD      r2,sp,#0x68
00000c  a139              ADR      r1,|L1.244|
00000e  4640              MOV      r0,r8
000010  f7fffffe          BL       __0sscanf
000014  2801              CMP      r0,#1
000016  d003              BEQ      |L1.32|
;;;138    	{
;;;139    		MC_DEBUG("Failed to parse, sscanf != 1\n");
;;;140    		return 1;
000018  2001              MOVS     r0,#1
                  |L1.26|
;;;141    	}
;;;142    	const char *buf_skip_space = buf;
;;;143    	int orig_has_neg = 0;
;;;144    	// Skip leading spaces
;;;145    	while (isspace((int)*buf_skip_space) && *buf_skip_space)
;;;146    		buf_skip_space++;
;;;147    	if (*buf_skip_space == '-')
;;;148    	{
;;;149    		buf_skip_space++;
;;;150    		orig_has_neg = 1;
;;;151    	}
;;;152    	// Skip leading zeros, but keep at least one digit
;;;153    	while (buf_skip_space[0] == '0' && buf_skip_space[1] != '\0')
;;;154    		buf_skip_space++;
;;;155    	if (buf_skip_space[0] == '0' && buf_skip_space[1] == '\0')
;;;156    		orig_has_neg = 0; // "-0" is the same as just plain "0"
;;;157    	
;;;158    	if (errno != ERANGE)
;;;159    	{
;;;160    		char buf_cmp[100];
;;;161    		char *buf_cmp_start = buf_cmp;
;;;162    		int recheck_has_neg = 0;
;;;163    		snprintf(buf_cmp_start, sizeof(buf_cmp), "%d", num64);
;;;164                    
;;;165    		if (*buf_cmp_start == '-')
;;;166    		{
;;;167    			recheck_has_neg = 1;
;;;168    			buf_cmp_start++;
;;;169    		}
;;;170    		// No need to skip leading spaces or zeros here.
;;;171    
;;;172    		int buf_cmp_len = strlen(buf_cmp_start);
;;;173    		/**
;;;174    		 * If the sign is different, or
;;;175    		 * some of the digits are different, or
;;;176    		 * there is another digit present in the original string
;;;177    		 * then we NOT successfully parsed the value.
;;;178    		 */
;;;179    		if (orig_has_neg != recheck_has_neg ||
;;;180    		    strncmp(buf_skip_space, buf_cmp_start, strlen(buf_cmp_start)) != 0 ||
;;;181    			(strlen(buf_skip_space) != buf_cmp_len &&
;;;182    			 isdigit((int)buf_skip_space[buf_cmp_len])
;;;183    		    )
;;;184    		   )
;;;185    		{
;;;186    			errno = ERANGE;
;;;187    		}
;;;188    	}
;;;189    	if (errno == ERANGE)
;;;190    	{
;;;191    		if (orig_has_neg)
;;;192    			num64 = INT32_MIN;
;;;193    		else
;;;194    			num64 = INT32_MAX;
;;;195    	}
;;;196    	*retval = num64;
;;;197    	return 0;
;;;198    }
00001a  b01b              ADD      sp,sp,#0x6c
00001c  e8bd8ff0          POP      {r4-r11,pc}
                  |L1.32|
000020  4644              MOV      r4,r8                 ;142
000022  2700              MOVS     r7,#0                 ;143
000024  e000              B        |L1.40|
                  |L1.38|
000026  1c64              ADDS     r4,r4,#1              ;146
                  |L1.40|
000028  f7fffffe          BL       __rt_ctype_table
00002c  6800              LDR      r0,[r0,#0]            ;145
00002e  7821              LDRB     r1,[r4,#0]            ;145
000030  5c40              LDRB     r0,[r0,r1]            ;145
000032  f0000001          AND      r0,r0,#1              ;145
000036  b110              CBZ      r0,|L1.62|
000038  7820              LDRB     r0,[r4,#0]            ;145
00003a  2800              CMP      r0,#0                 ;145
00003c  d1f3              BNE      |L1.38|
                  |L1.62|
00003e  7820              LDRB     r0,[r4,#0]            ;147
000040  282d              CMP      r0,#0x2d              ;147
000042  d101              BNE      |L1.72|
000044  1c64              ADDS     r4,r4,#1              ;149
000046  2701              MOVS     r7,#1                 ;150
                  |L1.72|
000048  e000              B        |L1.76|
                  |L1.74|
00004a  1c64              ADDS     r4,r4,#1              ;154
                  |L1.76|
00004c  7820              LDRB     r0,[r4,#0]            ;153
00004e  2830              CMP      r0,#0x30              ;153
000050  d102              BNE      |L1.88|
000052  7860              LDRB     r0,[r4,#1]            ;153
000054  2800              CMP      r0,#0                 ;153
000056  d1f8              BNE      |L1.74|
                  |L1.88|
000058  7820              LDRB     r0,[r4,#0]            ;155
00005a  2830              CMP      r0,#0x30              ;155
00005c  d102              BNE      |L1.100|
00005e  7860              LDRB     r0,[r4,#1]            ;155
000060  b900              CBNZ     r0,|L1.100|
000062  2700              MOVS     r7,#0                 ;156
                  |L1.100|
000064  f7fffffe          BL       __aeabi_errno_addr
000068  6800              LDR      r0,[r0,#0]            ;158
00006a  2802              CMP      r0,#2                 ;158
00006c  d02f              BEQ      |L1.206|
00006e  ad01              ADD      r5,sp,#4              ;161
000070  f04f0a00          MOV      r10,#0                ;162
000074  a21f              ADR      r2,|L1.244|
000076  2164              MOVS     r1,#0x64              ;163
000078  4628              MOV      r0,r5                 ;163
00007a  9b1a              LDR      r3,[sp,#0x68]         ;163
00007c  f7fffffe          BL       __2snprintf
000080  7828              LDRB     r0,[r5,#0]            ;165
000082  282d              CMP      r0,#0x2d              ;165
000084  d102              BNE      |L1.140|
000086  f04f0a01          MOV      r10,#1                ;167
00008a  1c6d              ADDS     r5,r5,#1              ;168
                  |L1.140|
00008c  4628              MOV      r0,r5                 ;172
00008e  f7fffffe          BL       strlen
000092  4606              MOV      r6,r0                 ;172
000094  4557              CMP      r7,r10                ;179
000096  d115              BNE      |L1.196|
000098  4628              MOV      r0,r5                 ;180
00009a  f7fffffe          BL       strlen
00009e  4683              MOV      r11,r0                ;180
0000a0  465a              MOV      r2,r11                ;180
0000a2  4629              MOV      r1,r5                 ;180
0000a4  4620              MOV      r0,r4                 ;180
0000a6  f7fffffe          BL       strncmp
0000aa  b958              CBNZ     r0,|L1.196|
0000ac  4620              MOV      r0,r4                 ;181
0000ae  f7fffffe          BL       strlen
0000b2  42b0              CMP      r0,r6                 ;181
0000b4  d00a              BEQ      |L1.204|
0000b6  f7fffffe          BL       __rt_ctype_table
0000ba  6800              LDR      r0,[r0,#0]            ;182
0000bc  5da1              LDRB     r1,[r4,r6]            ;182
0000be  5c40              LDRB     r0,[r0,r1]            ;182
0000c0  2820              CMP      r0,#0x20              ;182
0000c2  d103              BNE      |L1.204|
                  |L1.196|
0000c4  f7fffffe          BL       __aeabi_errno_addr
0000c8  2102              MOVS     r1,#2                 ;186
0000ca  6001              STR      r1,[r0,#0]            ;186
                  |L1.204|
0000cc  bf00              NOP                            ;188
                  |L1.206|
0000ce  f7fffffe          BL       __aeabi_errno_addr
0000d2  6800              LDR      r0,[r0,#0]            ;189
0000d4  2802              CMP      r0,#2                 ;189
0000d6  d106              BNE      |L1.230|
0000d8  b117              CBZ      r7,|L1.224|
0000da  0780              LSLS     r0,r0,#30             ;192
0000dc  901a              STR      r0,[sp,#0x68]         ;192
0000de  e002              B        |L1.230|
                  |L1.224|
0000e0  f06f4000          MVN      r0,#0x80000000        ;194
0000e4  901a              STR      r0,[sp,#0x68]         ;194
                  |L1.230|
0000e6  981a              LDR      r0,[sp,#0x68]         ;196
0000e8  17c1              ASRS     r1,r0,#31             ;196
0000ea  e9c90100          STRD     r0,r1,[r9,#0]         ;196
0000ee  2000              MOVS     r0,#0                 ;197
0000f0  e793              B        |L1.26|
;;;199    
                          ENDP

0000f2  0000              DCW      0x0000
                  |L1.244|
0000f4  256400            DCB      "%d",0
0000f7  00                DCB      0

                          AREA ||i.json_type_to_name||, CODE, READONLY, ALIGN=2

                  json_type_to_name PROC
;;;222    
;;;223    const char *json_type_to_name(enum json_type o_type)
000000  4601              MOV      r1,r0
;;;224    {
;;;225    	if (o_type >= NELEM(json_type_name))
000002  2907              CMP      r1,#7
000004  d301              BCC      |L2.10|
;;;226    	{
;;;227    		MC_ERROR("json_type_to_name: type %d is out of range [0,%d]\n", o_type, NELEM(json_type_name));
;;;228    		return NULL;
000006  2000              MOVS     r0,#0
                  |L2.8|
;;;229    	}
;;;230    	return json_type_name[o_type];
;;;231    }
000008  4770              BX       lr
                  |L2.10|
00000a  4802              LDR      r0,|L2.20|
00000c  f8500021          LDR      r0,[r0,r1,LSL #2]     ;230
000010  e7fa              B        |L2.8|
;;;232    
                          ENDP

000012  0000              DCW      0x0000
                  |L2.20|
                          DCD      json_type_name

                          AREA ||.conststring||, DATA, READONLY, MERGE=1, STRINGS, ALIGN=2

000000  6e756c6c          DCB      "null",0
000004  00      
000005  00                DCB      0
000006  00                DCB      0
000007  00                DCB      0
000008  626f6f6c          DCB      "boolean",0
00000c  65616e00
000010  646f7562          DCB      "double",0
000014  6c6500  
000017  00                DCB      0
000018  696e7400          DCB      "int",0
00001c  6f626a65          DCB      "object",0
000020  637400  
000023  00                DCB      0
000024  61727261          DCB      "array",0
000028  7900    
00002a  00                DCB      0
00002b  00                DCB      0
00002c  73747269          DCB      "string",0
000030  6e6700  

                          AREA ||.data||, DATA, ALIGN=2

                  json_type_name
                          DCD      ||.conststring||
                          DCD      ||.conststring||+0x8
                          DCD      ||.conststring||+0x10
                          DCD      ||.conststring||+0x18
                          DCD      ||.conststring||+0x1c
                          DCD      ||.conststring||+0x24
                          DCD      ||.conststring||+0x2c
