clarify the purpose of this project
[nyanglibc.git] / intl / explodename.shared.s
blob520611d836b28eaea1cf9704827bb42455a33758
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 _nl_explode_name
9 .type _nl_explode_name, @function
10 _nl_explode_name:
11 pushq %r15
12 pushq %r14
13 movq %rcx, %r14
14 pushq %r13
15 pushq %r12
16 movq %rdx, %r13
17 pushq %rbp
18 pushq %rbx
19 movq %rdi, %rbp
20 subq $40, %rsp
21 movq $0, (%rdx)
22 movq $0, (%rcx)
23 movq $0, (%r8)
24 movq $0, (%r9)
25 movq %rdi, (%rsi)
26 movzbl (%rdi), %eax
27 testb $-65, %al
28 je .L2
29 cmpb $95, %al
30 je .L2
31 cmpb $46, %al
32 je .L2
33 movq %rdi, %rax
34 jmp .L4
35 .p2align 4,,10
36 .p2align 3
37 .L63:
38 cmpb $64, %sil
39 je .L6
40 .L4:
41 movzbl 1(%rax), %esi
42 leaq 1(%rax), %rbx
43 testb %sil, %sil
44 je .L3
45 cmpb $95, %sil
46 je .L3
47 cmpb $46, %sil
48 movq %rbx, %rax
49 jne .L63
50 .L6:
51 cmpq %rbx, %rbp
52 je .L2
53 .L60:
54 xorl %ebp, %ebp
55 cmpb $46, %sil
56 je .L64
57 .L8:
58 cmpb $64, %sil
59 je .L65
60 .L15:
61 movq (%r14), %rax
62 testq %rax, %rax
63 je .L16
64 cmpb $0, (%rax)
65 jne .L16
66 andl $-5, %ebp
67 .L16:
68 movq (%r8), %rax
69 testq %rax, %rax
70 je .L1
71 cmpb $0, (%rax)
72 jne .L1
73 andl $-3, %ebp
74 .L1:
75 addq $40, %rsp
76 movl %ebp, %eax
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 .L2:
87 movq %rbp, %rdi
88 movq %r8, 8(%rsp)
89 call __GI_strlen@PLT
90 leaq 0(%rbp,%rax), %rbx
91 xorl %ebp, %ebp
92 movq 8(%rsp), %r8
93 movzbl (%rbx), %esi
94 cmpb $64, %sil
95 jne .L15
96 .L65:
97 leaq 1(%rbx), %rax
98 movb $0, (%rbx)
99 movq %rax, 0(%r13)
100 cmpb $0, 1(%rbx)
101 je .L15
102 orl $8, %ebp
103 jmp .L15
104 .p2align 4,,10
105 .p2align 3
106 .L3:
107 cmpq %rbx, %rbp
108 je .L2
109 cmpb $95, %sil
110 jne .L60
111 addq $2, %rax
112 movb $0, (%rbx)
113 movq %rax, (%r14)
114 movzbl 1(%rbx), %esi
115 movq %rax, %rbx
116 testb $-65, %sil
117 jne .L61
118 jmp .L18
119 .p2align 4,,10
120 .p2align 3
121 .L66:
122 addq $1, %rbx
123 movzbl (%rbx), %esi
124 testb $-65, %sil
125 je .L18
126 .L61:
127 cmpb $46, %sil
128 jne .L66
129 .L18:
130 cmpb $46, %sil
131 movl $4, %ebp
132 jne .L8
133 .L64:
134 leaq 1(%rbx), %rdi
135 movb $0, (%rbx)
136 movl %ebp, %r15d
137 orl $2, %r15d
138 movq %rdi, (%r8)
139 movzbl 1(%rbx), %esi
140 testb $-65, %sil
141 je .L19
142 movq %rdi, %r12
143 jmp .L12
144 .p2align 4,,10
145 .p2align 3
146 .L20:
147 movq %rbx, %r12
148 .L12:
149 testb $-65, 1(%r12)
150 leaq 1(%r12), %rbx
151 jne .L20
152 cmpq %rbx, %rdi
153 movq %r9, 8(%rsp)
154 je .L21
155 movq %rbx, %rsi
156 movq %r8, 24(%rsp)
157 subq %rdi, %rsi
158 call _nl_normalize_codeset@PLT
159 movq 8(%rsp), %r9
160 testq %rax, %rax
161 movq %rax, (%r9)
162 je .L22
163 movq 24(%rsp), %r8
164 movq %rax, %rsi
165 movq %rax, 16(%rsp)
166 movq (%r8), %rdi
167 movq %r8, 8(%rsp)
168 call __GI_strcmp
169 testl %eax, %eax
170 movq 8(%rsp), %r8
171 movq 16(%rsp), %rdx
172 je .L67
173 orl $3, %ebp
174 movzbl 1(%r12), %esi
175 jmp .L8
176 .L21:
177 movl %r15d, %ebp
178 jmp .L8
179 .L67:
180 movq %rdx, %rdi
181 movl %r15d, %ebp
182 call free@PLT
183 movzbl 1(%r12), %esi
184 movq 8(%rsp), %r8
185 jmp .L8
186 .L19:
187 movl %r15d, %ebp
188 movq %rdi, %rbx
189 jmp .L8
190 .L22:
191 orl $-1, %ebp
192 jmp .L1
193 .size _nl_explode_name, .-_nl_explode_name