/calls.*$4,_ATAN2/s&^.*$&\
	cvtdf	(sp)+,r2	\
	jlss	9f		\
0:				\
	cvtdf	(sp)+,r3	\
	jlss	3f		\
	cmpf	r3,r2		\
	blss	1f		\
	clrf	r5		\
	brb	4f		\
3:				\
	mnegf	r3,r0		\
	cmpf	r0,r2		\
	jgeq	2f		\
1:				\
	movf	$PID2,r5	\
	brb	5f		\
2:				\
	movf	$PI,r5		\
	brb	4f		\
9:				\
	cvtdf	(sp)+,r3	\
	jgeq	3f		\
	cmpf	r3,r2		\
	jgtr	1f		\
	movf	$NPI,r5		\
	brb	4f		\
3:				\
	mnegf	r2,r0		\
	cmpf	r0,r3		\
	jlss	2f		\
1:				\
	movf	$NPID2,r5	\
	brb	5f		\
2:				\
	clrf	r5		\
	brb	4f		\
4:				\
	tstf	r3		\
	beql	6f		\
	divf2	r3,r2		\
	emodf	r2,$0,$ATAN2_TSCALE_F,r4,r0		\
	movq	(_mt$atan2+ATAN2_TORIGIN_O)[r4],r2	\
	mulf2	r3,r0		\
	addf2	r2,r0		\
	addf2	r5,r0		\
	brb	2f		\
5:				\
	tstf	r2		\
	jeql	6f		\
	divf2	r2,r3		\
	emodf	r3,$0,$ATAN2_TSCALE_F,r4,r0		\
	movq	(_mt$atan2+ATAN2_TORIGIN_O)[r4],r2	\
	mulf2	r3,r0		\
	addf2	r2,r0		\
	subf3	r0,r5,r0	\
	brb	2f		\
6:				\
	clrf	r0		\
2:&
/calls.*$2,_COS/s&^.*$&\
	.set	SIN_IVSIZE,SIN_TBSIZE-2		\
	emodd	$SIN_TSCALE_D,$0,(sp)+,r4,r0	\
	blss	1f				\
						\
	addl2	$(SIN_IVSIZE/4),r4		\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+8)[r4],r2		\
	mulf2	r3,r0				\
	addf2	r2,r0				\
	brb	2f				\
1:						\
	addl2	$(SIN_IVSIZE/4),r4		\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+4)[r4],r2		\
	mulf2	r2,r0				\
	addf2	r3,r0				\
2:&
/calls.*$2,_SIN/s&^.*$&\
	.set	SIN_IVSIZE,SIN_TBSIZE-2		\
	emodd	$SIN_TSCALE_D,$0,(sp)+,r4,r0	\
	blss	1f				\
						\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+8)[r4],r2		\
	mulf2	r3,r0				\
	addf2	r2,r0				\
	brb	2f				\
1:						\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+4)[r4],r2		\
	mulf2	r2,r0				\
	addf2	r3,r0				\
2:&
/calls.*$4,_SINCOS/s&^.*$&\
	.set	SIN_IVSIZE,SIN_TBSIZE-2		\
	emodd	$SIN_TSCALE_D,$0,(sp)+,r4,r1	\
	blss	1f				\
						\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+8)[r4],r2		\
	mulf3	r3,r1,r0			\
	addf3	r2,r0,*(sp)+			\
	addl2	$(SIN_IVSIZE/4),r4		\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+8)[r4],r2		\
	mulf3	r3,r1,r0			\
	addf3	r2,r0,*(sp)+			\
	brb	2f				\
1:						\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+4)[r4],r2		\
	mulf3	r2,r1,r0			\
	addf3	r3,r0,*(sp)+			\
	addl2	$(SIN_IVSIZE/4),r4		\
	bicl2	$-SIN_IVSIZE,r4			\
	movq	(_mt$sin+4)[r4],r2		\
	mulf3	r2,r1,r0			\
	addf3	r3,r0,*(sp)+			\
2:&
