;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.4.0 Tue Oct 12 01:21:23 2004

;--------------------------------------------------------
	.module _fs2slong
	
	.area CSEG
	.area GSINIT
	.area GSFINAL
	.area XINIT
	.area DSEG
	.area OSEG    (OVR)
	.area BSEG
	.area XSEG
	.area XISEG
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl ___fs2slong_PARM_1
	.globl ___fs2slong
;--------------------------------------------------------
;  ram data
;--------------------------------------------------------
	.area DSEG
___fs2slong_sloc0_1_0::
	.ds 4
;--------------------------------------------------------
; overlayable items in  ram 
;--------------------------------------------------------
	.area OSEG    (OVR)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
	.area XISEG
;--------------------------------------------------------
; extended address mode data
;--------------------------------------------------------
	.area XSEG
___fs2slong_PARM_1::
	.ds 4
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area GSINIT
	.area GSFINAL
	.area GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area HOME
	.area CSEG
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CSEG
;------------------------------------------------------------
;Allocation info for local variables in function '__fs2slong'
;------------------------------------------------------------
;sloc0                     Allocated with name '___fs2slong_sloc0_1_0'
;f                         Allocated with name '___fs2slong_PARM_1'
;------------------------------------------------------------
;_fs2slong.c:4: signed long __fs2slong (float f) {
;	-----------------------------------------
;	 function __fs2slong
;	-----------------------------------------
___fs2slong:
;_fs2slong.c:6: if (!f)
;     genIfx
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 0)
	lda	(___fs2slong_PARM_1 + 3)
	ora	(___fs2slong_PARM_1 + 2)
	ora	(___fs2slong_PARM_1 + 1)
	ora	___fs2slong_PARM_1
;     genIfxJump
; Peephole 2c	- eliminated jmp
	bne	00102$
00110$:
;_fs2slong.c:7: return 0;
;     genRet
	mov	#0x00,*__ret3
	mov	#0x00,*__ret2
;     loadRegFromAop (x, LIT(#0x00), 1)
	ldx	#0x00
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, LIT(#0x00), 0)
	lda	#0x00
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
	jmp	00106$
00102$:
;_fs2slong.c:9: if (f<0) {
;     genAssign
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 0)
	lda	(___fs2slong_PARM_1 + 3)
;     storeRegToAop (a, EXT(___fslt_PARM_1), 0), stacked=0, isaddr=1
	sta	(___fslt_PARM_1 + 3)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 1)
	lda	(___fs2slong_PARM_1 + 2)
;     storeRegToAop (a, EXT(___fslt_PARM_1), 1), stacked=0, isaddr=1
	sta	(___fslt_PARM_1 + 2)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 2)
	lda	(___fs2slong_PARM_1 + 1)
;     storeRegToAop (a, EXT(___fslt_PARM_1), 2), stacked=0, isaddr=1
	sta	(___fslt_PARM_1 + 1)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 3)
	lda	___fs2slong_PARM_1
;     storeRegToAop (a, EXT(___fslt_PARM_1), 3), stacked=0, isaddr=1
	sta	___fslt_PARM_1
;     genAssign
;     loadRegFromAop (a, LIT(#0x00), 0)
	lda	#0x00
;     storeRegToAop (a, EXT(___fslt_PARM_2), 0), stacked=0, isaddr=1
	sta	(___fslt_PARM_2 + 3)
;     loadRegFromAop (a, LIT(#0x00), 1)
	lda	#0x00
;     storeRegToAop (a, EXT(___fslt_PARM_2), 1), stacked=0, isaddr=1
	sta	(___fslt_PARM_2 + 2)
;     loadRegFromAop (a, LIT(#0x00), 2)
	lda	#0x00
;     storeRegToAop (a, EXT(___fslt_PARM_2), 2), stacked=0, isaddr=1
	sta	(___fslt_PARM_2 + 1)
;     loadRegFromAop (a, LIT(#0x00), 3)
	lda	#0x00
;     storeRegToAop (a, EXT(___fslt_PARM_2), 3), stacked=0, isaddr=1
	sta	___fslt_PARM_2
;     genCall
	jsr	___fslt
;     loadRegFromAop (a, REG(-,-,-,a), 0)
; transferRegReg(a,a)
;     storeRegToAop (a, REG(-,-,x,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
;     genIfx
	tsta
;     genIfxJump
; Peephole 2d	- eliminated jmp
	beq	00104$
00111$:
; forgot to free a
;_fs2slong.c:10: return -__fs2ulong(-f);
;     genUminus
;     genUminusFloat
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 0)
	lda	(___fs2slong_PARM_1 + 3)
;     storeRegToAop (a, EXT(___fs2ulong_PARM_1), 0), stacked=0, isaddr=1
	sta	(___fs2ulong_PARM_1 + 3)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 1)
	lda	(___fs2slong_PARM_1 + 2)
;     storeRegToAop (a, EXT(___fs2ulong_PARM_1), 1), stacked=0, isaddr=1
	sta	(___fs2ulong_PARM_1 + 2)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 2)
	lda	(___fs2slong_PARM_1 + 1)
	eor	#0x80
;     storeRegToAop (a, EXT(___fs2ulong_PARM_1), 2), stacked=0, isaddr=1
	sta	(___fs2ulong_PARM_1 + 1)
;     genCall
	jsr	___fs2ulong
;     loadRegFromAop (a, REG(-,-,-,a), 0)
; transferRegReg(a,a)
;     storeRegToAop (a, DIR(___fs2slong_sloc0_1_0), 0), stacked=0, isaddr=0
	sta	*(___fs2slong_sloc0_1_0 + 3)
;     loadRegFromAop (x, REG(-,-,-,x), 0)
; transferRegReg(x,x)
;     storeRegToAop (x, DIR(___fs2slong_sloc0_1_0), 1), stacked=0, isaddr=0
	stx	*(___fs2slong_sloc0_1_0 + 2)
	mov	*__ret2,*(___fs2slong_sloc0_1_0 + 1)
	mov	*__ret3,*___fs2slong_sloc0_1_0
;     genUminus
	clra
	sub	*(___fs2slong_sloc0_1_0 + 3)
;     storeRegToAop (a, DIR(___fs2slong_sloc0_1_0), 0), stacked=0, isaddr=0
	sta	*(___fs2slong_sloc0_1_0 + 3)
	clra
	sbc	*(___fs2slong_sloc0_1_0 + 2)
;     storeRegToAop (a, DIR(___fs2slong_sloc0_1_0), 1), stacked=0, isaddr=0
	sta	*(___fs2slong_sloc0_1_0 + 2)
	clra
	sbc	*(___fs2slong_sloc0_1_0 + 1)
;     storeRegToAop (a, DIR(___fs2slong_sloc0_1_0), 2), stacked=0, isaddr=0
	sta	*(___fs2slong_sloc0_1_0 + 1)
	clra
	sbc	*___fs2slong_sloc0_1_0
;     storeRegToAop (a, DIR(___fs2slong_sloc0_1_0), 3), stacked=0, isaddr=0
	sta	*___fs2slong_sloc0_1_0
;     genRet
	mov	*___fs2slong_sloc0_1_0,*__ret3
	mov	*(___fs2slong_sloc0_1_0 + 1),*__ret2
;     loadRegFromAop (x, DIR(___fs2slong_sloc0_1_0), 1)
	ldx	*(___fs2slong_sloc0_1_0 + 2)
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, DIR(___fs2slong_sloc0_1_0), 0)
	lda	*(___fs2slong_sloc0_1_0 + 3)
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
; Peephole 3	- shortened jmp to bra
	bra	00106$
00104$:
;_fs2slong.c:12: return __fs2ulong(f);
;     genAssign
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 0)
	lda	(___fs2slong_PARM_1 + 3)
;     storeRegToAop (a, EXT(___fs2ulong_PARM_1), 0), stacked=0, isaddr=1
	sta	(___fs2ulong_PARM_1 + 3)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 1)
	lda	(___fs2slong_PARM_1 + 2)
;     storeRegToAop (a, EXT(___fs2ulong_PARM_1), 1), stacked=0, isaddr=1
	sta	(___fs2ulong_PARM_1 + 2)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 2)
	lda	(___fs2slong_PARM_1 + 1)
;     storeRegToAop (a, EXT(___fs2ulong_PARM_1), 2), stacked=0, isaddr=1
	sta	(___fs2ulong_PARM_1 + 1)
;     loadRegFromAop (a, EXT(___fs2slong_PARM_1), 3)
	lda	___fs2slong_PARM_1
;     storeRegToAop (a, EXT(___fs2ulong_PARM_1), 3), stacked=0, isaddr=1
	sta	___fs2ulong_PARM_1
;     genCall
	jsr	___fs2ulong
;     loadRegFromAop (a, REG(-,-,-,a), 0)
; transferRegReg(a,a)
;     storeRegToAop (a, DIR(___fs2slong_sloc0_1_0), 0), stacked=0, isaddr=0
	sta	*(___fs2slong_sloc0_1_0 + 3)
;     loadRegFromAop (x, REG(-,-,-,x), 0)
; transferRegReg(x,x)
;     storeRegToAop (x, DIR(___fs2slong_sloc0_1_0), 1), stacked=0, isaddr=0
	stx	*(___fs2slong_sloc0_1_0 + 2)
	mov	*__ret2,*(___fs2slong_sloc0_1_0 + 1)
	mov	*__ret3,*___fs2slong_sloc0_1_0
;     genRet
	mov	*___fs2slong_sloc0_1_0,*__ret3
	mov	*(___fs2slong_sloc0_1_0 + 1),*__ret2
;     loadRegFromAop (x, DIR(___fs2slong_sloc0_1_0), 1)
	ldx	*(___fs2slong_sloc0_1_0 + 2)
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, DIR(___fs2slong_sloc0_1_0), 0)
	lda	*(___fs2slong_sloc0_1_0 + 3)
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
00106$:
	rts
	.area CSEG
	.area XINIT
