view compal/c156-fw-disasm @ 287:5259ce993e87

compal/c156-fw-disasm: got to Init_Target()
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 23 Mar 2019 05:11:09 +0000
parents e5b0164f6060
children
line wrap: on
line source

; This disassembly is an attempt at analyzing Mot C155/156 fw, specifically
; the version published in c156-flashimg-r1.zip.  I was hoping to get to the
; Init_Target() and AI_InitIOConfig() functions as easily as in the C11x and
; C139 versions, but this fw has been hacked up pretty heavily.

; Entry point from bootloader
   200e0:	ea06105a	b	0x1a4250
   200e4:	ea06105a	b	0x1a4254
   200e8:	ea061059	b	0x1a4254
   200ec:	ea061058	b	0x1a4254
   200f0:	ea061057	b	0x1a4254
   200f4:	ea06105a	b	0x1a4264
   200f8:	ea06105a	b	0x1a4268
   200fc:	ea06105e	b	0x1a427c

; this code appears to be the counterpart to TI's _INT_Initialize
  1a4034:	e51f1024	ldr	r1, =0xffff9800	; via 0x1a4018
  1a4038:	e15f21ba	ldrh	r2, =0x2006	; via 0x1a4026
  1a403c:	e1c120b0	strh	r2, [r1]
  1a4040:	e5912000	ldr	r2, [r1]
  1a4044:	e2022001	and	r2, r2, #1
  1a4048:	e3520001	cmp	r2, #1
  1a404c:	0afffffb	beq	0x1a4040
  1a4050:	e51f1044	ldr	r1, =0xfffffd00	; via 0x1a4014
  1a4054:	e15f23b8	ldrh	r2, =0x1081	; via 0x1a4024
  1a4058:	e1c120b0	strh	r2, [r1]
  1a405c:	e51f1048	ldr	r1, =0xfffffb10	; via 0x1a401c
  1a4060:	e15f23be	ldrh	r2, =0xf7ff	; via 0x1a402a
  1a4064:	e1d100b0	ldrh	r0, [r1]
  1a4068:	e0000002	and	r0, r0, r2
  1a406c:	e1c100b0	strh	r0, [r1]
  1a4070:	e51f1058	ldr	r1, =0xffffff08	; via 0x1a4020
  1a4074:	e15f25b0	ldrh	r2, =0x0	; via 0x1a402c
  1a4078:	e1c120b0	strh	r2, [r1]
  1a407c:	e51f1074	ldr	r1, =0xfffffb00	; via 0x1a4010
  1a4080:	e15f28b8	ldrh	r2, =0x2a1	; via 0x1a4000
  1a4084:	e1c120b0	strh	r2, [r1]
  1a4088:	e15f28be	ldrh	r2, =0x2a1	; via 0x1a4002
  1a408c:	e1c120b2	strh	r2, [r1, #2]
  1a4090:	e15f29b4	ldrh	r2, =0x2a4	; via 0x1a4004
  1a4094:	e1c120b4	strh	r2, [r1, #4]
  1a4098:	e15f29ba	ldrh	r2, =0x2a3	; via 0x1a4006
  1a409c:	e1c120b6	strh	r2, [r1, #6]
  1a40a0:	e15f2ab0	ldrh	r2, =0xe85	; via 0x1a4008
  1a40a4:	e1c120ba	strh	r2, [r1, #10]	; 0xa
  1a40a8:	e15f2ab6	ldrh	r2, =0xc0	; via 0x1a400a
  1a40ac:	e1c120bc	strh	r2, [r1, #12]	; 0xc
  1a40b0:	e15f2abc	ldrh	r2, =0x40	; via 0x1a400c
  1a40b4:	e1c120b8	strh	r2, [r1, #8]
  1a40b8:	e15f2bb2	ldrh	r2, =0x2a	; via 0x1a400e
  1a40bc:	e1c120be	strh	r2, [r1, #14]	; 0xe
  1a40c0:	e10f0000	mrs	r0, CPSR
  1a40c4:	e3c0001f	bic	r0, r0, #31	; 0x1f
  1a40c8:	e3800013	orr	r0, r0, #19	; 0x13
  1a40cc:	e38000c0	orr	r0, r0, #192	; 0xc0
  1a40d0:	e129f000	msr	CPSR_fc, r0
  1a40d4:	e3a00001	mov	r0, #1
  1a40d8:	e59f12b8	ldr	r1, =0x11694f8	; via 0x1a4398
  1a40dc:	e5810000	str	r0, [r1]
  1a40e0:	e59f02a8	ldr	r0, =0x1169500	; via 0x1a4390
  1a40e4:	e3a01010	mov	r1, #16	; 0x10
  1a40e8:	e0800001	add	r0, r0, r1
  1a40ec:	e3a01b01	mov	r1, #1024	; 0x400
  1a40f0:	e2411004	sub	r1, r1, #4
  1a40f4:	e0802001	add	r2, r0, r1
  1a40f8:	e3c22003	bic	r2, r2, #3
  1a40fc:	e1a0a000	mov	r10, r0
  1a4100:	e59f3294	ldr	r3, =0x82e97c	; via 0x1a439c
  1a4104:	e583a000	str	r10, [r3]
  1a4108:	e1a0d002	mov	sp, r2
  1a410c:	e59f328c	ldr	r3, =0x82eaa0	; via 0x1a43a0
  1a4110:	e583d000	str	sp, [r3]
  1a4114:	e3a01c01	mov	r1, #256	; 0x100
  1a4118:	e0822001	add	r2, r2, r1
  1a411c:	e3c22003	bic	r2, r2, #3
  1a4120:	e10f0000	mrs	r0, CPSR
  1a4124:	e3c0001f	bic	r0, r0, #31	; 0x1f
  1a4128:	e3800012	orr	r0, r0, #18	; 0x12
  1a412c:	e129f000	msr	CPSR_fc, r0
  1a4130:	e1a0d002	mov	sp, r2
  1a4134:	e3a01c02	mov	r1, #512	; 0x200
  1a4138:	e0822001	add	r2, r2, r1
  1a413c:	e3c22003	bic	r2, r2, #3
  1a4140:	e10f0000	mrs	r0, CPSR
  1a4144:	e3c0001f	bic	r0, r0, #31	; 0x1f
  1a4148:	e3800011	orr	r0, r0, #17	; 0x11
  1a414c:	e129f000	msr	CPSR_fc, r0
  1a4150:	e1a0d002	mov	sp, r2
  1a4154:	e10f0000	mrs	r0, CPSR
  1a4158:	e3c0001f	bic	r0, r0, #31	; 0x1f
  1a415c:	e3800013	orr	r0, r0, #19	; 0x13
  1a4160:	e129f000	msr	CPSR_fc, r0
  1a4164:	e59f3238	ldr	r3, =0x82e8e4	; via 0x1a43a4
  1a4168:	e2822004	add	r2, r2, #4
  1a416c:	e5832000	str	r2, [r3]
  1a4170:	e3a01b01	mov	r1, #1024	; 0x400
  1a4174:	e3c11003	bic	r1, r1, #3
  1a4178:	e0822001	add	r2, r2, r1
  1a417c:	e59f3224	ldr	r3, =0x82e968	; via 0x1a43a8
  1a4180:	e5831000	str	r1, [r3]
  1a4184:	e3a01002	mov	r1, #2
  1a4188:	e59f321c	ldr	r3, =0x82e978	; via 0x1a43ac
  1a418c:	e5831000	str	r1, [r3]
  1a4190:	e1a04002	mov	r4, r2
  1a4194:	eb0cd342	bl	0x4d8ea4
  1a4198:	e1a02004	mov	r2, r4
  1a419c:	e51f0174	ldr	r0, =0x3e79c	; via 0x1a4030
  1a41a0:	e3700001	cmn	r0, #1
  1a41a4:	1b000083	blne	0x1a43b8
  1a41a8:	e1a00002	mov	r0, r2
  1a41ac:	ea19d513	b	0x819600	; _INC_Initialize

  1a4250:	ea0cc185	b	0x4d486c
  1a4254:	eaf9efa9	b	0x20100
  1a4258:	eafffffe	b	0x1a4258
  1a425c:	eafffffe	b	0x1a425c
  1a4260:	eafffffe	b	0x1a4260
  1a4264:	eafffffe	b	0x1a4264

$Init_Target:
  4bf76c:	b570		push	{r4, r5, r6, lr}
  4bf76e:	b081		sub	sp, #4
  4bf770:	4c73		ldr	r4, =0xfffef006	; via 0x4bf940
  4bf772:	2003		mov	r0, #3
  4bf774:	0340		lsl	r0, r0, #13
  4bf776:	8060		strh	r0, [r4, #2]
  4bf778:	f00e ffce	bl	0x4ce718	; $TM_DisableWatchdog
; 8 MiB MEMIF setting
  4bf77c:	2008		mov	r0, #8
  4bf77e:	8821		ldrh	r1, [r4, #0]
  4bf780:	4308		orr	r0, r1
  4bf782:	8020		strh	r0, [r4, #0]
; standard code continues
  4bf784:	486f		ldr	r0, =0xfffffd02	; via 0x4bf944
  4bf786:	2105		mov	r1, #5
  4bf788:	8001		strh	r1, [r0, #0]
  4bf78a:	2180		mov	r1, #128	; 0x80
  4bf78c:	8802		ldrh	r2, [r0, #0]
  4bf78e:	4311		orr	r1, r2
  4bf790:	8001		strh	r1, [r0, #0]
  4bf792:	2180		mov	r1, #128	; 0x80
  4bf794:	8802		ldrh	r2, [r0, #0]
  4bf796:	4311		orr	r1, r2
  4bf798:	8001		strh	r1, [r0, #0]
  4bf79a:	496b		ldr	r1, =0xffdf	; via 0x4bf948
  4bf79c:	8802		ldrh	r2, [r0, #0]
  4bf79e:	4011		and	r1, r2
  4bf7a0:	8001		strh	r1, [r0, #0]
  4bf7a2:	4e6a		ldr	r6, =0xfffff900	; via 0x4bf94c
  4bf7a4:	20ff		mov	r0, #255	; 0xff
  4bf7a6:	0200		lsl	r0, r0, #8
  4bf7a8:	8030		strh	r0, [r6, #0]
  4bf7aa:	4d69		ldr	r5, =0xffff9800	; via 0x4bf950
  4bf7ac:	4869		ldr	r0, =0xfff3	; via 0x4bf954
  4bf7ae:	8829		ldrh	r1, [r5, #0]
  4bf7b0:	4008		and	r0, r1
  4bf7b2:	8028		strh	r0, [r5, #0]
  4bf7b4:	8828		ldrh	r0, [r5, #0]
  4bf7b6:	8028		strh	r0, [r5, #0]
  4bf7b8:	4867		ldr	r0, =0xf01f	; via 0x4bf958
  4bf7ba:	8829		ldrh	r1, [r5, #0]
  4bf7bc:	4008		and	r0, r1
  4bf7be:	8028		strh	r0, [r5, #0]
  4bf7c0:	2001		mov	r0, #1
  4bf7c2:	0280		lsl	r0, r0, #10
  4bf7c4:	8829		ldrh	r1, [r5, #0]
  4bf7c6:	4308		orr	r0, r1
  4bf7c8:	8028		strh	r0, [r5, #0]
  4bf7ca:	2000		mov	r0, #0
  4bf7cc:	2102		mov	r1, #2
  4bf7ce:	2200		mov	r2, #0
  4bf7d0:	f010 f806	bl	0x4cf7e0	; $CLKM_InitARMClock
  4bf7d4:	4961		ldr	r1, =0xfffffb00	; via 0x4bf95c
  4bf7d6:	20a4		mov	r0, #164	; 0xa4
  4bf7d8:	8008		strh	r0, [r1, #0]
  4bf7da:	8048		strh	r0, [r1, #2]
  4bf7dc:	22a5		mov	r2, #165	; 0xa5
  4bf7de:	808a		strh	r2, [r1, #4]
  4bf7e0:	80c8		strh	r0, [r1, #6]
  4bf7e2:	20a6		mov	r0, #166	; 0xa6
  4bf7e4:	8148		strh	r0, [r1, #10]	; 0xa
  4bf7e6:	20c0		mov	r0, #192	; 0xc0
  4bf7e8:	8188		strh	r0, [r1, #12]	; 0xc
  4bf7ea:	2040		mov	r0, #64	; 0x40
  4bf7ec:	8108		strh	r0, [r1, #8]
  4bf7ee:	2020		mov	r0, #32	; 0x20
  4bf7f0:	8070		strh	r0, [r6, #2]
  4bf7f2:	2000		mov	r0, #0
  4bf7f4:	80b0		strh	r0, [r6, #4]
  4bf7f6:	2010		mov	r0, #16	; 0x10
  4bf7f8:	8829		ldrh	r1, [r5, #0]
  4bf7fa:	4308		orr	r0, r1
  4bf7fc:	8028		strh	r0, [r5, #0]
  4bf7fe:	4858		ldr	r0, =0xfffffa08	; via 0x4bf960
  4bf800:	4958		ldr	r1, =0xffff	; via 0x4bf964
  4bf802:	8001		strh	r1, [r0, #0]
  4bf804:	8041		strh	r1, [r0, #2]
  4bf806:	2103		mov	r1, #3
  4bf808:	8181		strh	r1, [r0, #12]	; 0xc
  4bf80a:	f00d f8a7	bl	0x4cc95c	; $IQ_SetupInterrupts
  4bf80e:	4856		ldr	r0, =0xfffffc00	; via 0x4bf968
  4bf810:	2124		mov	r1, #36	; 0x24
  4bf812:	8001		strh	r1, [r0, #0]
  4bf814:	210d		mov	r1, #13	; 0xd
  4bf816:	8041		strh	r1, [r0, #2]
  4bf818:	2500		mov	r5, #0
  4bf81a:	4854		ldr	r0, =0xfffe2016	; via 0x4bf96c
  4bf81c:	8005		strh	r5, [r0, #0]
  4bf81e:	4954		ldr	r1, =0xfffe2014	; via 0x4bf970
  4bf820:	2002		mov	r0, #2
  4bf822:	8008		strh	r0, [r1, #0]
  4bf824:	4953		ldr	r1, =0xfffe2002	; via 0x4bf974
  4bf826:	2084		mov	r0, #132	; 0x84
  4bf828:	8008		strh	r0, [r1, #0]
  4bf82a:	4953		ldr	r1, =0xfffe2000	; via 0x4bf978
  4bf82c:	4853		ldr	r0, =0x3de0	; via 0x4bf97c
  4bf82e:	8008		strh	r0, [r1, #0]
  4bf830:	4a53		ldr	r2, =0xfffe2022	; via 0x4bf980
  4bf832:	200a		mov	r0, #10	; 0xa
  4bf834:	8010		strh	r0, [r2, #0]
  4bf836:	4a53		ldr	r2, =0xfffe2020	; via 0x4bf984
  4bf838:	4853		ldr	r0, =0x45a	; via 0x4bf988
  4bf83a:	8010		strh	r0, [r2, #0]
  4bf83c:	4a53		ldr	r2, =0xfffe201e	; via 0x4bf98c
  4bf83e:	20ff		mov	r0, #255	; 0xff
  4bf840:	304b		add	r0, #75	; 0x4b
  4bf842:	8010		strh	r0, [r2, #0]
  4bf844:	4852		ldr	r0, =0xfffe201c	; via 0x4bf990
  4bf846:	221f		mov	r2, #31	; 0x1f
  4bf848:	8002		strh	r2, [r0, #0]
  4bf84a:	4852		ldr	r0, =0xfffe2024	; via 0x4bf994
  4bf84c:	8005		strh	r5, [r0, #0]
  4bf84e:	4a52		ldr	r2, =0xfffe2010	; via 0x4bf998
  4bf850:	2002		mov	r0, #2
  4bf852:	8813		ldrh	r3, [r2, #0]
  4bf854:	4318		orr	r0, r3
  4bf856:	8010		strh	r0, [r2, #0]
  4bf858:	2004		mov	r0, #4
  4bf85a:	8813		ldrh	r3, [r2, #0]
  4bf85c:	4318		orr	r0, r3
  4bf85e:	8010		strh	r0, [r2, #0]
  4bf860:	2027		mov	r0, #39	; 0x27
  4bf862:	80e0		strh	r0, [r4, #6]
  4bf864:	8a08		ldrh	r0, [r1, #16]	; 0x10
  4bf866:	0840		lsr	r0, r0, #1
  4bf868:	d30f		bcc	0x4bf88a
  4bf86a:	8a08		ldrh	r0, [r1, #16]	; 0x10
  4bf86c:	0400		lsl	r0, r0, #16
  4bf86e:	0c40		lsr	r0, r0, #17
  4bf870:	0040		lsl	r0, r0, #1
  4bf872:	8208		strh	r0, [r1, #16]	; 0x10
  4bf874:	2001		mov	r0, #1
  4bf876:	e001		b	0x4bf87c
  4bf878:	9800		ldr	r0, [sp, #0]
  4bf87a:	3001		add	r0, #1
  4bf87c:	9000		str	r0, [sp, #0]
  4bf87e:	9800		ldr	r0, [sp, #0]
  4bf880:	2832		cmp	r0, #50	; 0x32
  4bf882:	d3f9		bcc	0x4bf878
  4bf884:	8a48		ldrh	r0, [r1, #18]	; 0x12
  4bf886:	2800		cmp	r0, #0
  4bf888:	d0fc		beq	0x4bf884
  4bf88a:	f00f f92c	bl	0x4ceae6	; ARMIO setup?
  4bf88e:	2027		mov	r0, #39	; 0x27
  4bf890:	0500		lsl	r0, r0, #20
  4bf892:	8005		strh	r5, [r0, #0]
  4bf894:	2001		mov	r0, #1
  4bf896:	f00e ff4f	bl	0x4ce738
  4bf89a:	2002		mov	r0, #2
  4bf89c:	f00e ff4c	bl	0x4ce738
  4bf8a0:	b001		add	sp, #4
  4bf8a2:	bd70		pop	{r4, r5, r6, pc}

  4bf8a4:	b500		push	{lr}
  4bf8a6:	f79c fdc9	bl	0x45c43c
  4bf8aa:	f70f f9e4	bl	0x3cec76
  4bf8ae:	f73c f835	bl	0x3fb91c
  4bf8b2:	f7d4 fbb7	bl	0x494024
  4bf8b6:	f699 f8b5	bl	0x358a24
  4bf8ba:	bd00		pop	{pc}

  4bf8bc:	b500		push	{lr}
  4bf8be:	4837		ldr	r0, =0x1175c94	; via 0x4bf99c
  4bf8c0:	f756 ff05	bl	0x4166ce
  4bf8c4:	f757 f9ca	bl	0x416c5c
  4bf8c8:	bd00		pop	{pc}

  4bf8ca:	b500		push	{lr}
  4bf8cc:	2004		mov	r0, #4
  4bf8ce:	f00d f8a6	bl	0x4cca1e
  4bf8d2:	2012		mov	r0, #18	; 0x12
  4bf8d4:	f00d f8a3	bl	0x4cca1e
  4bf8d8:	2007		mov	r0, #7
  4bf8da:	f00d f8a0	bl	0x4cca1e
  4bf8de:	2008		mov	r0, #8
  4bf8e0:	f00d f89d	bl	0x4cca1e
  4bf8e4:	bd00		pop	{pc}

  4bf8e6:	b510		push	{r4, lr}
  4bf8e8:	1c04		add	r4, r0, #0
  4bf8ea:	2012		mov	r0, #18	; 0x12
  4bf8ec:	f00d f8a8	bl	0x4cca40
  4bf8f0:	2007		mov	r0, #7
  4bf8f2:	f00d f8a5	bl	0x4cca40
  4bf8f6:	2c00		cmp	r4, #0
  4bf8f8:	d012		beq	0x4bf920
  4bf8fa:	3c01		sub	r4, #1
  4bf8fc:	2c00		cmp	r4, #0
  4bf8fe:	d009		beq	0x4bf914
  4bf900:	3c01		sub	r4, #1
  4bf902:	2c00		cmp	r4, #0
  4bf904:	d114		bne	0x4bf930
  4bf906:	2049		mov	r0, #73	; 0x49
  4bf908:	00c0		lsl	r0, r0, #3
  4bf90a:	f756 fdef	bl	0x4164ec
  4bf90e:	2101		mov	r1, #1
  4bf910:	4a23		ldr	r2, =0x4a502f	; via 0x4bf9a0
  4bf912:	e00a		b	0x4bf92a
  4bf914:	20ff		mov	r0, #255	; 0xff
  4bf916:	3069		add	r0, #105	; 0x69
  4bf918:	f756 fde8	bl	0x4164ec
  4bf91c:	4a20		ldr	r2, =0x4a502f	; via 0x4bf9a0
  4bf91e:	e003		b	0x4bf928
  4bf920:	2068		mov	r0, #104	; 0x68
  4bf922:	f756 fde3	bl	0x4164ec
  4bf926:	2200		mov	r2, #0
  4bf928:	2100		mov	r1, #0
  4bf92a:	2001		mov	r0, #1
  4bf92c:	f757 f938	bl	0x416ba0
  4bf930:	2012		mov	r0, #18	; 0x12
  4bf932:	f00d f874	bl	0x4cca1e
  4bf936:	2007		mov	r0, #7
  4bf938:	f00d f871	bl	0x4cca1e
  4bf93c:	bd10		pop	{r4, pc}
  4bf93e:	46c0		nop			(mov r8, r8)

  4cfb9a:	4770		bx	lr
  4cfb9c:	4770		bx	lr
  4cfb9e:	4806		ldr	r0, =0x1175c90	; via 0x4cfbb8
  4cfba0:	7800		ldrb	r0, [r0, #0]
  4cfba2:	4770		bx	lr

; code looks like TI's bootloader.s, not int.s
  4d486c:	e51f101c	ldr	r1, =0xffff9800	; via 0x4d4858
  4d4870:	e15f21b2	ldrh	r2, =0x2006	; via 0x4d4866
  4d4874:	e1c120b0	strh	r2, [r1]
  4d4878:	e5912000	ldr	r2, [r1]
  4d487c:	e2022001	and	r2, r2, #1
  4d4880:	e3520001	cmp	r2, #1
  4d4884:	0afffffb	beq	0x4d4878
  4d4888:	e51f103c	ldr	r1, =0xfffffd00	; via 0x4d4854
  4d488c:	e15f23b0	ldrh	r2, =0x1081	; via 0x4d4864
  4d4890:	e1c120b0	strh	r2, [r1]
  4d4894:	e51f1040	ldr	r1, =0xfffffb10	; via 0x4d485c
  4d4898:	e15f23b8	ldrh	r2, =0x800	; via 0x4d4868
  4d489c:	e1d100b0	ldrh	r0, [r1]
  4d48a0:	e1800002	orr	r0, r0, r2
  4d48a4:	e1c100b0	strh	r0, [r1]
  4d48a8:	e51f1050	ldr	r1, =0xffffff08	; via 0x4d4860
  4d48ac:	e15f24ba	ldrh	r2, =0x0	; via 0x4d486a
  4d48b0:	e1c120b0	strh	r2, [r1]
  4d48b4:	e51f107c	ldr	r1, =0xfffffb00	; via 0x4d4840
  4d48b8:	e15f27bc	ldrh	r2, =0x2a1	; via 0x4d4844
  4d48bc:	e1c120b0	strh	r2, [r1]
  4d48c0:	e15f28b2	ldrh	r2, =0x2a1	; via 0x4d4846
  4d48c4:	e1c120b2	strh	r2, [r1, #2]
  4d48c8:	e15f28b8	ldrh	r2, =0x2a1	; via 0x4d4848
  4d48cc:	e1c120b4	strh	r2, [r1, #4]
  4d48d0:	e15f28be	ldrh	r2, =0x283	; via 0x4d484a
  4d48d4:	e1c120b6	strh	r2, [r1, #6]
  4d48d8:	e15f29b4	ldrh	r2, =0x281	; via 0x4d484c
  4d48dc:	e1c120ba	strh	r2, [r1, #10]	; 0xa
  4d48e0:	e15f29ba	ldrh	r2, =0xc0	; via 0x4d484e
  4d48e4:	e1c120bc	strh	r2, [r1, #12]	; 0xc
  4d48e8:	e15f2ab0	ldrh	r2, =0x40	; via 0x4d4850
  4d48ec:	e1c120b8	strh	r2, [r1, #8]
  4d48f0:	e15f2ab6	ldrh	r2, =0x2a	; via 0x4d4852
  4d48f4:	e1c120be	strh	r2, [r1, #14]	; 0xe
  4d48f8:	e59f0014	ldr	r0, =0x1195770	; via 0x4d4914
  4d48fc:	e3a01b01	mov	r1, #1024	; 0x400
  4d4900:	e2411004	sub	r1, r1, #4
  4d4904:	e0802001	add	r2, r0, r1
  4d4908:	e3c22003	bic	r2, r2, #3
  4d490c:	e1a0d002	mov	sp, r2
  4d4910:	eaf33dc7	b	0x1a4034

  4d6b80:	2900		cmp	r1, #0
  4d6b82:	d006		beq	0x4d6b92
  4d6b84:	6803		ldr	r3, [r0, #0]
  4d6b86:	6013		str	r3, [r2, #0]
  4d6b88:	3204		add	r2, #4
  4d6b8a:	3004		add	r0, #4
  4d6b8c:	3904		sub	r1, #4
  4d6b8e:	2900		cmp	r1, #0
  4d6b90:	d1f8		bne	0x4d6b84
  4d6b92:	4770		bx	lr

  4d6bc0:	b500		push	{lr}
  4d6bc2:	2000		mov	r0, #0
  4d6bc4:	4909		ldr	r1, =0x116a020	; via 0x4d6bec
  4d6bc6:	8008		strh	r0, [r1, #0]
  4d6bc8:	4909		ldr	r1, =0x116a022	; via 0x4d6bf0
  4d6bca:	8008		strh	r0, [r1, #0]
  4d6bcc:	4a09		ldr	r2, =0x800000	; via 0x4d6bf4
  4d6bce:	480a		ldr	r0, =0x20188	; via 0x4d6bf8
  4d6bd0:	490a		ldr	r1, =0x81e614	; via 0x4d6bfc
  4d6bd2:	1a89		sub	r1, r1, r2
  4d6bd4:	3904		sub	r1, #4
  4d6bd6:	2304		mov	r3, #4
  4d6bd8:	189a		add	r2, r3, r2
  4d6bda:	f7ff ffd1	bl	0x4d6b80
  4d6bde:	4a08		ldr	r2, =0x81e618	; via 0x4d6c00
  4d6be0:	4808		ldr	r0, =0x4d9280	; via 0x4d6c04
  4d6be2:	4909		ldr	r1, =0x81e868	; via 0x4d6c08
  4d6be4:	1a89		sub	r1, r1, r2
  4d6be6:	f7ff ffcb	bl	0x4d6b80
  4d6bea:	bd00		pop	{pc}

; code from  0x20188 is moved to 0x800004, length 0x1E610
; code from 0x4D9280 is moved to 0x81E618, length 0x250

$Application_Initialize:
  4d751a:	b500		push	{lr}
  4d751c:	f7f8 fb3d	bl	0x4cfb9a	; empty function
  4d7520:	4916		ldr	r1, =0x116b56c	; via 0x4d757c
  4d7522:	4817		ldr	r0, =0xffff5800	; via 0x4d7580
  4d7524:	6008		str	r0, [r1, #0]
  4d7526:	2000		mov	r0, #0
  4d7528:	2107		mov	r1, #7
  4d752a:	f7e3 fba9	bl	0x4bac80
  4d752e:	f001 f8db	bl	0x4d86e8
  4d7532:	f7d8 fde2	bl	0x4b00fa
  4d7536:	f329 ff4b	bl	0x8013d0
  4d753a:	f7d8 fdde	bl	0x4b00fa
  4d753e:	f001 f8d9	bl	0x4d86f4
  4d7542:	2000		mov	r0, #0
  4d7544:	2102		mov	r1, #2
  4d7546:	4a0f		ldr	r2, =0x4d7519	; via 0x4d7584
  4d7548:	f73f fb2a	bl	0x416ba0
  4d754c:	f7fe fb82	bl	0x4d5c54
  4d7550:	f75d fc05	bl	0x434d5e
  4d7554:	f7f8 fb21	bl	0x4cfb9a	; empty function
  4d7558:	4808		ldr	r0, =0x116b56c	; via 0x4d757c
  4d755a:	4909		ldr	r1, =0xffff5800	; via 0x4d7580
  4d755c:	6001		str	r1, [r0, #0]
  4d755e:	2000		mov	r0, #0
  4d7560:	2107		mov	r1, #7
  4d7562:	f7e3 fb8d	bl	0x4bac80
  4d7566:	f7b4 fa1d	bl	0x48b9a4
  4d756a:	bd00		pop	{pc}

  4d86e8:	b500		push	{lr}
  4d86ea:	f7e7 f83f	bl	0x4bf76c
  4d86ee:	f7e7 f8d9	bl	0x4bf8a4
  4d86f2:	bd00		pop	{pc}

  4d86f4:	b500		push	{lr}
  4d86f6:	f7e7 f8e1	bl	0x4bf8bc
  4d86fa:	bd00		pop	{pc}

  4d86fc:	b500		push	{lr}
  4d86fe:	f7e7 f8e4	bl	0x4bf8ca
  4d8702:	bd00		pop	{pc}

  4d8704:	b500		push	{lr}
  4d8706:	200a		mov	r0, #10	; 0xa
  4d8708:	f7f4 f989	bl	0x4cca1e
  4d870c:	bd00		pop	{pc}
  4d870e:	0000

  4d8710:	4770		bx	lr
  4d8712:	4770		bx	lr
  4d8714:	4770		bx	lr
  4d8716:	4770		bx	lr
  4d8718:	4770		bx	lr
  4d871a:	4770		bx	lr
  4d871c:	4770		bx	lr
  4d871e:	4770		bx	lr
  4d8720:	4770		bx	lr
  4d8722:	4770		bx	lr

  4d8724:	4803		ldr	r0, =0xfffe480e	; via 0x4d8734
  4d8726:	8800		ldrh	r0, [r0, #0]
  4d8728:	07c0		lsl	r0, r0, #31
  4d872a:	0fc0		lsr	r0, r0, #31
  4d872c:	0600		lsl	r0, r0, #24
  4d872e:	0e00		lsr	r0, r0, #24
  4d8730:	4770		bx	lr
  4d8732:	46c0		nop			(mov r8, r8)

  4d8ea4:	e92d4000	stmdb	sp!, {lr}
  4d8ea8:	e28fe001	add	lr, pc, #1
  4d8eac:	e12fff1e	bx	lr
  4d8eb0:	f7fd fe86	bl	0x4d6bc0
  4d8eb4:	4778		bx	pc
  4d8eb6:	46c0		nop			(mov r8, r8)
  4d8eb8:	e8bd8000	ldmia	sp!, {pc}

; IRAM code

_INC_Initialize:	; call veneer
  819600:	e92d4000	stmdb	sp!, {lr}
  819604:	e28fe001	add	lr, pc, #1
  819608:	e12fff1e	bx	lr
  81960c:	f000 f804	bl	0x819618
  819610:	4778		bx	pc
  819612:	46c0		nop			(mov r8, r8)
  819614:	e8bd8000	ldmia	sp!, {pc}

$INC_Initialize:
  819618:	b500		push	{lr}
  81961a:	b081		sub	sp, #4
  81961c:	9000		str	r0, [sp, #0]
  81961e:	4914		ldr	r1, =0x82ef7c	; via 0x819670
  819620:	2001		mov	r0, #1
  819622:	6008		str	r0, [r1, #0]
  819624:	f000 f836	bl	0x819694
  819628:	f000 f85c	bl	0x8196e4
  81962c:	f000 f908	bl	0x819840
  819630:	f000 f8ee	bl	0x819810
  819634:	f000 f91a	bl	0x81986c
  819638:	f000 f85c	bl	0x8196f4
  81963c:	f000 f8d8	bl	0x8197f0
  819640:	f000 f904	bl	0x81984c
  819644:	f000 f9c0	bl	0x8199c8
  819648:	f000 f82c	bl	0x8196a4
  81964c:	f000 f83a	bl	0x8196c4
  819650:	f000 f810	bl	0x819674
  819654:	f000 f86e	bl	0x819734
  819658:	f000 f85c	bl	0x819714
  81965c:	9800		ldr	r0, [sp, #0]
  81965e:	f4bd ff5c	bl	0x4d751a	; $Application_Initialize
  819662:	4803		ldr	r0, =0x82ef7c	; via 0x819670
  819664:	2102		mov	r1, #2
  819666:	6001		str	r1, [r0, #0]
  819668:	f7fb fa48	bl	0x814afc
  81966c:	b001		add	sp, #4
  81966e:	bd00		pop	{pc}