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