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

;--------------------------------------------------------
	.module acosf
	
	.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 _acosf
;--------------------------------------------------------
;  ram data
;--------------------------------------------------------
	.area DSEG
;--------------------------------------------------------
; overlayable items in  ram 
;--------------------------------------------------------
	.area OSEG    (OVR)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
	.area XISEG
;--------------------------------------------------------
; extended address mode data
;--------------------------------------------------------
	.area XSEG
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area GSINIT
	.area GSFINAL
	.area GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area HOME
	.area CSEG
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CSEG
;------------------------------------------------------------
;Allocation info for local variables in function 'acosf'
;------------------------------------------------------------
;x                         Allocated to stack - offset 2
;sloc0                     Allocated to stack - offset -4
;------------------------------------------------------------
;acosf.c:25: float acosf(const float x) reentrant
;	-----------------------------------------
;	 function acosf
;	-----------------------------------------
_acosf:
	ais	#-4
;acosf.c:27: if(x== 1.0) return 0.0;
;     genAssign
;     loadRegFromAop (a, SOF(x), 0)
	lda	10,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 0), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 3)
;     loadRegFromAop (a, SOF(x), 1)
	lda	9,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 1), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 2)
;     loadRegFromAop (a, SOF(x), 2)
	lda	8,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 2), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 1)
;     loadRegFromAop (a, SOF(x), 3)
	lda	7,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 3), stacked=0, isaddr=1
	sta	___fseq_PARM_1
;     genAssign
;     loadRegFromAop (a, LIT(#0x00), 0)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 0), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 3)
;     loadRegFromAop (a, LIT(#0x00), 1)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 1), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 2)
;     loadRegFromAop (a, LIT(#0x00), 2)
	lda	#0x80
;     storeRegToAop (a, EXT(___fseq_PARM_2), 2), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 1)
;     loadRegFromAop (a, LIT(#0x00), 3)
	lda	#0x3F
;     storeRegToAop (a, EXT(___fseq_PARM_2), 3), stacked=0, isaddr=1
	sta	___fseq_PARM_2
;     genCall
	jsr	___fseq
;     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	00107$
00114$:
; forgot to free a
;     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	00109$
00107$:
;acosf.c:28: else if(x==-1.0) return PI;
;     genAssign
;     loadRegFromAop (a, SOF(x), 0)
	lda	10,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 0), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 3)
;     loadRegFromAop (a, SOF(x), 1)
	lda	9,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 1), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 2)
;     loadRegFromAop (a, SOF(x), 2)
	lda	8,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 2), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 1)
;     loadRegFromAop (a, SOF(x), 3)
	lda	7,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 3), stacked=0, isaddr=1
	sta	___fseq_PARM_1
;     genAssign
;     loadRegFromAop (a, LIT(#0x00), 0)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 0), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 3)
;     loadRegFromAop (a, LIT(#0x00), 1)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 1), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 2)
;     loadRegFromAop (a, LIT(#0x00), 2)
	lda	#0x80
;     storeRegToAop (a, EXT(___fseq_PARM_2), 2), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 1)
;     loadRegFromAop (a, LIT(#0x00), 3)
	lda	#0xBF
;     storeRegToAop (a, EXT(___fseq_PARM_2), 3), stacked=0, isaddr=1
	sta	___fseq_PARM_2
;     genCall
	jsr	___fseq
;     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$
00115$:
; forgot to free a
;     genRet
	mov	#0x40,*__ret3
	mov	#0x49,*__ret2
;     loadRegFromAop (x, LIT(#0xDB), 1)
	ldx	#0x0F
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, LIT(#0xDB), 0)
	lda	#0xDB
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
	jmp	00109$
00104$:
;acosf.c:29: else if(x== 0.0) return HALF_PI;
;     genAssign
;     loadRegFromAop (a, SOF(x), 0)
	lda	10,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 0), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 3)
;     loadRegFromAop (a, SOF(x), 1)
	lda	9,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 1), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 2)
;     loadRegFromAop (a, SOF(x), 2)
	lda	8,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 2), stacked=0, isaddr=1
	sta	(___fseq_PARM_1 + 1)
;     loadRegFromAop (a, SOF(x), 3)
	lda	7,s
;     storeRegToAop (a, EXT(___fseq_PARM_1), 3), stacked=0, isaddr=1
	sta	___fseq_PARM_1
;     genAssign
;     loadRegFromAop (a, LIT(#0x00), 0)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 0), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 3)
;     loadRegFromAop (a, LIT(#0x00), 1)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 1), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 2)
;     loadRegFromAop (a, LIT(#0x00), 2)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 2), stacked=0, isaddr=1
	sta	(___fseq_PARM_2 + 1)
;     loadRegFromAop (a, LIT(#0x00), 3)
	lda	#0x00
;     storeRegToAop (a, EXT(___fseq_PARM_2), 3), stacked=0, isaddr=1
	sta	___fseq_PARM_2
;     genCall
	jsr	___fseq
;     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	00108$
00116$:
; forgot to free a
;     genRet
	mov	#0x3F,*__ret3
	mov	#0xC9,*__ret2
;     loadRegFromAop (x, LIT(#0xDB), 1)
	ldx	#0x0F
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, LIT(#0xDB), 0)
	lda	#0xDB
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
; Peephole 3	- shortened jmp to bra
	bra	00109$
00108$:
;acosf.c:30: return asincosf(x,1);
;     genAssign
;     loadRegFromAop (a, SOF(x), 0)
	lda	10,s
;     storeRegToAop (a, EXT(_asincosf_PARM_1), 0), stacked=0, isaddr=1
	sta	(_asincosf_PARM_1 + 3)
;     loadRegFromAop (a, SOF(x), 1)
	lda	9,s
;     storeRegToAop (a, EXT(_asincosf_PARM_1), 1), stacked=0, isaddr=1
	sta	(_asincosf_PARM_1 + 2)
;     loadRegFromAop (a, SOF(x), 2)
	lda	8,s
;     storeRegToAop (a, EXT(_asincosf_PARM_1), 2), stacked=0, isaddr=1
	sta	(_asincosf_PARM_1 + 1)
;     loadRegFromAop (a, SOF(x), 3)
	lda	7,s
;     storeRegToAop (a, EXT(_asincosf_PARM_1), 3), stacked=0, isaddr=1
	sta	_asincosf_PARM_1
;     genAssign
;     loadRegFromAop (a, LIT(#0x01), 0)
	lda	#0x01
;     storeRegToAop (a, EXT(_asincosf_PARM_2), 0), stacked=0, isaddr=1
	sta	(_asincosf_PARM_2 + 1)
;     loadRegFromAop (a, LIT(#0x01), 1)
	lda	#0x00
;     storeRegToAop (a, EXT(_asincosf_PARM_2), 1), stacked=0, isaddr=1
	sta	_asincosf_PARM_2
;     genCall
	jsr	_asincosf
;     loadRegFromAop (a, REG(-,-,-,a), 0)
; transferRegReg(a,a)
;     storeRegToAop (a, SOF(iTemp3), 0), stacked=0, isaddr=0
	sta	4,s
;     loadRegFromAop (x, REG(-,-,-,x), 0)
; transferRegReg(x,x)
;     storeRegToAop (x, SOF(iTemp3), 1), stacked=0, isaddr=0
	stx	3,s
;     loadRegFromAop (a, DIR(__ret2), 0)
	lda	*__ret2
;     storeRegToAop (a, SOF(iTemp3), 2), stacked=0, isaddr=0
	sta	2,s
;     loadRegFromAop (a, DIR(__ret3), 0)
	lda	*__ret3
;     storeRegToAop (a, SOF(iTemp3), 3), stacked=0, isaddr=0
	sta	1,s
;     genRet
;     loadRegFromAop (a, SOF(iTemp3), 3)
	lda	1,s
;     storeRegToAop (a, DIR(__ret3), 0), stacked=0, isaddr=0
	sta	*__ret3
;     loadRegFromAop (a, SOF(iTemp3), 2)
	lda	2,s
;     storeRegToAop (a, DIR(__ret2), 0), stacked=0, isaddr=0
	sta	*__ret2
;     loadRegFromAop (x, SOF(iTemp3), 1)
	ldx	3,s
;     storeRegToAop (x, REG(-,-,-,x), 0), stacked=0, isaddr=0
; transferRegReg(x,x)
;     loadRegFromAop (a, SOF(iTemp3), 0)
	lda	4,s
;     storeRegToAop (a, REG(-,-,-,a), 0), stacked=0, isaddr=0
; transferRegReg(a,a)
00109$:
	ais	#4
	rts
	.area CSEG
	.area XINIT
