
HV_Converter.elf:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000025f4  00080000  00080000  00008000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata       00000101  000825f4  000825f4  0000a5f4  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .rodata.str1.4 0000002c  000826f8  000826f8  0000a6f8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .data         00000008  00010000  00082724  00010000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .bss          0000006c  00010008  00010008  00000094  2**2
                  ALLOC
  5 .comment      000000ee  00000000  00000000  00010008  2**0
                  CONTENTS, READONLY
  6 .debug_aranges 00000200  00000000  00000000  000100f8  2**3
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_pubnames 000003b3  00000000  00000000  000102f8  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_info   00001ae3  00000000  00000000  000106ab  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_abbrev 0000088d  00000000  00000000  0001218e  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_line   00000dd9  00000000  00000000  00012a1b  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_frame  000002d8  00000000  00000000  000137f4  2**2
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_str    0000055f  00000000  00000000  00013acc  2**0
                  CONTENTS, READONLY, DEBUGGING
 13 .debug_loc    00000eda  00000000  00000000  0001402b  2**0
                  CONTENTS, READONLY, DEBUGGING
 14 .debug_ranges 000005e8  00000000  00000000  00014f05  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00080000 <_startup>:
#  Mapped to Address 0.
#  Absolute addressing mode must be used.
#  Dummy Handlers are implemented as infinite loops which can be modified.

Vectors:        LDR     PC, Reset_Address
   80000:	e59ff018 	ldr	pc, [pc, #24]	; 80020 <Reset_Address>
                LDR     PC, Undef_Addr
   80004:	e59ff018 	ldr	pc, [pc, #24]	; 80024 <Undef_Addr>
                LDR     PC, SWI_Addr
   80008:	e59ff018 	ldr	pc, [pc, #24]	; 80028 <SWI_Addr>
                LDR     PC, PAbt_Addr
   8000c:	e59ff018 	ldr	pc, [pc, #24]	; 8002c <PAbt_Addr>
                LDR     PC, DAbt_Addr
   80010:	e59ff018 	ldr	pc, [pc, #24]	; 80030 <DAbt_Addr>
                NOP                            /* Reserved Vector */
   80014:	e1a00000 	nop			(mov r0,r0)
                LDR     PC, IRQ_Addr
   80018:	e59ff014 	ldr	pc, [pc, #20]	; 80034 <IRQ_Addr>
                LDR     PC, FIQ_Addr
   8001c:	e59ff014 	ldr	pc, [pc, #20]	; 80038 <FIQ_Addr>

00080020 <Reset_Address>:
   80020:	0008003c 	andeq	r0, r8, ip, lsr r0

00080024 <Undef_Addr>:
   80024:	00080180 	andeq	r0, r8, r0, lsl #3

00080028 <SWI_Addr>:
   80028:	0008015c 	andeq	r0, r8, ip, asr r1

0008002c <PAbt_Addr>:
   8002c:	000801a4 	andeq	r0, r8, r4, lsr #3

00080030 <DAbt_Addr>:
   80030:	000801c8 	andeq	r0, r8, r8, asr #3

00080034 <IRQ_Addr>:
   80034:	000800f4 	streqd	r0, [r8], -r4

00080038 <FIQ_Addr>:
   80038:	00080134 	andeq	r0, r8, r4, lsr r1

0008003c <Reset_Handler>:

Reset_Address:  .word   Reset_Handler
Undef_Addr:     .word   ADI_UNDEF_Interrupt_Setup 
SWI_Addr:       .word   ADI_SWI_Interrupt_Setup 
PAbt_Addr:      .word   ADI_PABORT_Interrupt_Setup 
DAbt_Addr:      .word   ADI_DABORT_Interrupt_Setup 
@ IRQ_Addr:       .word   ADI_IRQ_Interrupt_Setup 
IRQ_Addr:       .word   ADI_IRQ_Interrupt_Wrapper
FIQ_Addr:       .word   ADI_FIQ_Interrupt_Setup 

# Reset Handler

Reset_Handler:  

.if PLL_SETUP
                LDR     R0, =MMR_BASE_0
   8003c:	e59f00d0 	ldr	r0, [pc, #208]	; 80114 <.text+0x114>
                MOV     R1, #0x01         
   80040:	e3a01001 	mov	r1, #1	; 0x1
                STR     R1, [R0,#POWKEY1_OFFSET]          
   80044:	e5801404 	str	r1, [r0, #1028]
                MOV     R1, #PLLCFG_Val      
   80048:	e3a01003 	mov	r1, #3	; 0x3
                STR     R1, [R0,#POWCON_OFFSET]    
   8004c:	e5801408 	str	r1, [r0, #1032]
                MOV     R1, #0xF4
   80050:	e3a010f4 	mov	r1, #244	; 0xf4
                STR     R1, [R0,#POWKEY2_OFFSET]
   80054:	e580140c 	str	r1, [r0, #1036]
.endif

# Setup Stack for each mode 
                LDR     R0, =Top_Stack 
   80058:	e3a00a12 	mov	r0, #73728	; 0x12000
 
#  Enter Undefined Instruction Mode and set its Stack Pointer 
                MSR     CPSR_c, #Mode_UNDEF|I_Bit|F_Bit 
   8005c:	e321f0db 	msr	CPSR_c, #219	; 0xdb
                MOV     SP, R0 
   80060:	e1a0d000 	mov	sp, r0
                SUB     R0, R0, #UNDEF_Stack_Size 
   80064:	e2400004 	sub	r0, r0, #4	; 0x4
 
#  Enter Abort Mode and set its Stack Pointer 
                MSR     CPSR_c, #Mode_ABT|I_Bit|F_Bit 
   80068:	e321f0d7 	msr	CPSR_c, #215	; 0xd7
                MOV     SP, R0 
   8006c:	e1a0d000 	mov	sp, r0
                SUB     R0, R0, #ABT_Stack_Size 
   80070:	e2400004 	sub	r0, r0, #4	; 0x4
 
#  Enter FIQ Mode and set its Stack Pointer 
                MSR     CPSR_c, #Mode_FIQ|I_Bit|F_Bit 
   80074:	e321f0d1 	msr	CPSR_c, #209	; 0xd1
                MOV     SP, R0 
   80078:	e1a0d000 	mov	sp, r0
                SUB     R0, R0, #FIQ_Stack_Size 
   8007c:	e2400080 	sub	r0, r0, #128	; 0x80
 
#  Enter IRQ Mode and set its Stack Pointer 
                MSR     CPSR_c, #Mode_IRQ|I_Bit|F_Bit 
   80080:	e321f0d2 	msr	CPSR_c, #210	; 0xd2
                MOV     SP, R0 
   80084:	e1a0d000 	mov	sp, r0
                SUB     R0, R0, #IRQ_Stack_Size 
   80088:	e2400080 	sub	r0, r0, #128	; 0x80
 
#  Enter Supervisor Mode and set its Stack Pointer 
                MSR     CPSR_c, #Mode_SVC|I_Bit|F_Bit 
   8008c:	e321f0d3 	msr	CPSR_c, #211	; 0xd3
                MOV     SP, R0 
   80090:	e1a0d000 	mov	sp, r0
                SUB     R0, R0, #SVC_Stack_Size 
   80094:	e2400004 	sub	r0, r0, #4	; 0x4
 
#  Enter User Mode and set its Stack Pointer 
                MSR     CPSR_c, #Mode_USR 
   80098:	e321f010 	msr	CPSR_c, #16	; 0x10
                MOV     SP, R0 
   8009c:	e1a0d000 	mov	sp, r0
 
#  Setup a default Stack Limit (when compiled with -mapcs-stack-check) 
                mov     R0,#USR_Stack_Size
   800a0:	e3a00b01 	mov	r0, #1024	; 0x400
                SUB     SL, SP,R0         /* USER STACK SIZE SL = R10 */ 
   800a4:	e04da000 	sub	sl, sp, r0

/* mt: ifdef / else / endif */
#ifdef ROM_RUN
# Relocate .data section (Copy from ROM to RAM) 
                LDR     R1, =_etext 
   800a8:	e59f1068 	ldr	r1, [pc, #104]	; 80118 <.text+0x118>
                LDR     R2, =_data 
   800ac:	e59f2068 	ldr	r2, [pc, #104]	; 8011c <.text+0x11c>
                LDR     R3, =_edata 
   800b0:	e59f3068 	ldr	r3, [pc, #104]	; 80120 <.text+0x120>
				CMP     R2, R3 /* mt */
   800b4:	e1520003 	cmp	r2, r3
				BEQ		DataIsEmpty /* mt */				
   800b8:	0a000003 	beq	800cc <DataIsEmpty>

000800bc <LoopRel>:
LoopRel:        CMP     R2, R3 
   800bc:	e1520003 	cmp	r2, r3
                LDRLO   R0, [R1], #4 
   800c0:	34910004 	ldrcc	r0, [r1], #4
                STRLO   R0, [R2], #4 
   800c4:	34820004 	strcc	r0, [r2], #4
                BLO     LoopRel 
   800c8:	3afffffb 	bcc	800bc <LoopRel>

000800cc <DataIsEmpty>:
DataIsEmpty: /* mt */
#else
#warning RAM_RUN - .data will not be copied
#endif
 
# Clear .bss section (Zero init)                 
                MOV     R0, #0 
   800cc:	e3a00000 	mov	r0, #0	; 0x0
                LDR     R1, =__bss_start__ 
   800d0:	e59f104c 	ldr	r1, [pc, #76]	; 80124 <.text+0x124>
                LDR     R2, =__bss_end__ 
   800d4:	e59f204c 	ldr	r2, [pc, #76]	; 80128 <.text+0x128>

000800d8 <LoopZI>:
LoopZI:         CMP     R1, R2 
   800d8:	e1510002 	cmp	r1, r2
                STRLO   R0, [R1], #4 
   800dc:	34810004 	strcc	r0, [r1], #4
                BLO     LoopZI 
   800e0:	3afffffc 	bcc	800d8 <LoopZI>

000800e4 <Jump_To_Main>:
 

.if En_StdIO
            
# Enter the standard system startup code required for stdlib I/O  
              B       _start	
			      
.endif
 
# Enter the C code 
           	 


Jump_To_Main:   
                ADR     LR, __Return_from_Main           
   800e4:	e28fe004 	add	lr, pc, #4	; 0x4
                LDR     R0, =main
   800e8:	e59f003c 	ldr	r0, [pc, #60]	; 8012c <.text+0x12c>
                BX      R0
   800ec:	e12fff10 	bx	r0

000800f0 <__Return_from_Main>:

__Return_from_Main:
                B       __Return_from_Main	 
   800f0:	eafffffe 	b	800f0 <__Return_from_Main>

000800f4 <ADI_IRQ_Interrupt_Wrapper>:


        .size   _startup, . - _startup 
        .endfunc 

		
		.func ADI_IRQ_Interrupt_Wrapper
		.extern IRQ

ADI_IRQ_Interrupt_Wrapper:
@ adjust return-address and save registers
		sub lr, lr, #4
   800f4:	e24ee004 	sub	lr, lr, #4	; 0x4
		stmdb sp!, {r0-r3, ip, lr}
   800f8:	e92d500f 	stmdb	sp!, {r0, r1, r2, r3, ip, lr}

		ldr r0, =IRQ
   800fc:	e59f002c 	ldr	r0, [pc, #44]	; 80130 <.text+0x130>
		ldr r0, [r0]
   80100:	e5900000 	ldr	r0, [r0]
@ if *IRQ != 0 call IRQ()
		cmp r0, #0
   80104:	e3500000 	cmp	r0, #0	; 0x0
		movne lr, pc
   80108:	11a0e00f 	movne	lr, pc
		bxne r0
   8010c:	112fff10 	bxne	r0
@ restore registers and exit from wrapper (PC=saved LR)
		ldmia sp!, {r0-r3, ip, pc}^
   80110:	e8fd900f 	ldmia	sp!, {r0, r1, r2, r3, ip, pc}^
   80114:	ffff0000 	undefined instruction 0xffff0000
   80118:	00082724 	andeq	r2, r8, r4, lsr #14
   8011c:	00010000 	andeq	r0, r1, r0
   80120:	00010008 	andeq	r0, r1, r8
   80124:	00010008 	andeq	r0, r1, r8
   80128:	00010074 	andeq	r0, r1, r4, ror r0
   8012c:	000803b4 	streqh	r0, [r8], -r4
   80130:	00010020 	andeq	r0, r1, r0, lsr #32

00080134 <ADI_FIQ_Interrupt_Setup>:
}
#endif

void	ADI_FIQ_Interrupt_Setup(void) 
{
   80134:	e24ee004 	sub	lr, lr, #4	; 0x4
   80138:	e92d400f 	stmdb	sp!, {r0, r1, r2, r3, lr}
	if ( *FIQ !=0x00)
   8013c:	e59f3014 	ldr	r3, [pc, #20]	; 80158 <.text+0x158>
   80140:	e5933000 	ldr	r3, [r3]
   80144:	e3530000 	cmp	r3, #0	; 0x0
   80148:	08fd800f 	ldmeqia	sp!, {r0, r1, r2, r3, pc}^
	{
		FIQ();
   8014c:	e1a0e00f 	mov	lr, pc
   80150:	e12fff13 	bx	r3
   80154:	e8fd800f 	ldmia	sp!, {r0, r1, r2, r3, pc}^
   80158:	00010024 	andeq	r0, r1, r4, lsr #32

0008015c <ADI_SWI_Interrupt_Setup>:
	}
}

void	ADI_SWI_Interrupt_Setup(void) 
{
   8015c:	e92d500f 	stmdb	sp!, {r0, r1, r2, r3, ip, lr}
	if ( *SWI !=0x00)
   80160:	e59f3014 	ldr	r3, [pc, #20]	; 8017c <.text+0x17c>
   80164:	e5933000 	ldr	r3, [r3]
   80168:	e3530000 	cmp	r3, #0	; 0x0
   8016c:	08fd900f 	ldmeqia	sp!, {r0, r1, r2, r3, ip, pc}^
	{
		SWI();
   80170:	e1a0e00f 	mov	lr, pc
   80174:	e12fff13 	bx	r3
   80178:	e8fd900f 	ldmia	sp!, {r0, r1, r2, r3, ip, pc}^
   8017c:	00010014 	andeq	r0, r1, r4, lsl r0

00080180 <ADI_UNDEF_Interrupt_Setup>:
	}
}

void	ADI_UNDEF_Interrupt_Setup(void) 
{
   80180:	e92d500f 	stmdb	sp!, {r0, r1, r2, r3, ip, lr}
	if ( *UNDEF !=0x00)
   80184:	e59f3014 	ldr	r3, [pc, #20]	; 801a0 <.text+0x1a0>
   80188:	e5933000 	ldr	r3, [r3]
   8018c:	e3530000 	cmp	r3, #0	; 0x0
   80190:	08fd900f 	ldmeqia	sp!, {r0, r1, r2, r3, ip, pc}^
	{
		UNDEF();
   80194:	e1a0e00f 	mov	lr, pc
   80198:	e12fff13 	bx	r3
   8019c:	e8fd900f 	ldmia	sp!, {r0, r1, r2, r3, ip, pc}^
   801a0:	00010010 	andeq	r0, r1, r0, lsl r0

000801a4 <ADI_PABORT_Interrupt_Setup>:
	}
}

void	ADI_PABORT_Interrupt_Setup(void) 
{
	if ( *PABORT !=0x00)
   801a4:	e59f3018 	ldr	r3, [pc, #24]	; 801c4 <.text+0x1c4>
   801a8:	e5933000 	ldr	r3, [r3]
   801ac:	e3530000 	cmp	r3, #0	; 0x0
   801b0:	e52de004 	str	lr, [sp, #-4]!
   801b4:	049df004 	ldreq	pc, [sp], #4
	{
		PABORT();
   801b8:	e1a0e00f 	mov	lr, pc
   801bc:	e12fff13 	bx	r3
   801c0:	e49df004 	ldr	pc, [sp], #4
   801c4:	00010018 	andeq	r0, r1, r8, lsl r0

000801c8 <ADI_DABORT_Interrupt_Setup>:
	}
}

void	ADI_DABORT_Interrupt_Setup(void) 
{
	if ( *DABORT !=0x00)
   801c8:	e59f3018 	ldr	r3, [pc, #24]	; 801e8 <.text+0x1e8>
   801cc:	e5933000 	ldr	r3, [r3]
   801d0:	e3530000 	cmp	r3, #0	; 0x0
   801d4:	e52de004 	str	lr, [sp, #-4]!
   801d8:	049df004 	ldreq	pc, [sp], #4
	{
		DABORT();
   801dc:	e1a0e00f 	mov	lr, pc
   801e0:	e12fff13 	bx	r3
   801e4:	e49df004 	ldr	pc, [sp], #4
   801e8:	0001001c 	andeq	r0, r1, ip, lsl r0

000801ec <FeedWatchdog>:
volatile int integral;

#ifdef Watchdog
#else
void FeedWatchdog(void) {};
   801ec:	e12fff1e 	bx	lr

000801f0 <Timer0_IRQ_Handler>:
#endif


#define FIRST_ADC_INPUT 0
#define LAST_ADC_INPUT 3
volatile u32 adc_data[LAST_ADC_INPUT-FIRST_ADC_INPUT+1];
volatile int Temperature;

void Timer0_IRQ_Handler(void);

void Timer0_IRQ_Handler(void)
{
   801f0:	e92d4010 	stmdb	sp!, {r4, lr}
  static u32 input_index = 1;
  u32 DAC_Value;
  int delta;

  ADCCP = input_index;
   801f4:	e59f419c 	ldr	r4, [pc, #412]	; 80398 <.text+0x398>
   801f8:	e5940000 	ldr	r0, [r4]
   801fc:	e3e02a0f 	mvn	r2, #61440	; 0xf000

  if (input_index == 0x10) {
   80200:	e3500010 	cmp	r0, #16	; 0x10
   80204:	e5020afb 	str	r0, [r2, #-2811]
   80208:	0a000053 	beq	8035c <Timer0_IRQ_Handler+0x16c>
    ADCCON = 0x6A3;				// ADC config: fADC/2, acq. time = 16 clocks => ADC Speed = 1MSPS
	while (!ADCSTA);			// wait for end of conversion
    Temperature = 0x525 - (ADCDAT >> 16);
    input_index = FIRST_ADC_INPUT;
  }
  else {
    if (input_index == FIRST_ADC_INPUT) {		// HV Feedback
   8020c:	e3500000 	cmp	r0, #0	; 0x0
	  ADCCON = 0x6A3;				// ADC config: fADC/2, acq. time = 16 clocks => ADC Speed = 1MSPS
	  while (!ADCSTA);			// wait for end of conversion
      adc_data[input_index] = HV_Measured = ADCDAT >> 16;    	
      if (GP1DAT & PowerEN) {
        delta = (HV_Measured - (int)HV_Setting);
        integral += delta;
        if (integral < 0)
          DAC_Value = 0;
        else if (integral > (MaxDAC_Value << int_shift)) {
          integral = MaxDAC_Value << int_shift;
          DAC_Value = MaxDAC_Value;
		}
        else
          DAC_Value = (u32)integral >> int_shift;

        DAC0DAT = (DAC_Value << 15);
	    DAC1DAT = ((DAC_Value + 1) << 15);

        if (abs(delta) > 2)
          T0LD = 25;
        else
          T0LD = 800;
      }
    }
    else {
	  ADCCON = 0x6A3;				// ADC config: fADC/2, acq. time = 16 clocks => ADC Speed = 1MSPS
   80210:	13a03e6a 	movne	r3, #1696	; 0x6a0
   80214:	12833003 	addne	r3, r3, #3	; 0x3
   80218:	15023aff 	strne	r3, [r2, #-2815]
   8021c:	1a000038 	bne	80304 <Timer0_IRQ_Handler+0x114>
   80220:	e3a03e6a 	mov	r3, #1696	; 0x6a0
   80224:	e2833003 	add	r3, r3, #3	; 0x3
   80228:	e5023aff 	str	r3, [r2, #-2815]
   8022c:	e5123af3 	ldr	r3, [r2, #-2803]
   80230:	e3530000 	cmp	r3, #0	; 0x0
   80234:	0afffffc 	beq	8022c <Timer0_IRQ_Handler+0x3c>
   80238:	e5123aef 	ldr	r3, [r2, #-2799]
   8023c:	e59f0158 	ldr	r0, [pc, #344]	; 8039c <.text+0x39c>
   80240:	e1a03823 	mov	r3, r3, lsr #16
   80244:	e5803000 	str	r3, [r0]
   80248:	e59f3150 	ldr	r3, [pc, #336]	; 803a0 <.text+0x3a0>
   8024c:	e5901000 	ldr	r1, [r0]
   80250:	e5831000 	str	r1, [r3]
   80254:	e3e02000 	mvn	r2, #0	; 0x0
   80258:	e5123bcf 	ldr	r3, [r2, #-3023]
   8025c:	e3130701 	tst	r3, #262144	; 0x40000
   80260:	0a000024 	beq	802f8 <Timer0_IRQ_Handler+0x108>
   80264:	e59f2138 	ldr	r2, [pc, #312]	; 803a4 <.text+0x3a4>
   80268:	e59fe138 	ldr	lr, [pc, #312]	; 803a8 <.text+0x3a8>
   8026c:	e5900000 	ldr	r0, [r0]
   80270:	e5921000 	ldr	r1, [r2]
   80274:	e59e3000 	ldr	r3, [lr]
   80278:	e0611000 	rsb	r1, r1, r0
   8027c:	e0813003 	add	r3, r1, r3
   80280:	e58e3000 	str	r3, [lr]
   80284:	e59e2000 	ldr	r2, [lr]
   80288:	e3520000 	cmp	r2, #0	; 0x0
   8028c:	b3a00000 	movlt	r0, #0	; 0x0
   80290:	b3a02902 	movlt	r2, #32768	; 0x8000
   80294:	ba00000d 	blt	802d0 <Timer0_IRQ_Handler+0xe0>
   80298:	e59e3000 	ldr	r3, [lr]
   8029c:	e3a0cb7e 	mov	ip, #129024	; 0x1f800
   802a0:	e28cce1a 	add	ip, ip, #416	; 0x1a0
   802a4:	e153000c 	cmp	r3, ip
   802a8:	d59e3000 	ldrle	r3, [lr]
   802ac:	c3a0053f 	movgt	r0, #264241152	; 0xfc00000
   802b0:	d1a03223 	movle	r3, r3, lsr #4
   802b4:	c1a02000 	movgt	r2, r0
   802b8:	d2832001 	addle	r2, r3, #1	; 0x1
   802bc:	c58ec000 	strgt	ip, [lr]
   802c0:	c280080d 	addgt	r0, r0, #851968	; 0xd0000
   802c4:	c2822936 	addgt	r2, r2, #884736	; 0xd8000
   802c8:	d1a02782 	movle	r2, r2, lsl #15
   802cc:	d1a00783 	movle	r0, r3, lsl #15
   802d0:	e0213fc1 	eor	r3, r1, r1, asr #31
   802d4:	e0433fc1 	sub	r3, r3, r1, asr #31
   802d8:	e3530002 	cmp	r3, #2	; 0x2
   802dc:	e3e01a0f 	mvn	r1, #61440	; 0xf000
   802e0:	c3a03019 	movgt	r3, #25	; 0x19
   802e4:	d3a03e32 	movle	r3, #800	; 0x320
   802e8:	e50109fb 	str	r0, [r1, #-2555]
   802ec:	e50129f3 	str	r2, [r1, #-2547]
   802f0:	c5013cff 	strgt	r3, [r1, #-3327]
   802f4:	d5013cff 	strle	r3, [r1, #-3327]
	  while (!ADCSTA);			// wait for end of conversion
      adc_data[input_index] = (ADCDAT >> 16);    

    } 

    //Select next ADC input
    if (++input_index > LAST_ADC_INPUT)
   802f8:	e3a03001 	mov	r3, #1	; 0x1
   802fc:	e5843000 	str	r3, [r4]
   80300:	ea00000c 	b	80338 <Timer0_IRQ_Handler+0x148>
   80304:	e5123af3 	ldr	r3, [r2, #-2803]
   80308:	e3530000 	cmp	r3, #0	; 0x0
   8030c:	0afffffc 	beq	80304 <Timer0_IRQ_Handler+0x114>
   80310:	e5123aef 	ldr	r3, [r2, #-2799]
   80314:	e2801001 	add	r1, r0, #1	; 0x1
   80318:	e59f2080 	ldr	r2, [pc, #128]	; 803a0 <.text+0x3a0>
   8031c:	e3510003 	cmp	r1, #3	; 0x3
   80320:	e1a03823 	mov	r3, r3, lsr #16
   80324:	e7823100 	str	r3, [r2, r0, lsl #2]
      input_index = 0x10;	// Choose temperature sensor
   80328:	859f3068 	ldrhi	r3, [pc, #104]	; 80398 <.text+0x398>
   8032c:	83a02010 	movhi	r2, #16	; 0x10
   80330:	e5841000 	str	r1, [r4]
   80334:	85832000 	strhi	r2, [r3]
  }
  
  if (ProgramOk) {
   80338:	e59f206c 	ldr	r2, [pc, #108]	; 803ac <.text+0x3ac>
   8033c:	e5923000 	ldr	r3, [r2]
   80340:	e3530000 	cmp	r3, #0	; 0x0
    ProgramOk = 0;
   80344:	13a03000 	movne	r3, #0	; 0x0
   80348:	15823000 	strne	r3, [r2]
    FeedWatchdog();
  }

  T0CLRI = 0;
   8034c:	e3a02000 	mov	r2, #0	; 0x0
   80350:	e3e03a0f 	mvn	r3, #61440	; 0xf000
   80354:	e5032cf3 	str	r2, [r3, #-3315]
}
   80358:	e8bd8010 	ldmia	sp!, {r4, pc}
   8035c:	e3a03e6a 	mov	r3, #1696	; 0x6a0
   80360:	e2833003 	add	r3, r3, #3	; 0x3
   80364:	e5023aff 	str	r3, [r2, #-2815]
   80368:	e5123af3 	ldr	r3, [r2, #-2803]
   8036c:	e3530000 	cmp	r3, #0	; 0x0
   80370:	0afffffc 	beq	80368 <Timer0_IRQ_Handler+0x178>
   80374:	e5123aef 	ldr	r3, [r2, #-2799]
   80378:	e1a03823 	mov	r3, r3, lsr #16
   8037c:	e2633e52 	rsb	r3, r3, #1312	; 0x520
   80380:	e59f2028 	ldr	r2, [pc, #40]	; 803b0 <.text+0x3b0>
   80384:	e2833005 	add	r3, r3, #5	; 0x5
   80388:	e3a01000 	mov	r1, #0	; 0x0
   8038c:	e5823000 	str	r3, [r2]
   80390:	e5841000 	str	r1, [r4]
   80394:	eaffffe7 	b	80338 <Timer0_IRQ_Handler+0x148>
   80398:	00010000 	andeq	r0, r1, r0
   8039c:	00010038 	andeq	r0, r1, r8, lsr r0
   803a0:	0001003c 	andeq	r0, r1, ip, lsr r0
   803a4:	00010060 	andeq	r0, r1, r0, rrx
   803a8:	00010070 	andeq	r0, r1, r0, ror r0
   803ac:	00010030 	andeq	r0, r1, r0, lsr r0
   803b0:	00010028 	andeq	r0, r1, r8, lsr #32

000803b4 <main>:



char NextChar;

static u16 GetWORD(void)
{ 
  u16 i;
  
  i = 0;
  do {
//    while (!received())
//      ProgramOk = 1;   
    NextChar = getchar();
    if (isdigit(NextChar)) {
      i *= 10;
      i += NextChar - '0';
    }
    else  
      break;
  }  while(1);

  return i;
}


u16 MyAddress, ADC2HV;

float Code2Voltage;


char String[16];

//#define _RS485_TEST_

static u8 GoodAddress(void)
{
  u8 b;
  
  b = (u8)GetWORD();
  return (b == MyAddress);      
}


static void InitADC(void)
{
  int time;

  time = 20000;
  ADCCON = 0x20;	 					// power-on the ADC
  while (time >=0)	  				// wait for ADC to be fully powered on
    time--;

  REFCON = 0x01;				// connect internal 2.5V reference to Vref pin
  ADCCON = 0x623;				// ADC config: fADC/2, acq. time = 16 clocks => ADC Speed = 1MSPS
}

//#define _RS485_TEST_
//#define _INIT_EEPROM_
//#define _EEPROM_TEST_

int main(void)
{
   803b4:	e92d4ff0 	stmdb	sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}

  int ch, i, b;
#ifdef _EEPROM_TEST_
  u16 j;
#endif

  InitController();
   803b8:	eb0001eb 	bl	80b6c <InitController>
   803bc:	e3a02e62 	mov	r2, #1568	; 0x620
   803c0:	e3e04a0f 	mvn	r4, #61440	; 0xf000
   803c4:	e2822003 	add	r2, r2, #3	; 0x3
   803c8:	e3a03020 	mov	r3, #32	; 0x20
   803cc:	e3a06001 	mov	r6, #1	; 0x1
   803d0:	e5043aff 	str	r3, [r4, #-2815]
   803d4:	e5046b73 	str	r6, [r4, #-2931]
   803d8:	e5042aff 	str	r2, [r4, #-2815]
  InitADC();
  InitSerial();
   803dc:	eb00023f 	bl	80ce0 <InitSerial>

#ifndef _EEPROM_TEST
  IRQ = Timer0_IRQ_Handler;			// Specify Interrupt Service Rountine
   803e0:	e59f16f8 	ldr	r1, [pc, #1784]	; 80ae0 <.text+0xae0>
   803e4:	e59f36f8 	ldr	r3, [pc, #1784]	; 80ae4 <.text+0xae4>
  T0LD = 50;						// Counter Value
   803e8:	e3a02032 	mov	r2, #50	; 0x32
   803ec:	e5831000 	str	r1, [r3]
  T0CON = 0xC4;						// Enabled,Periodic,Binary and CLK/16
  IRQEN = TIMER0_BIT;				// Enable Timer0 IRQ
   803f0:	e3a05004 	mov	r5, #4	; 0x4
   803f4:	e3a030c4 	mov	r3, #196	; 0xc4
   803f8:	e5042cff 	str	r2, [r4, #-3327]
   803fc:	e5043cf7 	str	r3, [r4, #-3319]
   80400:	e5045ff7 	str	r5, [r4, #-4087]
#endif

#ifdef _RS485_TEST_  
  ch =0x55;
  putchar(ch);
  while (1) {
    if (received()) {
      ch = toupper(getchar());
      putchar(ch);
	}
    FeedWatchdog();
	if (ch == 'N')
	  break;
	if (ch == 'T') {
      IRQEN = 0;
 	}
  }
#endif



#ifdef _EEPROM_TEST_
  if (EE_Erased()) {
    EE_Format();
	delay(50000);
    EE_Write(0, 0x1234);
    EE_Write(2, 0x5678);
    EE_Write(4, 0xA5A5);
  }
  else
    EE_Write(4, 0x4321);
while (1) {
  EE_Read(0, &j);
  rprintf("%X\n", j);
  EE_Read(2, &j);
  rprintf("%X\n", j);
  EE_Read(4, &j);
  rprintf("%X\n", j);
  getchar();
} 
#endif

  if (EE_Erased()) {
   80404:	eb0003c7 	bl	81328 <EE_Erased>
   80408:	e3500000 	cmp	r0, #0	; 0x0
   8040c:	1a0001a3 	bne	80aa0 <.text+0xaa0>
    EE_Format();
    EE_Write(MyAddressAdr, MyAddress0);
    EE_Write(HV_SettingAdr, HV_Setting0);
	EE_Write(ADC2HV_Adr, ADC2HV0);
	EE_Write(FlagsAdr, Flags0);
  }

  EE_Read(MyAddressAdr, &MyAddress);
   80410:	e59f86d0 	ldr	r8, [pc, #1744]	; 80ae8 <.text+0xae8>
  EE_Read(HV_SettingAdr, &HV_Setting);
   80414:	e59f96d0 	ldr	r9, [pc, #1744]	; 80aec <.text+0xaec>
   80418:	e1a01008 	mov	r1, r8
  EE_Read(ADC2HV_Adr, &ADC2HV);
   8041c:	e59f46cc 	ldr	r4, [pc, #1740]	; 80af0 <.text+0xaf0>
   80420:	e3a00000 	mov	r0, #0	; 0x0
   80424:	eb000447 	bl	81548 <EE_Read>
   80428:	e1a01009 	mov	r1, r9
   8042c:	e3a00002 	mov	r0, #2	; 0x2
   80430:	eb000444 	bl	81548 <EE_Read>
   80434:	e1a01004 	mov	r1, r4
   80438:	e1a00005 	mov	r0, r5
   8043c:	eb000441 	bl	81548 <EE_Read>
  EE_Read(FlagsAdr, &Flags);
   80440:	e3a00006 	mov	r0, #6	; 0x6
   80444:	e59f16a8 	ldr	r1, [pc, #1704]	; 80af4 <.text+0xaf4>
   80448:	eb00043e 	bl	81548 <EE_Read>

  Code2Voltage = (float)ADC2HV/0x8000;
   8044c:	e5943000 	ldr	r3, [r4]
   80450:	e3530000 	cmp	r3, #0	; 0x0
   80454:	ba00018b 	blt	80a88 <.text+0xa88>
   80458:	e1a00003 	mov	r0, r3
   8045c:	eb000743 	bl	82170 <__aeabi_i2f>
   80460:	e3a0130e 	mov	r1, #939524096	; 0x38000000
   80464:	eb000778 	bl	8224c <__aeabi_fmul>
   80468:	e59fb688 	ldr	fp, [pc, #1672]	; 80af8 <.text+0xaf8>
   8046c:	e1a03000 	mov	r3, r0
  MaxADC = MaxHV/Code2Voltage;
   80470:	e1a01000 	mov	r1, r0
   80474:	e3a00445 	mov	r0, #1157627904	; 0x45000000
   80478:	e58b3000 	str	r3, [fp]
   8047c:	e2400913 	sub	r0, r0, #311296	; 0x4c000
   80480:	eb0007d7 	bl	823e4 <__aeabi_fdiv>
   80484:	eb00082e 	bl	82544 <__aeabi_f2iz>

  integral = (MaxDAC_Value - (int)HV_Setting) << int_shift;

  if (Flags & HV_OnFlag)
   80488:	e59f1664 	ldr	r1, [pc, #1636]	; 80af4 <.text+0xaf4>
   8048c:	e5912000 	ldr	r2, [r1]
   80490:	e5993000 	ldr	r3, [r9]
   80494:	e3120001 	tst	r2, #1	; 0x1
   80498:	e59f265c 	ldr	r2, [pc, #1628]	; 80afc <.text+0xafc>
   8049c:	e2633d7e 	rsb	r3, r3, #8064	; 0x1f80
   804a0:	e5820000 	str	r0, [r2]
   804a4:	e283301a 	add	r3, r3, #26	; 0x1a
   804a8:	e59f0650 	ldr	r0, [pc, #1616]	; 80b00 <.text+0xb00>
   804ac:	e1a03203 	mov	r3, r3, lsl #4
   804b0:	e5803000 	str	r3, [r0]
    GP1DAT |= PowerEN;
   804b4:	13e02000 	mvnne	r2, #0	; 0x0
   804b8:	15123bcf 	ldrne	r3, [r2, #-3023]
   804bc:	13833701 	orrne	r3, r3, #262144	; 0x40000
   804c0:	159fa63c 	ldrne	sl, [pc, #1596]	; 80b04 <.text+0xb04>
   804c4:	159f663c 	ldrne	r6, [pc, #1596]	; 80b08 <.text+0xb08>
   804c8:	159f763c 	ldrne	r7, [pc, #1596]	; 80b0c <.text+0xb0c>
   804cc:	15023bcf 	strne	r3, [r2, #-3023]
   804d0:	059fa62c 	ldreq	sl, [pc, #1580]	; 80b04 <.text+0xb04>
   804d4:	059f662c 	ldreq	r6, [pc, #1580]	; 80b08 <.text+0xb08>
   804d8:	059f762c 	ldreq	r7, [pc, #1580]	; 80b0c <.text+0xb0c>

  while (1) {
    ProgramOk = 1;
   804dc:	e3a03001 	mov	r3, #1	; 0x1
   804e0:	e58a3000 	str	r3, [sl]
    if(received()) {
   804e4:	eb0001f9 	bl	80cd0 <received>
   804e8:	e3500000 	cmp	r0, #0	; 0x0
   804ec:	0afffffa 	beq	804dc <main+0x128>
      ch = toupper(getchar());
   804f0:	eb0001f0 	bl	80cb8 <getchar>
   804f4:	e5963000 	ldr	r3, [r6]
   804f8:	e7d32000 	ldrb	r2, [r3, r0]
   804fc:	e3120002 	tst	r2, #2	; 0x2
   80500:	01a05000 	moveq	r5, r0
   80504:	12405020 	subne	r5, r0, #32	; 0x20
      if (ch == 'A') {                 // Set and read Address
   80508:	e3550041 	cmp	r5, #65	; 0x41
   8050c:	0a000123 	beq	809a0 <.text+0x9a0>
        b = (u8)GetWORD();
        if ((b == 253) | (b == MyAddress)) {
          if (NextChar == ' ') {
            b = (u8)GetWORD();
            if (b)
              MyAddress = b;
            else
              b = MyAddress;
          }
          else
            b = MyAddress;
		  rprintf("%u", b);
        }
      }
      else {
        switch(ch) {
   80510:	e2453043 	sub	r3, r5, #67	; 0x43
   80514:	e3530013 	cmp	r3, #19	; 0x13
   80518:	979ff103 	ldrls	pc, [pc, r3, lsl #2]
   8051c:	eaffffee 	b	804dc <main+0x128>
   80520:	00080570 	andeq	r0, r8, r0, ror r5
   80524:	0008067c 	andeq	r0, r8, ip, ror r6
   80528:	00080754 	andeq	r0, r8, r4, asr r7
   8052c:	000804dc 	ldreqd	r0, [r8], -ip
   80530:	00080894 	muleq	r8, r4, r8
   80534:	0008082c 	andeq	r0, r8, ip, lsr #16
   80538:	000804dc 	ldreqd	r0, [r8], -ip
   8053c:	000804dc 	ldreqd	r0, [r8], -ip
   80540:	000804dc 	ldreqd	r0, [r8], -ip
   80544:	000804dc 	ldreqd	r0, [r8], -ip
   80548:	000804dc 	ldreqd	r0, [r8], -ip
   8054c:	000804dc 	ldreqd	r0, [r8], -ip
   80550:	000804dc 	ldreqd	r0, [r8], -ip
   80554:	000804dc 	ldreqd	r0, [r8], -ip
   80558:	000804dc 	ldreqd	r0, [r8], -ip
   8055c:	0008082c 	andeq	r0, r8, ip, lsr #16
   80560:	00080928 	andeq	r0, r8, r8, lsr #18
   80564:	000804dc 	ldreqd	r0, [r8], -ip
   80568:	000804dc 	ldreqd	r0, [r8], -ip
   8056c:	00080754 	andeq	r0, r8, r4, asr r7
   80570:	e3a04000 	mov	r4, #0	; 0x0
   80574:	ea000000 	b	8057c <.text+0x57c>
   80578:	e2434030 	sub	r4, r3, #48	; 0x30
   8057c:	eb0001cd 	bl	80cb8 <getchar>
   80580:	e20000ff 	and	r0, r0, #255	; 0xff
   80584:	e5c70000 	strb	r0, [r7]
   80588:	e5961000 	ldr	r1, [r6]
   8058c:	e1a02184 	mov	r2, r4, lsl #3
   80590:	e1a03084 	mov	r3, r4, lsl #1
   80594:	e0833002 	add	r3, r3, r2
   80598:	e7d02001 	ldrb	r2, [r0, r1]
   8059c:	e3120004 	tst	r2, #4	; 0x4
   805a0:	e0803003 	add	r3, r0, r3
   805a4:	1afffff3 	bne	80578 <.text+0x578>
        case 'C':    // Calibrate
          if (GoodAddress()) { 
   805a8:	e5982000 	ldr	r2, [r8]
   805ac:	e20430ff 	and	r3, r4, #255	; 0xff
   805b0:	e1530002 	cmp	r3, r2
   805b4:	1affffc8 	bne	804dc <main+0x128>
   805b8:	e3a04000 	mov	r4, #0	; 0x0
   805bc:	ea000000 	b	805c4 <.text+0x5c4>
   805c0:	e2434030 	sub	r4, r3, #48	; 0x30
   805c4:	eb0001bb 	bl	80cb8 <getchar>
   805c8:	e20000ff 	and	r0, r0, #255	; 0xff
   805cc:	e5c70000 	strb	r0, [r7]
   805d0:	e5961000 	ldr	r1, [r6]
   805d4:	e1a02184 	mov	r2, r4, lsl #3
   805d8:	e1a03084 	mov	r3, r4, lsl #1
   805dc:	e0833002 	add	r3, r3, r2
   805e0:	e7d02001 	ldrb	r2, [r0, r1]
   805e4:	e3120004 	tst	r2, #4	; 0x4
   805e8:	e0803003 	add	r3, r0, r3
   805ec:	1afffff3 	bne	805c0 <.text+0x5c0>
            i = GetWORD();
            Code2Voltage = ((float) i)/HV_Setting;
   805f0:	e1a00004 	mov	r0, r4
   805f4:	eb0006dd 	bl	82170 <__aeabi_i2f>
   805f8:	e5993000 	ldr	r3, [r9]
   805fc:	e3530000 	cmp	r3, #0	; 0x0
   80600:	e1a05000 	mov	r5, r0
   80604:	ba000119 	blt	80a70 <.text+0xa70>
   80608:	e1a00003 	mov	r0, r3
   8060c:	eb0006d7 	bl	82170 <__aeabi_i2f>
   80610:	e1a01000 	mov	r1, r0
   80614:	e1a00005 	mov	r0, r5
   80618:	eb000771 	bl	823e4 <__aeabi_fdiv>
   8061c:	e1a03000 	mov	r3, r0
   80620:	e58b3000 	str	r3, [fp]
			ADC2HV = (u16)(Code2Voltage*0x8000 + 0.5);
   80624:	e3a01447 	mov	r1, #1191182336	; 0x47000000
   80628:	eb000707 	bl	8224c <__aeabi_fmul>
   8062c:	eb000616 	bl	81e8c <__aeabi_f2d>
   80630:	e3a025ff 	mov	r2, #1069547520	; 0x3fc00000
   80634:	e2822602 	add	r2, r2, #2097152	; 0x200000
   80638:	e3a03000 	mov	r3, #0	; 0x0
   8063c:	eb000545 	bl	81b58 <__adddf3>
   80640:	eb000641 	bl	81f4c <__aeabi_d2uiz>
   80644:	e59f24a4 	ldr	r2, [pc, #1188]	; 80af0 <.text+0xaf0>
   80648:	e1a03000 	mov	r3, r0
   8064c:	e5823000 	str	r3, [r2]
			EE_Write(ADC2HV_Adr, ADC2HV);
   80650:	e1a01000 	mov	r1, r0
   80654:	e3a00004 	mov	r0, #4	; 0x4
   80658:	eb000409 	bl	81684 <EE_Write>
            MaxADC = MaxHV/Code2Voltage; 
   8065c:	e3a00445 	mov	r0, #1157627904	; 0x45000000
   80660:	e59b1000 	ldr	r1, [fp]
   80664:	e2400913 	sub	r0, r0, #311296	; 0x4c000
   80668:	eb00075d 	bl	823e4 <__aeabi_fdiv>
   8066c:	eb0007b4 	bl	82544 <__aeabi_f2iz>
   80670:	e59f3484 	ldr	r3, [pc, #1156]	; 80afc <.text+0xafc>
   80674:	e5830000 	str	r0, [r3]
   80678:	eaffff97 	b	804dc <main+0x128>
          }
//rprintf("C2V=%u\n", (int)(Code2Voltage*1000.0));
        break;         
        case 'V':                 // Set HV in Volts
        case 'E':                 // Set HV in ADC units
          if (GoodAddress()) {
            i = GetWORD();
            if (ch == 'V')
              i =  (u16)(i/Code2Voltage);
            if (i > MaxADC)
              i = MaxADC;
			if (i != HV_Setting) {
              HV_Setting = i;
              integral = (MaxDAC_Value - (int)HV_Setting) << int_shift;
              EE_Write(HV_SettingAdr, HV_Setting);
			}
          }
        break;
        case 'R':                 // Read HV in Volts
        case 'H':                 // ReadHV in ADC units
          if (GoodAddress()) {
            i = HV_Measured;
            if (ch == 'R')
              i *= Code2Voltage;
            rprintf("e=%u", i);
          }
        break;     
        case 'S':                 // Switch HV off
          if (GoodAddress()) {
		    Flags &= ~HV_OnFlag;
	        EE_Write(FlagsAdr, Flags);
		    GP1DAT &= ~PowerEN;
          }
        break;
        case 'G':                 // Switch HV on
          if (GoodAddress()) {
		    Flags |= HV_OnFlag;
	        EE_Write(FlagsAdr, Flags);
            GP1DAT |= PowerEN;
            integral = (MaxDAC_Value - (int)HV_Setting) << int_shift;			
   8067c:	e3a04000 	mov	r4, #0	; 0x0
   80680:	ea000000 	b	80688 <.text+0x688>
   80684:	e2434030 	sub	r4, r3, #48	; 0x30
   80688:	eb00018a 	bl	80cb8 <getchar>
   8068c:	e20000ff 	and	r0, r0, #255	; 0xff
   80690:	e5c70000 	strb	r0, [r7]
   80694:	e5961000 	ldr	r1, [r6]
   80698:	e1a02184 	mov	r2, r4, lsl #3
   8069c:	e1a03084 	mov	r3, r4, lsl #1
   806a0:	e0833002 	add	r3, r3, r2
   806a4:	e7d02001 	ldrb	r2, [r0, r1]
   806a8:	e3120004 	tst	r2, #4	; 0x4
   806ac:	e0803003 	add	r3, r0, r3
   806b0:	1afffff3 	bne	80684 <.text+0x684>
          }
        break;
        case 'D':
          if (GoodAddress()) {
   806b4:	e5982000 	ldr	r2, [r8]
   806b8:	e20430ff 	and	r3, r4, #255	; 0xff
   806bc:	e1530002 	cmp	r3, r2
   806c0:	1affff85 	bne	804dc <main+0x128>
		    rprintf("\n");
   806c4:	e59f0444 	ldr	r0, [pc, #1092]	; 80b10 <.text+0xb10>
   806c8:	eb0001b3 	bl	80d9c <rprintf>
            for (i = FIRST_ADC_INPUT; i <= LAST_ADC_INPUT; i++)
              rprintf("ADC[%i]=%u\n", i, adc_data[i]);
   806cc:	e59f1440 	ldr	r1, [pc, #1088]	; 80b14 <.text+0xb14>
   806d0:	e59f0440 	ldr	r0, [pc, #1088]	; 80b18 <.text+0xb18>
   806d4:	e5912000 	ldr	r2, [r1]
   806d8:	e3a01000 	mov	r1, #0	; 0x0
   806dc:	eb0001ae 	bl	80d9c <rprintf>
   806e0:	e59f342c 	ldr	r3, [pc, #1068]	; 80b14 <.text+0xb14>
   806e4:	e59f042c 	ldr	r0, [pc, #1068]	; 80b18 <.text+0xb18>
   806e8:	e5932004 	ldr	r2, [r3, #4]
   806ec:	e3a01001 	mov	r1, #1	; 0x1
   806f0:	eb0001a9 	bl	80d9c <rprintf>
   806f4:	e59f0418 	ldr	r0, [pc, #1048]	; 80b14 <.text+0xb14>
   806f8:	e3a01002 	mov	r1, #2	; 0x2
   806fc:	e5902008 	ldr	r2, [r0, #8]
   80700:	e59f0410 	ldr	r0, [pc, #1040]	; 80b18 <.text+0xb18>
   80704:	eb0001a4 	bl	80d9c <rprintf>
   80708:	e59f1404 	ldr	r1, [pc, #1028]	; 80b14 <.text+0xb14>
   8070c:	e59f0404 	ldr	r0, [pc, #1028]	; 80b18 <.text+0xb18>
   80710:	e591200c 	ldr	r2, [r1, #12]
   80714:	e3a01003 	mov	r1, #3	; 0x3
   80718:	eb00019f 	bl	80d9c <rprintf>
            rprintf("Temperature=%i\n", (Temperature*10)/13);
   8071c:	e59f23f8 	ldr	r2, [pc, #1016]	; 80b1c <.text+0xb1c>
   80720:	e5921000 	ldr	r1, [r2]
   80724:	e59f33f4 	ldr	r3, [pc, #1012]	; 80b20 <.text+0xb20>
   80728:	e1a02181 	mov	r2, r1, lsl #3
   8072c:	e1a01081 	mov	r1, r1, lsl #1
   80730:	e0811002 	add	r1, r1, r2
   80734:	e0c20193 	smull	r0, r2, r3, r1
   80738:	e1a01fc1 	mov	r1, r1, asr #31
   8073c:	e0611142 	rsb	r1, r1, r2, asr #2
   80740:	e59f03dc 	ldr	r0, [pc, #988]	; 80b24 <.text+0xb24>
   80744:	eb000194 	bl	80d9c <rprintf>
		    rprintf("\n");
   80748:	e59f03c0 	ldr	r0, [pc, #960]	; 80b10 <.text+0xb10>
   8074c:	eb000192 	bl	80d9c <rprintf>
   80750:	eaffff61 	b	804dc <main+0x128>
   80754:	e3a04000 	mov	r4, #0	; 0x0
   80758:	ea000000 	b	80760 <.text+0x760>
   8075c:	e2434030 	sub	r4, r3, #48	; 0x30
   80760:	eb000154 	bl	80cb8 <getchar>
   80764:	e20000ff 	and	r0, r0, #255	; 0xff
   80768:	e5c70000 	strb	r0, [r7]
   8076c:	e5961000 	ldr	r1, [r6]
   80770:	e1a02184 	mov	r2, r4, lsl #3
   80774:	e1a03084 	mov	r3, r4, lsl #1
   80778:	e0833002 	add	r3, r3, r2
   8077c:	e7d02001 	ldrb	r2, [r0, r1]
   80780:	e3120004 	tst	r2, #4	; 0x4
   80784:	e0803003 	add	r3, r0, r3
   80788:	1afffff3 	bne	8075c <.text+0x75c>
   8078c:	e5982000 	ldr	r2, [r8]
   80790:	e20430ff 	and	r3, r4, #255	; 0xff
   80794:	e1530002 	cmp	r3, r2
   80798:	1affff4f 	bne	804dc <main+0x128>
   8079c:	e3a04000 	mov	r4, #0	; 0x0
   807a0:	ea000000 	b	807a8 <.text+0x7a8>
   807a4:	e2434030 	sub	r4, r3, #48	; 0x30
   807a8:	eb000142 	bl	80cb8 <getchar>
   807ac:	e20000ff 	and	r0, r0, #255	; 0xff
   807b0:	e5c70000 	strb	r0, [r7]
   807b4:	e5961000 	ldr	r1, [r6]
   807b8:	e1a02184 	mov	r2, r4, lsl #3
   807bc:	e1a03084 	mov	r3, r4, lsl #1
   807c0:	e0833002 	add	r3, r3, r2
   807c4:	e7d02001 	ldrb	r2, [r0, r1]
   807c8:	e3120004 	tst	r2, #4	; 0x4
   807cc:	e0803003 	add	r3, r0, r3
   807d0:	1afffff3 	bne	807a4 <.text+0x7a4>
   807d4:	e3550056 	cmp	r5, #86	; 0x56
   807d8:	e1a00004 	mov	r0, r4
   807dc:	0a00009e 	beq	80a5c <.text+0xa5c>
   807e0:	e59f1314 	ldr	r1, [pc, #788]	; 80afc <.text+0xafc>
   807e4:	e5913000 	ldr	r3, [r1]
   807e8:	e5992000 	ldr	r2, [r9]
   807ec:	e1500003 	cmp	r0, r3
   807f0:	b1a0c000 	movlt	ip, r0
   807f4:	a1a0c003 	movge	ip, r3
   807f8:	e15c0002 	cmp	ip, r2
   807fc:	0affff36 	beq	804dc <main+0x128>
   80800:	e59f32e4 	ldr	r3, [pc, #740]	; 80aec <.text+0xaec>
   80804:	e26c2d7e 	rsb	r2, ip, #8064	; 0x1f80
   80808:	e583c000 	str	ip, [r3]
   8080c:	e282201a 	add	r2, r2, #26	; 0x1a
   80810:	e59f32e8 	ldr	r3, [pc, #744]	; 80b00 <.text+0xb00>
   80814:	e1a02202 	mov	r2, r2, lsl #4
   80818:	e1a0100c 	mov	r1, ip
   8081c:	e5832000 	str	r2, [r3]
   80820:	e3a00002 	mov	r0, #2	; 0x2
   80824:	eb000396 	bl	81684 <EE_Write>
   80828:	eaffff2b 	b	804dc <main+0x128>
   8082c:	e3a04000 	mov	r4, #0	; 0x0
   80830:	ea000000 	b	80838 <.text+0x838>
   80834:	e2434030 	sub	r4, r3, #48	; 0x30
   80838:	eb00011e 	bl	80cb8 <getchar>
   8083c:	e20000ff 	and	r0, r0, #255	; 0xff
   80840:	e5c70000 	strb	r0, [r7]
   80844:	e5961000 	ldr	r1, [r6]
   80848:	e1a02184 	mov	r2, r4, lsl #3
   8084c:	e1a03084 	mov	r3, r4, lsl #1
   80850:	e0833002 	add	r3, r3, r2
   80854:	e7d02001 	ldrb	r2, [r0, r1]
   80858:	e3120004 	tst	r2, #4	; 0x4
   8085c:	e0803003 	add	r3, r0, r3
   80860:	1afffff3 	bne	80834 <.text+0x834>
   80864:	e5982000 	ldr	r2, [r8]
   80868:	e20430ff 	and	r3, r4, #255	; 0xff
   8086c:	e1530002 	cmp	r3, r2
   80870:	1affff19 	bne	804dc <main+0x128>
   80874:	e59f12ac 	ldr	r1, [pc, #684]	; 80b28 <.text+0xb28>
   80878:	e3550052 	cmp	r5, #82	; 0x52
   8087c:	e5910000 	ldr	r0, [r1]
   80880:	0a000070 	beq	80a48 <.text+0xa48>
   80884:	e1a01000 	mov	r1, r0
   80888:	e59f029c 	ldr	r0, [pc, #668]	; 80b2c <.text+0xb2c>
   8088c:	eb000142 	bl	80d9c <rprintf>
   80890:	eaffff11 	b	804dc <main+0x128>
   80894:	e3a04000 	mov	r4, #0	; 0x0
   80898:	ea000000 	b	808a0 <.text+0x8a0>
   8089c:	e2434030 	sub	r4, r3, #48	; 0x30
   808a0:	eb000104 	bl	80cb8 <getchar>
   808a4:	e20000ff 	and	r0, r0, #255	; 0xff
   808a8:	e5c70000 	strb	r0, [r7]
   808ac:	e5961000 	ldr	r1, [r6]
   808b0:	e1a02184 	mov	r2, r4, lsl #3
   808b4:	e1a03084 	mov	r3, r4, lsl #1
   808b8:	e0833002 	add	r3, r3, r2
   808bc:	e7d02001 	ldrb	r2, [r0, r1]
   808c0:	e3120004 	tst	r2, #4	; 0x4
   808c4:	e0803003 	add	r3, r0, r3
   808c8:	1afffff3 	bne	8089c <.text+0x89c>
   808cc:	e5982000 	ldr	r2, [r8]
   808d0:	e20430ff 	and	r3, r4, #255	; 0xff
   808d4:	e1530002 	cmp	r3, r2
   808d8:	1afffeff 	bne	804dc <main+0x128>
   808dc:	e59f0210 	ldr	r0, [pc, #528]	; 80af4 <.text+0xaf4>
   808e0:	e5903000 	ldr	r3, [r0]
   808e4:	e59f2208 	ldr	r2, [pc, #520]	; 80af4 <.text+0xaf4>
   808e8:	e3833001 	orr	r3, r3, #1	; 0x1
   808ec:	e1a01003 	mov	r1, r3
   808f0:	e5823000 	str	r3, [r2]
   808f4:	e3a00006 	mov	r0, #6	; 0x6
   808f8:	eb000361 	bl	81684 <EE_Write>
   808fc:	e5993000 	ldr	r3, [r9]
   80900:	e3e01000 	mvn	r1, #0	; 0x0
   80904:	e5112bcf 	ldr	r2, [r1, #-3023]
   80908:	e2633d7e 	rsb	r3, r3, #8064	; 0x1f80
   8090c:	e283301a 	add	r3, r3, #26	; 0x1a
   80910:	e59f01e8 	ldr	r0, [pc, #488]	; 80b00 <.text+0xb00>
   80914:	e3822701 	orr	r2, r2, #262144	; 0x40000
   80918:	e1a03203 	mov	r3, r3, lsl #4
   8091c:	e5012bcf 	str	r2, [r1, #-3023]
   80920:	e5803000 	str	r3, [r0]
   80924:	eafffeec 	b	804dc <main+0x128>
   80928:	e3a04000 	mov	r4, #0	; 0x0
   8092c:	ea000000 	b	80934 <.text+0x934>
   80930:	e2434030 	sub	r4, r3, #48	; 0x30
   80934:	eb0000df 	bl	80cb8 <getchar>
   80938:	e20000ff 	and	r0, r0, #255	; 0xff
   8093c:	e5c70000 	strb	r0, [r7]
   80940:	e5961000 	ldr	r1, [r6]
   80944:	e1a02184 	mov	r2, r4, lsl #3
   80948:	e1a03084 	mov	r3, r4, lsl #1
   8094c:	e0833002 	add	r3, r3, r2
   80950:	e7d02001 	ldrb	r2, [r0, r1]
   80954:	e3120004 	tst	r2, #4	; 0x4
   80958:	e0803003 	add	r3, r0, r3
   8095c:	1afffff3 	bne	80930 <.text+0x930>
   80960:	e5982000 	ldr	r2, [r8]
   80964:	e20430ff 	and	r3, r4, #255	; 0xff
   80968:	e1530002 	cmp	r3, r2
   8096c:	1afffeda 	bne	804dc <main+0x128>
   80970:	e59f217c 	ldr	r2, [pc, #380]	; 80af4 <.text+0xaf4>
   80974:	e5923000 	ldr	r3, [r2]
   80978:	e3c33001 	bic	r3, r3, #1	; 0x1
   8097c:	e5823000 	str	r3, [r2]
   80980:	e1a01003 	mov	r1, r3
   80984:	e3a00006 	mov	r0, #6	; 0x6
   80988:	eb00033d 	bl	81684 <EE_Write>
   8098c:	e3e02000 	mvn	r2, #0	; 0x0
   80990:	e5123bcf 	ldr	r3, [r2, #-3023]
   80994:	e3c33701 	bic	r3, r3, #262144	; 0x40000
   80998:	e5023bcf 	str	r3, [r2, #-3023]
   8099c:	eafffece 	b	804dc <main+0x128>
   809a0:	e3a04000 	mov	r4, #0	; 0x0
   809a4:	ea000000 	b	809ac <.text+0x9ac>
   809a8:	e2434030 	sub	r4, r3, #48	; 0x30
   809ac:	eb0000c1 	bl	80cb8 <getchar>
   809b0:	e20000ff 	and	r0, r0, #255	; 0xff
   809b4:	e5c70000 	strb	r0, [r7]
   809b8:	e5961000 	ldr	r1, [r6]
   809bc:	e1a02184 	mov	r2, r4, lsl #3
   809c0:	e1a03084 	mov	r3, r4, lsl #1
   809c4:	e0833002 	add	r3, r3, r2
   809c8:	e7d02001 	ldrb	r2, [r0, r1]
   809cc:	e3120004 	tst	r2, #4	; 0x4
   809d0:	e0803003 	add	r3, r0, r3
   809d4:	1afffff3 	bne	809a8 <.text+0x9a8>
   809d8:	e5981000 	ldr	r1, [r8]
   809dc:	e20430ff 	and	r3, r4, #255	; 0xff
   809e0:	e1530001 	cmp	r3, r1
   809e4:	135300fd 	cmpne	r3, #253	; 0xfd
   809e8:	1afffebb 	bne	804dc <main+0x128>
   809ec:	e3500020 	cmp	r0, #32	; 0x20
   809f0:	0a000002 	beq	80a00 <.text+0xa00>
   809f4:	e59f0134 	ldr	r0, [pc, #308]	; 80b30 <.text+0xb30>
   809f8:	eb0000e7 	bl	80d9c <rprintf>
   809fc:	eafffeb6 	b	804dc <main+0x128>
   80a00:	e3a05000 	mov	r5, #0	; 0x0
   80a04:	ea000000 	b	80a0c <.text+0xa0c>
   80a08:	e2435030 	sub	r5, r3, #48	; 0x30
   80a0c:	eb0000a9 	bl	80cb8 <getchar>
   80a10:	e20000ff 	and	r0, r0, #255	; 0xff
   80a14:	e5c70000 	strb	r0, [r7]
   80a18:	e5961000 	ldr	r1, [r6]
   80a1c:	e1a02185 	mov	r2, r5, lsl #3
   80a20:	e1a03085 	mov	r3, r5, lsl #1
   80a24:	e0833002 	add	r3, r3, r2
   80a28:	e7d02001 	ldrb	r2, [r0, r1]
   80a2c:	e3120004 	tst	r2, #4	; 0x4
   80a30:	e0803003 	add	r3, r0, r3
   80a34:	1afffff3 	bne	80a08 <.text+0xa08>
   80a38:	e21510ff 	ands	r1, r5, #255	; 0xff
   80a3c:	05981000 	ldreq	r1, [r8]
   80a40:	15881000 	strne	r1, [r8]
   80a44:	eaffffea 	b	809f4 <.text+0x9f4>
   80a48:	eb0005c8 	bl	82170 <__aeabi_i2f>
   80a4c:	e59b1000 	ldr	r1, [fp]
   80a50:	eb0005fd 	bl	8224c <__aeabi_fmul>
   80a54:	eb0006ba 	bl	82544 <__aeabi_f2iz>
   80a58:	eaffff89 	b	80884 <.text+0x884>
   80a5c:	eb0005c3 	bl	82170 <__aeabi_i2f>
   80a60:	e59b1000 	ldr	r1, [fp]
   80a64:	eb00065e 	bl	823e4 <__aeabi_fdiv>
   80a68:	eb0006cc 	bl	825a0 <__aeabi_f2uiz>
   80a6c:	eaffff5b 	b	807e0 <.text+0x7e0>
   80a70:	e2030001 	and	r0, r3, #1	; 0x1
   80a74:	e18000a3 	orr	r0, r0, r3, lsr #1
   80a78:	eb0005bc 	bl	82170 <__aeabi_i2f>
   80a7c:	e1a01000 	mov	r1, r0
   80a80:	eb000549 	bl	81fac <__addsf3>
   80a84:	eafffee1 	b	80610 <.text+0x610>
   80a88:	e2030001 	and	r0, r3, #1	; 0x1
   80a8c:	e18000a3 	orr	r0, r0, r3, lsr #1
   80a90:	eb0005b6 	bl	82170 <__aeabi_i2f>
   80a94:	e1a01000 	mov	r1, r0
   80a98:	eb000543 	bl	81fac <__addsf3>
   80a9c:	eafffe6f 	b	80460 <main+0xac>
   80aa0:	eb00026b 	bl	81454 <EE_Format>
   80aa4:	e1a01006 	mov	r1, r6
   80aa8:	e3a00000 	mov	r0, #0	; 0x0
   80aac:	eb0002f4 	bl	81684 <EE_Write>
   80ab0:	e3a01e89 	mov	r1, #2192	; 0x890
   80ab4:	e2811008 	add	r1, r1, #8	; 0x8
   80ab8:	e3a00002 	mov	r0, #2	; 0x2
   80abc:	eb0002f0 	bl	81684 <EE_Write>
   80ac0:	e3a01c69 	mov	r1, #26880	; 0x6900
   80ac4:	e1a00005 	mov	r0, r5
   80ac8:	e2811038 	add	r1, r1, #56	; 0x38
   80acc:	eb0002ec 	bl	81684 <EE_Write>
   80ad0:	e3a01000 	mov	r1, #0	; 0x0
   80ad4:	e3a00006 	mov	r0, #6	; 0x6
   80ad8:	eb0002e9 	bl	81684 <EE_Write>
   80adc:	eafffe4b 	b	80410 <main+0x5c>
   80ae0:	000801f0 	streqd	r0, [r8], -r0
   80ae4:	00010020 	andeq	r0, r1, r0, lsr #32
   80ae8:	00010064 	andeq	r0, r1, r4, rrx
   80aec:	00010060 	andeq	r0, r1, r0, rrx
   80af0:	0001004c 	andeq	r0, r1, ip, asr #32
   80af4:	0001006c 	andeq	r0, r1, ip, rrx
   80af8:	00010068 	andeq	r0, r1, r8, rrx
   80afc:	0001002c 	andeq	r0, r1, ip, lsr #32
   80b00:	00010070 	andeq	r0, r1, r0, ror r0
   80b04:	00010030 	andeq	r0, r1, r0, lsr r0
   80b08:	00010004 	andeq	r0, r1, r4
   80b0c:	00010034 	andeq	r0, r1, r4, lsr r0
   80b10:	00082704 	andeq	r2, r8, r4, lsl #14
   80b14:	0001003c 	andeq	r0, r1, ip, lsr r0
   80b18:	00082708 	andeq	r2, r8, r8, lsl #14
   80b1c:	00010028 	andeq	r0, r1, r8, lsr #32
   80b20:	4ec4ec4f 	cdpmi	12, 12, cr14, cr4, cr15, {2}
   80b24:	00082714 	andeq	r2, r8, r4, lsl r7
   80b28:	00010038 	andeq	r0, r1, r8, lsr r0
   80b2c:	000826fc 	streqd	r2, [r8], -ip
   80b30:	000826f8 	streqd	r2, [r8], -r8

00080b34 <IRQ_Handler>:
#include "defs.h"

static void IRQ_Handler(void)
{
  if (IRQSTA & WAKEUP_TIMER_BIT) {
   80b34:	e3e01a0f 	mvn	r1, #61440	; 0xf000
   80b38:	e5113fff 	ldr	r3, [r1, #-4095]
   80b3c:	e3130010 	tst	r3, #16	; 0x10
    T2CON = 0;	// Disable T2
   80b40:	e3a02000 	mov	r2, #0	; 0x0
   80b44:	012fff1e 	bxeq	lr
	T2CLRI = 0;	// Clear T2 interrupt

    // Standard POWCON Write Sequence
    POWKEY1 = 0x01;
   80b48:	e3a03001 	mov	r3, #1	; 0x1
   80b4c:	e5012cb7 	str	r2, [r1, #-3255]
   80b50:	e5012cb3 	str	r2, [r1, #-3251]
   80b54:	e5013bfb 	str	r3, [r1, #-3067]
    POWCON = 0x03;	// Set Core working mode, CD = 3
   80b58:	e2822003 	add	r2, r2, #3	; 0x3
    POWKEY2 = 0xF4;	
   80b5c:	e28330f3 	add	r3, r3, #243	; 0xf3
   80b60:	e5012bf7 	str	r2, [r1, #-3063]
   80b64:	e5013bf3 	str	r3, [r1, #-3059]
   80b68:	e12fff1e 	bx	lr

00080b6c <InitController>:
  } 
}


void InitController(void)
{
#ifdef ExternalCrystal
  int t2val_old;
#endif

  IRQ = IRQ_Handler;
   80b6c:	e59f30a4 	ldr	r3, [pc, #164]	; 80c18 <.text+0xc18>
   80b70:	e59f00a4 	ldr	r0, [pc, #164]	; 80c1c <.text+0xc1c>

#ifdef ExternalCrystal
  // WAKEUP (T2) Timer settings
  t2val_old = T2VAL;
   80b74:	e3e01a0f 	mvn	r1, #61440	; 0xf000
   80b78:	e5830000 	str	r0, [r3]

  // Select External Crystal
  // 5 periodes of 32kHz internal oscillator.  T >= 120us
  T2LD = 5;
   80b7c:	e3a02005 	mov	r2, #5	; 0x5
  // Enable the Timer2 interrupt
  T2CON = 0x480;
   80b80:	e3a03d12 	mov	r3, #1152	; 0x480
   80b84:	e92d4010 	stmdb	sp!, {r4, lr}
   80b88:	e511ecbb 	ldr	lr, [r1, #-3259]
   80b8c:	e5012cbf 	str	r2, [r1, #-3263]
   80b90:	e5013cb7 	str	r3, [r1, #-3255]
   80b94:	e1a0c001 	mov	ip, r1
   80b98:	e3a04010 	mov	r4, #16	; 0x10
  // Ensures timer value loaded
  while ((T2VAL == t2val_old) || (T2VAL > 3))
   80b9c:	e51c3cbb 	ldr	r3, [ip, #-3259]
   80ba0:	e153000e 	cmp	r3, lr
   80ba4:	0a000002 	beq	80bb4 <InitController+0x48>
   80ba8:	e51c3cbb 	ldr	r3, [ip, #-3259]
   80bac:	e3530003 	cmp	r3, #3	; 0x3
   80bb0:	9a000001 	bls	80bbc <InitController+0x50>
    IRQEN = 0x10;	// enable T2 interrupt
   80bb4:	e50c4ff7 	str	r4, [ip, #-4087]
   80bb8:	eafffff7 	b	80b9c <InitController+0x30>
	
  // Standard PLLCON Write Sequence
  PLLKEY1 = 0xAA;
   80bbc:	e3a030aa 	mov	r3, #170	; 0xaa
   80bc0:	e50c3bef 	str	r3, [ip, #-3055]
  PLLCON = 0x01;	// External Crystal
   80bc4:	e3a02001 	mov	r2, #1	; 0x1
  PLLKEY2 = 0x55;
   80bc8:	e2433055 	sub	r3, r3, #85	; 0x55
   80bcc:	e50c2beb 	str	r2, [ip, #-3051]
   80bd0:	e50c3be7 	str	r3, [ip, #-3047]
  
  // Standard POWCON Write Sequence
  POWKEY1 = 0x01;
   80bd4:	e50c2bfb 	str	r2, [ip, #-3067]
  POWCON = 0x27;	// Set Core into NAP mode, CD = 7
   80bd8:	e243302e 	sub	r3, r3, #46	; 0x2e
  POWKEY2 = 0xF4;	
   80bdc:	e28220f3 	add	r2, r2, #243	; 0xf3
   80be0:	e50c3bf7 	str	r3, [ip, #-3063]
#endif

  GP0DAT = 0x80000000;		//	Configure P0.7 as output (TXEN)
   80be4:	e3e01000 	mvn	r1, #0	; 0x0
   80be8:	e50c2bf3 	str	r2, [ip, #-3059]
   80bec:	e243319e 	sub	r3, r3, #-2147483609	; 0x80000027
  GP1DAT = 0x04000000;		//	Configure P1.2 as output (PowerEN)
   80bf0:	e3a02301 	mov	r2, #67108864	; 0x4000000
   80bf4:	e5013bdf 	str	r3, [r1, #-3039]
   80bf8:	e5012bcf 	str	r2, [r1, #-3023]

  // Timer1: HCLK + Count Up + Enable + Free Running + Binary + SourceClock/1
  T1CON = 0x180;
   80bfc:	e3a03d06 	mov	r3, #384	; 0x180

  // DAC0, DAC1: Enable + Vref(2.5V) reference
  DAC1CON = DAC0CON = 0X12;
   80c00:	e3a02012 	mov	r2, #18	; 0x12
   80c04:	e50c3cd7 	str	r3, [ip, #-3287]
   80c08:	e50c29ff 	str	r2, [ip, #-2559]
   80c0c:	e51c39ff 	ldr	r3, [ip, #-2559]
   80c10:	e50c39f7 	str	r3, [ip, #-2551]
//  DAC0DAT = 0xFFF0000;
//  DAC1DAT = 0xFFF0000;
}
   80c14:	e8bd8010 	ldmia	sp!, {r4, pc}
   80c18:	00010020 	andeq	r0, r1, r0, lsr #32
   80c1c:	00080b34 	andeq	r0, r8, r4, lsr fp

00080c20 <delay>:

void delay(u32 duration /*us*/)
{
  u32 i;

  i = (duration-1)*TiksPerUs;
  if ((u32)T1VAL > 0x80000000L) {
   80c20:	e3e02a0f 	mvn	r2, #61440	; 0xf000
   80c24:	e5123cdb 	ldr	r3, [r2, #-3291]
   80c28:	e3530102 	cmp	r3, #-2147483648	; 0x80000000
   80c2c:	e0800100 	add	r0, r0, r0, lsl #2
    i += T1VAL - 0x80000000L;
	while ((u32)(T1VAL - 0x80000000L) < i);
  }
  else {
    i += T1VAL;
   80c30:	95123cdb 	ldrls	r3, [r2, #-3291]
   80c34:	e2400005 	sub	r0, r0, #5	; 0x5
   80c38:	90800003 	addls	r0, r0, r3
   80c3c:	9a00000b 	bls	80c70 <delay+0x50>
   80c40:	e5123cdb 	ldr	r3, [r2, #-3291]
   80c44:	e0803003 	add	r3, r0, r3
   80c48:	e2830102 	add	r0, r3, #-2147483648	; 0x80000000
   80c4c:	e5123cdb 	ldr	r3, [r2, #-3291]
   80c50:	e2833102 	add	r3, r3, #-2147483648	; 0x80000000
   80c54:	e1500003 	cmp	r0, r3
   80c58:	912fff1e 	bxls	lr
   80c5c:	e5123cdb 	ldr	r3, [r2, #-3291]
   80c60:	e2833102 	add	r3, r3, #-2147483648	; 0x80000000
   80c64:	e1500003 	cmp	r0, r3
   80c68:	8afffff7 	bhi	80c4c <delay+0x2c>
   80c6c:	e12fff1e 	bx	lr
    while (T1VAL < i);
   80c70:	e5123cdb 	ldr	r3, [r2, #-3291]
   80c74:	e1500003 	cmp	r0, r3
   80c78:	8afffffc 	bhi	80c70 <delay+0x50>
   80c7c:	e12fff1e 	bx	lr

00080c80 <putchar>:
}

int putchar(int ch)
{
  GP0DAT |= TXEN;
   80c80:	e3e03000 	mvn	r3, #0	; 0x0
   80c84:	e5132bdf 	ldr	r2, [r3, #-3039]
  COMTX = ch;
   80c88:	e3e01a0f 	mvn	r1, #61440	; 0xf000
   80c8c:	e3822502 	orr	r2, r2, #8388608	; 0x800000
   80c90:	e5032bdf 	str	r2, [r3, #-3039]
   80c94:	e50108ff 	str	r0, [r1, #-2303]
  while(!(COMSTA0 & 0x040));
   80c98:	e51138eb 	ldr	r3, [r1, #-2283]
   80c9c:	e3130040 	tst	r3, #64	; 0x40
   80ca0:	0afffffc 	beq	80c98 <putchar+0x18>
  GP0DAT &= ~TXEN;
   80ca4:	e3e02000 	mvn	r2, #0	; 0x0
   80ca8:	e5123bdf 	ldr	r3, [r2, #-3039]
   80cac:	e3c33502 	bic	r3, r3, #8388608	; 0x800000
   80cb0:	e5023bdf 	str	r3, [r2, #-3039]

  return ch;
}
   80cb4:	e12fff1e 	bx	lr

00080cb8 <getchar>:


int write (int file, char * ptr, int len)
{
  int i;

  for (i = 0; i < len; i++)
    if (*ptr)
      putchar (*ptr++);
		else
		  break;
  return i;
}

int getchar (void)
{                      /* Read character from Serial Port */
   80cb8:	e3e02a0f 	mvn	r2, #61440	; 0xf000
 	while(!(COMSTA0 & 0x01));
   80cbc:	e51238eb 	ldr	r3, [r2, #-2283]
   80cc0:	e3130001 	tst	r3, #1	; 0x1
   80cc4:	0afffffc 	beq	80cbc <getchar+0x4>
 	return (COMRX);
   80cc8:	e51208ff 	ldr	r0, [r2, #-2303]
}
   80ccc:	e12fff1e 	bx	lr

00080cd0 <received>:

int received(void)
{
	return (COMSTA0 & 0x01);
   80cd0:	e3e03a0f 	mvn	r3, #61440	; 0xf000
   80cd4:	e51308eb 	ldr	r0, [r3, #-2283]
}
   80cd8:	e2000001 	and	r0, r0, #1	; 0x1
   80cdc:	e12fff1e 	bx	lr

00080ce0 <InitSerial>:
   80ce0:	e3e01a0f 	mvn	r1, #61440	; 0xf000
   80ce4:	e3a0c011 	mov	ip, #17	; 0x11
   80ce8:	e3e03000 	mvn	r3, #0	; 0x0
   80cec:	e3a02080 	mov	r2, #128	; 0x80
   80cf0:	e59f001c 	ldr	r0, [pc, #28]	; 80d14 <.text+0xd14>
   80cf4:	e503cbfb 	str	ip, [r3, #-3067]
   80cf8:	e50128f3 	str	r2, [r1, #-2291]
   80cfc:	e2833001 	add	r3, r3, #1	; 0x1
   80d00:	e242207d 	sub	r2, r2, #125	; 0x7d
   80d04:	e501c8ff 	str	ip, [r1, #-2303]
   80d08:	e50138fb 	str	r3, [r1, #-2299]
   80d0c:	e50128f3 	str	r2, [r1, #-2291]
   80d10:	ea00001d 	b	80d8c <rprintf_devopen>
   80d14:	00080c80 	andeq	r0, r8, r0, lsl #25

00080d18 <write>:
   80d18:	e92d4010 	stmdb	sp!, {r4, lr}
   80d1c:	e2524000 	subs	r4, r2, #0	; 0x0
   80d20:	da000017 	ble	80d84 <write+0x6c>
   80d24:	e5d1c000 	ldrb	ip, [r1]
   80d28:	e35c0000 	cmp	ip, #0	; 0x0
   80d2c:	13a00000 	movne	r0, #0	; 0x0
   80d30:	13e02000 	mvnne	r2, #0	; 0x0
   80d34:	13e0ea0f 	mvnne	lr, #61440	; 0xf000
   80d38:	0a000011 	beq	80d84 <write+0x6c>
   80d3c:	e5123bdf 	ldr	r3, [r2, #-3039]
   80d40:	e3833502 	orr	r3, r3, #8388608	; 0x800000
   80d44:	e5023bdf 	str	r3, [r2, #-3039]
   80d48:	e50ec8ff 	str	ip, [lr, #-2303]
   80d4c:	e51e38eb 	ldr	r3, [lr, #-2283]
   80d50:	e3130040 	tst	r3, #64	; 0x40
   80d54:	0afffffc 	beq	80d4c <write+0x34>
   80d58:	e5123bdf 	ldr	r3, [r2, #-3039]
   80d5c:	e2800001 	add	r0, r0, #1	; 0x1
   80d60:	e3c33502 	bic	r3, r3, #8388608	; 0x800000
   80d64:	e1540000 	cmp	r4, r0
   80d68:	e5023bdf 	str	r3, [r2, #-3039]
   80d6c:	0a000003 	beq	80d80 <write+0x68>
   80d70:	e7d0c001 	ldrb	ip, [r0, r1]
   80d74:	e35c0000 	cmp	ip, #0	; 0x0
   80d78:	1affffef 	bne	80d3c <write+0x24>
   80d7c:	e8bd8010 	ldmia	sp!, {r4, pc}
   80d80:	e8bd8010 	ldmia	sp!, {r4, pc}
   80d84:	e3a00000 	mov	r0, #0	; 0x0
   80d88:	e8bd8010 	ldmia	sp!, {r4, pc}

00080d8c <rprintf_devopen>:
static int (*putcharfunc)(int c);

void rprintf_devopen( int(*put)(int) )
{
   putcharfunc = put;
   80d8c:	e59f3004 	ldr	r3, [pc, #4]	; 80d98 <.text+0xd98>
   80d90:	e5830000 	str	r0, [r3]
}
   80d94:	e12fff1e 	bx	lr
   80d98:	00010008 	andeq	r0, r1, r8

00080d9c <rprintf>:

static void myputchar(unsigned char c)
{
	if(c == '\n') putcharfunc('\r');
	putcharfunc(c);
}

void rprintf(char const *format, ...)
{
   80d9c:	e92d000f 	stmdb	sp!, {r0, r1, r2, r3}
   80da0:	e92d45f0 	stmdb	sp!, {r4, r5, r6, r7, r8, sl, lr}
   80da4:	e24dd010 	sub	sp, sp, #16	; 0x10
  unsigned char scratch[SCRATCH];
  unsigned char format_flag;
  unsigned short base;
  unsigned char *ptr;
  unsigned char issigned=0;
  va_list ap;

#ifdef USE_LONG
// #warning "use long"
  unsigned char islong=0;
  unsigned long u_val=0;
  long s_val=0;
#else
  unsigned int u_val=0;
  int s_val=0;
#endif

  unsigned char fill;
  unsigned char width;

  va_start (ap, format);
   80da8:	e28d3030 	add	r3, sp, #48	; 0x30
   80dac:	e59d802c 	ldr	r8, [sp, #44]
   80db0:	e58d300c 	str	r3, [sp, #12]
  for (;;){
    while ((format_flag = *(format++)) != '%'){      // Until '%' or '\0' 
   80db4:	e4d80001 	ldrb	r0, [r8], #1
   80db8:	e3500025 	cmp	r0, #37	; 0x25
   80dbc:	0a00000b 	beq	80df0 <rprintf+0x54>
      if (!format_flag){va_end (ap); return;}
   80dc0:	e3500000 	cmp	r0, #0	; 0x0
   80dc4:	0a0000ca 	beq	810f4 <.text+0x10f4>
      myputchar(format_flag);
    }

    issigned=0; //default unsigned
    base = 10;

    format_flag = *format++; //get char after '%'

#ifdef PADDING
    width=0; //no formatting
    fill=0;  //no formatting
    if(format_flag=='0' || format_flag==' ') //SPACE or ZERO padding  ?
     {
      fill=format_flag;
      format_flag = *format++; //get char after padding char
      if(format_flag>='0' && format_flag<='9')
       {
        width=format_flag-'0';
        format_flag = *format++; //get char after width char
       }
     }
#endif

#ifdef USE_LONG
    islong=0; //default int value
#ifdef USE_UPPER
    if(format_flag=='l' || format_flag=='L') //Long value 
#else
    if(format_flag=='l') //Long value 
#endif
     {
      islong=1;
      format_flag = *format++; //get char after 'l' or 'L'
     }
#endif

    switch (format_flag)
    {
#ifdef USE_CHAR
    case 'c':
#ifdef USE_UPPER
    case 'C':
#endif
      format_flag = va_arg(ap,int);
   80dc8:	e20040ff 	and	r4, r0, #255	; 0xff
   80dcc:	e354000a 	cmp	r4, #10	; 0xa
   80dd0:	159f735c 	ldrne	r7, [pc, #860]	; 81134 <.text+0x1134>
   80dd4:	0a00005f 	beq	80f58 <.text+0xf58>
   80dd8:	e1a00004 	mov	r0, r4
   80ddc:	e1a0e00f 	mov	lr, pc
   80de0:	e597f000 	ldr	pc, [r7]
   80de4:	e4d80001 	ldrb	r0, [r8], #1
   80de8:	e3500025 	cmp	r0, #37	; 0x25
   80dec:	1afffff3 	bne	80dc0 <rprintf+0x24>
   80df0:	e4d82001 	ldrb	r2, [r8], #1
   80df4:	e3520020 	cmp	r2, #32	; 0x20
   80df8:	13520030 	cmpne	r2, #48	; 0x30
   80dfc:	13a03000 	movne	r3, #0	; 0x0
   80e00:	03a03001 	moveq	r3, #1	; 0x1
   80e04:	11a06003 	movne	r6, r3
   80e08:	11a00002 	movne	r0, r2
   80e0c:	11a0a006 	movne	sl, r6
   80e10:	1a000007 	bne	80e34 <rprintf+0x98>
   80e14:	e4d80001 	ldrb	r0, [r8], #1
   80e18:	e2403030 	sub	r3, r0, #48	; 0x30
   80e1c:	e20360ff 	and	r6, r3, #255	; 0xff
   80e20:	e3560009 	cmp	r6, #9	; 0x9
   80e24:	94d80001 	ldrlsb	r0, [r8], #1
   80e28:	81a0a002 	movhi	sl, r2
   80e2c:	83a06000 	movhi	r6, #0	; 0x0
   80e30:	91a0a002 	movls	sl, r2
   80e34:	e350004c 	cmp	r0, #76	; 0x4c
   80e38:	1350006c 	cmpne	r0, #108	; 0x6c
   80e3c:	04d80001 	ldreqb	r0, [r8], #1
   80e40:	13a03000 	movne	r3, #0	; 0x0
   80e44:	03a03001 	moveq	r3, #1	; 0x1
   80e48:	11a02003 	movne	r2, r3
   80e4c:	e2403043 	sub	r3, r0, #67	; 0x43
   80e50:	03a02001 	moveq	r2, #1	; 0x1
   80e54:	e3530035 	cmp	r3, #53	; 0x35
   80e58:	979ff103 	ldrls	pc, [pc, r3, lsl #2]
   80e5c:	eaffffd9 	b	80dc8 <rprintf+0x2c>
   80e60:	00080f38 	andeq	r0, r8, r8, lsr pc
   80e64:	00080f6c 	andeq	r0, r8, ip, ror #30
   80e68:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e6c:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e70:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e74:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e78:	00080f6c 	andeq	r0, r8, ip, ror #30
   80e7c:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e80:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e84:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e88:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e8c:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e90:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e94:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e98:	00080dc8 	andeq	r0, r8, r8, asr #27
   80e9c:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ea0:	00080f94 	muleq	r8, r4, pc
   80ea4:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ea8:	00080ff0 	streqd	r0, [r8], -r0
   80eac:	00080dc8 	andeq	r0, r8, r8, asr #27
   80eb0:	00080dc8 	andeq	r0, r8, r8, asr #27
   80eb4:	000810ec 	andeq	r1, r8, ip, ror #1
   80eb8:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ebc:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ec0:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ec4:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ec8:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ecc:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ed0:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ed4:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ed8:	00080dc8 	andeq	r0, r8, r8, asr #27
   80edc:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ee0:	00080f38 	andeq	r0, r8, r8, lsr pc
   80ee4:	00080f6c 	andeq	r0, r8, ip, ror #30
   80ee8:	00080dc8 	andeq	r0, r8, r8, asr #27
   80eec:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ef0:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ef4:	00080dc8 	andeq	r0, r8, r8, asr #27
   80ef8:	00080f6c 	andeq	r0, r8, ip, ror #30
   80efc:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f00:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f04:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f08:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f0c:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f10:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f14:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f18:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f1c:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f20:	00080f94 	muleq	r8, r4, pc
   80f24:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f28:	00080ff0 	streqd	r0, [r8], -r0
   80f2c:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f30:	00080dc8 	andeq	r0, r8, r8, asr #27
   80f34:	000810ec 	andeq	r1, r8, ip, ror #1
   80f38:	e59d200c 	ldr	r2, [sp, #12]
   80f3c:	e5d20000 	ldrb	r0, [r2]
   80f40:	e20040ff 	and	r4, r0, #255	; 0xff
   80f44:	e2823004 	add	r3, r2, #4	; 0x4
   80f48:	e354000a 	cmp	r4, #10	; 0xa
   80f4c:	e58d300c 	str	r3, [sp, #12]
   80f50:	159f71dc 	ldrne	r7, [pc, #476]	; 81134 <.text+0x1134>
   80f54:	1affff9f 	bne	80dd8 <rprintf+0x3c>
   80f58:	e59f71d4 	ldr	r7, [pc, #468]	; 81134 <.text+0x1134>
   80f5c:	e3a0000d 	mov	r0, #13	; 0xd
   80f60:	e1a0e00f 	mov	lr, pc
   80f64:	e597f000 	ldr	pc, [r7]
   80f68:	eaffff9a 	b	80dd8 <rprintf+0x3c>
      // no break -> run into default
#endif

    default:
      myputchar(format_flag);
      continue;

#ifdef USE_STRING
#ifdef USE_UPPER
    case 'S':
#endif
    case 's':
      ptr = (unsigned char*)va_arg(ap,char *);
      while(*ptr) { myputchar(*ptr); ptr++; }
      continue;
#endif

#ifdef USE_OCTAL
    case 'o':
#ifdef USE_UPPER
    case 'O':
#endif
      base = 8;
      myputchar('0');
      goto CONVERSION_LOOP;
#endif

#ifdef USE_INTEGER //don't use %i, is same as %d
    case 'i':
#ifdef USE_UPPER
    case 'I':
#endif
#endif
    case 'd':
#ifdef USE_UPPER
    case 'D':
#endif
      issigned=1;
      // no break -> run into next case
    case 'u':
#ifdef USE_UPPER
    case 'U':
#endif

//don't insert some case below this if USE_HEX is undefined !
//or put       goto CONVERSION_LOOP;  before next case.
#ifdef USE_HEX
      goto CONVERSION_LOOP;
    case 'x':
#ifdef USE_UPPER
    case 'X':
#endif
      base = 16;
#endif

    CONVERSION_LOOP:

      if(issigned) //Signed types
       {
#ifdef USE_LONG
        if(islong) { s_val = va_arg(ap,long); }
   80f6c:	e3520000 	cmp	r2, #0	; 0x0
   80f70:	1a000063 	bne	81104 <.text+0x1104>
        else { s_val = va_arg(ap,int); }
   80f74:	e59d200c 	ldr	r2, [sp, #12]
   80f78:	e2823004 	add	r3, r2, #4	; 0x4
   80f7c:	e58d300c 	str	r3, [sp, #12]
   80f80:	e5924000 	ldr	r4, [r2]
#else
        s_val = va_arg(ap,int);
#endif

        if(s_val < 0) //Value negativ ?
   80f84:	e3540000 	cmp	r4, #0	; 0x0
   80f88:	ba000062 	blt	81118 <.text+0x1118>
         {
          s_val = - s_val; //Make it positiv
          myputchar('-');    //Output sign
         }

        u_val = (unsigned long)s_val;
   80f8c:	e3a0700a 	mov	r7, #10	; 0xa
   80f90:	ea000022 	b	81020 <.text+0x1020>
   80f94:	e59d200c 	ldr	r2, [sp, #12]
   80f98:	e2823004 	add	r3, r2, #4	; 0x4
   80f9c:	e58d300c 	str	r3, [sp, #12]
   80fa0:	e5922000 	ldr	r2, [r2]
   80fa4:	e5d20000 	ldrb	r0, [r2]
   80fa8:	e3500000 	cmp	r0, #0	; 0x0
   80fac:	0affff80 	beq	80db4 <rprintf+0x18>
   80fb0:	e59f717c 	ldr	r7, [pc, #380]	; 81134 <.text+0x1134>
   80fb4:	e1a05002 	mov	r5, r2
   80fb8:	ea000005 	b	80fd4 <.text+0xfd4>
   80fbc:	e1a00004 	mov	r0, r4
   80fc0:	e1a0e00f 	mov	lr, pc
   80fc4:	e597f000 	ldr	pc, [r7]
   80fc8:	e5f50001 	ldrb	r0, [r5, #1]!
   80fcc:	e3500000 	cmp	r0, #0	; 0x0
   80fd0:	0affff77 	beq	80db4 <rprintf+0x18>
   80fd4:	e20040ff 	and	r4, r0, #255	; 0xff
   80fd8:	e354000a 	cmp	r4, #10	; 0xa
   80fdc:	e3a0000d 	mov	r0, #13	; 0xd
   80fe0:	1afffff5 	bne	80fbc <.text+0xfbc>
   80fe4:	e1a0e00f 	mov	lr, pc
   80fe8:	e597f000 	ldr	pc, [r7]
   80fec:	eafffff2 	b	80fbc <.text+0xfbc>
   80ff0:	e3a0100a 	mov	r1, #10	; 0xa
       }
      else //Unsigned types
       {
#ifdef USE_LONG
        if(islong) { u_val = va_arg(ap,unsigned long); }
   80ff4:	e3520000 	cmp	r2, #0	; 0x0
   80ff8:	159d300c 	ldrne	r3, [sp, #12]
        else { u_val = va_arg(ap,unsigned int); }
   80ffc:	059d200c 	ldreq	r2, [sp, #12]
   81000:	15934000 	ldrne	r4, [r3]
   81004:	02823004 	addeq	r3, r2, #4	; 0x4
   81008:	12833004 	addne	r3, r3, #4	; 0x4
   8100c:	158d300c 	strne	r3, [sp, #12]
   81010:	058d300c 	streq	r3, [sp, #12]
   81014:	05924000 	ldreq	r4, [r2]
   81018:	11a07001 	movne	r7, r1
   8101c:	01a07001 	moveq	r7, r1
#else
        u_val = va_arg(ap,unsigned int);
#endif
       }
    
      ptr = scratch + SCRATCH;
      *--ptr = 0;
   81020:	e3a03000 	mov	r3, #0	; 0x0
   81024:	e5cd300b 	strb	r3, [sp, #11]
   81028:	e28d500b 	add	r5, sp, #11	; 0xb
      do
       {
        char ch = u_val % base + '0';
   8102c:	e1a00004 	mov	r0, r4
   81030:	e1a01007 	mov	r1, r7
   81034:	eb000290 	bl	81a7c <__umodsi3>
   81038:	e2800030 	add	r0, r0, #48	; 0x30
   8103c:	e20030ff 	and	r3, r0, #255	; 0xff
#ifdef USE_HEX
        if (ch > '9')
   81040:	e3530039 	cmp	r3, #57	; 0x39
         {
          ch += 'a' - '9' - 1;
#ifdef USE_UPPERHEX
          ch-=0x20;
   81044:	e2832007 	add	r2, r3, #7	; 0x7
   81048:	820230ff 	andhi	r3, r2, #255	; 0xff
#endif
         }
#endif          
        *--ptr = ch;
        u_val /= base;
   8104c:	e1a00004 	mov	r0, r4
   81050:	e5653001 	strb	r3, [r5, #-1]!
   81054:	e1a01007 	mov	r1, r7
   81058:	eb000243 	bl	8196c <__aeabi_uidiv>

#ifdef PADDING
        if(width) width--; //calculate number of padding chars
   8105c:	e3560000 	cmp	r6, #0	; 0x0
   81060:	e2463001 	sub	r3, r6, #1	; 0x1
   81064:	120360ff 	andne	r6, r3, #255	; 0xff
#endif
      } while (u_val);
   81068:	e3500000 	cmp	r0, #0	; 0x0
   8106c:	e1a04000 	mov	r4, r0
   81070:	1affffed 	bne	8102c <.text+0x102c>

#ifdef PADDING
     while(width--) *--ptr = fill; //insert padding chars		      
   81074:	e2463001 	sub	r3, r6, #1	; 0x1
   81078:	e20320ff 	and	r2, r3, #255	; 0xff
   8107c:	e35200ff 	cmp	r2, #255	; 0xff
   81080:	e1a01005 	mov	r1, r5
   81084:	1a000001 	bne	81090 <.text+0x1090>
   81088:	ea000005 	b	810a4 <.text+0x10a4>
   8108c:	e2463001 	sub	r3, r6, #1	; 0x1
   81090:	e21360ff 	ands	r6, r3, #255	; 0xff
   81094:	e565a001 	strb	sl, [r5, #-1]!
   81098:	1afffffb 	bne	8108c <.text+0x108c>
   8109c:	e0623001 	rsb	r3, r2, r1
   810a0:	e2435001 	sub	r5, r3, #1	; 0x1
#endif

      while(*ptr) { myputchar(*ptr); ptr++; }
   810a4:	e5d50000 	ldrb	r0, [r5]
   810a8:	e3500000 	cmp	r0, #0	; 0x0
   810ac:	0affff40 	beq	80db4 <rprintf+0x18>
   810b0:	e59f707c 	ldr	r7, [pc, #124]	; 81134 <.text+0x1134>
   810b4:	ea000005 	b	810d0 <.text+0x10d0>
   810b8:	e1a00004 	mov	r0, r4
   810bc:	e1a0e00f 	mov	lr, pc
   810c0:	e597f000 	ldr	pc, [r7]
   810c4:	e5f50001 	ldrb	r0, [r5, #1]!
   810c8:	e3500000 	cmp	r0, #0	; 0x0
   810cc:	0affff38 	beq	80db4 <rprintf+0x18>
   810d0:	e20040ff 	and	r4, r0, #255	; 0xff
   810d4:	e354000a 	cmp	r4, #10	; 0xa
   810d8:	e3a0000d 	mov	r0, #13	; 0xd
   810dc:	1afffff5 	bne	810b8 <.text+0x10b8>
   810e0:	e1a0e00f 	mov	lr, pc
   810e4:	e597f000 	ldr	pc, [r7]
   810e8:	eafffff2 	b	810b8 <.text+0x10b8>
   810ec:	e3a01010 	mov	r1, #16	; 0x10
   810f0:	eaffffbf 	b	80ff4 <.text+0xff4>
    }
  }
}
   810f4:	e28dd010 	add	sp, sp, #16	; 0x10
   810f8:	e8bd45f0 	ldmia	sp!, {r4, r5, r6, r7, r8, sl, lr}
   810fc:	e28dd010 	add	sp, sp, #16	; 0x10
   81100:	e12fff1e 	bx	lr
   81104:	e59d300c 	ldr	r3, [sp, #12]
   81108:	e5934000 	ldr	r4, [r3]
   8110c:	e2833004 	add	r3, r3, #4	; 0x4
   81110:	e58d300c 	str	r3, [sp, #12]
   81114:	eaffff9a 	b	80f84 <.text+0xf84>
   81118:	e59f7014 	ldr	r7, [pc, #20]	; 81134 <.text+0x1134>
   8111c:	e3a0002d 	mov	r0, #45	; 0x2d
   81120:	e1a0e00f 	mov	lr, pc
   81124:	e597f000 	ldr	pc, [r7]
   81128:	e2644000 	rsb	r4, r4, #0	; 0x0
   8112c:	e3a0700a 	mov	r7, #10	; 0xa
   81130:	eaffffba 	b	81020 <.text+0x1020>
   81134:	00010008 	andeq	r0, r1, r8

00081138 <EE_VerifyPageFullWriteVariable>:
static u16 FLASH_Load(u16 Address)
{
  u8 status;

  FEEADR = Address;
   81138:	e3e0c000 	mvn	ip, #0	; 0x0
   8113c:	e3a03a0f 	mov	r3, #61440	; 0xf000
  FEECON = 0x01;				// single read command
   81140:	e3a02001 	mov	r2, #1	; 0x1
   81144:	e50c37ef 	str	r3, [ip, #-2031]
   81148:	e50c27f7 	str	r2, [ip, #-2039]

  status = FEESTA & 0x03;
   8114c:	e51c37ff 	ldr	r3, [ip, #-2047]
  while (!(status)) status = FEESTA & 0x03;
   81150:	e3130003 	tst	r3, #3	; 0x3
//	if ((status&0x02)==0x02) EEPROMerr = 1;

  return (FEEDAT);		
} 


static FLASH_Status FLASH_ErasePage(u16 Page_Address)
{
  u8 status;

  FEEMOD = 0x8;				// enable erase/write command

  FEEADR = Page_Address;
  FEECON = 0x05;				// erase page command
  status = FEESTA & 0x03;
  while (!(status)) status = FEESTA & 0x03;

  FEEMOD = 0;				// disable erase/write command

  if ((status & 0x02)==0x02) return FLASH_ERROR;
  return FLASH_COMPLETE;
}


Bool EE_Erased(void)
{
   return ((FLASH_Load(PAGE0_BASE_ADDRESS) == 0xFFFF) &&
           (FLASH_Load(PAGE0_BASE_ADDRESS + 2) == 0xFFFF) &&
           (FLASH_Load(PAGE1_BASE_ADDRESS) == 0xFFFF) &&
           (FLASH_Load(PAGE1_BASE_ADDRESS + 2) == 0xFFFF));
}


/* Global variable used to store variable value in read sequence */
u16 DataVar = 0 ;

/* Private functions ---------------------------------------------------------*/
static FLASH_Status EE_FindValidPage(u8 operation);
static FLASH_Status EE_VerifyPageFullWriteVariable(u16 VirtAddress, u16 Data);
static FLASH_Status EE_PageTransfer(u16 VirtAddress, u16 Data);
static FLASH_Status EE_ReadVariable(u16 VirtAddress, u16* Read_data);

/*******************************************************************************
* Function Name  : EE_Format
* Description    : Erases PAGE0 and PAGE1 and writes VALID_PAGE header to PAGE0
* Return         : Status of the last operation (Flash write or erase) done during
*                  EEPROM formating
*******************************************************************************/
Bool EE_Format(void)
{
  FLASH_Status FlashStatus;

  FlashStatus = FLASH_ErasePage(PAGE0_BASE_ADDRESS);
  if (FlashStatus == FLASH_COMPLETE) {
    // Set Page0 as valid page: Write VALID_PAGE at Page0 base address
    FlashStatus = FLASH_Save(PAGE0_BASE_ADDRESS, VALID_PAGE);
    if (FlashStatus == FLASH_COMPLETE)
      FlashStatus = FLASH_ErasePage(PAGE1_BASE_ADDRESS);
  }

  return (FlashStatus == FLASH_COMPLETE);
}



/*******************************************************************************
* Function Name  : EE_FindValidPage
* Description    : Find valid Page for write or read operation
* Input          : - Operation: operation to achieve on the valid page:
*                      - READ_FROM_VALID_PAGE: read operation from valid page
*                      - WRITE_IN_VALID_PAGE: write operation from valid page
* Output         : None
* Return         : Valid page number (PAGE0 or PAGE1) or NO_VALID_PAGE in case
*                  of no valid page was found
*******************************************************************************/
FLASH_Status EE_FindValidPage(u8 Operation)
{
  FLASH_Status PageStatus0, PageStatus1;

  PageStatus0 = FLASH_Load(PAGE0_BASE_ADDRESS);
  PageStatus1 = FLASH_Load(PAGE1_BASE_ADDRESS);

  // Write or read operation
  switch (Operation) {
    case WRITE_IN_VALID_PAGE:   // ---- Write operation ----
      if (PageStatus1 == VALID_PAGE) {
        // Page0 receiving data
        if (PageStatus0 == RECEIVE_DATA) {
          return PAGE0;   // Page0 valid
        }
        else {
          return PAGE1;   // Page1 valid
        }
      }
      else if (PageStatus0 == VALID_PAGE) {
        // Page1 receiving data
        if (PageStatus1 == RECEIVE_DATA) {
          return PAGE1;      // Page1 valid
        }
        else {
          return PAGE0;      // Page0 valid
        }
      }
      else {
        return NO_VALID_PAGE;   // No valid Page
      }

    case READ_FROM_VALID_PAGE:  // ---- Read operation ----
      if (PageStatus0 == VALID_PAGE) {
        return PAGE0;           // Page0 valid
      }
      else if (PageStatus1 == VALID_PAGE) {
        return PAGE1;           // Page1 valid
      }
      else {
        return NO_VALID_PAGE ;  // No valid Page
      }

    default:
      return PAGE0;       // Page0 valid
  }
}

/*******************************************************************************
* Function Name  : EE_VerifyPageFullWriteVariable
* Description    : Verify if active page is full and Writes variable in EEPROM.
* Input          : - VirtAddress: 16 bit virtual address of the variable
*                  - Data: 16 bit data to be written as variable value
* Output         : None
* Return         : - Success or error status: 
*                      - FLASH_COMPLETE: on success
*                      - PAGE_FULL: if valid page is full
*                      - NO_VALID_PAGE: if no valid page was found
*                      - Flash error code: on write Flash error
*******************************************************************************/
FLASH_Status EE_VerifyPageFullWriteVariable(u16 VirtAddress, u16 Data)
{
   81154:	e92d4030 	stmdb	sp!, {r4, r5, lr}
   81158:	e1a04000 	mov	r4, r0
   8115c:	e1a05001 	mov	r5, r1
   81160:	1a000003 	bne	81174 <EE_VerifyPageFullWriteVariable+0x3c>
   81164:	e1a0200c 	mov	r2, ip
   81168:	e51237ff 	ldr	r3, [r2, #-2047]
   8116c:	e3130003 	tst	r3, #3	; 0x3
   81170:	0afffffc 	beq	81168 <EE_VerifyPageFullWriteVariable+0x30>
   81174:	e3e0c000 	mvn	ip, #0	; 0x0
   81178:	e3a03cf2 	mov	r3, #61952	; 0xf200
   8117c:	e3a02001 	mov	r2, #1	; 0x1
   81180:	e51ce7f3 	ldr	lr, [ip, #-2035]
   81184:	e50c37ef 	str	r3, [ip, #-2031]
   81188:	e50c27f7 	str	r2, [ip, #-2039]
   8118c:	e51c37ff 	ldr	r3, [ip, #-2047]
   81190:	e3130003 	tst	r3, #3	; 0x3
   81194:	1a000003 	bne	811a8 <EE_VerifyPageFullWriteVariable+0x70>
   81198:	e1a0200c 	mov	r2, ip
   8119c:	e51237ff 	ldr	r3, [r2, #-2047]
   811a0:	e3130003 	tst	r3, #3	; 0x3
   811a4:	0afffffc 	beq	8119c <EE_VerifyPageFullWriteVariable+0x64>
   811a8:	e3e03000 	mvn	r3, #0	; 0x0
   811ac:	e51337f3 	ldr	r3, [r3, #-2035]
   811b0:	e3530006 	cmp	r3, #6	; 0x6
   811b4:	1a000051 	bne	81300 <EE_VerifyPageFullWriteVariable+0x1c8>
   811b8:	e35e0005 	cmp	lr, #5	; 0x5
   811bc:	0a000054 	beq	81314 <EE_VerifyPageFullWriteVariable+0x1dc>
   811c0:	e3a0ecf6 	mov	lr, #62976	; 0xf600
   811c4:	e3a01cf7 	mov	r1, #63232	; 0xf700
   811c8:	e28ee004 	add	lr, lr, #4	; 0x4
   811cc:	e28110fe 	add	r1, r1, #254	; 0xfe
   811d0:	e3e0c000 	mvn	ip, #0	; 0x0
   811d4:	e3a03001 	mov	r3, #1	; 0x1
   811d8:	e50ce7ef 	str	lr, [ip, #-2031]
   811dc:	e50c37f7 	str	r3, [ip, #-2039]
   811e0:	e51c27ff 	ldr	r2, [ip, #-2047]
   811e4:	e3120003 	tst	r2, #3	; 0x3
   811e8:	1a000003 	bne	811fc <EE_VerifyPageFullWriteVariable+0xc4>
   811ec:	e1a0200c 	mov	r2, ip
   811f0:	e51237ff 	ldr	r3, [r2, #-2047]
   811f4:	e3130003 	tst	r3, #3	; 0x3
   811f8:	0afffffc 	beq	811f0 <EE_VerifyPageFullWriteVariable+0xb8>
   811fc:	e3e0c000 	mvn	ip, #0	; 0x0
   81200:	e51c27f3 	ldr	r2, [ip, #-2035]
  FLASH_Status FlashStatus;
  FLASH_Status ValidPage;
  u16 Address, PageEndAddress;

  // Get valid Page for write operation
  ValidPage = EE_FindValidPage(WRITE_IN_VALID_PAGE);
  if (ValidPage == NO_VALID_PAGE)
    return  NO_VALID_PAGE;

  // Get the valid Page start Address
  Address = (EEPROM_START_ADDRESS + (ValidPage * PAGE_SIZE) + 4);

  // Get the valid Page end Address
  PageEndAddress = (EEPROM_START_ADDRESS + ((1 + ValidPage) * PAGE_SIZE) - 2);
  // Check each active page address starting from begining
  while (Address < PageEndAddress) {
    // Verify if Address and Address+2 are free
    if ((FLASH_Load(Address) == 0xFFFF) && (FLASH_Load(Address + 2) == 0xFFFF)) {
   81204:	e3a03801 	mov	r3, #65536	; 0x10000
   81208:	e083300c 	add	r3, r3, ip
   8120c:	e1520003 	cmp	r2, r3
   81210:	0a000004 	beq	81228 <EE_VerifyPageFullWriteVariable+0xf0>
      FlashStatus = FLASH_Save(Address, Data);
      if (FlashStatus == FLASH_COMPLETE)
        FlashStatus = FLASH_Save(Address + 2, VirtAddress);
      return FlashStatus;
    }
    else {
      // Next address location
      Address = Address + 4;
   81214:	e28ee004 	add	lr, lr, #4	; 0x4
   81218:	e151000e 	cmp	r1, lr
   8121c:	8affffeb 	bhi	811d0 <EE_VerifyPageFullWriteVariable+0x98>
   81220:	e3a00008 	mov	r0, #8	; 0x8
   81224:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81228:	e28e0002 	add	r0, lr, #2	; 0x2
   8122c:	e3a03001 	mov	r3, #1	; 0x1
   81230:	e50c07ef 	str	r0, [ip, #-2031]
   81234:	e50c37f7 	str	r3, [ip, #-2039]
   81238:	e51c27ff 	ldr	r2, [ip, #-2047]
   8123c:	e3120003 	tst	r2, #3	; 0x3
   81240:	1a000003 	bne	81254 <EE_VerifyPageFullWriteVariable+0x11c>
   81244:	e1a0200c 	mov	r2, ip
   81248:	e51237ff 	ldr	r3, [r2, #-2047]
   8124c:	e3130003 	tst	r3, #3	; 0x3
   81250:	0afffffc 	beq	81248 <EE_VerifyPageFullWriteVariable+0x110>
   81254:	e3e0c000 	mvn	ip, #0	; 0x0
   81258:	e51c27f3 	ldr	r2, [ip, #-2035]
   8125c:	e3a03801 	mov	r3, #65536	; 0x10000
   81260:	e083300c 	add	r3, r3, ip
   81264:	e1520003 	cmp	r2, r3
   81268:	1affffe9 	bne	81214 <EE_VerifyPageFullWriteVariable+0xdc>
   8126c:	e3a03008 	mov	r3, #8	; 0x8
   81270:	e3a02002 	mov	r2, #2	; 0x2
   81274:	e50c37fb 	str	r3, [ip, #-2043]
   81278:	e50ce7ef 	str	lr, [ip, #-2031]
   8127c:	e50c57f3 	str	r5, [ip, #-2035]
   81280:	e50c27f7 	str	r2, [ip, #-2039]
   81284:	e51c37ff 	ldr	r3, [ip, #-2047]
   81288:	e2133003 	ands	r3, r3, #3	; 0x3
   8128c:	1a000003 	bne	812a0 <EE_VerifyPageFullWriteVariable+0x168>
   81290:	e1a0200c 	mov	r2, ip
   81294:	e51237ff 	ldr	r3, [r2, #-2047]
   81298:	e2133003 	ands	r3, r3, #3	; 0x3
   8129c:	0afffffc 	beq	81294 <EE_VerifyPageFullWriteVariable+0x15c>
   812a0:	e2133002 	ands	r3, r3, #2	; 0x2
   812a4:	1a000013 	bne	812f8 <EE_VerifyPageFullWriteVariable+0x1c0>
   812a8:	e3e01000 	mvn	r1, #0	; 0x0
   812ac:	e50137fb 	str	r3, [r1, #-2043]
   812b0:	e3a02002 	mov	r2, #2	; 0x2
   812b4:	e3a03008 	mov	r3, #8	; 0x8
   812b8:	e50137fb 	str	r3, [r1, #-2043]
   812bc:	e50107ef 	str	r0, [r1, #-2031]
   812c0:	e50147f3 	str	r4, [r1, #-2035]
   812c4:	e50127f7 	str	r2, [r1, #-2039]
   812c8:	e51137ff 	ldr	r3, [r1, #-2047]
   812cc:	e2133003 	ands	r3, r3, #3	; 0x3
   812d0:	1a000003 	bne	812e4 <EE_VerifyPageFullWriteVariable+0x1ac>
   812d4:	e1a02001 	mov	r2, r1
   812d8:	e51237ff 	ldr	r3, [r2, #-2047]
   812dc:	e2133003 	ands	r3, r3, #3	; 0x3
   812e0:	0afffffc 	beq	812d8 <EE_VerifyPageFullWriteVariable+0x1a0>
   812e4:	e2132002 	ands	r2, r3, #2	; 0x2
   812e8:	03e03000 	mvneq	r3, #0	; 0x0
   812ec:	03a00001 	moveq	r0, #1	; 0x1
   812f0:	050327fb 	streq	r2, [r3, #-2043]
   812f4:	08bd8030 	ldmeqia	sp!, {r4, r5, pc}
   812f8:	e3a00000 	mov	r0, #0	; 0x0
    }
  }

  return PAGE_FULL;
}
   812fc:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81300:	e35e0006 	cmp	lr, #6	; 0x6
   81304:	13a00007 	movne	r0, #7	; 0x7
   81308:	18bd8030 	ldmneia	sp!, {r4, r5, pc}
   8130c:	e3530005 	cmp	r3, #5	; 0x5
   81310:	0affffaa 	beq	811c0 <EE_VerifyPageFullWriteVariable+0x88>
   81314:	e3a0eb3d 	mov	lr, #62464	; 0xf400
   81318:	e3a01cf5 	mov	r1, #62720	; 0xf500
   8131c:	e28ee004 	add	lr, lr, #4	; 0x4
   81320:	e28110fe 	add	r1, r1, #254	; 0xfe
   81324:	eaffffa9 	b	811d0 <EE_VerifyPageFullWriteVariable+0x98>

00081328 <EE_Erased>:
   81328:	e3e01000 	mvn	r1, #0	; 0x0
   8132c:	e3a03a0f 	mov	r3, #61440	; 0xf000
   81330:	e3a02001 	mov	r2, #1	; 0x1
   81334:	e50137ef 	str	r3, [r1, #-2031]
   81338:	e50127f7 	str	r2, [r1, #-2039]
   8133c:	e51137ff 	ldr	r3, [r1, #-2047]
   81340:	e3130003 	tst	r3, #3	; 0x3
   81344:	1a000003 	bne	81358 <EE_Erased+0x30>
   81348:	e1a02001 	mov	r2, r1
   8134c:	e51237ff 	ldr	r3, [r2, #-2047]
   81350:	e3130003 	tst	r3, #3	; 0x3
   81354:	0afffffc 	beq	8134c <EE_Erased+0x24>
   81358:	e3e01000 	mvn	r1, #0	; 0x0
   8135c:	e51127f3 	ldr	r2, [r1, #-2035]
   81360:	e3a03801 	mov	r3, #65536	; 0x10000
   81364:	e0833001 	add	r3, r3, r1
   81368:	e1520003 	cmp	r2, r3
   8136c:	0a000001 	beq	81378 <EE_Erased+0x50>
   81370:	e3a00000 	mov	r0, #0	; 0x0
   81374:	e12fff1e 	bx	lr
   81378:	e3a03a0f 	mov	r3, #61440	; 0xf000
   8137c:	e2833002 	add	r3, r3, #2	; 0x2
   81380:	e3a02001 	mov	r2, #1	; 0x1
   81384:	e50137ef 	str	r3, [r1, #-2031]
   81388:	e50127f7 	str	r2, [r1, #-2039]
   8138c:	e51137ff 	ldr	r3, [r1, #-2047]
   81390:	e3130003 	tst	r3, #3	; 0x3
   81394:	1a000003 	bne	813a8 <EE_Erased+0x80>
   81398:	e1a02001 	mov	r2, r1
   8139c:	e51237ff 	ldr	r3, [r2, #-2047]
   813a0:	e3130003 	tst	r3, #3	; 0x3
   813a4:	0afffffc 	beq	8139c <EE_Erased+0x74>
   813a8:	e3e01000 	mvn	r1, #0	; 0x0
   813ac:	e51127f3 	ldr	r2, [r1, #-2035]
   813b0:	e3a03801 	mov	r3, #65536	; 0x10000
   813b4:	e0833001 	add	r3, r3, r1
   813b8:	e1520003 	cmp	r2, r3
   813bc:	1affffeb 	bne	81370 <EE_Erased+0x48>
   813c0:	e3a03cf2 	mov	r3, #61952	; 0xf200
   813c4:	e3a02001 	mov	r2, #1	; 0x1
   813c8:	e50137ef 	str	r3, [r1, #-2031]
   813cc:	e50127f7 	str	r2, [r1, #-2039]
   813d0:	e51137ff 	ldr	r3, [r1, #-2047]
   813d4:	e3130003 	tst	r3, #3	; 0x3
   813d8:	1a000003 	bne	813ec <EE_Erased+0xc4>
   813dc:	e1a02001 	mov	r2, r1
   813e0:	e51237ff 	ldr	r3, [r2, #-2047]
   813e4:	e3130003 	tst	r3, #3	; 0x3
   813e8:	0afffffc 	beq	813e0 <EE_Erased+0xb8>
   813ec:	e3e01000 	mvn	r1, #0	; 0x0
   813f0:	e51127f3 	ldr	r2, [r1, #-2035]
   813f4:	e3a03801 	mov	r3, #65536	; 0x10000
   813f8:	e0833001 	add	r3, r3, r1
   813fc:	e1520003 	cmp	r2, r3
   81400:	1affffda 	bne	81370 <EE_Erased+0x48>
   81404:	e3a03cf2 	mov	r3, #61952	; 0xf200
   81408:	e2833002 	add	r3, r3, #2	; 0x2
   8140c:	e3a02001 	mov	r2, #1	; 0x1
   81410:	e50137ef 	str	r3, [r1, #-2031]
   81414:	e50127f7 	str	r2, [r1, #-2039]
   81418:	e51137ff 	ldr	r3, [r1, #-2047]
   8141c:	e3130003 	tst	r3, #3	; 0x3
   81420:	1a000003 	bne	81434 <EE_Erased+0x10c>
   81424:	e1a02001 	mov	r2, r1
   81428:	e51237ff 	ldr	r3, [r2, #-2047]
   8142c:	e3130003 	tst	r3, #3	; 0x3
   81430:	0afffffc 	beq	81428 <EE_Erased+0x100>
   81434:	e3e03000 	mvn	r3, #0	; 0x0
   81438:	e51317f3 	ldr	r1, [r3, #-2035]
   8143c:	e3a02801 	mov	r2, #65536	; 0x10000
   81440:	e0822003 	add	r2, r2, r3
   81444:	e1510002 	cmp	r1, r2
   81448:	13a00000 	movne	r0, #0	; 0x0
   8144c:	03a00001 	moveq	r0, #1	; 0x1
   81450:	e12fff1e 	bx	lr

00081454 <EE_Format>:
   81454:	e3e00000 	mvn	r0, #0	; 0x0
   81458:	e3a03008 	mov	r3, #8	; 0x8
   8145c:	e3a02a0f 	mov	r2, #61440	; 0xf000
   81460:	e3a01005 	mov	r1, #5	; 0x5
   81464:	e50037fb 	str	r3, [r0, #-2043]
   81468:	e50027ef 	str	r2, [r0, #-2031]
   8146c:	e50017f7 	str	r1, [r0, #-2039]
   81470:	e51037ff 	ldr	r3, [r0, #-2047]
   81474:	e2133003 	ands	r3, r3, #3	; 0x3
   81478:	1a000003 	bne	8148c <EE_Format+0x38>
   8147c:	e1a02000 	mov	r2, r0
   81480:	e51237ff 	ldr	r3, [r2, #-2047]
   81484:	e2133003 	ands	r3, r3, #3	; 0x3
   81488:	0afffffc 	beq	81480 <EE_Format+0x2c>
   8148c:	e3130002 	tst	r3, #2	; 0x2
   81490:	e3a02000 	mov	r2, #0	; 0x0
   81494:	e3e03000 	mvn	r3, #0	; 0x0
   81498:	e50327fb 	str	r2, [r3, #-2043]
   8149c:	1a000027 	bne	81540 <EE_Format+0xec>
   814a0:	e3e01000 	mvn	r1, #0	; 0x0
   814a4:	e3a03008 	mov	r3, #8	; 0x8
   814a8:	e3a02a0f 	mov	r2, #61440	; 0xf000
   814ac:	e50137fb 	str	r3, [r1, #-2043]
   814b0:	e50127ef 	str	r2, [r1, #-2031]
   814b4:	e2433002 	sub	r3, r3, #2	; 0x2
   814b8:	e3a02002 	mov	r2, #2	; 0x2
   814bc:	e50137f3 	str	r3, [r1, #-2035]
   814c0:	e50127f7 	str	r2, [r1, #-2039]
   814c4:	e51137ff 	ldr	r3, [r1, #-2047]
   814c8:	e2133003 	ands	r3, r3, #3	; 0x3
   814cc:	1a000003 	bne	814e0 <EE_Format+0x8c>
   814d0:	e3e02000 	mvn	r2, #0	; 0x0
   814d4:	e51237ff 	ldr	r3, [r2, #-2047]
   814d8:	e2133003 	ands	r3, r3, #3	; 0x3
   814dc:	0afffffb 	beq	814d0 <EE_Format+0x7c>
   814e0:	e2133002 	ands	r3, r3, #2	; 0x2
   814e4:	1a000015 	bne	81540 <EE_Format+0xec>
   814e8:	e3e00000 	mvn	r0, #0	; 0x0
   814ec:	e50037fb 	str	r3, [r0, #-2043]
   814f0:	e3a02cf2 	mov	r2, #61952	; 0xf200
   814f4:	e3a03008 	mov	r3, #8	; 0x8
   814f8:	e3a01005 	mov	r1, #5	; 0x5
   814fc:	e50037fb 	str	r3, [r0, #-2043]
   81500:	e50027ef 	str	r2, [r0, #-2031]
   81504:	e50017f7 	str	r1, [r0, #-2039]
   81508:	e51037ff 	ldr	r3, [r0, #-2047]
   8150c:	e2133003 	ands	r3, r3, #3	; 0x3
   81510:	1a000003 	bne	81524 <EE_Format+0xd0>
   81514:	e1a02000 	mov	r2, r0
   81518:	e51237ff 	ldr	r3, [r2, #-2047]
   8151c:	e2133003 	ands	r3, r3, #3	; 0x3
   81520:	0afffffc 	beq	81518 <EE_Format+0xc4>
   81524:	e1b030a3 	movs	r3, r3, lsr #1
   81528:	e3a02000 	mov	r2, #0	; 0x0
   8152c:	e3e03000 	mvn	r3, #0	; 0x0
   81530:	13a00000 	movne	r0, #0	; 0x0
   81534:	03a00001 	moveq	r0, #1	; 0x1
   81538:	e50327fb 	str	r2, [r3, #-2043]
   8153c:	e12fff1e 	bx	lr
   81540:	e3a00000 	mov	r0, #0	; 0x0
   81544:	e12fff1e 	bx	lr

00081548 <EE_Read>:
   81548:	e3e0c000 	mvn	ip, #0	; 0x0
   8154c:	e3a03a0f 	mov	r3, #61440	; 0xf000
   81550:	e3a02001 	mov	r2, #1	; 0x1
   81554:	e50c37ef 	str	r3, [ip, #-2031]
   81558:	e50c27f7 	str	r2, [ip, #-2039]
   8155c:	e51c37ff 	ldr	r3, [ip, #-2047]
   81560:	e3130003 	tst	r3, #3	; 0x3

/*******************************************************************************
* Function Name  : EE_ReadVariable
* Description    : Returns the last stored variable data, if found, which 
*                  correspond to the passed virtual address
* Input          : - VirtAddress: Variable virtual address
*                  - Read_data: Global variable contains the read variable value
* Output         : None
* Return         : - Success or error status: 
*                      - 0: if variable was found
*                      - 1: if the variable was not found
*                      - NO_VALID_PAGE: if no valid page was found.
*******************************************************************************/
FLASH_Status EE_ReadVariable(u16 VirtAddress, u16* ReadData)
{
  FLASH_Status ValidPage;
  u16 AddressValue;
  u16 Address, PageStartAddress;

  // Get active Page for read operation
  ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);

  if (ValidPage == NO_VALID_PAGE)
    return  NO_VALID_PAGE;

  // Get the valid Page start Address
  PageStartAddress = (EEPROM_START_ADDRESS + (ValidPage * PAGE_SIZE) + 4);
  // Get the valid Page end Address
  Address = (EEPROM_START_ADDRESS + ((1 + ValidPage) * PAGE_SIZE) - 2);

  // Check each active page address starting from end
  while (Address >= (PageStartAddress + 2)) {
    // Get the current location content to be compared with virtual address
    AddressValue = FLASH_Load(Address);
    // Compare the read address with the virtual address
    if (AddressValue == VirtAddress) {
      // Get content of Address-2 which is variable value
      *ReadData = FLASH_Load(Address - 2);
      return VARIABLE_EXIST;
    }
    else {
      // Next address location
      Address = Address - 4;
    }
  }

  return VARIABLE_DOESNOT_EXIST;
}

Bool EE_Read(u16 VirtAddress, u16* Read_data)
{
   81564:	e92d4010 	stmdb	sp!, {r4, lr}
   81568:	e1a04001 	mov	r4, r1
   8156c:	1a000003 	bne	81580 <EE_Read+0x38>
   81570:	e1a0200c 	mov	r2, ip
   81574:	e51237ff 	ldr	r3, [r2, #-2047]
   81578:	e3130003 	tst	r3, #3	; 0x3
   8157c:	0afffffc 	beq	81574 <EE_Read+0x2c>
   81580:	e3e0c000 	mvn	ip, #0	; 0x0
   81584:	e3a03cf2 	mov	r3, #61952	; 0xf200
   81588:	e3a02001 	mov	r2, #1	; 0x1
   8158c:	e51ce7f3 	ldr	lr, [ip, #-2035]
   81590:	e50c37ef 	str	r3, [ip, #-2031]
   81594:	e50c27f7 	str	r2, [ip, #-2039]
   81598:	e51c37ff 	ldr	r3, [ip, #-2047]
   8159c:	e3130003 	tst	r3, #3	; 0x3
   815a0:	1a000003 	bne	815b4 <EE_Read+0x6c>
   815a4:	e1a0200c 	mov	r2, ip
   815a8:	e51237ff 	ldr	r3, [r2, #-2047]
   815ac:	e3130003 	tst	r3, #3	; 0x3
   815b0:	0afffffc 	beq	815a8 <EE_Read+0x60>
   815b4:	e35e0006 	cmp	lr, #6	; 0x6
   815b8:	e3e03000 	mvn	r3, #0	; 0x0
   815bc:	03a0ecf5 	moveq	lr, #62720	; 0xf500
   815c0:	03a01b3d 	moveq	r1, #62464	; 0xf400
   815c4:	e51337f3 	ldr	r3, [r3, #-2035]
   815c8:	028ee0fe 	addeq	lr, lr, #254	; 0xfe
   815cc:	02811006 	addeq	r1, r1, #6	; 0x6
   815d0:	0a000007 	beq	815f4 <EE_Read+0xac>
   815d4:	e3530006 	cmp	r3, #6	; 0x6
   815d8:	0a000001 	beq	815e4 <EE_Read+0x9c>
   815dc:	e3a00000 	mov	r0, #0	; 0x0
  u16 *DataPtr = Read_data;
  
  return (EE_ReadVariable(VirtAddress, DataPtr) == VARIABLE_EXIST);

}
   815e0:	e8bd8010 	ldmia	sp!, {r4, pc}
   815e4:	e3a0ecf7 	mov	lr, #63232	; 0xf700
   815e8:	e3a01cf6 	mov	r1, #62976	; 0xf600
   815ec:	e28ee0fe 	add	lr, lr, #254	; 0xfe
   815f0:	e2811006 	add	r1, r1, #6	; 0x6
   815f4:	e3e0c000 	mvn	ip, #0	; 0x0
   815f8:	e3a03001 	mov	r3, #1	; 0x1
   815fc:	e50ce7ef 	str	lr, [ip, #-2031]
   81600:	e50c37f7 	str	r3, [ip, #-2039]
   81604:	e51c27ff 	ldr	r2, [ip, #-2047]
   81608:	e3120003 	tst	r2, #3	; 0x3
   8160c:	1a000003 	bne	81620 <EE_Read+0xd8>
   81610:	e1a0200c 	mov	r2, ip
   81614:	e51237ff 	ldr	r3, [r2, #-2047]
   81618:	e3130003 	tst	r3, #3	; 0x3
   8161c:	0afffffc 	beq	81614 <EE_Read+0xcc>
   81620:	e3e0c000 	mvn	ip, #0	; 0x0
   81624:	e51c37f3 	ldr	r3, [ip, #-2035]
   81628:	e1500003 	cmp	r0, r3
   8162c:	0a000004 	beq	81644 <EE_Read+0xfc>
   81630:	e24ee004 	sub	lr, lr, #4	; 0x4
   81634:	e151000e 	cmp	r1, lr
   81638:	9affffed 	bls	815f4 <EE_Read+0xac>
   8163c:	e3a00000 	mov	r0, #0	; 0x0
   81640:	e8bd8010 	ldmia	sp!, {r4, pc}
   81644:	e24e3002 	sub	r3, lr, #2	; 0x2
   81648:	e3a02001 	mov	r2, #1	; 0x1
   8164c:	e50c37ef 	str	r3, [ip, #-2031]
   81650:	e50c27f7 	str	r2, [ip, #-2039]
   81654:	e51c37ff 	ldr	r3, [ip, #-2047]
   81658:	e3130003 	tst	r3, #3	; 0x3
   8165c:	1a000003 	bne	81670 <EE_Read+0x128>
   81660:	e1a0200c 	mov	r2, ip
   81664:	e51237ff 	ldr	r3, [r2, #-2047]
   81668:	e3130003 	tst	r3, #3	; 0x3
   8166c:	0afffffc 	beq	81664 <EE_Read+0x11c>
   81670:	e3e03000 	mvn	r3, #0	; 0x0
   81674:	e51327f3 	ldr	r2, [r3, #-2035]
   81678:	e3a00001 	mov	r0, #1	; 0x1
   8167c:	e5842000 	str	r2, [r4]
   81680:	e8bd8010 	ldmia	sp!, {r4, pc}

00081684 <EE_Write>:

/*******************************************************************************
* Function Name  : EE_PageTransfer
* Description    : Transfers last updated variable data from the full Page to 
*                  an empty one.
* Input          : - VirtAddress: 16 bit virtual address of the variable
*                  - Data: 16 bit data to be written as variable value
* Output         : None
* Return         : - Success or error status: 
*                      - FLASH_COMPLETE: on success,
*                      - PAGE_FULL: if valid page is full
*                      - NO_VALID_PAGE: if no valid page was found
*                      - Flash error code: on write Flash error
*******************************************************************************/
FLASH_Status EE_PageTransfer(u16 VirtAddress, u16 Data)
{
  FLASH_Status FlashStatus;
  u16 NewPageAddress, OldPageAddress;
  FLASH_Status ValidPage;
  u16 VarIdx;
  FLASH_Status EepromStatus, ReadStatus;

  // Get active Page for read operation
  ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);

  if (ValidPage == PAGE1) {
    NewPageAddress = PAGE0_BASE_ADDRESS;
    OldPageAddress = PAGE1_BASE_ADDRESS;
  }
  else if (ValidPage == PAGE0) {
    NewPageAddress = PAGE1_BASE_ADDRESS;
    OldPageAddress = PAGE0_BASE_ADDRESS;
  }
  else
    return NO_VALID_PAGE;

  // Set the new Page status to RECEIVE_DATA status
  FlashStatus = FLASH_Save(NewPageAddress, RECEIVE_DATA);
  if (FlashStatus != FLASH_COMPLETE)
    return FlashStatus;

  // Write the variable passed as parameter in the new active page
  EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
  if (EepromStatus != FLASH_COMPLETE)
    return EepromStatus;

  // Transfer process: transfer variables from old to the new active page
  for (VarIdx = 0; VarIdx < NumbOfVar; VarIdx++) {
    // Check each variable except the one passed as parameter
    if (VarIdx != VirtAddress) { 
      // Read the other last variable updates
      ReadStatus = EE_ReadVariable(VarIdx, &DataVar);
      // In case variable corresponding to the virtual address was found
      if (ReadStatus == VARIABLE_EXIST) {
        // Transfer the variable to the new active page
        EepromStatus = EE_VerifyPageFullWriteVariable(VarIdx, DataVar);
        // If program operation was failed, a Flash error code is returned
        if (EepromStatus != FLASH_COMPLETE) {
          return EepromStatus;
        }
      }
    }
  }

  // Erase the old Page: Set old Page status to ERASED status
  FlashStatus = FLASH_ErasePage(OldPageAddress);
  if (FlashStatus == FLASH_COMPLETE)
    FlashStatus = FLASH_Save(NewPageAddress, VALID_PAGE);

  return FlashStatus;
}

/*******************************************************************************
* Function Name  : EE_WriteVariable
* Description    : Writes/upadtes variable data in EEPROM.
* Input          : - VirtAddress: Variable virtual address
*                  - Data: 16 bit data to be written
* Output         : None
* Return         : - Success or error status: 
*                      - FLASH_COMPLETE: on success,
*                      - PAGE_FULL: if valid page is full
*                      - NO_VALID_PAGE: if no valid page was found
*                      - Flash error code: on write Flash error
*******************************************************************************/
Bool EE_Write(u16 VirtAddress, u16 Data)
{
   81684:	e92d45f0 	stmdb	sp!, {r4, r5, r6, r7, r8, sl, lr}
   81688:	e1a07000 	mov	r7, r0
   8168c:	e1a05001 	mov	r5, r1
  FLASH_Status Status;

  // Write the variable virtual address and value in the EEPROM
  Status = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
   81690:	ebfffea8 	bl	81138 <EE_VerifyPageFullWriteVariable>
  // In case the EEPROM active page is full
  if (Status == PAGE_FULL)
   81694:	e3500008 	cmp	r0, #8	; 0x8
   81698:	0a000003 	beq	816ac <EE_Write+0x28>
   8169c:	e3500001 	cmp	r0, #1	; 0x1
   816a0:	13a00000 	movne	r0, #0	; 0x0
   816a4:	03a00001 	moveq	r0, #1	; 0x1
   816a8:	e8bd85f0 	ldmia	sp!, {r4, r5, r6, r7, r8, sl, pc}
   816ac:	e3e01000 	mvn	r1, #0	; 0x0
   816b0:	e3a03a0f 	mov	r3, #61440	; 0xf000
   816b4:	e3a02001 	mov	r2, #1	; 0x1
   816b8:	e50137ef 	str	r3, [r1, #-2031]
   816bc:	e50127f7 	str	r2, [r1, #-2039]
   816c0:	e51137ff 	ldr	r3, [r1, #-2047]
   816c4:	e3130003 	tst	r3, #3	; 0x3
   816c8:	1a000003 	bne	816dc <EE_Write+0x58>
   816cc:	e1a02001 	mov	r2, r1
   816d0:	e51237ff 	ldr	r3, [r2, #-2047]
   816d4:	e3130003 	tst	r3, #3	; 0x3
   816d8:	0afffffc 	beq	816d0 <EE_Write+0x4c>
   816dc:	e3e01000 	mvn	r1, #0	; 0x0
   816e0:	e3a03cf2 	mov	r3, #61952	; 0xf200
   816e4:	e3a02001 	mov	r2, #1	; 0x1
   816e8:	e51107f3 	ldr	r0, [r1, #-2035]
   816ec:	e50137ef 	str	r3, [r1, #-2031]
   816f0:	e50127f7 	str	r2, [r1, #-2039]
   816f4:	e51137ff 	ldr	r3, [r1, #-2047]
   816f8:	e3130003 	tst	r3, #3	; 0x3
   816fc:	1a000003 	bne	81710 <EE_Write+0x8c>
   81700:	e1a02001 	mov	r2, r1
   81704:	e51237ff 	ldr	r3, [r2, #-2047]
   81708:	e3130003 	tst	r3, #3	; 0x3
   8170c:	0afffffc 	beq	81704 <EE_Write+0x80>
   81710:	e3500006 	cmp	r0, #6	; 0x6
   81714:	e3e03000 	mvn	r3, #0	; 0x0
   81718:	e51337f3 	ldr	r3, [r3, #-2035]
   8171c:	03a08cf2 	moveq	r8, #61952	; 0xf200
   81720:	03a0aa0f 	moveq	sl, #61440	; 0xf000
   81724:	0a000005 	beq	81740 <EE_Write+0xbc>
   81728:	e3530006 	cmp	r3, #6	; 0x6
   8172c:	0a000001 	beq	81738 <EE_Write+0xb4>
   81730:	e3a00000 	mov	r0, #0	; 0x0
   81734:	e8bd85f0 	ldmia	sp!, {r4, r5, r6, r7, r8, sl, pc}
   81738:	e3a08a0f 	mov	r8, #61440	; 0xf000
   8173c:	e3a0acf2 	mov	sl, #61952	; 0xf200
   81740:	e3e01000 	mvn	r1, #0	; 0x0
   81744:	e3a03008 	mov	r3, #8	; 0x8
   81748:	e50137fb 	str	r3, [r1, #-2043]
   8174c:	e3a02002 	mov	r2, #2	; 0x2
   81750:	e2433003 	sub	r3, r3, #3	; 0x3
   81754:	e50187ef 	str	r8, [r1, #-2031]
   81758:	e50137f3 	str	r3, [r1, #-2035]
   8175c:	e50127f7 	str	r2, [r1, #-2039]
   81760:	e51137ff 	ldr	r3, [r1, #-2047]
   81764:	e2133003 	ands	r3, r3, #3	; 0x3
   81768:	1a000003 	bne	8177c <EE_Write+0xf8>
   8176c:	e1a02001 	mov	r2, r1
   81770:	e51237ff 	ldr	r3, [r2, #-2047]
   81774:	e2133003 	ands	r3, r3, #3	; 0x3
   81778:	0afffffc 	beq	81770 <EE_Write+0xec>
   8177c:	e2134002 	ands	r4, r3, #2	; 0x2
   81780:	1affffea 	bne	81730 <EE_Write+0xac>
   81784:	e3e06000 	mvn	r6, #0	; 0x0
   81788:	e1a01005 	mov	r1, r5
   8178c:	e1a00007 	mov	r0, r7
   81790:	e50647fb 	str	r4, [r6, #-2043]
   81794:	ebfffe67 	bl	81138 <EE_VerifyPageFullWriteVariable>
   81798:	e3500001 	cmp	r0, #1	; 0x1
   8179c:	11a00004 	movne	r0, r4
   817a0:	18bd85f0 	ldmneia	sp!, {r4, r5, r6, r7, r8, sl, pc}
   817a4:	e1a05004 	mov	r5, r4
   817a8:	e1a04006 	mov	r4, r6
   817ac:	e1a06000 	mov	r6, r0
   817b0:	e1570005 	cmp	r7, r5
   817b4:	0a00001d 	beq	81830 <EE_Write+0x1ac>
   817b8:	e3a03a0f 	mov	r3, #61440	; 0xf000
   817bc:	e50437ef 	str	r3, [r4, #-2031]
   817c0:	e50467f7 	str	r6, [r4, #-2039]
   817c4:	e51437ff 	ldr	r3, [r4, #-2047]
   817c8:	e3130003 	tst	r3, #3	; 0x3
   817cc:	1a000003 	bne	817e0 <EE_Write+0x15c>
   817d0:	e3e02000 	mvn	r2, #0	; 0x0
   817d4:	e51237ff 	ldr	r3, [r2, #-2047]
   817d8:	e3130003 	tst	r3, #3	; 0x3
   817dc:	0afffffc 	beq	817d4 <EE_Write+0x150>
   817e0:	e3a03cf2 	mov	r3, #61952	; 0xf200
   817e4:	e51417f3 	ldr	r1, [r4, #-2035]
   817e8:	e50437ef 	str	r3, [r4, #-2031]
   817ec:	e50467f7 	str	r6, [r4, #-2039]
   817f0:	e51437ff 	ldr	r3, [r4, #-2047]
   817f4:	e3130003 	tst	r3, #3	; 0x3
   817f8:	1a000003 	bne	8180c <EE_Write+0x188>
   817fc:	e3e02000 	mvn	r2, #0	; 0x0
   81800:	e51237ff 	ldr	r3, [r2, #-2047]
   81804:	e3130003 	tst	r3, #3	; 0x3
   81808:	0afffffc 	beq	81800 <EE_Write+0x17c>
   8180c:	e3510006 	cmp	r1, #6	; 0x6
   81810:	03a01cf5 	moveq	r1, #62720	; 0xf500
   81814:	03a00b3d 	moveq	r0, #62464	; 0xf400
   81818:	e51437f3 	ldr	r3, [r4, #-2035]
   8181c:	028110fe 	addeq	r1, r1, #254	; 0xfe
   81820:	02800006 	addeq	r0, r0, #6	; 0x6
   81824:	0a00002f 	beq	818e8 <EE_Write+0x264>
   81828:	e3530006 	cmp	r3, #6	; 0x6
   8182c:	0a000029 	beq	818d8 <EE_Write+0x254>
   81830:	e2855001 	add	r5, r5, #1	; 0x1
   81834:	e3550004 	cmp	r5, #4	; 0x4
   81838:	1affffdc 	bne	817b0 <EE_Write+0x12c>
   8183c:	e3e01000 	mvn	r1, #0	; 0x0
   81840:	e3a03008 	mov	r3, #8	; 0x8
   81844:	e3a02005 	mov	r2, #5	; 0x5
   81848:	e50137fb 	str	r3, [r1, #-2043]
   8184c:	e501a7ef 	str	sl, [r1, #-2031]
   81850:	e50127f7 	str	r2, [r1, #-2039]
   81854:	e51137ff 	ldr	r3, [r1, #-2047]
   81858:	e2133003 	ands	r3, r3, #3	; 0x3
   8185c:	1a000003 	bne	81870 <EE_Write+0x1ec>
   81860:	e1a02001 	mov	r2, r1
   81864:	e51237ff 	ldr	r3, [r2, #-2047]
   81868:	e2133003 	ands	r3, r3, #3	; 0x3
   8186c:	0afffffc 	beq	81864 <EE_Write+0x1e0>
   81870:	e3130002 	tst	r3, #2	; 0x2
   81874:	e3a02000 	mov	r2, #0	; 0x0
   81878:	e3e03000 	mvn	r3, #0	; 0x0
   8187c:	e50327fb 	str	r2, [r3, #-2043]
   81880:	1affffaa 	bne	81730 <EE_Write+0xac>
   81884:	e3e01000 	mvn	r1, #0	; 0x0
   81888:	e3a03008 	mov	r3, #8	; 0x8
   8188c:	e50137fb 	str	r3, [r1, #-2043]
   81890:	e3a02002 	mov	r2, #2	; 0x2
   81894:	e2433002 	sub	r3, r3, #2	; 0x2
   81898:	e50187ef 	str	r8, [r1, #-2031]
   8189c:	e50137f3 	str	r3, [r1, #-2035]
   818a0:	e50127f7 	str	r2, [r1, #-2039]
   818a4:	e51137ff 	ldr	r3, [r1, #-2047]
   818a8:	e2133003 	ands	r3, r3, #3	; 0x3
   818ac:	1a000003 	bne	818c0 <EE_Write+0x23c>
   818b0:	e3e02000 	mvn	r2, #0	; 0x0
   818b4:	e51237ff 	ldr	r3, [r2, #-2047]
   818b8:	e2133003 	ands	r3, r3, #3	; 0x3
   818bc:	0afffffb 	beq	818b0 <EE_Write+0x22c>
   818c0:	e2132002 	ands	r2, r3, #2	; 0x2
   818c4:	03e03000 	mvneq	r3, #0	; 0x0
   818c8:	03a00001 	moveq	r0, #1	; 0x1
   818cc:	050327fb 	streq	r2, [r3, #-2043]
   818d0:	08bd85f0 	ldmeqia	sp!, {r4, r5, r6, r7, r8, sl, pc}
   818d4:	eaffff95 	b	81730 <EE_Write+0xac>
   818d8:	e3a01cf7 	mov	r1, #63232	; 0xf700
   818dc:	e3a00cf6 	mov	r0, #62976	; 0xf600
   818e0:	e28110fe 	add	r1, r1, #254	; 0xfe
   818e4:	e2800006 	add	r0, r0, #6	; 0x6
   818e8:	e50417ef 	str	r1, [r4, #-2031]
   818ec:	e50467f7 	str	r6, [r4, #-2039]
   818f0:	e51437ff 	ldr	r3, [r4, #-2047]
   818f4:	e3130003 	tst	r3, #3	; 0x3
   818f8:	1a000003 	bne	8190c <EE_Write+0x288>
   818fc:	e3e02000 	mvn	r2, #0	; 0x0
   81900:	e51237ff 	ldr	r3, [r2, #-2047]
   81904:	e3130003 	tst	r3, #3	; 0x3
   81908:	0afffffc 	beq	81900 <EE_Write+0x27c>
   8190c:	e3e02000 	mvn	r2, #0	; 0x0
   81910:	e51237f3 	ldr	r3, [r2, #-2035]
   81914:	e1550003 	cmp	r5, r3
   81918:	0a000003 	beq	8192c <EE_Write+0x2a8>
   8191c:	e2411004 	sub	r1, r1, #4	; 0x4
   81920:	e1500001 	cmp	r0, r1
   81924:	9affffef 	bls	818e8 <EE_Write+0x264>
   81928:	eaffffc0 	b	81830 <EE_Write+0x1ac>
   8192c:	e2413002 	sub	r3, r1, #2	; 0x2
   81930:	e50237ef 	str	r3, [r2, #-2031]
   81934:	e50267f7 	str	r6, [r2, #-2039]
   81938:	e51237ff 	ldr	r3, [r2, #-2047]
   8193c:	e3130003 	tst	r3, #3	; 0x3
   81940:	0afffffc 	beq	81938 <EE_Write+0x2b4>
   81944:	e51427f3 	ldr	r2, [r4, #-2035]
   81948:	e59f3018 	ldr	r3, [pc, #24]	; 81968 <.text+0x1968>
   8194c:	e1a01002 	mov	r1, r2
   81950:	e1a00005 	mov	r0, r5
   81954:	e5832000 	str	r2, [r3]
   81958:	ebfffdf6 	bl	81138 <EE_VerifyPageFullWriteVariable>
   8195c:	e3500001 	cmp	r0, #1	; 0x1
   81960:	0affffb2 	beq	81830 <EE_Write+0x1ac>
   81964:	eaffff71 	b	81730 <EE_Write+0xac>
   81968:	0001000c 	andeq	r0, r1, ip

0008196c <__aeabi_uidiv>:
   8196c:	e2512001 	subs	r2, r1, #1	; 0x1
   81970:	012fff1e 	bxeq	lr
   81974:	3a000036 	bcc	81a54 <__aeabi_uidiv+0xe8>
   81978:	e1500001 	cmp	r0, r1
   8197c:	9a000022 	bls	81a0c <__aeabi_uidiv+0xa0>
   81980:	e1110002 	tst	r1, r2
   81984:	0a000023 	beq	81a18 <__aeabi_uidiv+0xac>
   81988:	e311020e 	tst	r1, #-536870912	; 0xe0000000
   8198c:	01a01181 	moveq	r1, r1, lsl #3
   81990:	03a03008 	moveq	r3, #8	; 0x8
   81994:	13a03001 	movne	r3, #1	; 0x1
   81998:	e3510201 	cmp	r1, #268435456	; 0x10000000
   8199c:	31510000 	cmpcc	r1, r0
   819a0:	31a01201 	movcc	r1, r1, lsl #4
   819a4:	31a03203 	movcc	r3, r3, lsl #4
   819a8:	3afffffa 	bcc	81998 <__aeabi_uidiv+0x2c>
   819ac:	e3510102 	cmp	r1, #-2147483648	; 0x80000000
   819b0:	31510000 	cmpcc	r1, r0
   819b4:	31a01081 	movcc	r1, r1, lsl #1
   819b8:	31a03083 	movcc	r3, r3, lsl #1
   819bc:	3afffffa 	bcc	819ac <__aeabi_uidiv+0x40>
   819c0:	e3a02000 	mov	r2, #0	; 0x0
   819c4:	e1500001 	cmp	r0, r1
   819c8:	20400001 	subcs	r0, r0, r1
   819cc:	21822003 	orrcs	r2, r2, r3
   819d0:	e15000a1 	cmp	r0, r1, lsr #1
   819d4:	204000a1 	subcs	r0, r0, r1, lsr #1
   819d8:	218220a3 	orrcs	r2, r2, r3, lsr #1
   819dc:	e1500121 	cmp	r0, r1, lsr #2
   819e0:	20400121 	subcs	r0, r0, r1, lsr #2
   819e4:	21822123 	orrcs	r2, r2, r3, lsr #2
   819e8:	e15001a1 	cmp	r0, r1, lsr #3
   819ec:	204001a1 	subcs	r0, r0, r1, lsr #3
   819f0:	218221a3 	orrcs	r2, r2, r3, lsr #3
   819f4:	e3500000 	cmp	r0, #0	; 0x0
   819f8:	11b03223 	movnes	r3, r3, lsr #4
   819fc:	11a01221 	movne	r1, r1, lsr #4
   81a00:	1affffef 	bne	819c4 <__aeabi_uidiv+0x58>
   81a04:	e1a00002 	mov	r0, r2
   81a08:	e12fff1e 	bx	lr
   81a0c:	03a00001 	moveq	r0, #1	; 0x1
   81a10:	13a00000 	movne	r0, #0	; 0x0
   81a14:	e12fff1e 	bx	lr
   81a18:	e3510801 	cmp	r1, #65536	; 0x10000
   81a1c:	21a01821 	movcs	r1, r1, lsr #16
   81a20:	23a02010 	movcs	r2, #16	; 0x10
   81a24:	33a02000 	movcc	r2, #0	; 0x0
   81a28:	e3510c01 	cmp	r1, #256	; 0x100
   81a2c:	21a01421 	movcs	r1, r1, lsr #8
   81a30:	22822008 	addcs	r2, r2, #8	; 0x8
   81a34:	e3510010 	cmp	r1, #16	; 0x10
   81a38:	21a01221 	movcs	r1, r1, lsr #4
   81a3c:	22822004 	addcs	r2, r2, #4	; 0x4
   81a40:	e3510004 	cmp	r1, #4	; 0x4
   81a44:	82822003 	addhi	r2, r2, #3	; 0x3
   81a48:	908220a1 	addls	r2, r2, r1, lsr #1
   81a4c:	e1a00230 	mov	r0, r0, lsr r2
   81a50:	e12fff1e 	bx	lr
   81a54:	e52de008 	str	lr, [sp, #-8]!
   81a58:	eb00003a 	bl	81b48 <__aeabi_idiv0>
   81a5c:	e3a00000 	mov	r0, #0	; 0x0
   81a60:	e49df008 	ldr	pc, [sp], #8

00081a64 <__aeabi_uidivmod>:
   81a64:	e92d4003 	stmdb	sp!, {r0, r1, lr}
   81a68:	ebffffbf 	bl	8196c <__aeabi_uidiv>
   81a6c:	e8bd4006 	ldmia	sp!, {r1, r2, lr}
   81a70:	e0030092 	mul	r3, r2, r0
   81a74:	e0411003 	sub	r1, r1, r3
   81a78:	e12fff1e 	bx	lr

00081a7c <__umodsi3>:
   81a7c:	e2512001 	subs	r2, r1, #1	; 0x1
   81a80:	3a00002c 	bcc	81b38 <__umodsi3+0xbc>
   81a84:	11500001 	cmpne	r0, r1
   81a88:	03a00000 	moveq	r0, #0	; 0x0
   81a8c:	81110002 	tsthi	r1, r2
   81a90:	00000002 	andeq	r0, r0, r2
   81a94:	912fff1e 	bxls	lr
   81a98:	e3a02000 	mov	r2, #0	; 0x0
   81a9c:	e3510201 	cmp	r1, #268435456	; 0x10000000
   81aa0:	31510000 	cmpcc	r1, r0
   81aa4:	31a01201 	movcc	r1, r1, lsl #4
   81aa8:	32822004 	addcc	r2, r2, #4	; 0x4
   81aac:	3afffffa 	bcc	81a9c <__umodsi3+0x20>
   81ab0:	e3510102 	cmp	r1, #-2147483648	; 0x80000000
   81ab4:	31510000 	cmpcc	r1, r0
   81ab8:	31a01081 	movcc	r1, r1, lsl #1
   81abc:	32822001 	addcc	r2, r2, #1	; 0x1
   81ac0:	3afffffa 	bcc	81ab0 <__umodsi3+0x34>
   81ac4:	e2522003 	subs	r2, r2, #3	; 0x3
   81ac8:	ba00000e 	blt	81b08 <__umodsi3+0x8c>
   81acc:	e1500001 	cmp	r0, r1
   81ad0:	20400001 	subcs	r0, r0, r1
   81ad4:	e15000a1 	cmp	r0, r1, lsr #1
   81ad8:	204000a1 	subcs	r0, r0, r1, lsr #1
   81adc:	e1500121 	cmp	r0, r1, lsr #2
   81ae0:	20400121 	subcs	r0, r0, r1, lsr #2
   81ae4:	e15001a1 	cmp	r0, r1, lsr #3
   81ae8:	204001a1 	subcs	r0, r0, r1, lsr #3
   81aec:	e3500001 	cmp	r0, #1	; 0x1
   81af0:	e1a01221 	mov	r1, r1, lsr #4
   81af4:	a2522004 	subges	r2, r2, #4	; 0x4
   81af8:	aafffff3 	bge	81acc <__umodsi3+0x50>
   81afc:	e3120003 	tst	r2, #3	; 0x3
   81b00:	13300000 	teqne	r0, #0	; 0x0
   81b04:	0a00000a 	beq	81b34 <__umodsi3+0xb8>
   81b08:	e3720002 	cmn	r2, #2	; 0x2
   81b0c:	ba000006 	blt	81b2c <__umodsi3+0xb0>
   81b10:	0a000002 	beq	81b20 <__umodsi3+0xa4>
   81b14:	e1500001 	cmp	r0, r1
   81b18:	20400001 	subcs	r0, r0, r1
   81b1c:	e1a010a1 	mov	r1, r1, lsr #1
   81b20:	e1500001 	cmp	r0, r1
   81b24:	20400001 	subcs	r0, r0, r1
   81b28:	e1a010a1 	mov	r1, r1, lsr #1
   81b2c:	e1500001 	cmp	r0, r1
   81b30:	20400001 	subcs	r0, r0, r1
   81b34:	e12fff1e 	bx	lr
   81b38:	e52de008 	str	lr, [sp, #-8]!
   81b3c:	eb000001 	bl	81b48 <__aeabi_idiv0>
   81b40:	e3a00000 	mov	r0, #0	; 0x0
   81b44:	e49df008 	ldr	pc, [sp], #8

00081b48 <__aeabi_idiv0>:
   81b48:	e12fff1e 	bx	lr

00081b4c <__aeabi_drsub>:
   81b4c:	e2200102 	eor	r0, r0, #-2147483648	; 0x80000000
   81b50:	ea000000 	b	81b58 <__adddf3>

00081b54 <__aeabi_dsub>:
   81b54:	e2222102 	eor	r2, r2, #-2147483648	; 0x80000000

00081b58 <__adddf3>:
   81b58:	e92d4030 	stmdb	sp!, {r4, r5, lr}
   81b5c:	e1a04080 	mov	r4, r0, lsl #1
   81b60:	e1a05082 	mov	r5, r2, lsl #1
   81b64:	e1340005 	teq	r4, r5
   81b68:	01310003 	teqeq	r1, r3
   81b6c:	1194c001 	orrnes	ip, r4, r1
   81b70:	1195c003 	orrnes	ip, r5, r3
   81b74:	11f0cac4 	mvnnes	ip, r4, asr #21
   81b78:	11f0cac5 	mvnnes	ip, r5, asr #21
   81b7c:	0a000086 	beq	81d9c <__adddf3+0x244>
   81b80:	e1a04aa4 	mov	r4, r4, lsr #21
   81b84:	e0745aa5 	rsbs	r5, r4, r5, lsr #21
   81b88:	b2655000 	rsblt	r5, r5, #0	; 0x0
   81b8c:	da000006 	ble	81bac <__adddf3+0x54>
   81b90:	e0844005 	add	r4, r4, r5
   81b94:	e0213003 	eor	r3, r1, r3
   81b98:	e0202002 	eor	r2, r0, r2
   81b9c:	e0231001 	eor	r1, r3, r1
   81ba0:	e0220000 	eor	r0, r2, r0
   81ba4:	e0213003 	eor	r3, r1, r3
   81ba8:	e0202002 	eor	r2, r0, r2
   81bac:	e3550036 	cmp	r5, #54	; 0x36
   81bb0:	88bd8030 	ldmhiia	sp!, {r4, r5, pc}
   81bb4:	e3100102 	tst	r0, #-2147483648	; 0x80000000
   81bb8:	e1a00600 	mov	r0, r0, lsl #12
   81bbc:	e3a0c601 	mov	ip, #1048576	; 0x100000
   81bc0:	e18c0620 	orr	r0, ip, r0, lsr #12
   81bc4:	0a000001 	beq	81bd0 <__adddf3+0x78>
   81bc8:	e2711000 	rsbs	r1, r1, #0	; 0x0
   81bcc:	e2e00000 	rsc	r0, r0, #0	; 0x0
   81bd0:	e3120102 	tst	r2, #-2147483648	; 0x80000000
   81bd4:	e1a02602 	mov	r2, r2, lsl #12
   81bd8:	e18c2622 	orr	r2, ip, r2, lsr #12
   81bdc:	0a000001 	beq	81be8 <__adddf3+0x90>
   81be0:	e2733000 	rsbs	r3, r3, #0	; 0x0
   81be4:	e2e22000 	rsc	r2, r2, #0	; 0x0
   81be8:	e1340005 	teq	r4, r5
   81bec:	0a000064 	beq	81d84 <__adddf3+0x22c>
   81bf0:	e2444001 	sub	r4, r4, #1	; 0x1
   81bf4:	e275e020 	rsbs	lr, r5, #32	; 0x20
   81bf8:	ba000005 	blt	81c14 <__adddf3+0xbc>
   81bfc:	e1a0ce13 	mov	ip, r3, lsl lr
   81c00:	e0911533 	adds	r1, r1, r3, lsr r5
   81c04:	e2a00000 	adc	r0, r0, #0	; 0x0
   81c08:	e0911e12 	adds	r1, r1, r2, lsl lr
   81c0c:	e0b00552 	adcs	r0, r0, r2, asr r5
   81c10:	ea000006 	b	81c30 <__adddf3+0xd8>
   81c14:	e2455020 	sub	r5, r5, #32	; 0x20
   81c18:	e28ee020 	add	lr, lr, #32	; 0x20
   81c1c:	e3530001 	cmp	r3, #1	; 0x1
   81c20:	e1a0ce12 	mov	ip, r2, lsl lr
   81c24:	238cc002 	orrcs	ip, ip, #2	; 0x2
   81c28:	e0911552 	adds	r1, r1, r2, asr r5
   81c2c:	e0b00fc2 	adcs	r0, r0, r2, asr #31
   81c30:	e2005102 	and	r5, r0, #-2147483648	; 0x80000000
   81c34:	5a000002 	bpl	81c44 <__adddf3+0xec>
   81c38:	e27cc000 	rsbs	ip, ip, #0	; 0x0
   81c3c:	e2f11000 	rscs	r1, r1, #0	; 0x0
   81c40:	e2e00000 	rsc	r0, r0, #0	; 0x0
   81c44:	e3500601 	cmp	r0, #1048576	; 0x100000
   81c48:	3a00000e 	bcc	81c88 <__adddf3+0x130>
   81c4c:	e3500602 	cmp	r0, #2097152	; 0x200000
   81c50:	3a000006 	bcc	81c70 <__adddf3+0x118>
   81c54:	e1b000a0 	movs	r0, r0, lsr #1
   81c58:	e1b01061 	movs	r1, r1, rrx
   81c5c:	e1a0c06c 	mov	ip, ip, rrx
   81c60:	e2844001 	add	r4, r4, #1	; 0x1
   81c64:	e1a02a84 	mov	r2, r4, lsl #21
   81c68:	e3720501 	cmn	r2, #4194304	; 0x400000
   81c6c:	2a000062 	bcs	81dfc <__adddf3+0x2a4>
   81c70:	e35c0102 	cmp	ip, #-2147483648	; 0x80000000
   81c74:	01b0c0a1 	moveqs	ip, r1, lsr #1
   81c78:	e2b11000 	adcs	r1, r1, #0	; 0x0
   81c7c:	e0a00a04 	adc	r0, r0, r4, lsl #20
   81c80:	e1800005 	orr	r0, r0, r5
   81c84:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81c88:	e1b0c08c 	movs	ip, ip, lsl #1
   81c8c:	e0b11001 	adcs	r1, r1, r1
   81c90:	e0a00000 	adc	r0, r0, r0
   81c94:	e3100601 	tst	r0, #1048576	; 0x100000
   81c98:	e2444001 	sub	r4, r4, #1	; 0x1
   81c9c:	1afffff3 	bne	81c70 <__adddf3+0x118>
   81ca0:	e3300000 	teq	r0, #0	; 0x0
   81ca4:	13a03014 	movne	r3, #20	; 0x14
   81ca8:	03a03034 	moveq	r3, #52	; 0x34
   81cac:	01a00001 	moveq	r0, r1
   81cb0:	03a01000 	moveq	r1, #0	; 0x0
   81cb4:	e1a02000 	mov	r2, r0
   81cb8:	e3520801 	cmp	r2, #65536	; 0x10000
   81cbc:	21a02822 	movcs	r2, r2, lsr #16
   81cc0:	22433010 	subcs	r3, r3, #16	; 0x10
   81cc4:	e3520c01 	cmp	r2, #256	; 0x100
   81cc8:	21a02422 	movcs	r2, r2, lsr #8
   81ccc:	22433008 	subcs	r3, r3, #8	; 0x8
   81cd0:	e3520010 	cmp	r2, #16	; 0x10
   81cd4:	21a02222 	movcs	r2, r2, lsr #4
   81cd8:	22433004 	subcs	r3, r3, #4	; 0x4
   81cdc:	e3520004 	cmp	r2, #4	; 0x4
   81ce0:	22433002 	subcs	r3, r3, #2	; 0x2
   81ce4:	304330a2 	subcc	r3, r3, r2, lsr #1
   81ce8:	e04331a2 	sub	r3, r3, r2, lsr #3
   81cec:	e2532020 	subs	r2, r3, #32	; 0x20
   81cf0:	aa000007 	bge	81d14 <__adddf3+0x1bc>
   81cf4:	e292200c 	adds	r2, r2, #12	; 0xc
   81cf8:	da000004 	ble	81d10 <__adddf3+0x1b8>
   81cfc:	e282c014 	add	ip, r2, #20	; 0x14
   81d00:	e262200c 	rsb	r2, r2, #12	; 0xc
   81d04:	e1a01c10 	mov	r1, r0, lsl ip
   81d08:	e1a00230 	mov	r0, r0, lsr r2
   81d0c:	ea000004 	b	81d24 <__adddf3+0x1cc>
   81d10:	e2822014 	add	r2, r2, #20	; 0x14
   81d14:	d262c020 	rsble	ip, r2, #32	; 0x20
   81d18:	e1a00210 	mov	r0, r0, lsl r2
   81d1c:	d1800c31 	orrle	r0, r0, r1, lsr ip
   81d20:	d1a01211 	movle	r1, r1, lsl r2
   81d24:	e0544003 	subs	r4, r4, r3
   81d28:	a0800a04 	addge	r0, r0, r4, lsl #20
   81d2c:	a1800005 	orrge	r0, r0, r5
   81d30:	a8bd8030 	ldmgeia	sp!, {r4, r5, pc}
   81d34:	e1e04004 	mvn	r4, r4
   81d38:	e254401f 	subs	r4, r4, #31	; 0x1f
   81d3c:	aa00000d 	bge	81d78 <__adddf3+0x220>
   81d40:	e294400c 	adds	r4, r4, #12	; 0xc
   81d44:	ca000005 	bgt	81d60 <__adddf3+0x208>
   81d48:	e2844014 	add	r4, r4, #20	; 0x14
   81d4c:	e2642020 	rsb	r2, r4, #32	; 0x20
   81d50:	e1a01431 	mov	r1, r1, lsr r4
   81d54:	e1811210 	orr	r1, r1, r0, lsl r2
   81d58:	e1850430 	orr	r0, r5, r0, lsr r4
   81d5c:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81d60:	e264400c 	rsb	r4, r4, #12	; 0xc
   81d64:	e2642020 	rsb	r2, r4, #32	; 0x20
   81d68:	e1a01231 	mov	r1, r1, lsr r2
   81d6c:	e1811410 	orr	r1, r1, r0, lsl r4
   81d70:	e1a00005 	mov	r0, r5
   81d74:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81d78:	e1a01430 	mov	r1, r0, lsr r4
   81d7c:	e1a00005 	mov	r0, r5
   81d80:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81d84:	e3340000 	teq	r4, #0	; 0x0
   81d88:	e2222601 	eor	r2, r2, #1048576	; 0x100000
   81d8c:	02200601 	eoreq	r0, r0, #1048576	; 0x100000
   81d90:	02844001 	addeq	r4, r4, #1	; 0x1
   81d94:	12455001 	subne	r5, r5, #1	; 0x1
   81d98:	eaffff94 	b	81bf0 <__adddf3+0x98>
   81d9c:	e1f0cac4 	mvns	ip, r4, asr #21
   81da0:	11f0cac5 	mvnnes	ip, r5, asr #21
   81da4:	0a000018 	beq	81e0c <__adddf3+0x2b4>
   81da8:	e1340005 	teq	r4, r5
   81dac:	01310003 	teqeq	r1, r3
   81db0:	0a000003 	beq	81dc4 <__adddf3+0x26c>
   81db4:	e194c001 	orrs	ip, r4, r1
   81db8:	01a00002 	moveq	r0, r2
   81dbc:	01a01003 	moveq	r1, r3
   81dc0:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81dc4:	e1300002 	teq	r0, r2
   81dc8:	13a00000 	movne	r0, #0	; 0x0
   81dcc:	13a01000 	movne	r1, #0	; 0x0
   81dd0:	18bd8030 	ldmneia	sp!, {r4, r5, pc}
   81dd4:	e1b0caa4 	movs	ip, r4, lsr #21
   81dd8:	1a000003 	bne	81dec <__adddf3+0x294>
   81ddc:	e1b01081 	movs	r1, r1, lsl #1
   81de0:	e0b00000 	adcs	r0, r0, r0
   81de4:	23800102 	orrcs	r0, r0, #-2147483648	; 0x80000000
   81de8:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81dec:	e2944501 	adds	r4, r4, #4194304	; 0x400000
   81df0:	32800601 	addcc	r0, r0, #1048576	; 0x100000
   81df4:	38bd8030 	ldmccia	sp!, {r4, r5, pc}
   81df8:	e2005102 	and	r5, r0, #-2147483648	; 0x80000000
   81dfc:	e385047f 	orr	r0, r5, #2130706432	; 0x7f000000
   81e00:	e380060f 	orr	r0, r0, #15728640	; 0xf00000
   81e04:	e3a01000 	mov	r1, #0	; 0x0
   81e08:	e8bd8030 	ldmia	sp!, {r4, r5, pc}
   81e0c:	e1f0cac4 	mvns	ip, r4, asr #21
   81e10:	11a00002 	movne	r0, r2
   81e14:	11a01003 	movne	r1, r3
   81e18:	01f0cac5 	mvneqs	ip, r5, asr #21
   81e1c:	11a02000 	movne	r2, r0
   81e20:	11a03001 	movne	r3, r1
   81e24:	e1914600 	orrs	r4, r1, r0, lsl #12
   81e28:	01935602 	orreqs	r5, r3, r2, lsl #12
   81e2c:	01300002 	teqeq	r0, r2
   81e30:	13800702 	orrne	r0, r0, #524288	; 0x80000
   81e34:	e8bd8030 	ldmia	sp!, {r4, r5, pc}

00081e38 <__aeabi_ui2d>:
   81e38:	e3300000 	teq	r0, #0	; 0x0
   81e3c:	03a01000 	moveq	r1, #0	; 0x0
   81e40:	012fff1e 	bxeq	lr
   81e44:	e92d4030 	stmdb	sp!, {r4, r5, lr}
   81e48:	e3a04b01 	mov	r4, #1024	; 0x400
   81e4c:	e2844032 	add	r4, r4, #50	; 0x32
   81e50:	e3a05000 	mov	r5, #0	; 0x0
   81e54:	e1a01000 	mov	r1, r0
   81e58:	e3a00000 	mov	r0, #0	; 0x0
   81e5c:	eaffff8f 	b	81ca0 <__adddf3+0x148>

00081e60 <__aeabi_i2d>:
   81e60:	e3300000 	teq	r0, #0	; 0x0
   81e64:	03a01000 	moveq	r1, #0	; 0x0
   81e68:	012fff1e 	bxeq	lr
   81e6c:	e92d4030 	stmdb	sp!, {r4, r5, lr}
   81e70:	e3a04b01 	mov	r4, #1024	; 0x400
   81e74:	e2844032 	add	r4, r4, #50	; 0x32
   81e78:	e2105102 	ands	r5, r0, #-2147483648	; 0x80000000
   81e7c:	42600000 	rsbmi	r0, r0, #0	; 0x0
   81e80:	e1a01000 	mov	r1, r0
   81e84:	e3a00000 	mov	r0, #0	; 0x0
   81e88:	eaffff84 	b	81ca0 <__adddf3+0x148>

00081e8c <__aeabi_f2d>:
   81e8c:	e1b02080 	movs	r2, r0, lsl #1
   81e90:	e1a001c2 	mov	r0, r2, asr #3
   81e94:	e1a00060 	mov	r0, r0, rrx
   81e98:	e1a01e02 	mov	r1, r2, lsl #28
   81e9c:	121234ff 	andnes	r3, r2, #-16777216	; 0xff000000
   81ea0:	133304ff 	teqne	r3, #-16777216	; 0xff000000
   81ea4:	1220030e 	eorne	r0, r0, #939524096	; 0x38000000
   81ea8:	112fff1e 	bxne	lr
   81eac:	e3320000 	teq	r2, #0	; 0x0
   81eb0:	133304ff 	teqne	r3, #-16777216	; 0xff000000
   81eb4:	012fff1e 	bxeq	lr
   81eb8:	e92d4030 	stmdb	sp!, {r4, r5, lr}
   81ebc:	e3a04d0e 	mov	r4, #896	; 0x380
   81ec0:	e2005102 	and	r5, r0, #-2147483648	; 0x80000000
   81ec4:	e3c00102 	bic	r0, r0, #-2147483648	; 0x80000000
   81ec8:	eaffff74 	b	81ca0 <__adddf3+0x148>

00081ecc <__aeabi_ul2d>:
   81ecc:	e1902001 	orrs	r2, r0, r1
   81ed0:	012fff1e 	bxeq	lr
   81ed4:	e92d4030 	stmdb	sp!, {r4, r5, lr}
   81ed8:	e3a05000 	mov	r5, #0	; 0x0
   81edc:	ea000006 	b	81efc <__aeabi_l2d+0x1c>

00081ee0 <__aeabi_l2d>:
   81ee0:	e1902001 	orrs	r2, r0, r1
   81ee4:	012fff1e 	bxeq	lr
   81ee8:	e92d4030 	stmdb	sp!, {r4, r5, lr}
   81eec:	e2115102 	ands	r5, r1, #-2147483648	; 0x80000000
   81ef0:	5a000001 	bpl	81efc <__aeabi_l2d+0x1c>
   81ef4:	e2700000 	rsbs	r0, r0, #0	; 0x0
   81ef8:	e2e11000 	rsc	r1, r1, #0	; 0x0
   81efc:	e3a04b01 	mov	r4, #1024	; 0x400
   81f00:	e2844032 	add	r4, r4, #50	; 0x32
   81f04:	e1a0c000 	mov	ip, r0
   81f08:	e1a00001 	mov	r0, r1
   81f0c:	e1a0100c 	mov	r1, ip
   81f10:	e1b0cb20 	movs	ip, r0, lsr #22
   81f14:	0affff4a 	beq	81c44 <__adddf3+0xec>
   81f18:	e3a02003 	mov	r2, #3	; 0x3
   81f1c:	e1b0c1ac 	movs	ip, ip, lsr #3
   81f20:	12822003 	addne	r2, r2, #3	; 0x3
   81f24:	e1b0c1ac 	movs	ip, ip, lsr #3
   81f28:	12822003 	addne	r2, r2, #3	; 0x3
   81f2c:	e08221ac 	add	r2, r2, ip, lsr #3
   81f30:	e2623020 	rsb	r3, r2, #32	; 0x20
   81f34:	e1a0c311 	mov	ip, r1, lsl r3
   81f38:	e1a01231 	mov	r1, r1, lsr r2
   81f3c:	e1811310 	orr	r1, r1, r0, lsl r3
   81f40:	e1a00230 	mov	r0, r0, lsr r2
   81f44:	e0844002 	add	r4, r4, r2
   81f48:	eaffff3d 	b	81c44 <__adddf3+0xec>

00081f4c <__aeabi_d2uiz>:
   81f4c:	e1b02080 	movs	r2, r0, lsl #1
   81f50:	2a00000a 	bcs	81f80 <__aeabi_d2uiz+0x34>
   81f54:	e2922602 	adds	r2, r2, #2097152	; 0x200000
   81f58:	2a00000a 	bcs	81f88 <__aeabi_d2uiz+0x3c>
   81f5c:	5a000007 	bpl	81f80 <__aeabi_d2uiz+0x34>
   81f60:	e3e03e3e 	mvn	r3, #992	; 0x3e0
   81f64:	e0532ac2 	subs	r2, r3, r2, asr #21
   81f68:	4a000008 	bmi	81f90 <__aeabi_d2uiz+0x44>
   81f6c:	e1a03580 	mov	r3, r0, lsl #11
   81f70:	e3833102 	orr	r3, r3, #-2147483648	; 0x80000000
   81f74:	e1833aa1 	orr	r3, r3, r1, lsr #21
   81f78:	e1a00233 	mov	r0, r3, lsr r2
   81f7c:	e12fff1e 	bx	lr
   81f80:	e3a00000 	mov	r0, #0	; 0x0
   81f84:	e12fff1e 	bx	lr
   81f88:	e1911600 	orrs	r1, r1, r0, lsl #12
   81f8c:	1a000001 	bne	81f98 <__aeabi_d2uiz+0x4c>
   81f90:	e3e00000 	mvn	r0, #0	; 0x0
   81f94:	e12fff1e 	bx	lr
   81f98:	e3a00000 	mov	r0, #0	; 0x0
   81f9c:	e12fff1e 	bx	lr

00081fa0 <__aeabi_frsub>:
   81fa0:	e2200102 	eor	r0, r0, #-2147483648	; 0x80000000
   81fa4:	ea000000 	b	81fac <__addsf3>

00081fa8 <__aeabi_fsub>:
   81fa8:	e2211102 	eor	r1, r1, #-2147483648	; 0x80000000

00081fac <__addsf3>:
   81fac:	e1b02080 	movs	r2, r0, lsl #1
   81fb0:	11b03081 	movnes	r3, r1, lsl #1
   81fb4:	11320003 	teqne	r2, r3
   81fb8:	11f0cc42 	mvnnes	ip, r2, asr #24
   81fbc:	11f0cc43 	mvnnes	ip, r3, asr #24
   81fc0:	0a000047 	beq	820e4 <__addsf3+0x138>
   81fc4:	e1a02c22 	mov	r2, r2, lsr #24
   81fc8:	e0723c23 	rsbs	r3, r2, r3, lsr #24
   81fcc:	c0822003 	addgt	r2, r2, r3
   81fd0:	c0201001 	eorgt	r1, r0, r1
   81fd4:	c0210000 	eorgt	r0, r1, r0
   81fd8:	c0201001 	eorgt	r1, r0, r1
   81fdc:	b2633000 	rsblt	r3, r3, #0	; 0x0
   81fe0:	e3530019 	cmp	r3, #25	; 0x19
   81fe4:	812fff1e 	bxhi	lr
   81fe8:	e3100102 	tst	r0, #-2147483648	; 0x80000000
   81fec:	e3800502 	orr	r0, r0, #8388608	; 0x800000
   81ff0:	e3c004ff 	bic	r0, r0, #-16777216	; 0xff000000
   81ff4:	12600000 	rsbne	r0, r0, #0	; 0x0
   81ff8:	e3110102 	tst	r1, #-2147483648	; 0x80000000
   81ffc:	e3811502 	orr	r1, r1, #8388608	; 0x800000
   82000:	e3c114ff 	bic	r1, r1, #-16777216	; 0xff000000
   82004:	12611000 	rsbne	r1, r1, #0	; 0x0
   82008:	e1320003 	teq	r2, r3
   8200c:	0a00002e 	beq	820cc <__addsf3+0x120>
   82010:	e2422001 	sub	r2, r2, #1	; 0x1
   82014:	e0900351 	adds	r0, r0, r1, asr r3
   82018:	e2633020 	rsb	r3, r3, #32	; 0x20
   8201c:	e1a01311 	mov	r1, r1, lsl r3
   82020:	e2003102 	and	r3, r0, #-2147483648	; 0x80000000
   82024:	5a000001 	bpl	82030 <__addsf3+0x84>
   82028:	e2711000 	rsbs	r1, r1, #0	; 0x0
   8202c:	e2e00000 	rsc	r0, r0, #0	; 0x0
   82030:	e3500502 	cmp	r0, #8388608	; 0x800000
   82034:	3a00000b 	bcc	82068 <__addsf3+0xbc>
   82038:	e3500401 	cmp	r0, #16777216	; 0x1000000
   8203c:	3a000004 	bcc	82054 <__addsf3+0xa8>
   82040:	e1b000a0 	movs	r0, r0, lsr #1
   82044:	e1a01061 	mov	r1, r1, rrx
   82048:	e2822001 	add	r2, r2, #1	; 0x1
   8204c:	e35200fe 	cmp	r2, #254	; 0xfe
   82050:	2a000038 	bcs	82138 <__addsf3+0x18c>
   82054:	e3510102 	cmp	r1, #-2147483648	; 0x80000000
   82058:	e0a00b82 	adc	r0, r0, r2, lsl #23
   8205c:	03c00001 	biceq	r0, r0, #1	; 0x1
   82060:	e1800003 	orr	r0, r0, r3
   82064:	e12fff1e 	bx	lr
   82068:	e1b01081 	movs	r1, r1, lsl #1
   8206c:	e0a00000 	adc	r0, r0, r0
   82070:	e3100502 	tst	r0, #8388608	; 0x800000
   82074:	e2422001 	sub	r2, r2, #1	; 0x1
   82078:	1afffff5 	bne	82054 <__addsf3+0xa8>
   8207c:	e1b0c620 	movs	ip, r0, lsr #12
   82080:	01a00600 	moveq	r0, r0, lsl #12
   82084:	0242200c 	subeq	r2, r2, #12	; 0xc
   82088:	e31008ff 	tst	r0, #16711680	; 0xff0000
   8208c:	01a00400 	moveq	r0, r0, lsl #8
   82090:	02422008 	subeq	r2, r2, #8	; 0x8
   82094:	e310060f 	tst	r0, #15728640	; 0xf00000
   82098:	01a00200 	moveq	r0, r0, lsl #4
   8209c:	02422004 	subeq	r2, r2, #4	; 0x4
   820a0:	e3100503 	tst	r0, #12582912	; 0xc00000
   820a4:	01a00100 	moveq	r0, r0, lsl #2
   820a8:	02422002 	subeq	r2, r2, #2	; 0x2
   820ac:	e3500502 	cmp	r0, #8388608	; 0x800000
   820b0:	31a00080 	movcc	r0, r0, lsl #1
   820b4:	e2d22000 	sbcs	r2, r2, #0	; 0x0
   820b8:	a0800b82 	addge	r0, r0, r2, lsl #23
   820bc:	b2622000 	rsblt	r2, r2, #0	; 0x0
   820c0:	a1800003 	orrge	r0, r0, r3
   820c4:	b1830230 	orrlt	r0, r3, r0, lsr r2
   820c8:	e12fff1e 	bx	lr
   820cc:	e3320000 	teq	r2, #0	; 0x0
   820d0:	e2211502 	eor	r1, r1, #8388608	; 0x800000
   820d4:	02200502 	eoreq	r0, r0, #8388608	; 0x800000
   820d8:	02822001 	addeq	r2, r2, #1	; 0x1
   820dc:	12433001 	subne	r3, r3, #1	; 0x1
   820e0:	eaffffca 	b	82010 <__addsf3+0x64>
   820e4:	e1a03081 	mov	r3, r1, lsl #1
   820e8:	e1f0cc42 	mvns	ip, r2, asr #24
   820ec:	11f0cc43 	mvnnes	ip, r3, asr #24
   820f0:	0a000013 	beq	82144 <__addsf3+0x198>
   820f4:	e1320003 	teq	r2, r3
   820f8:	0a000002 	beq	82108 <__addsf3+0x15c>
   820fc:	e3320000 	teq	r2, #0	; 0x0
   82100:	01a00001 	moveq	r0, r1
   82104:	e12fff1e 	bx	lr
   82108:	e1300001 	teq	r0, r1
   8210c:	13a00000 	movne	r0, #0	; 0x0
   82110:	112fff1e 	bxne	lr
   82114:	e31204ff 	tst	r2, #-16777216	; 0xff000000
   82118:	1a000002 	bne	82128 <__addsf3+0x17c>
   8211c:	e1b00080 	movs	r0, r0, lsl #1
   82120:	23800102 	orrcs	r0, r0, #-2147483648	; 0x80000000
   82124:	e12fff1e 	bx	lr
   82128:	e2922402 	adds	r2, r2, #33554432	; 0x2000000
   8212c:	32800502 	addcc	r0, r0, #8388608	; 0x800000
   82130:	312fff1e 	bxcc	lr
   82134:	e2003102 	and	r3, r0, #-2147483648	; 0x80000000
   82138:	e383047f 	orr	r0, r3, #2130706432	; 0x7f000000
   8213c:	e3800502 	orr	r0, r0, #8388608	; 0x800000
   82140:	e12fff1e 	bx	lr
   82144:	e1f02c42 	mvns	r2, r2, asr #24
   82148:	11a00001 	movne	r0, r1
   8214c:	01f03c43 	mvneqs	r3, r3, asr #24
   82150:	11a01000 	movne	r1, r0
   82154:	e1b02480 	movs	r2, r0, lsl #9
   82158:	01b03481 	moveqs	r3, r1, lsl #9
   8215c:	01300001 	teqeq	r0, r1
   82160:	13800501 	orrne	r0, r0, #4194304	; 0x400000
   82164:	e12fff1e 	bx	lr

00082168 <__aeabi_ui2f>:
   82168:	e3a03000 	mov	r3, #0	; 0x0
   8216c:	ea000001 	b	82178 <__aeabi_i2f+0x8>

00082170 <__aeabi_i2f>:
   82170:	e2103102 	ands	r3, r0, #-2147483648	; 0x80000000
   82174:	42600000 	rsbmi	r0, r0, #0	; 0x0
   82178:	e1b0c000 	movs	ip, r0
   8217c:	012fff1e 	bxeq	lr
   82180:	e383344b 	orr	r3, r3, #1258291200	; 0x4b000000
   82184:	e1a01000 	mov	r1, r0
   82188:	e3a00000 	mov	r0, #0	; 0x0
   8218c:	ea00000f 	b	821d0 <__aeabi_l2f+0x30>

00082190 <__aeabi_ul2f>:
   82190:	e1902001 	orrs	r2, r0, r1
   82194:	012fff1e 	bxeq	lr
   82198:	e3a03000 	mov	r3, #0	; 0x0
   8219c:	ea000005 	b	821b8 <__aeabi_l2f+0x18>

000821a0 <__aeabi_l2f>:
   821a0:	e1902001 	orrs	r2, r0, r1
   821a4:	012fff1e 	bxeq	lr
   821a8:	e2113102 	ands	r3, r1, #-2147483648	; 0x80000000
   821ac:	5a000001 	bpl	821b8 <__aeabi_l2f+0x18>
   821b0:	e2700000 	rsbs	r0, r0, #0	; 0x0
   821b4:	e2e11000 	rsc	r1, r1, #0	; 0x0
   821b8:	e1b0c001 	movs	ip, r1
   821bc:	01a0c000 	moveq	ip, r0
   821c0:	01a01000 	moveq	r1, r0
   821c4:	03a00000 	moveq	r0, #0	; 0x0
   821c8:	e383345b 	orr	r3, r3, #1526726656	; 0x5b000000
   821cc:	02433201 	subeq	r3, r3, #268435456	; 0x10000000
   821d0:	e2433502 	sub	r3, r3, #8388608	; 0x800000
   821d4:	e3a02017 	mov	r2, #23	; 0x17
   821d8:	e35c0801 	cmp	ip, #65536	; 0x10000
   821dc:	21a0c82c 	movcs	ip, ip, lsr #16
   821e0:	22422010 	subcs	r2, r2, #16	; 0x10
   821e4:	e35c0c01 	cmp	ip, #256	; 0x100
   821e8:	21a0c42c 	movcs	ip, ip, lsr #8
   821ec:	22422008 	subcs	r2, r2, #8	; 0x8
   821f0:	e35c0010 	cmp	ip, #16	; 0x10
   821f4:	21a0c22c 	movcs	ip, ip, lsr #4
   821f8:	22422004 	subcs	r2, r2, #4	; 0x4
   821fc:	e35c0004 	cmp	ip, #4	; 0x4
   82200:	22422002 	subcs	r2, r2, #2	; 0x2
   82204:	304220ac 	subcc	r2, r2, ip, lsr #1
   82208:	e05221ac 	subs	r2, r2, ip, lsr #3
   8220c:	e0433b82 	sub	r3, r3, r2, lsl #23
   82210:	ba000006 	blt	82230 <__aeabi_l2f+0x90>
   82214:	e0833211 	add	r3, r3, r1, lsl r2
   82218:	e1a0c210 	mov	ip, r0, lsl r2
   8221c:	e2622020 	rsb	r2, r2, #32	; 0x20
   82220:	e35c0102 	cmp	ip, #-2147483648	; 0x80000000
   82224:	e0a30230 	adc	r0, r3, r0, lsr r2
   82228:	03c00001 	biceq	r0, r0, #1	; 0x1
   8222c:	e12fff1e 	bx	lr
   82230:	e2822020 	add	r2, r2, #32	; 0x20
   82234:	e1a0c211 	mov	ip, r1, lsl r2
   82238:	e2622020 	rsb	r2, r2, #32	; 0x20
   8223c:	e190008c 	orrs	r0, r0, ip, lsl #1
   82240:	e0a30231 	adc	r0, r3, r1, lsr r2
   82244:	01c00fac 	biceq	r0, r0, ip, lsr #31
   82248:	e12fff1e 	bx	lr

0008224c <__aeabi_fmul>:
   8224c:	e3a0c0ff 	mov	ip, #255	; 0xff
   82250:	e01c2ba0 	ands	r2, ip, r0, lsr #23
   82254:	101c3ba1 	andnes	r3, ip, r1, lsr #23
   82258:	1132000c 	teqne	r2, ip
   8225c:	1133000c 	teqne	r3, ip
   82260:	0a00003e 	beq	82360 <__aeabi_fmul+0x114>
   82264:	e0822003 	add	r2, r2, r3
   82268:	e020c001 	eor	ip, r0, r1
   8226c:	e1b00480 	movs	r0, r0, lsl #9
   82270:	11b01481 	movnes	r1, r1, lsl #9
   82274:	0a000010 	beq	822bc <__aeabi_fmul+0x70>
   82278:	e3a03302 	mov	r3, #134217728	; 0x8000000
   8227c:	e18302a0 	orr	r0, r3, r0, lsr #5
   82280:	e18312a1 	orr	r1, r3, r1, lsr #5
   82284:	e0813190 	umull	r3, r1, r0, r1
   82288:	e20c0102 	and	r0, ip, #-2147483648	; 0x80000000
   8228c:	e3510502 	cmp	r1, #8388608	; 0x800000
   82290:	31a01081 	movcc	r1, r1, lsl #1
   82294:	31811fa3 	orrcc	r1, r1, r3, lsr #31
   82298:	31a03083 	movcc	r3, r3, lsl #1
   8229c:	e1800001 	orr	r0, r0, r1
   822a0:	e2c2207f 	sbc	r2, r2, #127	; 0x7f
   822a4:	e35200fd 	cmp	r2, #253	; 0xfd
   822a8:	8a00000f 	bhi	822ec <__aeabi_fmul+0xa0>
   822ac:	e3530102 	cmp	r3, #-2147483648	; 0x80000000
   822b0:	e0a00b82 	adc	r0, r0, r2, lsl #23
   822b4:	03c00001 	biceq	r0, r0, #1	; 0x1
   822b8:	e12fff1e 	bx	lr
   822bc:	e3300000 	teq	r0, #0	; 0x0
   822c0:	e20cc102 	and	ip, ip, #-2147483648	; 0x80000000
   822c4:	01a01481 	moveq	r1, r1, lsl #9
   822c8:	e18c04a0 	orr	r0, ip, r0, lsr #9
   822cc:	e18004a1 	orr	r0, r0, r1, lsr #9
   822d0:	e252207f 	subs	r2, r2, #127	; 0x7f
   822d4:	c27230ff 	rsbgts	r3, r2, #255	; 0xff
   822d8:	c1800b82 	orrgt	r0, r0, r2, lsl #23
   822dc:	c12fff1e 	bxgt	lr
   822e0:	e3800502 	orr	r0, r0, #8388608	; 0x800000
   822e4:	e3a03000 	mov	r3, #0	; 0x0
   822e8:	e2522001 	subs	r2, r2, #1	; 0x1
   822ec:	ca000035 	bgt	823c8 <__aeabi_fmul+0x17c>
   822f0:	e3720019 	cmn	r2, #25	; 0x19
   822f4:	d2000102 	andle	r0, r0, #-2147483648	; 0x80000000
   822f8:	d12fff1e 	bxle	lr
   822fc:	e2622000 	rsb	r2, r2, #0	; 0x0
   82300:	e1b01080 	movs	r1, r0, lsl #1
   82304:	e1a01231 	mov	r1, r1, lsr r2
   82308:	e2622020 	rsb	r2, r2, #32	; 0x20
   8230c:	e1a0c210 	mov	ip, r0, lsl r2
   82310:	e1b00061 	movs	r0, r1, rrx
   82314:	e2a00000 	adc	r0, r0, #0	; 0x0
   82318:	e193308c 	orrs	r3, r3, ip, lsl #1
   8231c:	01c00fac 	biceq	r0, r0, ip, lsr #31
   82320:	e12fff1e 	bx	lr
   82324:	e3320000 	teq	r2, #0	; 0x0
   82328:	e200c102 	and	ip, r0, #-2147483648	; 0x80000000
   8232c:	01a00080 	moveq	r0, r0, lsl #1
   82330:	03100502 	tsteq	r0, #8388608	; 0x800000
   82334:	02422001 	subeq	r2, r2, #1	; 0x1
   82338:	0afffffb 	beq	8232c <__aeabi_fmul+0xe0>
   8233c:	e180000c 	orr	r0, r0, ip
   82340:	e3330000 	teq	r3, #0	; 0x0
   82344:	e201c102 	and	ip, r1, #-2147483648	; 0x80000000
   82348:	01a01081 	moveq	r1, r1, lsl #1
   8234c:	03110502 	tsteq	r1, #8388608	; 0x800000
   82350:	02433001 	subeq	r3, r3, #1	; 0x1
   82354:	0afffffb 	beq	82348 <__aeabi_fmul+0xfc>
   82358:	e181100c 	orr	r1, r1, ip
   8235c:	eaffffc0 	b	82264 <__aeabi_fmul+0x18>
   82360:	e00c3ba1 	and	r3, ip, r1, lsr #23
   82364:	e132000c 	teq	r2, ip
   82368:	1133000c 	teqne	r3, ip
   8236c:	0a000005 	beq	82388 <__aeabi_fmul+0x13c>
   82370:	e3d0c102 	bics	ip, r0, #-2147483648	; 0x80000000
   82374:	13d1c102 	bicnes	ip, r1, #-2147483648	; 0x80000000
   82378:	1affffe9 	bne	82324 <__aeabi_fmul+0xd8>
   8237c:	e0200001 	eor	r0, r0, r1
   82380:	e2000102 	and	r0, r0, #-2147483648	; 0x80000000
   82384:	e12fff1e 	bx	lr
   82388:	e3300000 	teq	r0, #0	; 0x0
   8238c:	13300102 	teqne	r0, #-2147483648	; 0x80000000
   82390:	01a00001 	moveq	r0, r1
   82394:	13310000 	teqne	r1, #0	; 0x0
   82398:	13310102 	teqne	r1, #-2147483648	; 0x80000000
   8239c:	0a00000d 	beq	823d8 <__aeabi_fmul+0x18c>
   823a0:	e132000c 	teq	r2, ip
   823a4:	1a000001 	bne	823b0 <__aeabi_fmul+0x164>
   823a8:	e1b02480 	movs	r2, r0, lsl #9
   823ac:	1a000009 	bne	823d8 <__aeabi_fmul+0x18c>
   823b0:	e133000c 	teq	r3, ip
   823b4:	1a000002 	bne	823c4 <__aeabi_fmul+0x178>
   823b8:	e1b03481 	movs	r3, r1, lsl #9
   823bc:	11a00001 	movne	r0, r1
   823c0:	1a000004 	bne	823d8 <__aeabi_fmul+0x18c>
   823c4:	e0200001 	eor	r0, r0, r1
   823c8:	e2000102 	and	r0, r0, #-2147483648	; 0x80000000
   823cc:	e380047f 	orr	r0, r0, #2130706432	; 0x7f000000
   823d0:	e3800502 	orr	r0, r0, #8388608	; 0x800000
   823d4:	e12fff1e 	bx	lr
   823d8:	e380047f 	orr	r0, r0, #2130706432	; 0x7f000000
   823dc:	e3800503 	orr	r0, r0, #12582912	; 0xc00000
   823e0:	e12fff1e 	bx	lr

000823e4 <__aeabi_fdiv>:
   823e4:	e3a0c0ff 	mov	ip, #255	; 0xff
   823e8:	e01c2ba0 	ands	r2, ip, r0, lsr #23
   823ec:	101c3ba1 	andnes	r3, ip, r1, lsr #23
   823f0:	1132000c 	teqne	r2, ip
   823f4:	1133000c 	teqne	r3, ip
   823f8:	0a00003a 	beq	824e8 <__aeabi_fdiv+0x104>
   823fc:	e0422003 	sub	r2, r2, r3
   82400:	e020c001 	eor	ip, r0, r1
   82404:	e1b01481 	movs	r1, r1, lsl #9
   82408:	e1a00480 	mov	r0, r0, lsl #9
   8240c:	0a00001c 	beq	82484 <__aeabi_fdiv+0xa0>
   82410:	e3a03201 	mov	r3, #268435456	; 0x10000000
   82414:	e1831221 	orr	r1, r3, r1, lsr #4
   82418:	e1833220 	orr	r3, r3, r0, lsr #4
   8241c:	e20c0102 	and	r0, ip, #-2147483648	; 0x80000000
   82420:	e1530001 	cmp	r3, r1
   82424:	31a03083 	movcc	r3, r3, lsl #1
   82428:	e2a2207d 	adc	r2, r2, #125	; 0x7d
   8242c:	e3a0c502 	mov	ip, #8388608	; 0x800000
   82430:	e1530001 	cmp	r3, r1
   82434:	20433001 	subcs	r3, r3, r1
   82438:	2180000c 	orrcs	r0, r0, ip
   8243c:	e15300a1 	cmp	r3, r1, lsr #1
   82440:	204330a1 	subcs	r3, r3, r1, lsr #1
   82444:	218000ac 	orrcs	r0, r0, ip, lsr #1
   82448:	e1530121 	cmp	r3, r1, lsr #2
   8244c:	20433121 	subcs	r3, r3, r1, lsr #2
   82450:	2180012c 	orrcs	r0, r0, ip, lsr #2
   82454:	e15301a1 	cmp	r3, r1, lsr #3
   82458:	204331a1 	subcs	r3, r3, r1, lsr #3
   8245c:	218001ac 	orrcs	r0, r0, ip, lsr #3
   82460:	e1b03203 	movs	r3, r3, lsl #4
   82464:	11b0c22c 	movnes	ip, ip, lsr #4
   82468:	1afffff0 	bne	82430 <__aeabi_fdiv+0x4c>
   8246c:	e35200fd 	cmp	r2, #253	; 0xfd
   82470:	8affff9d 	bhi	822ec <__aeabi_fmul+0xa0>
   82474:	e1530001 	cmp	r3, r1
   82478:	e0a00b82 	adc	r0, r0, r2, lsl #23
   8247c:	03c00001 	biceq	r0, r0, #1	; 0x1
   82480:	e12fff1e 	bx	lr
   82484:	e20cc102 	and	ip, ip, #-2147483648	; 0x80000000
   82488:	e18c04a0 	orr	r0, ip, r0, lsr #9
   8248c:	e292207f 	adds	r2, r2, #127	; 0x7f
   82490:	c27230ff 	rsbgts	r3, r2, #255	; 0xff
   82494:	c1800b82 	orrgt	r0, r0, r2, lsl #23
   82498:	c12fff1e 	bxgt	lr
   8249c:	e3800502 	orr	r0, r0, #8388608	; 0x800000
   824a0:	e3a03000 	mov	r3, #0	; 0x0
   824a4:	e2522001 	subs	r2, r2, #1	; 0x1
   824a8:	eaffff8f 	b	822ec <__aeabi_fmul+0xa0>
   824ac:	e3320000 	teq	r2, #0	; 0x0
   824b0:	e200c102 	and	ip, r0, #-2147483648	; 0x80000000
   824b4:	01a00080 	moveq	r0, r0, lsl #1
   824b8:	03100502 	tsteq	r0, #8388608	; 0x800000
   824bc:	02422001 	subeq	r2, r2, #1	; 0x1
   824c0:	0afffffb 	beq	824b4 <__aeabi_fdiv+0xd0>
   824c4:	e180000c 	orr	r0, r0, ip
   824c8:	e3330000 	teq	r3, #0	; 0x0
   824cc:	e201c102 	and	ip, r1, #-2147483648	; 0x80000000
   824d0:	01a01081 	moveq	r1, r1, lsl #1
   824d4:	03110502 	tsteq	r1, #8388608	; 0x800000
   824d8:	02433001 	subeq	r3, r3, #1	; 0x1
   824dc:	0afffffb 	beq	824d0 <__aeabi_fdiv+0xec>
   824e0:	e181100c 	orr	r1, r1, ip
   824e4:	eaffffc4 	b	823fc <__aeabi_fdiv+0x18>
   824e8:	e00c3ba1 	and	r3, ip, r1, lsr #23
   824ec:	e132000c 	teq	r2, ip
   824f0:	1a000005 	bne	8250c <__aeabi_fdiv+0x128>
   824f4:	e1b02480 	movs	r2, r0, lsl #9
   824f8:	1affffb6 	bne	823d8 <__aeabi_fmul+0x18c>
   824fc:	e133000c 	teq	r3, ip
   82500:	1affffaf 	bne	823c4 <__aeabi_fmul+0x178>
   82504:	e1a00001 	mov	r0, r1
   82508:	eaffffb2 	b	823d8 <__aeabi_fmul+0x18c>
   8250c:	e133000c 	teq	r3, ip
   82510:	1a000003 	bne	82524 <__aeabi_fdiv+0x140>
   82514:	e1b03481 	movs	r3, r1, lsl #9
   82518:	0affff97 	beq	8237c <__aeabi_fmul+0x130>
   8251c:	e1a00001 	mov	r0, r1
   82520:	eaffffac 	b	823d8 <__aeabi_fmul+0x18c>
   82524:	e3d0c102 	bics	ip, r0, #-2147483648	; 0x80000000
   82528:	13d1c102 	bicnes	ip, r1, #-2147483648	; 0x80000000
   8252c:	1affffde 	bne	824ac <__aeabi_fdiv+0xc8>
   82530:	e3d02102 	bics	r2, r0, #-2147483648	; 0x80000000
   82534:	1affffa2 	bne	823c4 <__aeabi_fmul+0x178>
   82538:	e3d13102 	bics	r3, r1, #-2147483648	; 0x80000000
   8253c:	1affff8e 	bne	8237c <__aeabi_fmul+0x130>
   82540:	eaffffa4 	b	823d8 <__aeabi_fmul+0x18c>

00082544 <__aeabi_f2iz>:
   82544:	e1a02080 	mov	r2, r0, lsl #1
   82548:	e352047f 	cmp	r2, #2130706432	; 0x7f000000
   8254c:	3a000008 	bcc	82574 <__aeabi_f2iz+0x30>
   82550:	e3a0309e 	mov	r3, #158	; 0x9e
   82554:	e0532c22 	subs	r2, r3, r2, lsr #24
   82558:	9a000007 	bls	8257c <__aeabi_f2iz+0x38>
   8255c:	e1a03400 	mov	r3, r0, lsl #8
   82560:	e3833102 	orr	r3, r3, #-2147483648	; 0x80000000
   82564:	e3100102 	tst	r0, #-2147483648	; 0x80000000
   82568:	e1a00233 	mov	r0, r3, lsr r2
   8256c:	12600000 	rsbne	r0, r0, #0	; 0x0
   82570:	e12fff1e 	bx	lr
   82574:	e3a00000 	mov	r0, #0	; 0x0
   82578:	e12fff1e 	bx	lr
   8257c:	e3720061 	cmn	r2, #97	; 0x61
   82580:	1a000001 	bne	8258c <__aeabi_f2iz+0x48>
   82584:	e1b02480 	movs	r2, r0, lsl #9
   82588:	1a000002 	bne	82598 <__aeabi_f2iz+0x54>
   8258c:	e2100102 	ands	r0, r0, #-2147483648	; 0x80000000
   82590:	03e00102 	mvneq	r0, #-2147483648	; 0x80000000
   82594:	e12fff1e 	bx	lr
   82598:	e3a00000 	mov	r0, #0	; 0x0
   8259c:	e12fff1e 	bx	lr

000825a0 <__aeabi_f2uiz>:
   825a0:	e1b02080 	movs	r2, r0, lsl #1
   825a4:	2a000008 	bcs	825cc <__aeabi_f2uiz+0x2c>
   825a8:	e352047f 	cmp	r2, #2130706432	; 0x7f000000
   825ac:	3a000006 	bcc	825cc <__aeabi_f2uiz+0x2c>
   825b0:	e3a0309e 	mov	r3, #158	; 0x9e
   825b4:	e0532c22 	subs	r2, r3, r2, lsr #24
   825b8:	4a000005 	bmi	825d4 <__aeabi_f2uiz+0x34>
   825bc:	e1a03400 	mov	r3, r0, lsl #8
   825c0:	e3833102 	orr	r3, r3, #-2147483648	; 0x80000000
   825c4:	e1a00233 	mov	r0, r3, lsr r2
   825c8:	e12fff1e 	bx	lr
   825cc:	e3a00000 	mov	r0, #0	; 0x0
   825d0:	e12fff1e 	bx	lr
   825d4:	e3720061 	cmn	r2, #97	; 0x61
   825d8:	1a000001 	bne	825e4 <__aeabi_f2uiz+0x44>
   825dc:	e1b02480 	movs	r2, r0, lsl #9
   825e0:	1a000001 	bne	825ec <__aeabi_f2uiz+0x4c>
   825e4:	e3e00000 	mvn	r0, #0	; 0x0
   825e8:	e12fff1e 	bx	lr
   825ec:	e3a00000 	mov	r0, #0	; 0x0
   825f0:	e12fff1e 	bx	lr
