clarify the purpose of this project
[nyanglibc.git] / nss / rewrite_field.s
blob1b5991a01647118998d268e6540c77d61f0469fd
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string ""
5 .text
6 .p2align 4,,15
7 .globl __nss_rewrite_field
8 .hidden __nss_rewrite_field
9 .type __nss_rewrite_field, @function
10 __nss_rewrite_field:
11 pushq %r13
12 pushq %r12
13 pushq %rbp
14 pushq %rbx
15 leaq .LC0(%rip), %rbp
16 subq $8, %rsp
17 testq %rdi, %rdi
18 movq $0, (%rsi)
19 je .L1
20 movq %rsi, %r13
21 leaq __nss_invalid_field_characters(%rip), %rsi
22 movq %rdi, %r12
23 movq %r12, %rbp
24 call strpbrk
25 testq %rax, %rax
26 movq %rax, %rbx
27 je .L1
28 movq %r12, %rdi
29 call __strdup
30 testq %rax, %rax
31 movq %rax, %rbp
32 movq %rax, 0(%r13)
33 je .L1
34 subq %r12, %rbx
35 leaq (%rax,%rbx), %rax
36 leaq __nss_invalid_field_characters(%rip), %rbx
37 .p2align 4,,10
38 .p2align 3
39 .L3:
40 leaq 1(%rax), %rdi
41 movb $32, (%rax)
42 movq %rbx, %rsi
43 call strpbrk
44 testq %rax, %rax
45 jne .L3
46 .L1:
47 addq $8, %rsp
48 movq %rbp, %rax
49 popq %rbx
50 popq %rbp
51 popq %r12
52 popq %r13
53 ret
54 .size __nss_rewrite_field, .-__nss_rewrite_field
55 .hidden __strdup
56 .hidden strpbrk
57 .hidden __nss_invalid_field_characters