
bin/applet-flash-same54p20a.elf:     file format elf32-littlearm


Disassembly of section .text:

20001000 <_stext>:
20001000:	2001fff0 	.word	0x2001fff0
20001004:	200013e5 	.word	0x200013e5
	...

20001040 <mailbox>:
	...

200010c0 <nvm_write_buffer>:
)
{
		
		uint32_t *dst = (uint32_t *)destination_address;
		uint32_t *src = (uint32_t*)buffer;		
		if (destination_address >(FLASH_NB_OF_PAGES * FLASH_PAGE_SIZE))
200010c0:	f5b0 1f80 	cmp.w	r0, #1048576	; 0x100000
200010c4:	d813      	bhi.n	200010ee <nvm_write_buffer+0x2e>
		{
			return STATUS_ERR_BAD_ADDRESS;
		}
		while (0 == NVMCTRL->STATUS.bit.READY);
200010c6:	4a0b      	ldr	r2, [pc, #44]	; (200010f4 <nvm_write_buffer+0x34>)
200010c8:	8a53      	ldrh	r3, [r2, #18]
200010ca:	07db      	lsls	r3, r3, #31
200010cc:	d5fc      	bpl.n	200010c8 <nvm_write_buffer+0x8>
		NVMCTRL->ADDR.reg = destination_address;
200010ce:	4b09      	ldr	r3, [pc, #36]	; (200010f4 <nvm_write_buffer+0x34>)
		for (int i = 0; i < WORDS(FLASH_PAGE_SIZE); i++)
			dst[i] = src[i];
200010d0:	1a09      	subs	r1, r1, r0
		if (destination_address >(FLASH_NB_OF_PAGES * FLASH_PAGE_SIZE))
		{
			return STATUS_ERR_BAD_ADDRESS;
		}
		while (0 == NVMCTRL->STATUS.bit.READY);
		NVMCTRL->ADDR.reg = destination_address;
200010d2:	6158      	str	r0, [r3, #20]
200010d4:	f500 7300 	add.w	r3, r0, #512	; 0x200
		for (int i = 0; i < WORDS(FLASH_PAGE_SIZE); i++)
			dst[i] = src[i];
200010d8:	580a      	ldr	r2, [r1, r0]
200010da:	f840 2b04 	str.w	r2, [r0], #4
		{
			return STATUS_ERR_BAD_ADDRESS;
		}
		while (0 == NVMCTRL->STATUS.bit.READY);
		NVMCTRL->ADDR.reg = destination_address;
		for (int i = 0; i < WORDS(FLASH_PAGE_SIZE); i++)
200010de:	4298      	cmp	r0, r3
200010e0:	d1fa      	bne.n	200010d8 <nvm_write_buffer+0x18>
			dst[i] = src[i];
		while (0 == NVMCTRL->STATUS.bit.READY);
200010e2:	4a04      	ldr	r2, [pc, #16]	; (200010f4 <nvm_write_buffer+0x34>)
200010e4:	8a53      	ldrh	r3, [r2, #18]
200010e6:	07db      	lsls	r3, r3, #31
200010e8:	d5fc      	bpl.n	200010e4 <nvm_write_buffer+0x24>
		return STATUS_OK;
200010ea:	2000      	movs	r0, #0
200010ec:	4770      	bx	lr
		
		uint32_t *dst = (uint32_t *)destination_address;
		uint32_t *src = (uint32_t*)buffer;		
		if (destination_address >(FLASH_NB_OF_PAGES * FLASH_PAGE_SIZE))
		{
			return STATUS_ERR_BAD_ADDRESS;
200010ee:	2018      	movs	r0, #24
		NVMCTRL->ADDR.reg = destination_address;
		for (int i = 0; i < WORDS(FLASH_PAGE_SIZE); i++)
			dst[i] = src[i];
		while (0 == NVMCTRL->STATUS.bit.READY);
		return STATUS_OK;
}
200010f0:	4770      	bx	lr
200010f2:	bf00      	nop
200010f4:	41004000 	.word	0x41004000

200010f8 <nvm_erase_row>:
(
const uint32_t row_address
)
{
		/* Check if the row address is valid */
		if (row_address >((uint32_t)FLASH_PAGE_SIZE * FLASH_NB_OF_PAGES)) 
200010f8:	f5b0 1f80 	cmp.w	r0, #1048576	; 0x100000
200010fc:	d809      	bhi.n	20001112 <nvm_erase_row+0x1a>
		{
			return STATUS_ERR_BAD_ADDRESS;
		}

		NVMCTRL->ADDR.reg = row_address;
200010fe:	4b06      	ldr	r3, [pc, #24]	; (20001118 <nvm_erase_row+0x20>)
		NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | NVMCTRL_CTRLB_CMD_EB;
20001100:	f24a 5201 	movw	r2, #42241	; 0xa501
		if (row_address >((uint32_t)FLASH_PAGE_SIZE * FLASH_NB_OF_PAGES)) 
		{
			return STATUS_ERR_BAD_ADDRESS;
		}

		NVMCTRL->ADDR.reg = row_address;
20001104:	6158      	str	r0, [r3, #20]
		NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | NVMCTRL_CTRLB_CMD_EB;
20001106:	809a      	strh	r2, [r3, #4]
		while (0 == NVMCTRL->STATUS.bit.READY);
20001108:	8a5a      	ldrh	r2, [r3, #18]
2000110a:	07d2      	lsls	r2, r2, #31
2000110c:	d5fc      	bpl.n	20001108 <nvm_erase_row+0x10>
		return STATUS_OK;
2000110e:	2000      	movs	r0, #0
20001110:	4770      	bx	lr
)
{
		/* Check if the row address is valid */
		if (row_address >((uint32_t)FLASH_PAGE_SIZE * FLASH_NB_OF_PAGES)) 
		{
			return STATUS_ERR_BAD_ADDRESS;
20001112:	2018      	movs	r0, #24

		NVMCTRL->ADDR.reg = row_address;
		NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | NVMCTRL_CTRLB_CMD_EB;
		while (0 == NVMCTRL->STATUS.bit.READY);
		return STATUS_OK;
}
20001114:	4770      	bx	lr
20001116:	bf00      	nop
20001118:	41004000 	.word	0x41004000

2000111c <nvm_execute_command>:
const uint32_t address,
const uint32_t parameter
)
{
	
	if (address > ((uint32_t)FLASH_PAGE_SIZE * FLASH_NB_OF_PAGES))
2000111c:	f5b1 1f80 	cmp.w	r1, #1048576	; 0x100000
20001120:	d813      	bhi.n	2000114a <nvm_execute_command+0x2e>
	{
		return STATUS_ERR_BAD_ADDRESS;
	}
	while (0 == NVMCTRL->STATUS.bit.READY)
20001122:	4b0d      	ldr	r3, [pc, #52]	; (20001158 <nvm_execute_command+0x3c>)
20001124:	8a5a      	ldrh	r2, [r3, #18]
20001126:	07d2      	lsls	r2, r2, #31
20001128:	d511      	bpl.n	2000114e <nvm_execute_command+0x32>
	{
		return STATUS_BUSY;
	}
	switch (command)
2000112a:	2812      	cmp	r0, #18
2000112c:	d003      	beq.n	20001136 <nvm_execute_command+0x1a>
2000112e:	2816      	cmp	r0, #22
20001130:	d002      	beq.n	20001138 <nvm_execute_command+0x1c>
20001132:	2811      	cmp	r0, #17
20001134:	d10d      	bne.n	20001152 <nvm_execute_command+0x36>
	{
		case NVM_COMMAND_LOCK_REGION: NVMCTRL->ADDR.reg = address;
										break;
		case NVM_COMMAND_UNLOCK_REGION: NVMCTRL->ADDR.reg = address;
20001136:	6159      	str	r1, [r3, #20]
										break;
		case NVM_COMMAND_SET_SECURITY_BIT: break;
		default:	return STATUS_ERR_INVALID_ARG;	
	}
	NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | command;
20001138:	4b07      	ldr	r3, [pc, #28]	; (20001158 <nvm_execute_command+0x3c>)
2000113a:	f440 4025 	orr.w	r0, r0, #42240	; 0xa500
2000113e:	8098      	strh	r0, [r3, #4]
	while (0 == NVMCTRL->STATUS.bit.READY);
20001140:	8a5a      	ldrh	r2, [r3, #18]
20001142:	07d2      	lsls	r2, r2, #31
20001144:	d5fc      	bpl.n	20001140 <nvm_execute_command+0x24>
	return STATUS_OK;
20001146:	2000      	movs	r0, #0
20001148:	4770      	bx	lr
)
{
	
	if (address > ((uint32_t)FLASH_PAGE_SIZE * FLASH_NB_OF_PAGES))
	{
		return STATUS_ERR_BAD_ADDRESS;
2000114a:	2018      	movs	r0, #24
2000114c:	4770      	bx	lr
	}
	while (0 == NVMCTRL->STATUS.bit.READY)
	{
		return STATUS_BUSY;
2000114e:	2005      	movs	r0, #5
20001150:	4770      	bx	lr
		case NVM_COMMAND_LOCK_REGION: NVMCTRL->ADDR.reg = address;
										break;
		case NVM_COMMAND_UNLOCK_REGION: NVMCTRL->ADDR.reg = address;
										break;
		case NVM_COMMAND_SET_SECURITY_BIT: break;
		default:	return STATUS_ERR_INVALID_ARG;	
20001152:	2017      	movs	r0, #23
	}
	NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | command;
	while (0 == NVMCTRL->STATUS.bit.READY);
	return STATUS_OK;
}
20001154:	4770      	bx	lr
20001156:	bf00      	nop
20001158:	41004000 	.word	0x41004000

2000115c <nvm_is_page_locked>:
{
		uint16_t pages_in_region;
		uint32_t region_number;
		pages_in_region = FLASH_NB_OF_PAGES / 32;
		region_number = page_number / pages_in_region;
		return !(NVMCTRL->RUNLOCK.reg & (1 << region_number));
2000115c:	4b05      	ldr	r3, [pc, #20]	; (20001174 <nvm_is_page_locked+0x18>)
2000115e:	0980      	lsrs	r0, r0, #6
20001160:	699a      	ldr	r2, [r3, #24]
20001162:	2301      	movs	r3, #1
20001164:	fa03 f000 	lsl.w	r0, r3, r0
20001168:	4210      	tst	r0, r2
}
2000116a:	bf0c      	ite	eq
2000116c:	4618      	moveq	r0, r3
2000116e:	2000      	movne	r0, #0
20001170:	4770      	bx	lr
20001172:	bf00      	nop
20001174:	41004000 	.word	0x41004000

20001178 <nvm_init>:
void nvm_init(void)
{
	MCLK->APBBMASK.reg |= MCLK_APBBMASK_NVMCTRL;
20001178:	4a07      	ldr	r2, [pc, #28]	; (20001198 <nvm_init+0x20>)
2000117a:	6993      	ldr	r3, [r2, #24]
2000117c:	f043 0304 	orr.w	r3, r3, #4
20001180:	6193      	str	r3, [r2, #24]
	MCLK->AHBMASK.reg |= MCLK_AHBMASK_NVMCTRL | MCLK_AHBMASK_NVMCTRL_CACHE;
20001182:	6913      	ldr	r3, [r2, #16]
20001184:	f443 0300 	orr.w	r3, r3, #8388608	; 0x800000
20001188:	f043 0340 	orr.w	r3, r3, #64	; 0x40
2000118c:	6113      	str	r3, [r2, #16]
	NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CACHEDIS1 | NVMCTRL_CTRLA_CACHEDIS0 | NVMCTRL_CTRLA_AUTOWS | NVMCTRL_CTRLA_WMODE_AP;
2000118e:	4b03      	ldr	r3, [pc, #12]	; (2000119c <nvm_init+0x24>)
20001190:	f24c 0234 	movw	r2, #49204	; 0xc034
20001194:	801a      	strh	r2, [r3, #0]
20001196:	4770      	bx	lr
20001198:	40000800 	.word	0x40000800
2000119c:	41004000 	.word	0x41004000

200011a0 <applet_nvm_islocked>:
    } argument;
};


bool applet_nvm_islocked(uint32_t addstart,uint32_t addend)
{
200011a0:	b570      	push	{r4, r5, r6, lr}
	//Get region number from address
	page_end = (addend - FLASH_ADDR) / FLASH_PAGE_SIZE;

	//Now check that all regions between start and end (included) are not locked
	for (page = page_start; page <= page_end; page++) {
		if (nvm_is_page_locked(page)) {
200011a2:	4e07      	ldr	r6, [pc, #28]	; (200011c0 <applet_nvm_islocked+0x20>)
	uint16_t page_start;
	uint16_t page_end;
	uint16_t page;

	//Get region number from address
	page_start = (addstart - FLASH_ADDR) / FLASH_PAGE_SIZE;
200011a4:	f3c0 244f 	ubfx	r4, r0, #9, #16
	//Get region number from address
	page_end = (addend - FLASH_ADDR) / FLASH_PAGE_SIZE;
200011a8:	f3c1 254f 	ubfx	r5, r1, #9, #16

	//Now check that all regions between start and end (included) are not locked
	for (page = page_start; page <= page_end; page++) {
200011ac:	42ac      	cmp	r4, r5
200011ae:	d805      	bhi.n	200011bc <applet_nvm_islocked+0x1c>
		if (nvm_is_page_locked(page)) {
200011b0:	4620      	mov	r0, r4
200011b2:	47b0      	blx	r6
200011b4:	b918      	cbnz	r0, 200011be <applet_nvm_islocked+0x1e>
	page_start = (addstart - FLASH_ADDR) / FLASH_PAGE_SIZE;
	//Get region number from address
	page_end = (addend - FLASH_ADDR) / FLASH_PAGE_SIZE;

	//Now check that all regions between start and end (included) are not locked
	for (page = page_start; page <= page_end; page++) {
200011b6:	3401      	adds	r4, #1
200011b8:	b2a4      	uxth	r4, r4
200011ba:	e7f7      	b.n	200011ac <applet_nvm_islocked+0xc>
		if (nvm_is_page_locked(page)) {
			return (true);
		}
	}
	//No locked region found
	return (false);
200011bc:	2000      	movs	r0, #0
}
200011be:	bd70      	pop	{r4, r5, r6, pc}
200011c0:	2000115d 	.word	0x2000115d

200011c4 <applet_nvm_memcpy>:
enum status_code applet_nvm_memcpy(
		const uint32_t destination_address,
		uint8_t *const buffer,
		uint16_t length,
		bool erase_flag)
{
200011c4:	b5f8      	push	{r3, r4, r5, r6, r7, lr}
	enum status_code error_code = STATUS_OK;
	uint32_t i;
	/* Calculate the starting row address of the page to update */
	uint32_t row_start_address =
200011c6:	f420 55ff 	bic.w	r5, r0, #8160	; 0x1fe0
enum status_code applet_nvm_memcpy(
		const uint32_t destination_address,
		uint8_t *const buffer,
		uint16_t length,
		bool erase_flag)
{
200011ca:	460e      	mov	r6, r1
200011cc:	4614      	mov	r4, r2
	enum status_code error_code = STATUS_OK;
	uint32_t i;
	/* Calculate the starting row address of the page to update */
	uint32_t row_start_address =
200011ce:	f025 051f 	bic.w	r5, r5, #31
			destination_address & ~((FLASH_PAGE_SIZE * NVMCTRL_ROW_PAGES) - 1);

		if (erase_flag) {
200011d2:	b91b      	cbnz	r3, 200011dc <applet_nvm_memcpy+0x18>
			if (error_code != STATUS_OK) 
			{
				return error_code;
			}
		}
		if (length < (FLASH_PAGE_SIZE * 16))
200011d4:	f5b4 5f00 	cmp.w	r4, #8192	; 0x2000
200011d8:	d306      	bcc.n	200011e8 <applet_nvm_memcpy+0x24>
200011da:	e00c      	b.n	200011f6 <applet_nvm_memcpy+0x32>
	uint32_t row_start_address =
			destination_address & ~((FLASH_PAGE_SIZE * NVMCTRL_ROW_PAGES) - 1);

		if (erase_flag) {
			/* Erase the row */
				error_code = nvm_erase_row(row_start_address);
200011dc:	4628      	mov	r0, r5
200011de:	4b0e      	ldr	r3, [pc, #56]	; (20001218 <applet_nvm_memcpy+0x54>)
200011e0:	4798      	blx	r3
				
			if (error_code != STATUS_OK) 
200011e2:	2800      	cmp	r0, #0
200011e4:	d0f6      	beq.n	200011d4 <applet_nvm_memcpy+0x10>
200011e6:	bdf8      	pop	{r3, r4, r5, r6, r7, pc}
				return error_code;
			}
		}
		if (length < (FLASH_PAGE_SIZE * 16))
		{
			for (int j = length; j < (FLASH_PAGE_SIZE * NVMCTRL_ROW_PAGES); j++)
200011e8:	4622      	mov	r2, r4
			{
				*(buffer + j) = 0xff;
200011ea:	23ff      	movs	r3, #255	; 0xff
200011ec:	54b3      	strb	r3, [r6, r2]
				return error_code;
			}
		}
		if (length < (FLASH_PAGE_SIZE * 16))
		{
			for (int j = length; j < (FLASH_PAGE_SIZE * NVMCTRL_ROW_PAGES); j++)
200011ee:	3201      	adds	r2, #1
200011f0:	f5b2 5f00 	cmp.w	r2, #8192	; 0x2000
200011f4:	d1fa      	bne.n	200011ec <applet_nvm_memcpy+0x28>
enum status_code applet_nvm_memcpy(
		const uint32_t destination_address,
		uint8_t *const buffer,
		uint16_t length,
		bool erase_flag)
{
200011f6:	2400      	movs	r4, #0
			}
		}

		/* Write the updated row contents to the erased row */
		for (i = 0; i < NVMCTRL_ROW_PAGES; i++) {
				error_code = nvm_write_buffer(
200011f8:	4f08      	ldr	r7, [pc, #32]	; (2000121c <applet_nvm_memcpy+0x58>)
200011fa:	e004      	b.n	20001206 <applet_nvm_memcpy+0x42>
200011fc:	f504 7400 	add.w	r4, r4, #512	; 0x200
				*(buffer + j) = 0xff;
			}
		}

		/* Write the updated row contents to the erased row */
		for (i = 0; i < NVMCTRL_ROW_PAGES; i++) {
20001200:	f5b4 5f00 	cmp.w	r4, #8192	; 0x2000
20001204:	d006      	beq.n	20001214 <applet_nvm_memcpy+0x50>
				error_code = nvm_write_buffer(
20001206:	f44f 7200 	mov.w	r2, #512	; 0x200
2000120a:	1931      	adds	r1, r6, r4
2000120c:	1928      	adds	r0, r5, r4
2000120e:	47b8      	blx	r7
				row_start_address + (i * FLASH_PAGE_SIZE),
				(buffer + (i * FLASH_PAGE_SIZE)), FLASH_PAGE_SIZE);
			if (error_code != STATUS_OK) {
20001210:	2800      	cmp	r0, #0
20001212:	d0f3      	beq.n	200011fc <applet_nvm_memcpy+0x38>
				return error_code;
			}
		}
	return STATUS_OK;
}
20001214:	bdf8      	pop	{r3, r4, r5, r6, r7, pc}
20001216:	bf00      	nop
20001218:	200010f9 	.word	0x200010f9
2000121c:	200010c1 	.word	0x200010c1

20001220 <main>:
 *
 * \param argc  always 1
 * \param argv  Address of the argument area..
 */
int main(int argc, char **argv)
{
20001220:	e92d 43f8 	stmdb	sp!, {r3, r4, r5, r6, r7, r8, r9, lr}

	// Save info of communication link
	comType = pMailbox->argument.inputInit.comType;

	//Applet vars are cleared on every load
	flashBaseAddr       = FLASH_ADDR;
20001224:	4d63      	ldr	r5, [pc, #396]	; (200013b4 <main+0x194>)
 */
int main(int argc, char **argv)
{
	struct _Mailbox *pMailbox = (struct _Mailbox *) argv;
	enum status_code status;
	nvm_init();
20001226:	4b64      	ldr	r3, [pc, #400]	; (200013b8 <main+0x198>)
 *
 * \param argc  always 1
 * \param argv  Address of the argument area..
 */
int main(int argc, char **argv)
{
20001228:	460c      	mov	r4, r1

	// Save info of communication link
	comType = pMailbox->argument.inputInit.comType;

	//Applet vars are cleared on every load
	flashBaseAddr       = FLASH_ADDR;
2000122a:	f04f 0800 	mov.w	r8, #0
 */
int main(int argc, char **argv)
{
	struct _Mailbox *pMailbox = (struct _Mailbox *) argv;
	enum status_code status;
	nvm_init();
2000122e:	4798      	blx	r3
	comType = pMailbox->argument.inputInit.comType;

	//Applet vars are cleared on every load
	flashBaseAddr       = FLASH_ADDR;
	flashBaseAddrInit   = FLASH_ADDR;
	flashSize           = FLASH_SIZE;
20001230:	f44f 1380 	mov.w	r3, #1048576	; 0x100000

	// Save info of communication link
	comType = pMailbox->argument.inputInit.comType;

	//Applet vars are cleared on every load
	flashBaseAddr       = FLASH_ADDR;
20001234:	f8c5 8000 	str.w	r8, [r5]
	flashBaseAddrInit   = FLASH_ADDR;
20001238:	f8c5 8004 	str.w	r8, [r5, #4]
	flashSize           = FLASH_SIZE;
2000123c:	60ab      	str	r3, [r5, #8]
	flashPageSize       = FLASH_PAGE_SIZE;
2000123e:	f44f 7300 	mov.w	r3, #512	; 0x200
20001242:	60eb      	str	r3, [r5, #12]
	flashNbLockBits     = 32; //Hardcoded
20001244:	2320      	movs	r3, #32
20001246:	612b      	str	r3, [r5, #16]
	flashNbPagesOneRow  = 16; //Hardcoded

	/*----------------------------------------------------------
	 * INIT:
	 *----------------------------------------------------------*/
	if (pMailbox->command == APPLET_CMD_INIT) {
20001248:	6826      	ldr	r6, [r4, #0]
	flashBaseAddr       = FLASH_ADDR;
	flashBaseAddrInit   = FLASH_ADDR;
	flashSize           = FLASH_SIZE;
	flashPageSize       = FLASH_PAGE_SIZE;
	flashNbLockBits     = 32; //Hardcoded
	flashLockRegionSize = flashSize/flashNbLockBits;
2000124a:	68ab      	ldr	r3, [r5, #8]
2000124c:	692a      	ldr	r2, [r5, #16]
2000124e:	fbb3 f3f2 	udiv	r3, r3, r2
20001252:	616b      	str	r3, [r5, #20]
	flashNbPagesOneRow  = 16; //Hardcoded
20001254:	2310      	movs	r3, #16
	enum status_code status;
	nvm_init();
	uint32_t bytesToWrite, bufferAddr, memoryOffset;

	// Save info of communication link
	comType = pMailbox->argument.inputInit.comType;
20001256:	68a7      	ldr	r7, [r4, #8]
	flashBaseAddrInit   = FLASH_ADDR;
	flashSize           = FLASH_SIZE;
	flashPageSize       = FLASH_PAGE_SIZE;
	flashNbLockBits     = 32; //Hardcoded
	flashLockRegionSize = flashSize/flashNbLockBits;
	flashNbPagesOneRow  = 16; //Hardcoded
20001258:	61ab      	str	r3, [r5, #24]
2000125a:	46a9      	mov	r9, r5

	/*----------------------------------------------------------
	 * INIT:
	 *----------------------------------------------------------*/
	if (pMailbox->command == APPLET_CMD_INIT) {
2000125c:	b9ce      	cbnz	r6, 20001292 <main+0x72>
		/*  Re-configurate UART   (MCK maybe change in LowLevelInit())  */
		//UART_Configure(115200, BOARD_MCK);
		/* flash accesses must be 4 bytes aligned */
		pMailbox->argument.outputInit.bufferAddress = ((uint32_t) &end);
2000125e:	4b57      	ldr	r3, [pc, #348]	; (200013bc <main+0x19c>)
20001260:	60e3      	str	r3, [r4, #12]
					- ( ((uint32_t) &end) - HSRAM_ADDR )  /* program size (romcode, code+data) */
					- STACK_SIZE;                         /* stack size at the end */
		/* integer number of pages can be contained in each buffer.
		 * operation is : buffersize -= bufferSize % flashPageSize */
		/* modulo can be done with a mask since flashpagesize is a power of two integer */
		bufferSize = (16 * flashPageSize);
20001262:	68eb      	ldr	r3, [r5, #12]
20001264:	011b      	lsls	r3, r3, #4
20001266:	61eb      	str	r3, [r5, #28]
		//Timeout issue
		//bufferSize = (bufferSize/flashPageSize)*flashPageSize;
		//bufferSize = 128 * flashPageSize;
		pMailbox->argument.outputInit.bufferSize = bufferSize;
20001268:	6123      	str	r3, [r4, #16]
		pMailbox->argument.outputInit.memorySize = flashSize;
2000126a:	68ab      	ldr	r3, [r5, #8]
2000126c:	60a3      	str	r3, [r4, #8]
		pMailbox->argument.outputInit.memoryInfo.lockRegionSize = flashLockRegionSize;
2000126e:	696b      	ldr	r3, [r5, #20]
20001270:	82a3      	strh	r3, [r4, #20]
		pMailbox->argument.outputInit.memoryInfo.numbersLockBits = flashNbLockBits;
20001272:	692b      	ldr	r3, [r5, #16]
20001274:	82e3      	strh	r3, [r4, #22]
		pMailbox->argument.outputInit.pageSize = flashPageSize;
20001276:	68eb      	ldr	r3, [r5, #12]
20001278:	61a3      	str	r3, [r4, #24]
		pMailbox->argument.outputInit.nbPages = flashSize/flashPageSize;
2000127a:	68ab      	ldr	r3, [r5, #8]
2000127c:	68ea      	ldr	r2, [r5, #12]
2000127e:	fbb3 f3f2 	udiv	r3, r3, r2
		pMailbox->argument.outputInit.appStartPage = MONITOR_SIZE/flashPageSize;
20001282:	68ea      	ldr	r2, [r5, #12]
		pMailbox->argument.outputInit.bufferSize = bufferSize;
		pMailbox->argument.outputInit.memorySize = flashSize;
		pMailbox->argument.outputInit.memoryInfo.lockRegionSize = flashLockRegionSize;
		pMailbox->argument.outputInit.memoryInfo.numbersLockBits = flashNbLockBits;
		pMailbox->argument.outputInit.pageSize = flashPageSize;
		pMailbox->argument.outputInit.nbPages = flashSize/flashPageSize;
20001284:	61e3      	str	r3, [r4, #28]
		pMailbox->argument.outputInit.appStartPage = MONITOR_SIZE/flashPageSize;
20001286:	f44f 5300 	mov.w	r3, #8192	; 0x2000
2000128a:	fbb3 f3f2 	udiv	r3, r3, r2
2000128e:	6223      	str	r3, [r4, #32]
20001290:	e069      	b.n	20001366 <main+0x146>
		pMailbox->status = APPLET_SUCCESS;
	}
	/*-----------------------------------------------------------
	 * ERASE APP SECTION :
	 *-----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_ERASE_APP) {
20001292:	2e44      	cmp	r6, #68	; 0x44
20001294:	d114      	bne.n	200012c0 <main+0xa0>
		row = pMailbox->argument.inputEraseApp.start_row;
20001296:	b2bf      	uxth	r7, r7
		TRACE_INFO("ERASE APP command \n\r");
		do {
			/* Erase the flash row */
			while (nvm_erase_row(row * 16 * FLASH_PAGE_SIZE) != STATUS_OK);
20001298:	4e49      	ldr	r6, [pc, #292]	; (200013c0 <main+0x1a0>)
	}
	/*-----------------------------------------------------------
	 * ERASE APP SECTION :
	 *-----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_ERASE_APP) {
		row = pMailbox->argument.inputEraseApp.start_row;
2000129a:	842f      	strh	r7, [r5, #32]
		TRACE_INFO("ERASE APP command \n\r");
		do {
			/* Erase the flash row */
			while (nvm_erase_row(row * 16 * FLASH_PAGE_SIZE) != STATUS_OK);
2000129c:	f8b9 0020 	ldrh.w	r0, [r9, #32]
200012a0:	b280      	uxth	r0, r0
200012a2:	0340      	lsls	r0, r0, #13
200012a4:	47b0      	blx	r6
200012a6:	2800      	cmp	r0, #0
200012a8:	d1f8      	bne.n	2000129c <main+0x7c>
			row++;
200012aa:	8c2b      	ldrh	r3, [r5, #32]
		} while(row < pMailbox->argument.inputEraseApp.end_row);
200012ac:	68e2      	ldr	r2, [r4, #12]
		row = pMailbox->argument.inputEraseApp.start_row;
		TRACE_INFO("ERASE APP command \n\r");
		do {
			/* Erase the flash row */
			while (nvm_erase_row(row * 16 * FLASH_PAGE_SIZE) != STATUS_OK);
			row++;
200012ae:	3301      	adds	r3, #1
200012b0:	b29b      	uxth	r3, r3
200012b2:	842b      	strh	r3, [r5, #32]
		} while(row < pMailbox->argument.inputEraseApp.end_row);
200012b4:	8c2b      	ldrh	r3, [r5, #32]
200012b6:	b29b      	uxth	r3, r3
200012b8:	4293      	cmp	r3, r2
200012ba:	d3ef      	bcc.n	2000129c <main+0x7c>

		TRACE_INFO("Application area erased\n\r");
		pMailbox->status = APPLET_SUCCESS;
200012bc:	2300      	movs	r3, #0
200012be:	e00b      	b.n	200012d8 <main+0xb8>
	}
	/*----------------------------------------------------------
	 * WRITE:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_WRITE) {
200012c0:	2e02      	cmp	r6, #2
200012c2:	d12a      	bne.n	2000131a <main+0xfa>

		memoryOffset  = pMailbox->argument.inputWrite.memoryOffset;
200012c4:	f8d4 8010 	ldr.w	r8, [r4, #16]

		TRACE_INFO("WRITE at offset: 0x%x buffer at : 0x%x of: 0x%x Bytes (flash base addr : 0x%x)\n\r",
				(uint32_t)memoryOffset, (uint32_t)bufferAddr,
				(uint32_t)bytesToWrite, (uint32_t)flashBaseAddr);
		//Protect monitor address space from write
		if ((flashBaseAddr + memoryOffset) < MONITOR_SIZE) {
200012c8:	682b      	ldr	r3, [r5, #0]
200012ca:	4443      	add	r3, r8
200012cc:	f5b3 5f00 	cmp.w	r3, #8192	; 0x2000
200012d0:	d204      	bcs.n	200012dc <main+0xbc>
			//Forbidden !
			TRACE_INFO("Error write operation\n\r");
			pMailbox->argument.outputWrite.bytesWritten = 0;
200012d2:	2300      	movs	r3, #0
200012d4:	60a3      	str	r3, [r4, #8]
			pMailbox->status = APPLET_WRITE_FAIL;
200012d6:	2302      	movs	r3, #2
200012d8:	6063      	str	r3, [r4, #4]
			goto exit;
200012da:	e060      	b.n	2000139e <main+0x17e>
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_WRITE) {

		memoryOffset  = pMailbox->argument.inputWrite.memoryOffset;
		bufferAddr    = pMailbox->argument.inputWrite.bufferAddr;
		bytesToWrite  = pMailbox->argument.inputWrite.bufferSize;
200012dc:	f8d4 900c 	ldr.w	r9, [r4, #12]
			pMailbox->argument.outputWrite.bytesWritten = 0;
			pMailbox->status = APPLET_WRITE_FAIL;
			goto exit;
		}
		/* Check if one of the given regions is locked */
		if (applet_nvm_islocked(flashBaseAddr + memoryOffset, (flashBaseAddr + memoryOffset + bytesToWrite)-1) != 0) {
200012e0:	6828      	ldr	r0, [r5, #0]
200012e2:	6829      	ldr	r1, [r5, #0]
200012e4:	eb08 0309 	add.w	r3, r8, r9
200012e8:	3b01      	subs	r3, #1
200012ea:	4419      	add	r1, r3
200012ec:	4440      	add	r0, r8
200012ee:	4b35      	ldr	r3, [pc, #212]	; (200013c4 <main+0x1a4>)
200012f0:	4798      	blx	r3
200012f2:	2800      	cmp	r0, #0
200012f4:	d1ed      	bne.n	200012d2 <main+0xb2>
			pMailbox->status = APPLET_WRITE_FAIL;
			goto exit;
		}

		TRACE_INFO("Write <%x> bytes from <#%x> \n\r", (uint32_t )writeSize, (uint32_t )memoryOffset );
		if (applet_nvm_memcpy(flashBaseAddr + memoryOffset, (uint8_t *const)bufferAddr, bytesToWrite, (((flashBaseAddr + memoryOffset) & 0xFF) == 0)) != STATUS_OK) {
200012f6:	6828      	ldr	r0, [r5, #0]
200012f8:	682b      	ldr	r3, [r5, #0]
200012fa:	4d33      	ldr	r5, [pc, #204]	; (200013c8 <main+0x1a8>)
200012fc:	4443      	add	r3, r8
200012fe:	b2db      	uxtb	r3, r3
20001300:	fab3 f383 	clz	r3, r3
20001304:	095b      	lsrs	r3, r3, #5
20001306:	fa1f f289 	uxth.w	r2, r9
2000130a:	4639      	mov	r1, r7
2000130c:	4440      	add	r0, r8
2000130e:	47a8      	blx	r5
			TRACE_INFO("Error in write operation\n\r");
			pMailbox->argument.outputWrite.bytesWritten = bytesToWrite;
20001310:	f8c4 9008 	str.w	r9, [r4, #8]
			pMailbox->status = APPLET_WRITE_FAIL;
			goto exit;
		}

		TRACE_INFO("Write <%x> bytes from <#%x> \n\r", (uint32_t )writeSize, (uint32_t )memoryOffset );
		if (applet_nvm_memcpy(flashBaseAddr + memoryOffset, (uint8_t *const)bufferAddr, bytesToWrite, (((flashBaseAddr + memoryOffset) & 0xFF) == 0)) != STATUS_OK) {
20001314:	bb38      	cbnz	r0, 20001366 <main+0x146>
			goto exit;
		}

		TRACE_INFO("Write achieved\n\r");
		pMailbox->argument.outputWrite.bytesWritten = bytesToWrite;
		pMailbox->status = APPLET_SUCCESS;
20001316:	6060      	str	r0, [r4, #4]
20001318:	e041      	b.n	2000139e <main+0x17e>
	}

	/*----------------------------------------------------------
	 * READ:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_READ) {
2000131a:	2e03      	cmp	r6, #3
2000131c:	d10a      	bne.n	20001334 <main+0x114>
		memoryOffset = pMailbox->argument.inputRead.memoryOffset;
		bufferAddr   = pMailbox->argument.inputRead.bufferAddr;
		bufferSize   = pMailbox->argument.inputRead.bufferSize;
2000131e:	68e6      	ldr	r6, [r4, #12]
					(uint32_t)memoryOffset, (uint32_t)bufferAddr,
					(uint32_t)bufferSize,
					(uint32_t)flashBaseAddr);

		/* read data */
		memcpy((void *)bufferAddr, (void *)(flashBaseAddr + memoryOffset), bufferSize);
20001320:	682b      	ldr	r3, [r5, #0]

	/*----------------------------------------------------------
	 * READ:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_READ) {
		memoryOffset = pMailbox->argument.inputRead.memoryOffset;
20001322:	6921      	ldr	r1, [r4, #16]
		bufferAddr   = pMailbox->argument.inputRead.bufferAddr;
		bufferSize   = pMailbox->argument.inputRead.bufferSize;
20001324:	61ee      	str	r6, [r5, #28]
					(uint32_t)memoryOffset, (uint32_t)bufferAddr,
					(uint32_t)bufferSize,
					(uint32_t)flashBaseAddr);

		/* read data */
		memcpy((void *)bufferAddr, (void *)(flashBaseAddr + memoryOffset), bufferSize);
20001326:	4419      	add	r1, r3
20001328:	4632      	mov	r2, r6
2000132a:	4638      	mov	r0, r7
2000132c:	4b27      	ldr	r3, [pc, #156]	; (200013cc <main+0x1ac>)
2000132e:	4798      	blx	r3
		TRACE_INFO("Read achieved\n\r");
		pMailbox->argument.outputRead.bytesRead = bufferSize;
20001330:	60a6      	str	r6, [r4, #8]
20001332:	e027      	b.n	20001384 <main+0x164>
	}

	/*----------------------------------------------------------
	 * READ:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_READ_DEVICE_ID) {
20001334:	2e41      	cmp	r6, #65	; 0x41
20001336:	d105      	bne.n	20001344 <main+0x124>
		TRACE_INFO("READ DEVICE ID command \n\r");
		*((uint32_t *)(pMailbox->argument.inputReadUniqueID.bufferAddr)) = DSU->DID.reg;
20001338:	4b25      	ldr	r3, [pc, #148]	; (200013d0 <main+0x1b0>)
2000133a:	699b      	ldr	r3, [r3, #24]
2000133c:	603b      	str	r3, [r7, #0]
		TRACE_INFO("Read achieved\n\r");
		pMailbox->argument.outputRead.bytesRead = bufferSize;
2000133e:	69eb      	ldr	r3, [r5, #28]
20001340:	60a3      	str	r3, [r4, #8]
20001342:	e01f      	b.n	20001384 <main+0x164>
		pMailbox->status = APPLET_SUCCESS;
	}
	/*----------------------------------------------------------
	 * LOCK SECTOR/REGION:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_LOCK) {
20001344:	2e04      	cmp	r6, #4
20001346:	d104      	bne.n	20001352 <main+0x132>
		TRACE_INFO("LOCK command \n\r");

		status = nvm_execute_command(NVM_COMMAND_LOCK_REGION,
20001348:	6969      	ldr	r1, [r5, #20]
2000134a:	4642      	mov	r2, r8
2000134c:	4379      	muls	r1, r7
2000134e:	2011      	movs	r0, #17
20001350:	e005      	b.n	2000135e <main+0x13e>
	}

	/*----------------------------------------------------------
	 * UNLOCK SECTOR:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_UNLOCK) {
20001352:	2e05      	cmp	r6, #5
20001354:	d109      	bne.n	2000136a <main+0x14a>
		TRACE_INFO("UNLOCK command \n\r");

		status = nvm_execute_command(NVM_COMMAND_UNLOCK_REGION,
20001356:	6969      	ldr	r1, [r5, #20]
20001358:	4642      	mov	r2, r8
2000135a:	4379      	muls	r1, r7
2000135c:	2012      	movs	r0, #18
2000135e:	4b1d      	ldr	r3, [pc, #116]	; (200013d4 <main+0x1b4>)
20001360:	4798      	blx	r3
			(pMailbox->argument.inputUnlock.row * flashLockRegionSize), 0);

		if (status != STATUS_OK) {
20001362:	2800      	cmp	r0, #0
20001364:	d0aa      	beq.n	200012bc <main+0x9c>
			TRACE_INFO("Unlock failed! \n\r");
			pMailbox->status = APPLET_UNPROTECT_FAIL;
20001366:	6066      	str	r6, [r4, #4]
			goto exit;
20001368:	e019      	b.n	2000139e <main+0x17e>
	}

	/*----------------------------------------------------------
	 * READ LOCKS:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_READ_LOCKS) {
2000136a:	2e42      	cmp	r6, #66	; 0x42
2000136c:	d103      	bne.n	20001376 <main+0x156>
		TRACE_INFO("READ LOCKS command \n\r");

		*((uint32_t *)(pMailbox->argument.outputReadLocks.bufferAddr)) = NVMCTRL->RUNLOCK.reg;
2000136e:	4b1a      	ldr	r3, [pc, #104]	; (200013d8 <main+0x1b8>)
20001370:	699b      	ldr	r3, [r3, #24]
20001372:	603b      	str	r3, [r7, #0]
20001374:	e006      	b.n	20001384 <main+0x164>
	}

	/*----------------------------------------------------------
	 * READ FUSES:
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_READ_FUSES) {
20001376:	2e43      	cmp	r6, #67	; 0x43
20001378:	d107      	bne.n	2000138a <main+0x16a>
		TRACE_INFO("READ FUSES command \n\r");

		*((uint64_t *)(pMailbox->argument.outputReadFuses.bufferAddr)) = *(uint64_t *)NVMCTRL_USER;
2000137a:	4b18      	ldr	r3, [pc, #96]	; (200013dc <main+0x1bc>)
2000137c:	e9d3 2300 	ldrd	r2, r3, [r3]
20001380:	e9c7 2300 	strd	r2, r3, [r7]

		TRACE_INFO("Reading fuses achieved");
		pMailbox->status = APPLET_SUCCESS;
20001384:	f8c4 8004 	str.w	r8, [r4, #4]
20001388:	e009      	b.n	2000139e <main+0x17e>
	}

	/*----------------------------------------------------------
	 * SET SECURITY BIT :
	 *----------------------------------------------------------*/
	else if (pMailbox->command == APPLET_CMD_SECURITY) {
2000138a:	2e07      	cmp	r6, #7
2000138c:	d107      	bne.n	2000139e <main+0x17e>
		if (pMailbox->argument.inputSecurity.action > 0) {
2000138e:	2f00      	cmp	r7, #0
20001390:	d094      	beq.n	200012bc <main+0x9c>
			TRACE_INFO("Setting secure state! \n\r");
			//flashcalw_activate_security_bit();
			nvm_execute_command(NVM_COMMAND_SET_SECURITY_BIT, 0, 0);
20001392:	2200      	movs	r2, #0
20001394:	4611      	mov	r1, r2
20001396:	4b0f      	ldr	r3, [pc, #60]	; (200013d4 <main+0x1b4>)
20001398:	2016      	movs	r0, #22
2000139a:	4798      	blx	r3
2000139c:	e78e      	b.n	200012bc <main+0x9c>
	/* Acknowledge the end of command */
	TRACE_INFO("\tEnd of Applet %x %x.\n\r",
				(uint32_t)pMailbox->command,
				(uint32_t)pMailbox->status);
	/* Notify the host application of the end of the command processing */
	pMailbox->command = ~(pMailbox->command);
2000139e:	6823      	ldr	r3, [r4, #0]
200013a0:	43db      	mvns	r3, r3
200013a2:	6023      	str	r3, [r4, #0]
	if (!(pMailbox->command == ~(APPLET_CMD_ERASE_APP)))
200013a4:	3345      	adds	r3, #69	; 0x45
	{
			SERCOM2->USART.DATA.reg = 0x06;
200013a6:	bf1e      	ittt	ne
200013a8:	4b0d      	ldrne	r3, [pc, #52]	; (200013e0 <main+0x1c0>)
200013aa:	2206      	movne	r2, #6
200013ac:	629a      	strne	r2, [r3, #40]	; 0x28
	}
	return 0;
}
200013ae:	2000      	movs	r0, #0
200013b0:	e8bd 83f8 	ldmia.w	sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
200013b4:	2000158c 	.word	0x2000158c
200013b8:	20001179 	.word	0x20001179
200013bc:	200015b8 	.word	0x200015b8
200013c0:	200010f9 	.word	0x200010f9
200013c4:	200011a1 	.word	0x200011a1
200013c8:	200011c5 	.word	0x200011c5
200013cc:	20001459 	.word	0x20001459
200013d0:	41002000 	.word	0x41002000
200013d4:	2000111d 	.word	0x2000111d
200013d8:	41004000 	.word	0x41004000
200013dc:	00804000 	.word	0x00804000
200013e0:	41012000 	.word	0x41012000

200013e4 <ResetException>:
 * \brief  This is the code that gets called on processor reset. To initialize the
 * device. And call the main() routine.
 *
 */
void ResetException(void)
{
200013e4:	4668      	mov	r0, sp
200013e6:	f020 0107 	bic.w	r1, r0, #7
200013ea:	468d      	mov	sp, r1
200013ec:	b519      	push	{r0, r3, r4, lr}
    uint32_t *pSrc, *pDest;

    { asm volatile ("cpsid i"); }
200013ee:	b672      	cpsid	i

    /* Initialize data */
    /* Zero fill bss */
    if (isInitialized == 0) {
200013f0:	4b11      	ldr	r3, [pc, #68]	; (20001438 <ResetException+0x54>)
200013f2:	681a      	ldr	r2, [r3, #0]
200013f4:	b99a      	cbnz	r2, 2000141e <ResetException+0x3a>
200013f6:	4911      	ldr	r1, [pc, #68]	; (2000143c <ResetException+0x58>)
200013f8:	4a11      	ldr	r2, [pc, #68]	; (20001440 <ResetException+0x5c>)
        pSrc = &_sidata;
        for(pDest = &_sdata; pDest < &_edata;) {
200013fa:	4812      	ldr	r0, [pc, #72]	; (20001444 <ResetException+0x60>)
200013fc:	4282      	cmp	r2, r0
200013fe:	d204      	bcs.n	2000140a <ResetException+0x26>

            *(pDest ++) = *(pSrc ++);
20001400:	f851 4f04 	ldr.w	r4, [r1, #4]!
20001404:	f842 4b04 	str.w	r4, [r2], #4
20001408:	e7f8      	b.n	200013fc <ResetException+0x18>
2000140a:	4a0f      	ldr	r2, [pc, #60]	; (20001448 <ResetException+0x64>)
        }

        for (pDest = &_szero; pDest < &_ezero;) {
2000140c:	490f      	ldr	r1, [pc, #60]	; (2000144c <ResetException+0x68>)

            *(pDest ++) = 0;
2000140e:	2000      	movs	r0, #0
        for(pDest = &_sdata; pDest < &_edata;) {

            *(pDest ++) = *(pSrc ++);
        }

        for (pDest = &_szero; pDest < &_ezero;) {
20001410:	428a      	cmp	r2, r1
20001412:	d202      	bcs.n	2000141a <ResetException+0x36>

            *(pDest ++) = 0;
20001414:	f842 0b04 	str.w	r0, [r2], #4
20001418:	e7fa      	b.n	20001410 <ResetException+0x2c>
        }
        isInitialized = 1;
2000141a:	2201      	movs	r2, #1
2000141c:	601a      	str	r2, [r3, #0]
    }

    /* LowLevelInit(); */

   __asm("push {r0-r12}");
2000141e:	e92d 1fff 	stmdb	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip}
    main(1, (char**)mailbox);
20001422:	490b      	ldr	r1, [pc, #44]	; (20001450 <ResetException+0x6c>)
20001424:	4b0b      	ldr	r3, [pc, #44]	; (20001454 <ResetException+0x70>)
20001426:	2001      	movs	r0, #1
20001428:	4798      	blx	r3
    /* Restore previous SP point. */
   __asm("pop {r0-r12}");
2000142a:	e8bd 1fff 	ldmia.w	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip}
}
2000142e:	e8bd 4019 	ldmia.w	sp!, {r0, r3, r4, lr}
20001432:	4685      	mov	sp, r0
20001434:	4770      	bx	lr
20001436:	bf00      	nop
20001438:	200015b4 	.word	0x200015b4
2000143c:	20001588 	.word	0x20001588
20001440:	2000158c 	.word	0x2000158c
20001444:	2000158c 	.word	0x2000158c
20001448:	2000158c 	.word	0x2000158c
2000144c:	200015b8 	.word	0x200015b8
20001450:	20001040 	.word	0x20001040
20001454:	20001221 	.word	0x20001221

20001458 <memcpy>:
20001458:	4684      	mov	ip, r0
2000145a:	ea41 0300 	orr.w	r3, r1, r0
2000145e:	f013 0303 	ands.w	r3, r3, #3
20001462:	d16d      	bne.n	20001540 <memcpy+0xe8>
20001464:	3a40      	subs	r2, #64	; 0x40
20001466:	d341      	bcc.n	200014ec <memcpy+0x94>
20001468:	f851 3b04 	ldr.w	r3, [r1], #4
2000146c:	f840 3b04 	str.w	r3, [r0], #4
20001470:	f851 3b04 	ldr.w	r3, [r1], #4
20001474:	f840 3b04 	str.w	r3, [r0], #4
20001478:	f851 3b04 	ldr.w	r3, [r1], #4
2000147c:	f840 3b04 	str.w	r3, [r0], #4
20001480:	f851 3b04 	ldr.w	r3, [r1], #4
20001484:	f840 3b04 	str.w	r3, [r0], #4
20001488:	f851 3b04 	ldr.w	r3, [r1], #4
2000148c:	f840 3b04 	str.w	r3, [r0], #4
20001490:	f851 3b04 	ldr.w	r3, [r1], #4
20001494:	f840 3b04 	str.w	r3, [r0], #4
20001498:	f851 3b04 	ldr.w	r3, [r1], #4
2000149c:	f840 3b04 	str.w	r3, [r0], #4
200014a0:	f851 3b04 	ldr.w	r3, [r1], #4
200014a4:	f840 3b04 	str.w	r3, [r0], #4
200014a8:	f851 3b04 	ldr.w	r3, [r1], #4
200014ac:	f840 3b04 	str.w	r3, [r0], #4
200014b0:	f851 3b04 	ldr.w	r3, [r1], #4
200014b4:	f840 3b04 	str.w	r3, [r0], #4
200014b8:	f851 3b04 	ldr.w	r3, [r1], #4
200014bc:	f840 3b04 	str.w	r3, [r0], #4
200014c0:	f851 3b04 	ldr.w	r3, [r1], #4
200014c4:	f840 3b04 	str.w	r3, [r0], #4
200014c8:	f851 3b04 	ldr.w	r3, [r1], #4
200014cc:	f840 3b04 	str.w	r3, [r0], #4
200014d0:	f851 3b04 	ldr.w	r3, [r1], #4
200014d4:	f840 3b04 	str.w	r3, [r0], #4
200014d8:	f851 3b04 	ldr.w	r3, [r1], #4
200014dc:	f840 3b04 	str.w	r3, [r0], #4
200014e0:	f851 3b04 	ldr.w	r3, [r1], #4
200014e4:	f840 3b04 	str.w	r3, [r0], #4
200014e8:	3a40      	subs	r2, #64	; 0x40
200014ea:	d2bd      	bcs.n	20001468 <memcpy+0x10>
200014ec:	3230      	adds	r2, #48	; 0x30
200014ee:	d311      	bcc.n	20001514 <memcpy+0xbc>
200014f0:	f851 3b04 	ldr.w	r3, [r1], #4
200014f4:	f840 3b04 	str.w	r3, [r0], #4
200014f8:	f851 3b04 	ldr.w	r3, [r1], #4
200014fc:	f840 3b04 	str.w	r3, [r0], #4
20001500:	f851 3b04 	ldr.w	r3, [r1], #4
20001504:	f840 3b04 	str.w	r3, [r0], #4
20001508:	f851 3b04 	ldr.w	r3, [r1], #4
2000150c:	f840 3b04 	str.w	r3, [r0], #4
20001510:	3a10      	subs	r2, #16
20001512:	d2ed      	bcs.n	200014f0 <memcpy+0x98>
20001514:	320c      	adds	r2, #12
20001516:	d305      	bcc.n	20001524 <memcpy+0xcc>
20001518:	f851 3b04 	ldr.w	r3, [r1], #4
2000151c:	f840 3b04 	str.w	r3, [r0], #4
20001520:	3a04      	subs	r2, #4
20001522:	d2f9      	bcs.n	20001518 <memcpy+0xc0>
20001524:	3204      	adds	r2, #4
20001526:	d008      	beq.n	2000153a <memcpy+0xe2>
20001528:	07d2      	lsls	r2, r2, #31
2000152a:	bf1c      	itt	ne
2000152c:	f811 3b01 	ldrbne.w	r3, [r1], #1
20001530:	f800 3b01 	strbne.w	r3, [r0], #1
20001534:	d301      	bcc.n	2000153a <memcpy+0xe2>
20001536:	880b      	ldrh	r3, [r1, #0]
20001538:	8003      	strh	r3, [r0, #0]
2000153a:	4660      	mov	r0, ip
2000153c:	4770      	bx	lr
2000153e:	bf00      	nop
20001540:	2a08      	cmp	r2, #8
20001542:	d313      	bcc.n	2000156c <memcpy+0x114>
20001544:	078b      	lsls	r3, r1, #30
20001546:	d08d      	beq.n	20001464 <memcpy+0xc>
20001548:	f010 0303 	ands.w	r3, r0, #3
2000154c:	d08a      	beq.n	20001464 <memcpy+0xc>
2000154e:	f1c3 0304 	rsb	r3, r3, #4
20001552:	1ad2      	subs	r2, r2, r3
20001554:	07db      	lsls	r3, r3, #31
20001556:	bf1c      	itt	ne
20001558:	f811 3b01 	ldrbne.w	r3, [r1], #1
2000155c:	f800 3b01 	strbne.w	r3, [r0], #1
20001560:	d380      	bcc.n	20001464 <memcpy+0xc>
20001562:	f831 3b02 	ldrh.w	r3, [r1], #2
20001566:	f820 3b02 	strh.w	r3, [r0], #2
2000156a:	e77b      	b.n	20001464 <memcpy+0xc>
2000156c:	3a04      	subs	r2, #4
2000156e:	d3d9      	bcc.n	20001524 <memcpy+0xcc>
20001570:	3a01      	subs	r2, #1
20001572:	f811 3b01 	ldrb.w	r3, [r1], #1
20001576:	f800 3b01 	strb.w	r3, [r0], #1
2000157a:	d2f9      	bcs.n	20001570 <memcpy+0x118>
2000157c:	780b      	ldrb	r3, [r1, #0]
2000157e:	7003      	strb	r3, [r0, #0]
20001580:	784b      	ldrb	r3, [r1, #1]
20001582:	7043      	strb	r3, [r0, #1]
20001584:	788b      	ldrb	r3, [r1, #2]
20001586:	7083      	strb	r3, [r0, #2]
20001588:	4660      	mov	r0, ip
2000158a:	4770      	bx	lr
