	.file "X:\\707976 EPBuoyPrototypeAndTesting\\BoostController\\dsPic\\Code\\BoostController.X\\RPM_Calculation.c"
	.section	.debug_abbrev,info
.Ldebug_abbrev0:
	.section	.debug_info,info
.Ldebug_info0:
	.section	.debug_line,info
.Ldebug_line0:
	.section	.text,code
.Ltext0:
	.section	.text,code
	.align	2
	.global	_ComputeRPM	; export
	.type	_ComputeRPM,@function
_ComputeRPM:
.LFB2:
.LSM0:
	.set ___PA___,1
	mov	w8,[w15++]
.LSM1:
	mov	_n.9312,w1
	mov	_POSCNT,w0
	sl	w0,#4,w0
	mov	#_AngPos.9311,w2
	add	w1,w1,w3
	mov	w0,[w2+w3]
.LSM2:
	sub	w1,#3,[w15]
	.set ___BP___,50
	bra	le,.L2
.LSM3:
	sub	w1,#4,w1
.L3:
.LSM4:
	add	w1,w1,w1
	mov	[w2+w1],w1
	sub	w0,w1,w0
	rcall	__Q15abs
.LSM5:
	mov	#1999,w1
	sub	w0,w1,[w15]
	.set ___BP___,50
	bra	gtu,.L4
.LSM6:
	add	#49,w1
	mov	_QEICON,w2
	and	w2,w1,w2
	mov	w2,_dir_state.9316
.LSM7:
	sub	w0,#0,[w15]
	.set ___BP___,0
	bra	nz,.L4
.LSM8:
	mov	_n.9312,w6
	add	w6,w6,w1
	mov	#_RawRPMs.9310,w2
	mov	w0,[w2+w1]
	mov	#_RawRPMs.9310-2,w4
.LSM9:
	mov	#32,w5
	add	w5,w4,w5
.LSM10:
	mul.uu	w0,#0,w0
.L8:
.LSM11:
	mov	[++w4],w2
	asr	w2,#15,w3
	add	w2,w0,w0
	addc	w3,w1,w1
.LSM12:
	sub	w4,w5,[w15]
	.set ___BP___,93
	bra	nz,.L8
.LSM13:
	inc	w6,w6
	mov	w6,_n.9312
	sub	w6,#16,[w15]
	.set ___BP___,37
	bra	z,.L13
.LSM14:
	sub	w0,#0,[w15]
	subb	w1,#0,[w15]
	.set ___BP___,21
	bra	lt,.L14
.L10:
	sl	w1,#12,w2
	lsr	w0,#4,w0
	ior	w2,w0,w0
	asr	w1,#4,w1
.LSM15:
	mov	[--w15],w8
	return	
.L15:
	.set ___PA___,0
.L4:
.LSM16:
	mov	_dir_state.9316,w1
	sub	w1,#0,[w15]
	.set ___BP___,29
	bra	z,.L6
.LSM17:
	mov	_n.9312,w6
	add	w6,w6,w1
	lsr	w0,w0
	mov	#_RawRPMs.9310,w2
	mov	w0,[w2+w1]
.LSM18:
	mov	#_RawRPMs.9310-2,w4
.LSM19:
	mov	#32,w5
	add	w5,w4,w5
.LSM20:
	mul.uu	w0,#0,w0
	bra	.L8
.L2:
.LSM21:
	add	w1,#12,w1
	bra	.L3
.L13:
.LSM22:
	clr	_n.9312
.LSM23:
	sub	w0,#0,[w15]
	subb	w1,#0,[w15]
	.set ___BP___,79
	bra	ge,.L10
.L14:
	add	w0,#15,w0
	addc	w1,#0,w1
	sl	w1,#12,w2
	lsr	w0,#4,w0
	ior	w2,w0,w0
	asr	w1,#4,w1
.LSM24:
	mov	[--w15],w8
	return	
	bra	.L15
.L6:
.LSM25:
	mov	_n.9312,w8
	lsr	w0,w0
	rcall	__Q15neg
	add	w8,w8,w8
	mov	#_RawRPMs.9310,w1
	mov	w0,[w1+w8]
	mov	_n.9312,w6
.LSM26:
	mov	#_RawRPMs.9310-2,w4
.LSM27:
	mov	#32,w5
	add	w5,w4,w5
.LSM28:
	mul.uu	w0,#0,w0
	bra	.L8
.LFE2:
	.pushsection	.nbss,bss,near
	.align	2
_dir_state.9316:	.space	2
	.popsection
	.pushsection	.nbss,bss,near
	.align	2
_n.9312:	.space	2
	.popsection
	.pushsection	.nbss,bss,near
	.align	2
_AngPos.9311:	.space	32
	.popsection
	.pushsection	.nbss,bss,near
	.align	2
_RawRPMs.9310:	.space	32
	.popsection
	.section	.debug_frame,info
.Lframe0:
	.4byte	.LECIE0-.LSCIE0
.LSCIE0:
	.4byte	0xffffffff
	.byte	0x1
	.byte	0
	.uleb128 0x1
	.sleb128 2
	.byte	0x21
	.byte	0x12
	.uleb128 0xf
	.sleb128 -2
	.byte	0x9
	.uleb128 0x21
	.uleb128 0xf
	.align	4
.LECIE0:
.LSFDE0:
	.4byte	.LEFDE0-.LASFDE0
.LASFDE0:
	.4byte	.Lframe0
	.4byte	.LFB2
	.4byte	.LFE2-.LFB2
	.align	4
.LEFDE0:
	.section	.text,code
.Letext0:
	.section	.debug_info,info
	.4byte	0x24a
	.2byte	0x2
	.4byte	.Ldebug_abbrev0
	.byte	0x4
	.uleb128 0x1
	.asciz	"GNU C 4.5.1 (XC16, Microchip v1_11) (A) Build date: Nov 17 2012"
	.byte	0x1
	.asciz	"RPM_Calculation.c"
	.ascii	"X:\\\\707976 EPBuoyPrototypeAndTesting\\\\BoostController\\\\dsPic\\"
	.asciz	"\\Code\\\\BoostController.X"
	.4byte	.Ltext0
	.4byte	.Letext0
	.4byte	.Ldebug_line0
	.uleb128 0x2
	.byte	0x2
	.byte	0x7
	.asciz	"unsigned int"
	.uleb128 0x2
	.byte	0x2
	.byte	0x5
	.asciz	"short int"
	.uleb128 0x2
	.byte	0x4
	.byte	0x5
	.asciz	"long int"
	.uleb128 0x2
	.byte	0x2
	.byte	0x5
	.asciz	"int"
	.uleb128 0x2
	.byte	0x2
	.byte	0x7
	.asciz	"short unsigned int"
	.uleb128 0x2
	.byte	0x4
	.byte	0x7
	.asciz	"long unsigned int"
	.uleb128 0x3
	.asciz	"fractional"
	.byte	0x3
	.byte	0x5c
	.4byte	0xea
	.uleb128 0x4
	.byte	0x1
	.asciz	"ComputeRPM"
	.byte	0x1
	.byte	0xe
	.byte	0x1
	.4byte	0x11c
	.4byte	.LFB2
	.4byte	.LFE2
	.byte	0x1
	.byte	0x5f
	.4byte	0x1e4
	.uleb128 0x5
	.asciz	"delta"
	.byte	0x1
	.byte	0x10
	.4byte	0xc1
	.uleb128 0x6
	.asciz	"RawRPMs"
	.byte	0x1
	.byte	0x11
	.4byte	0x1e4
	.byte	0x5
	.byte	0x3
	.4byte	_RawRPMs.9310
	.uleb128 0x6
	.asciz	"AngPos"
	.byte	0x1
	.byte	0x12
	.4byte	0x1f4
	.byte	0x5
	.byte	0x3
	.4byte	_AngPos.9311
	.uleb128 0x6
	.asciz	"n"
	.byte	0x1
	.byte	0x13
	.4byte	0xea
	.byte	0x5
	.byte	0x3
	.4byte	_n.9312
	.uleb128 0x6
	.asciz	"n_minus_four"
	.byte	0x1
	.byte	0x14
	.4byte	0xea
	.byte	0x1
	.byte	0x51
	.uleb128 0x6
	.asciz	"temp_RPMs"
	.byte	0x1
	.byte	0x15
	.4byte	0xde
	.byte	0x6
	.byte	0x50
	.byte	0x93
	.uleb128 0x2
	.byte	0x51
	.byte	0x93
	.uleb128 0x2
	.uleb128 0x5
	.asciz	"j"
	.byte	0x1
	.byte	0x16
	.4byte	0xea
	.uleb128 0x6
	.asciz	"dir_state"
	.byte	0x1
	.byte	0x17
	.4byte	0xea
	.byte	0x5
	.byte	0x3
	.4byte	_dir_state.9316
	.byte	0x0
	.uleb128 0x7
	.4byte	0xea
	.4byte	0x1f4
	.uleb128 0x8
	.4byte	0xc1
	.byte	0xf
	.byte	0x0
	.uleb128 0x7
	.4byte	0xc1
	.4byte	0x204
	.uleb128 0x8
	.4byte	0xc1
	.byte	0xf
	.byte	0x0
	.uleb128 0x9
	.asciz	"QEICON"
	.byte	0x2
	.2byte	0x84a
	.4byte	0x215
	.byte	0x1
	.byte	0x1
	.uleb128 0xa
	.4byte	0xc1
	.uleb128 0x9
	.asciz	"POSCNT"
	.byte	0x2
	.2byte	0x898
	.4byte	0x215
	.byte	0x1
	.byte	0x1
	.uleb128 0x9
	.asciz	"QEICON"
	.byte	0x2
	.2byte	0x84a
	.4byte	0x215
	.byte	0x1
	.byte	0x1
	.uleb128 0x9
	.asciz	"POSCNT"
	.byte	0x2
	.2byte	0x898
	.4byte	0x215
	.byte	0x1
	.byte	0x1
	.byte	0x0
	.section	.debug_abbrev,info
	.uleb128 0x1
	.uleb128 0x11
	.byte	0x1
	.uleb128 0x25
	.uleb128 0x8
	.uleb128 0x13
	.uleb128 0xb
	.uleb128 0x3
	.uleb128 0x8
	.uleb128 0x1b
	.uleb128 0x8
	.uleb128 0x11
	.uleb128 0x1
	.uleb128 0x12
	.uleb128 0x1
	.uleb128 0x10
	.uleb128 0x6
	.byte	0x0
	.byte	0x0
	.uleb128 0x2
	.uleb128 0x24
	.byte	0x0
	.uleb128 0xb
	.uleb128 0xb
	.uleb128 0x3e
	.uleb128 0xb
	.uleb128 0x3
	.uleb128 0x8
	.byte	0x0
	.byte	0x0
	.uleb128 0x3
	.uleb128 0x16
	.byte	0x0
	.uleb128 0x3
	.uleb128 0x8
	.uleb128 0x3a
	.uleb128 0xb
	.uleb128 0x3b
	.uleb128 0xb
	.uleb128 0x49
	.uleb128 0x13
	.byte	0x0
	.byte	0x0
	.uleb128 0x4
	.uleb128 0x2e
	.byte	0x1
	.uleb128 0x3f
	.uleb128 0xc
	.uleb128 0x3
	.uleb128 0x8
	.uleb128 0x3a
	.uleb128 0xb
	.uleb128 0x3b
	.uleb128 0xb
	.uleb128 0x27
	.uleb128 0xc
	.uleb128 0x49
	.uleb128 0x13
	.uleb128 0x11
	.uleb128 0x1
	.uleb128 0x12
	.uleb128 0x1
	.uleb128 0x40
	.uleb128 0xa
	.uleb128 0x1
	.uleb128 0x13
	.byte	0x0
	.byte	0x0
	.uleb128 0x5
	.uleb128 0x34
	.byte	0x0
	.uleb128 0x3
	.uleb128 0x8
	.uleb128 0x3a
	.uleb128 0xb
	.uleb128 0x3b
	.uleb128 0xb
	.uleb128 0x49
	.uleb128 0x13
	.byte	0x0
	.byte	0x0
	.uleb128 0x6
	.uleb128 0x34
	.byte	0x0
	.uleb128 0x3
	.uleb128 0x8
	.uleb128 0x3a
	.uleb128 0xb
	.uleb128 0x3b
	.uleb128 0xb
	.uleb128 0x49
	.uleb128 0x13
	.uleb128 0x2
	.uleb128 0xa
	.byte	0x0
	.byte	0x0
	.uleb128 0x7
	.uleb128 0x1
	.byte	0x1
	.uleb128 0x49
	.uleb128 0x13
	.uleb128 0x1
	.uleb128 0x13
	.byte	0x0
	.byte	0x0
	.uleb128 0x8
	.uleb128 0x21
	.byte	0x0
	.uleb128 0x49
	.uleb128 0x13
	.uleb128 0x2f
	.uleb128 0xb
	.byte	0x0
	.byte	0x0
	.uleb128 0x9
	.uleb128 0x34
	.byte	0x0
	.uleb128 0x3
	.uleb128 0x8
	.uleb128 0x3a
	.uleb128 0xb
	.uleb128 0x3b
	.uleb128 0x5
	.uleb128 0x49
	.uleb128 0x13
	.uleb128 0x3f
	.uleb128 0xc
	.uleb128 0x3c
	.uleb128 0xc
	.byte	0x0
	.byte	0x0
	.uleb128 0xa
	.uleb128 0x35
	.byte	0x0
	.uleb128 0x49
	.uleb128 0x13
	.byte	0x0
	.byte	0x0
	.byte	0x0
	.section	.debug_pubnames,info
	.4byte	0x1d
	.2byte	0x2
	.4byte	.Ldebug_info0
	.4byte	0x24e
	.4byte	0x12e
	.asciz	"ComputeRPM"
	.4byte	0x0
	.section	.debug_pubtypes,info
	.4byte	0x1d
	.2byte	0x2
	.4byte	.Ldebug_info0
	.4byte	0x24e
	.4byte	0x11c
	.asciz	"fractional"
	.4byte	0x0
	.section	.debug_aranges,info
	.4byte	0x14
	.2byte	0x2
	.4byte	.Ldebug_info0
	.byte	0x4
	.byte	0x0
	.2byte	0x0
	.2byte	0x0
	.4byte	0x0
	.4byte	0x0
	.section	.debug_line,info
	.4byte	.LELT0-.LSLT0
.LSLT0:
	.2byte	0x2
	.4byte	.LELTP0-.LASLTP0
.LASLTP0:
	.byte	0x1
	.byte	0x1
	.byte	0xf6
	.byte	0xf5
	.byte	0xa
	.byte	0x0
	.byte	0x1
	.byte	0x1
	.byte	0x1
	.byte	0x1
	.byte	0x0
	.byte	0x0
	.byte	0x0
	.byte	0x1
	.ascii	"c:\\program files\\microchip\\xc16\\v1.11\\bin\\bin\\../..\\support"
	.ascii	"\\dsPIC33F\\h"
	.byte 0
	.ascii	"c:\\program files\\microchip\\xc16\\v1.11\\bin\\bin\\../..\\support"
	.ascii	"\\generic\\h"
	.byte 0
	.byte	0x0
	.asciz	"RPM_Calculation.c"
	.uleb128 0x0
	.uleb128 0x0
	.uleb128 0x0
	.asciz	"p33FJ256MC710A.h"
	.uleb128 0x1
	.uleb128 0x0
	.uleb128 0x0
	.asciz	"dsp.h"
	.uleb128 0x2
	.uleb128 0x0
	.uleb128 0x0
	.byte	0x0
.LELTP0:
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.Letext0
	.byte	0x0
	.uleb128 0x1
	.byte	0x1
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM0
	.byte	0x22
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM1
	.byte	0x1e
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM2
	.byte	0x15
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM3
	.byte	0x15
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM4
	.byte	0x18
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM5
	.byte	0x1e
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM6
	.byte	0x15
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM7
	.byte	0x15
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM8
	.byte	0x1b
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM9
	.byte	0x3
	.sleb128 -36
	.byte	0x1
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM10
	.byte	0x3d
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM11
	.byte	0x16
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM12
	.byte	0x13
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM13
	.byte	0x17
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM14
	.byte	0x17
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM15
	.byte	0x15
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM16
	.byte	0x3
	.sleb128 -18
	.byte	0x1
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM17
	.byte	0x15
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM18
	.byte	0x18
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM19
	.byte	0x3
	.sleb128 -36
	.byte	0x1
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM20
	.byte	0x3d
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM21
	.byte	0x3
	.sleb128 -26
	.byte	0x1
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM22
	.byte	0x33
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM23
	.byte	0x16
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM24
	.byte	0x15
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM25
	.byte	0x3
	.sleb128 -15
	.byte	0x1
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM26
	.byte	0x16
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM27
	.byte	0x3
	.sleb128 -36
	.byte	0x1
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LSM28
	.byte	0x3d
	.byte	0x0
	.uleb128 0x5
	.byte	0x2
	.4byte	.LFE2
	.byte	0x0
	.uleb128 0x1
	.byte	0x1
.LELT0:
	.section	.debug_str,info
	.section	.text,code

	.section __c30_signature, info, data
	.word 0x0001
	.word 0x0000
	.word 0x0000

; MCHP configuration words

	.set ___PA___,0
	.end
