clarify the purpose of this project
[nyanglibc.git] / stdlib / divmod_1.shared.s
blob1c54148d47acb17a8b65f3f65d4cfd1f4bf612bc
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __mpn_divmod_1
9 .type __mpn_divmod_1, @function
10 __mpn_divmod_1:
11 movq %rdx, %rax
12 xorl %edx, %edx
13 testq %rax, %rax
14 je .L1
15 leaq -1(%rax), %r8
16 movq (%rsi,%r8,8), %rdx
17 cmpq %rcx, %rdx
18 jnb .L6
19 movq $0, (%rdi,%r8,8)
20 leaq -2(%rax), %r8
21 .L3:
22 testq %r8, %r8
23 js .L1
24 leaq (%rdi,%r8,8), %rdi
25 .p2align 4,,10
26 .p2align 3
27 .L4:
28 movq (%rsi,%r8,8), %rax
29 subq $1, %r8
30 subq $8, %rdi
31 #APP
32 # 195 "divmod_1.c" 1
33 divq %rcx
34 # 0 "" 2
35 #NO_APP
36 movq %rax, 8(%rdi)
37 cmpq $-1, %r8
38 jne .L4
39 .L1:
40 movq %rdx, %rax
41 ret
42 .p2align 4,,10
43 .p2align 3
44 .L6:
45 xorl %edx, %edx
46 jmp .L3
47 .size __mpn_divmod_1, .-__mpn_divmod_1