; ACC = ACC * 15258.9
; Temp = TEMP
; ACC size = 16 bits
; Error = 0 %
; Bytes order = little endian
; Round = no

; ALGORITHM:
; Clear accumulator
; Add input * 16384 to accumulator
; Substract input * 1024 from accumulator
; Substract input * 128 from accumulator
; Add input * 16 to accumulator
; Add input * 8 to accumulator
; Add input * 2 to accumulator
; Add input * 1 to accumulator
; Substract input / 8 from accumulator
; Add input / 64 to accumulator
; Add input / 128 to accumulator
; Add input / 1024 to accumulator
; Add input / 2048 to accumulator
; Add input / 16384 to accumulator
; Add input / 32768 to accumulator
; Add input / 262144 to accumulator
; Add input / 524288 to accumulator
; Add input / 4194304 to accumulator
; Add input / 8388608 to accumulator
; Add input / 67108864 to accumulator
; Add input / 134217728 to accumulator
; Add input / 1073741824 to accumulator
; Add input / 2147483648 to accumulator
; Add input / 17179869184 to accumulator
; Add input / 34359738368 to accumulator
; Add input / 274877906944 to accumulator
; Add input / 549755813888 to accumulator
; Move accumulator to result
;
; Approximated constant: 15258.9, Error: 0 %

;     Input: ACC0 .. ACC1, 16 bits
;    Output: ACC0 .. ACC3, 30 bits
; Code size: 345 instructions

	cblock
	ACC0
	ACC1
	ACC2
	ACC3
	TEMP0
	TEMP1
	TEMP2
	TEMP3
	endc

;copy accumulator to temporary
	movf	ACC1, w
	movwf	TEMP1
	movf	ACC0, w
	movwf	TEMP0


;shift accumulator right 1 times
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 1 times
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f
	clrc
	rrf	ACC1, f
	rrf	ACC0, f

;substract temporary from accumulator
	movf	TEMP0, w
	subwf	ACC0, f
	movf	TEMP1, w
	skpc
	incfsz	TEMP1, w
	subwf	ACC1, f

;shift accumulator right 3 times
	rrf	ACC1, f
	movlw	0x80
	xorwf	ACC1, f	;invert bit shifted from carry
	rrf	ACC0, f
	rlf	ACC1, w
	rrf	ACC1, f
	rrf	ACC0, f
	rlf	ACC1, w
	rrf	ACC1, f
	rrf	ACC0, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f

;shift temporary left 1 times
	clrc
	rlf	TEMP0, f
	rlf	TEMP1, f
	clrf	TEMP2
	rlf	TEMP2, f

;add temporary to accumulator
	clrf	ACC2
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f
	movf	TEMP2, w
	skpnc
	incfsz	TEMP2, w
	addwf	ACC2, f

;shift temporary left 2 times
	clrc
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f
	movf	TEMP2, w
	skpnc
	incfsz	TEMP2, w
	addwf	ACC2, f

;shift temporary left 1 times
	clrc
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f
	movf	TEMP2, w
	skpnc
	incfsz	TEMP2, w
	addwf	ACC2, f

;shift temporary left 3 times
	clrc
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f

;substract temporary from accumulator
	movf	TEMP0, w
	subwf	ACC0, f
	movf	TEMP1, w
	skpc
	incfsz	TEMP1, w
	subwf	ACC1, f
	movf	TEMP2, w
	skpc
	incfsz	TEMP2, w
	subwf	ACC2, f

;shift temporary left 3 times
	clrc
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f
	clrf	TEMP3
	rlf	TEMP3, f
	rlf	TEMP0, f
	rlf	TEMP1, f
	rlf	TEMP2, f
	rlf	TEMP3, f

;substract temporary from accumulator
	clrf	ACC3
	btfsc	ACC2, 7
	comf	ACC3, f
	movf	TEMP0, w
	subwf	ACC0, f
	movf	TEMP1, w
	skpc
	incfsz	TEMP1, w
	subwf	ACC1, f
	movf	TEMP2, w
	skpc
	incfsz	TEMP2, w
	subwf	ACC2, f
	movf	TEMP3, w
	skpc
	incfsz	TEMP3, w
	subwf	ACC3, f

;shift temporary left 4 times
	swapf	TEMP3, f
	swapf	TEMP2, f
	movf	TEMP2, w
	andlw	0x0F
	xorwf	TEMP2, f
	iorwf	TEMP3, f
	swapf	TEMP1, f
	movf	TEMP1, w
	andlw	0x0F
	xorwf	TEMP1, f
	iorwf	TEMP2, f
	swapf	TEMP0, f
	movf	TEMP0, w
	andlw	0x0F
	xorwf	TEMP0, f
	iorwf	TEMP1, f

;add temporary to accumulator
	movf	TEMP0, w
	addwf	ACC0, f
	movf	TEMP1, w
	skpnc
	incfsz	TEMP1, w
	addwf	ACC1, f
	movf	TEMP2, w
	skpnc
	incfsz	TEMP2, w
	addwf	ACC2, f
	movf	TEMP3, w
	skpnc
	incfsz	TEMP3, w
	addwf	ACC3, f

; Generated by www.piclist.com/cgi-bin/constdivmul.exe (1-May-2002 version)
; Fri Jun 23 01:36:51 2017 GMT