clarify the purpose of this project
[nyanglibc.git] / stdlib / grouping.shared.s
blob039ad59e82e299283b33522f12bff2202dadcd76
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 __correctly_grouped_prefixmb
9 .hidden __correctly_grouped_prefixmb
10 .type __correctly_grouped_prefixmb, @function
11 __correctly_grouped_prefixmb:
12 pushq %r15
13 pushq %r14
14 pushq %r13
15 pushq %r12
16 pushq %rbp
17 pushq %rbx
18 movq %rsi, %rbp
19 subq $40, %rsp
20 testq %rcx, %rcx
21 movq %rcx, 16(%rsp)
22 je .L36
23 movq %rdi, %r15
24 movq %rdx, %rdi
25 movq %rdx, 24(%rsp)
26 call __GI_strlen
27 cmpq %r15, %rbp
28 jbe .L3
29 leaq -3(%rax), %rbx
30 movq 24(%rsp), %rdx
31 leaq -1(%r15), %rsi
32 leaq -2(%rax), %r12
33 movq %rbx, 8(%rsp)
34 .p2align 4,,10
35 .p2align 3
36 .L26:
37 leaq -1(%rbp), %r9
38 cmpq %r9, %r15
39 ja .L36
40 movzbl (%rdx), %ebx
41 jmp .L8
42 .p2align 4,,10
43 .p2align 3
44 .L4:
45 subq $1, %r9
46 cmpq %rsi, %r9
47 je .L36
48 .L8:
49 movzbl -1(%r9,%rax), %r11d
50 cmpb %bl, %r11b
51 jne .L4
52 movzbl 1(%rdx), %ecx
53 testb %cl, %cl
54 je .L5
55 cmpb %cl, -2(%r9,%rax)
56 jne .L4
57 movq 8(%rsp), %rdi
58 leaq 2(%rdx), %rcx
59 leaq (%r9,%rdi), %r8
60 jmp .L6
61 .p2align 4,,10
62 .p2align 3
63 .L7:
64 movzbl (%r8), %r10d
65 addq $1, %rcx
66 subq $1, %r8
67 cmpb %dil, %r10b
68 jne .L4
69 .L6:
70 movzbl (%rcx), %edi
71 testb %dil, %dil
72 jne .L7
73 .L5:
74 cmpq %r9, %r15
75 ja .L36
76 movq 16(%rsp), %rbx
77 movq %rbp, %r8
78 subq %r9, %r8
79 movsbq (%rbx), %rcx
80 movq %rcx, %rdi
81 addl $1, %ecx
82 movslq %ecx, %rcx
83 cmpq %rcx, %r8
84 je .L63
85 leaq 1(%r9,%rdi), %rbp
86 cmovle %r9, %rbp
87 .L25:
88 cmpq %r15, %rbp
89 ja .L26
90 .L3:
91 cmpq %r15, %rbp
92 cmovb %r15, %rbp
93 .L36:
94 addq $40, %rsp
95 movq %rbp, %rax
96 popq %rbx
97 popq %rbp
98 popq %r12
99 popq %r13
100 popq %r14
101 popq %r15
103 .L63:
104 movq %rbx, %r14
105 leaq -1(%r9), %r13
106 movsbq 1(%r14), %rbx
107 movq %r13, 24(%rsp)
108 testb %bl, %bl
109 je .L11
110 .p2align 4,,10
111 .p2align 3
112 .L64:
113 addq $1, %r14
114 cmpb $127, %bl
115 movq %r13, %r10
116 je .L13
117 .L65:
118 testb %bl, %bl
119 js .L13
120 cmpq %r13, %r15
121 ja .L36
122 movq %r13, %r9
123 .p2align 4,,10
124 .p2align 3
125 .L28:
126 testb %r11b, %r11b
127 je .L22
128 cmpb -1(%r9,%rax), %r11b
129 jne .L20
130 leaq 1(%rdx), %rcx
131 leaq (%r9,%r12), %r8
132 jmp .L23
133 .p2align 4,,10
134 .p2align 3
135 .L21:
136 movzbl (%r8), %r10d
137 addq $1, %rcx
138 subq $1, %r8
139 cmpb %dil, %r10b
140 jne .L20
141 .L23:
142 movzbl (%rcx), %edi
143 testb %dil, %dil
144 jne .L21
145 .L22:
146 subq %r9, %r13
147 cmpq %r9, %r15
148 ja .L29
149 cmpq %rbx, %r13
150 jne .L30
151 .L19:
152 movsbq 1(%r14), %rbx
153 leaq -1(%r9), %r13
154 testb %bl, %bl
155 jne .L64
156 .L11:
157 movsbq (%r14), %rbx
158 movq %r13, %r10
159 cmpb $127, %bl
160 jne .L65
161 .L13:
162 cmpq %r13, %r15
163 ja .L36
164 .p2align 4,,10
165 .p2align 3
166 .L27:
167 testb %r11b, %r11b
168 je .L17
169 cmpb -1(%r10,%rax), %r11b
170 jne .L15
171 leaq 1(%rdx), %rcx
172 leaq (%r10,%r12), %r8
173 jmp .L18
174 .p2align 4,,10
175 .p2align 3
176 .L16:
177 movzbl (%r8), %r9d
178 addq $1, %rcx
179 subq $1, %r8
180 cmpb %dil, %r9b
181 jne .L15
182 .L18:
183 movzbl (%rcx), %edi
184 testb %dil, %dil
185 jne .L16
186 .L17:
187 cmpq %r10, %r15
188 ja .L36
189 movq %r10, %r9
190 jmp .L19
191 .p2align 4,,10
192 .p2align 3
193 .L20:
194 subq $1, %r9
195 cmpq %rsi, %r9
196 jne .L28
197 subq %rsi, %r13
198 .L29:
199 cmpq %r13, %rbx
200 jge .L36
201 .L30:
202 movq 24(%rsp), %rbp
203 jmp .L25
204 .p2align 4,,10
205 .p2align 3
206 .L15:
207 subq $1, %r10
208 cmpq %rsi, %r10
209 jne .L27
210 jmp .L36
211 .size __correctly_grouped_prefixmb, .-__correctly_grouped_prefixmb