sinus.txt

(1 KB) Pobierz
.LC0:
	.string	"%d%d"
	.text
.globl funkcja
funkcja:
	pushl %ebp
	movl %esp, %ebp
	subl $88, %esp
	leal -16(%ebp), %eax
	movl %eax, 8(%esp)
	leal -12(%ebp), %eax
	movl %eax, 4(%esp)
	movl $.LC0, (%esp)
	call scant
	fld1
	fstpl -24(%ebp)
	fld1
	fstpl -32(%ebp)
	fld1
	fstpl -40(%ebp)
	fldz
	fstpl -48(%ebp)
	movl -16(%ebp), %eax
	pushl %eax
	fildl (%esp)
	leal 4(%esp), %esp
	fldl .LC3
	fmulp %st, %st(1)
	fnstcw -50(%ebp)
	movzwl -50(%ebp), %eax
	movb $12, %ah
	movw %ax, -52(%ebp)
	fldcw -52(%ebp)
	fistpl -56(%ebp)
	fldcw -50(%ebp)
	movl -56(%ebp), %eax
	movl %eax, -16(%ebp)
	movl -16(%ebp), %ecx
	movl $-1240768329, -68(%ebp)
	movl -68(%ebp), %eax
	imull %ecx
	leal (%edx,%ecx), %eax
	movl %eax, %edx
	sarl $7, %edx
	movl %ecx, %eax
	sarl $31, %eax
	movl %edx, %ecx
	subl %eax, %ecx
	movl %ecx, %eax
	movl %eax, -16(%ebp)
	movl $0, -8(%ebp)
	jmp .L2
.L9:
	fldz
	fstpl -40(%ebp)
	fldz
	fstpl -32(%ebp)
	fldz
	fstpl -24(%ebp)
	movl $0, -4(%ebp)
	jmp .L3
.L4:
	movl -16(%ebp), %eax
	pushl %eax
	fildl (%esp)
	leal 4(%esp), %esp
	fldl -40(%ebp)
	fmulp %st, %st(1)
	fstpl -40(%ebp)
	addl $1, -4(%ebp)
.L3:
	movl -8(%ebp), %eax
	addl %eax, %eax
	addl $1, %eax
	cmpl -4(%ebp), %eax
	jg .L4
	movl $1, -4(%ebp)
	jmp .L5
.L6:
	fildl -4(%ebp)
	fldl -32(%ebp)
	fmulp %st, %st(1)
	fstpl -32(%ebp)
	addl $1, -4(%ebp)
.L5:
	movl -8(%ebp), %eax
	addl %eax, %eax
	addl $1, %eax
	cmpl -4(%ebp), %eax
	jge .L6
	movl $1, -4(%ebp)
	jmp .L7
.L8:
	fldl -24(%ebp)
	fchs
	fstpl -24(%ebp)
	addl $1, -4(%ebp)
.L7:
	movl -4(%ebp), %eax
	cmpl -8(%ebp), %eax
	jle .L8
	fldl -40(%ebp)
	fmull -24(%ebp)
	fdivl -32(%ebp)
	fstpl -48(%ebp)
	addl $1, -8(%ebp)
.L2:
	movl -12(%ebp), %eax
	cmpl %eax, -8(%ebp)
	jl .L9
	flds .LC4
	leave
	ret
	.size	funkcja, .-funkcja
	.section	.rodata
	.align 8
.LC3:
	.long	1374389535
	.long	1074339512
	.align 4
.LC4:
	.long	2143289344
	
Zgłoś jeśli naruszono regulamin