Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- .text
- .global tree_find
- tree_find:
- pushl %ebp
- movl %esp, %ebp
- pushl %edi
- pushl %ebx
- pushl %esi
- movl 8(%ebp), %eax
- cmpl $0, %eax
- jz l5
- movsd 12(%ebp), %xmm0
- movl 20(%ebp), %ebx
- movsd (%eax), %xmm1
- movl 8(%eax), %ecx
- movl 12(%eax), %edx
- movl 16(%eax), %edi
- subsd %xmm0, %xmm1
- movl $0, %esi
- cvtsi2sd %esi, %xmm7
- comisd %xmm7, %xmm1
- jae l1
- movl $-1, %esi
- cvtsi2sd %esi, %xmm2
- mulpd %xmm2, %xmm1
- l1:
- movl $1, %esi
- cvtsi2sd %esi, %xmm3
- movl $100000000, %esi
- cvtsi2sd %esi, %xmm2
- divpd %xmm2, %xmm3
- comisd %xmm3, %xmm1
- jbe l2
- pushl %ebx
- subl $8, %esp
- movsd %xmm0, (%esp)
- movsd (%eax), %xmm1
- comisd %xmm1, %xmm0
- ja l3
- pushl %ecx
- jmp l4
- l3:
- pushl %edx
- l4:
- call tree_find
- addl $16, %esp
- jmp l5
- l2:
- cmpl $0, %ebx
- jz l6
- movl %edi, (%ebx)
- l6:
- movl $1, %eax
- l5:
- popl %esi
- popl %ebx
- popl %edi
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement