;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.6.1 #4330 (Oct 18 2006)
; This file generated Wed Oct 18 23:31:04 2006
;--------------------------------------------------------
	.module _fs2sint
	.optsdcc -mhc08
	
	.area HOME (CODE)
	.area GSINIT0 (CODE)
	.area GSINIT (CODE)
	.area GSFINAL (CODE)
	.area CSEG (CODE)
	.area XINIT
	.area CONST   (CODE)
	.area DSEG
	.area OSEG    (OVR)
	.area BSEG
	.area XSEG
	.area XISEG
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl ___fs2sint_PARM_1
	.globl ___fs2sint
;--------------------------------------------------------
;  ram data
;--------------------------------------------------------
	.area DSEG
___fs2sint_sloc0_1_0:
	.ds 2
;--------------------------------------------------------
; overlayable items in  ram 
;--------------------------------------------------------
	.area OSEG    (OVR)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
	.area XISEG
;--------------------------------------------------------
; extended address mode data
;--------------------------------------------------------
	.area XSEG
___fs2sint_PARM_1:
	.ds 4
___fs2sint_sl_1_1:
	.ds 4
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area HOME (CODE)
	.area GSINIT (CODE)
	.area GSFINAL (CODE)
	.area GSINIT (CODE)
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area HOME (CODE)
	.area CSEG (CODE)
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CSEG (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function '__fs2sint'
;------------------------------------------------------------
;sloc0                     Allocated with name '___fs2sint_sloc0_1_0'
;f                         Allocated with name '___fs2sint_PARM_1'
;sl                        Allocated with name '___fs2sint_sl_1_1'
;------------------------------------------------------------
;_fs2sint.c:74: signed int __fs2sint (float f) {
;	-----------------------------------------
;	 function __fs2sint
;	-----------------------------------------
___fs2sint:
;_fs2sint.c:75: signed long sl=__fs2slong(f);
;     genAssign
;     loadRegFromAop (a, EXT(___fs2sint_PARM_1), 3)
	lda	___fs2sint_PARM_1
;     storeRegToAop (a, EXT(___fs2slong_PARM_1), 3), stacked=0, isaddr=1
	sta	___fs2slong_PARM_1
;     loadRegFromAop (a, EXT(___fs2sint_PARM_1), 2)
	lda	(___fs2sint_PARM_1 + 1)
;     storeRegToAop (a, EXT(___fs2slong_PARM_1), 2), stacked=0, isaddr=1
	sta	(___fs2slong_PARM_1 + 1)
;     loadRegFromAop (a, EXT(___fs2sint_PARM_1), 1)
	lda	(___fs2sint_PARM_1 + 2)
;     storeRegToAop (a, EXT(___fs2slong_PARM_1), 1), stacked=0, isaddr=1
	sta	(___fs2slong_PARM_1 + 2)
;     loadRegFromAop (a, EXT(___fs2sint_PARM_1), 0)
	lda	(___fs2sint_PARM_1 + 3)
;     storeRegToAop (a, EXT(___fs2slong_PARM_1), 0), stacked=0, isaddr=1
	sta	(___fs2slong_PARM_1 + 3)
;     genCall
	jsr	___fs2slong
;     loadRegFromAop (a, REG(-,-,-,a), 0)
; transferRegReg(a,a)
;     storeRegToAop (a, EXT(___fs2sint_sl_1_1), 0), stacked=0, isaddr=0
	sta	(___fs2sint_sl_1_1 + 3)
;     loadRegFromAop (x, REG(-,-,-,x), 0)
; transferRegReg(x,x)
;     storeRegToAop (x, EXT(___fs2sint_sl_1_1), 1), stacked=0, isaddr=0
	stx	(___fs2sint_sl_1_1 + 2)
;     loadRegFromAop (a, DIR(__ret2), 0)
	lda	*__ret2
;     storeRegToAop (a, EXT(___fs2sint_sl_1_1), 2), stacked=0, isaddr=0
	sta	(___fs2sint_sl_1_1 + 1)
;     loadRegFromAop (a, DIR(__ret3), 0)
	lda	*__ret3
;     storeRegToAop (a, EXT(___fs2sint_sl_1_1), 3), stacked=0, isaddr=0
	sta	___fs2sint_sl_1_1
;_fs2sint.c:76: if (sl>=INT_MAX)
;     genCmp	(<)
;     loadRegFromAop (a, EXT(___fs2sint_sl_1_1), 0)
	lda	(___fs2sint_sl_1_1 + 3)
	sub	#0xFF
;     loadRegFromAop (a, EXT(___fs2sint_sl_1_1), 1)
	lda	(___fs2sint_sl_1_1 + 2)
	sbc	#0x7F
;     loadRegFromAop (a, EXT(___fs2sint_sl_1_1), 2)
	lda	(___fs2sint_sl_1_1 + 1)
	sbc	#0x00
;     loadRegFromAop (a, EXT(___fs2sint_sl_1_1), 3)
	lda	___fs2sint_sl_1_1
	sbc	#0x00
; Peephole 2k	- eliminated bra
	blt	00102$
00109$:
;_fs2sint.c:77: return INT_MAX;
;     genRet
;     loadRegFromAop (x, LIT(#0xFF), 1)
	ldx	#0x7F
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, LIT(#0xFF), 0)
	lda	#0xFF
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
; Peephole 3	- shortened jmp to bra
; Peephole 6b  - replaced jmp to rts with rts
	rts
00102$:
;_fs2sint.c:78: if (sl<=INT_MIN)
;     genCmp	(>)
;     loadRegFromAop (a, LIT(#0x00), 0)
	clra
	sub	(___fs2sint_sl_1_1 + 3)
;     loadRegFromAop (a, LIT(#0x00), 1)
	lda	#0x80
	sbc	(___fs2sint_sl_1_1 + 2)
;     loadRegFromAop (a, LIT(#0x00), 2)
	lda	#0xFF
	sbc	(___fs2sint_sl_1_1 + 1)
;     loadRegFromAop (a, LIT(#0x00), 3)
	lda	#0xFF
	sbc	___fs2sint_sl_1_1
; Peephole 2k	- eliminated bra
	blt	00104$
00110$:
;_fs2sint.c:79: return -INT_MIN;
;     genRet
;     loadRegFromAop (x, LIT(#0x00), 1)
	ldx	#0x80
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, LIT(#0x00), 0)
	clra
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
; Peephole 3	- shortened jmp to bra
; Peephole 6b  - replaced jmp to rts with rts
	rts
00104$:
;_fs2sint.c:80: return sl;
;     genCast
;     loadRegFromAop (a, EXT(___fs2sint_sl_1_1), 0)
	lda	(___fs2sint_sl_1_1 + 3)
;     storeRegToAop (a, DIR(___fs2sint_sloc0_1_0), 0), stacked=0, isaddr=0
	sta	*(___fs2sint_sloc0_1_0 + 1)
;     loadRegFromAop (a, EXT(___fs2sint_sl_1_1), 1)
	lda	(___fs2sint_sl_1_1 + 2)
;     storeRegToAop (a, DIR(___fs2sint_sloc0_1_0), 1), stacked=0, isaddr=0
	sta	*___fs2sint_sloc0_1_0
;     genRet
;     loadRegFromAop (x, DIR(___fs2sint_sloc0_1_0), 1)
	ldx	*___fs2sint_sloc0_1_0
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, DIR(___fs2sint_sloc0_1_0), 0)
	lda	*(___fs2sint_sloc0_1_0 + 1)
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
00105$:
	rts
	.area CSEG (CODE)
	.area CONST   (CODE)
	.area XINIT
