
%XCORR	JMS	CTECH
	LAC	XLOWS
	TAD	XLIM
	DAC	CORAD#
	CLL
	CLA
	TLS+10
	DZM	PMAX#
	DZM	LAG#
LAGDEC	LAC	XLOW
	TAD	(33
	DAC	SIG#
	LAC	XLOWS
	TAD	(33
	DAC	LAGSIG#
	JMS	%CONV
	JMP	XRET
	LAC	LAG
	TAD	(-1
	DAC	LAG
	SMA
	JMP	LAGDEC
	LAC	LAG
	TCA
	DAC	LAG
LAGADV	LAC	XLOWS
	DAC	SIG
	LAC	XLOW
	TAD	LAG
	DAC	LAGSIG
	JMS	%CONV
	LAC	LAG
	IAC
	DAC	LAG
	SAD	PMAX
	SKP
	JMP	LAGADV
XRET	CLC
	DAC	CFLAG
	DZM	OFLAG
	LAC	XLOWS
	TAD	XLIM
	DAC	XLOW
	JMP	DPY
%CONV	0
	DZM	HSUM#
	DZM	LSUM#
	LAC	(33
	TCA
	TAD	XLIM
	DAC	TOTAL#
	TCA
	DAC	SUMCNT#
INT	LAC*	SIG
	JMS	MULT
	LAC*	LAGSIG
	CLL
	TAD	LSUM
	DAC	LSUM
	LAC	%MHIGH
	SZL
	IAC
	TAD	HSUM
	DAC	HSUM
	ISZ	SIG
	ISZ	LAGSIG
	ISZ	SUMCNT
	JMP	INT
	DZM	OCNT#
%DIV	LAC	HSUM
	JMS	DIV
	LAC	LSUM
	LAC	TOTAL
	SZL
	JMP	OFLOW
	JMS	%DIP
	LAC	(305
	JMS	WRITE
	LAC	OCNT
	JMS	%DIP
	TSF
	JMP	.-1
	TCF
	JMP*	%CONV
OFLOW	CLL
	LAC	TOTAL
	RAL
	DAC	TOTAL
	ISZ	OCNT
	JMP	%DIV
	.END	DPY
