clarify the purpose of this project
[nyanglibc.git] / stdlib / strfromd.shared.s
blobc60c31b983cbd1893ee9833a6f99dce22f2c7f14
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 strfromd
9 .type strfromd, @function
10 strfromd:
11 pushq %r15
12 pushq %r14
13 pushq %r13
14 pushq %r12
15 pushq %rbp
16 pushq %rbx
17 subq $360, %rsp
18 cmpb $37, (%rdx)
19 movq %rsp, %rax
20 movq $0, 184(%rsp)
21 movsd %xmm0, (%rsp)
22 movq %rax, 8(%rsp)
23 jne .L14
24 movzbl 1(%rdx), %ebx
25 movq %rdi, %r15
26 cmpb $46, %bl
27 je .L3
28 movsbl %bl, %r14d
29 movl $-1, %r13d
30 .L4:
31 leal -65(%rbx), %eax
32 cmpb $38, %al
33 ja .L14
34 movabsq $485331304561, %rdx
35 btq %rax, %rdx
36 jnc .L14
37 testq %rsi, %rsi
38 je .L24
39 leaq -1(%rsi), %r12
40 leaq 48(%rsp), %rbp
41 .L15:
42 xorl %r8d, %r8d
43 xorl %ecx, %ecx
44 movl $-1, %edx
45 movl $32768, %esi
46 movq %rbp, %rdi
47 andl $-33, %ebx
48 call _IO_no_init@PLT
49 leaq _IO_strn_jumps(%rip), %rax
50 movq %r15, %rcx
51 movq %r12, %rdx
52 movq %r15, %rsi
53 movq %rbp, %rdi
54 movq %rax, 264(%rsp)
55 call _IO_str_init_static_internal@PLT
56 pxor %xmm0, %xmm0
57 cmpb $65, %bl
58 leaq 16(%rsp), %rax
59 movl %r13d, 16(%rsp)
60 movups %xmm0, 20(%rsp)
61 movl %r14d, 24(%rsp)
62 je .L16
63 leaq 8(%rsp), %rcx
64 movq %rbp, %rdi
65 movq __libc_tsd_LOCALE@gottpoff(%rip), %rdx
66 movq %fs:(%rdx), %rsi
67 movq %rax, %rdx
68 call __GI___printf_fp_l
69 .L17:
70 addq $240, %rbp
71 cmpq %rbp, 104(%rsp)
72 je .L1
73 movq 88(%rsp), %rdx
74 movb $0, (%rdx)
75 .L1:
76 addq $360, %rsp
77 popq %rbx
78 popq %rbp
79 popq %r12
80 popq %r13
81 popq %r14
82 popq %r15
83 ret
84 .p2align 4,,10
85 .p2align 3
86 .L24:
87 leaq 48(%rsp), %rbp
88 movl $63, %r12d
89 leaq 240(%rbp), %r15
90 jmp .L15
91 .p2align 4,,10
92 .p2align 3
93 .L16:
94 leaq 8(%rsp), %rdx
95 movq %rax, %rsi
96 movq %rbp, %rdi
97 call __printf_fphex
98 jmp .L17
99 .p2align 4,,10
100 .p2align 3
101 .L3:
102 movsbl 2(%rdx), %r14d
103 leaq 2(%rdx), %rax
104 xorl %r13d, %r13d
105 leal -48(%r14), %edx
106 movl %r14d, %ebx
107 cmpl $9, %edx
108 ja .L4
109 movl %edx, %r13d
110 movl $2147483647, %edi
111 movl $-1, %r8d
112 .L5:
113 movsbl 1(%rax), %r14d
114 leaq 1(%rax), %r9
115 leal -48(%r14), %edx
116 movl %r14d, %ebx
117 cmpl $9, %edx
118 ja .L4
119 testl %r13d, %r13d
120 js .L6
121 cmpl $214748364, %r13d
122 jg .L33
123 leal 0(%r13,%r13,4), %r13d
124 movl %edi, %ecx
125 subl %edx, %ecx
126 addl %r13d, %r13d
127 cmpl %ecx, %r13d
128 jg .L33
129 addl %edx, %r13d
130 .L6:
131 movq %r9, %rax
132 jmp .L5
133 .p2align 4,,10
134 .p2align 3
135 .L33:
136 movsbl 2(%rax), %r14d
137 leal -48(%r14), %edx
138 movl %r14d, %ebx
139 cmpl $9, %edx
140 ja .L22
141 movsbl 3(%rax), %r14d
142 leal -48(%r14), %edx
143 movl %r14d, %ebx
144 cmpl $9, %edx
145 ja .L22
146 movsbl 4(%rax), %r14d
147 leal -48(%r14), %edx
148 movl %r14d, %ebx
149 cmpl $9, %edx
150 ja .L22
151 movsbl 5(%rax), %r14d
152 leaq 5(%rax), %r9
153 leal -48(%r14), %eax
154 movl %r14d, %ebx
155 cmpl $9, %eax
156 ja .L22
157 movl %r8d, %r13d
158 jmp .L6
159 .p2align 4,,10
160 .p2align 3
161 .L22:
162 movl $-1, %r13d
163 jmp .L4
164 .L14:
165 call __GI_abort
166 .size strfromd, .-strfromd
167 .weak strfromf32x
168 .set strfromf32x,strfromd
169 .weak strfromf64
170 .set strfromf64,strfromd
171 .hidden __printf_fphex
172 .hidden _IO_strn_jumps