Some broken software wants to deal with ld.so.cache.
[nyanglibc.git] / pwd / getpwuid_r.s
blob68246edd2b8cb2a533c29082db767335404513d6
1 .text
2 #APP
3 .section .gnu.warning.getpwuid_r
4 .previous
5 .section .rodata.str1.1,"aMS",@progbits,1
6 .LC0:
7 .string "getpwuid_r"
8 #NO_APP
9 .text
10 .p2align 4,,15
11 .globl __getpwuid_r
12 .hidden __getpwuid_r
13 .type __getpwuid_r, @function
14 __getpwuid_r:
15 pushq %r15
16 pushq %r14
17 pushq %r13
18 pushq %r12
19 pushq %rbp
20 pushq %rbx
21 subq $72, %rsp
22 leaq 56(%rsp), %r13
23 leaq 48(%rsp), %r12
24 movq %rsi, 8(%rsp)
25 leaq .LC0(%rip), %rsi
26 movl %edi, 32(%rsp)
27 movq %rdx, 16(%rsp)
28 movq %rcx, (%rsp)
29 xorl %edx, %edx
30 movq %r13, %rcx
31 movq %r12, %rdi
32 movq %r8, 40(%rsp)
33 call __nss_passwd_lookup2
34 testl %eax, %eax
35 movl %eax, 36(%rsp)
36 jne .L2
37 xorl %ebp, %ebp
38 movq $0, 24(%rsp)
39 movq %fs:0, %r15
40 movq __libc_errno@gottpoff(%rip), %rbx
41 jmp .L13
42 .p2align 4,,10
43 .p2align 3
44 .L3:
45 testl %ebp, %ebp
46 je .L6
47 cmpl $1, %eax
48 jne .L7
49 movl $22, %fs:(%rbx)
50 xorl %ebp, %ebp
51 movl $-1, %r14d
52 .p2align 4,,10
53 .p2align 3
54 .L8:
55 leaq .LC0(%rip), %rsi
56 xorl %r9d, %r9d
57 xorl %edx, %edx
58 movl %r14d, %r8d
59 movq %r13, %rcx
60 movq %r12, %rdi
61 call __nss_next2
62 testl %eax, %eax
63 jne .L35
64 .L13:
65 movq 56(%rsp), %rdi
66 call _dl_mcount_wrapper_check
67 leaq (%r15,%rbx), %r8
68 movq (%rsp), %rcx
69 movq 16(%rsp), %rdx
70 movq 8(%rsp), %rsi
71 movl 32(%rsp), %edi
72 call *56(%rsp)
73 cmpl $-2, %eax
74 movl %eax, %r14d
75 jne .L3
76 cmpl $34, %fs:(%rbx)
77 je .L36
78 testl %ebp, %ebp
79 je .L6
80 .L7:
81 movq 48(%rsp), %rax
82 movl $22, %fs:(%rbx)
83 movl 8(%rax), %eax
84 shrl $6, %eax
85 andl $3, %eax
86 cmpl $2, %eax
87 jne .L17
88 .L11:
89 cmpq $0, 24(%rsp)
90 je .L37
91 .L10:
92 movl $22, %fs:(%rbx)
93 movl $-1, %r14d
94 movl $1, %ebp
95 jmp .L8
96 .p2align 4,,10
97 .p2align 3
98 .L6:
99 movq 48(%rsp), %rax
100 leal 4(%r14,%r14), %ecx
101 movl 8(%rax), %eax
102 shrl %cl, %eax
103 andl $3, %eax
104 cmpl $2, %eax
105 jne .L18
106 cmpl $1, %r14d
107 je .L11
108 .L18:
109 xorl %ebp, %ebp
110 jmp .L8
111 .p2align 4,,10
112 .p2align 3
113 .L17:
114 movl $1, %r14d
115 movl $1, %ebp
116 jmp .L8
117 .p2align 4,,10
118 .p2align 3
119 .L35:
120 movq 24(%rsp), %rdi
121 call free@PLT
122 cmpl $1, %r14d
123 movq 40(%rsp), %rax
124 je .L16
125 movq $0, (%rax)
126 jbe .L15
127 movl %fs:(%rbx), %eax
128 cmpl $34, %eax
129 movl %eax, 36(%rsp)
130 je .L38
131 .L1:
132 movl 36(%rsp), %eax
133 addq $72, %rsp
134 popq %rbx
135 popq %rbp
136 popq %r12
137 popq %r13
138 popq %r14
139 popq %r15
141 .p2align 4,,10
142 .p2align 3
143 .L16:
144 movq 8(%rsp), %rdx
145 movq %rdx, (%rax)
146 .L15:
147 movl 36(%rsp), %eax
148 movl %eax, %fs:(%rbx)
149 jmp .L1
150 .p2align 4,,10
151 .p2align 3
152 .L37:
153 movq (%rsp), %rdi
154 call malloc@PLT
155 testq %rax, %rax
156 movq %rax, 24(%rsp)
157 jne .L10
158 movq 40(%rsp), %rax
159 movl $12, %fs:(%rbx)
160 movl $12, 36(%rsp)
161 movq $0, (%rax)
162 jmp .L1
163 .p2align 4,,10
164 .p2align 3
165 .L36:
166 movq 24(%rsp), %rdi
167 call free@PLT
168 movq 40(%rsp), %rax
169 movl $34, 36(%rsp)
170 movq $0, (%rax)
171 jmp .L1
172 .L38:
173 cmpl $-2, %r14d
174 je .L1
175 .L19:
176 movl $22, 36(%rsp)
177 jmp .L15
178 .L2:
179 movq 40(%rsp), %rax
180 movq __libc_errno@gottpoff(%rip), %rbx
181 movq $0, (%rax)
182 movl %fs:(%rbx), %eax
183 cmpl $34, %eax
184 movl %eax, 36(%rsp)
185 jne .L1
186 jmp .L19
187 .size __getpwuid_r, .-__getpwuid_r
188 .globl __new_getpwuid_r
189 .set __new_getpwuid_r,__getpwuid_r
190 .weak getpwuid_r
191 .set getpwuid_r,__new_getpwuid_r
192 .section .gnu.warning.getpwuid_r
193 #,"a",@progbits
194 .align 32
195 .type __evoke_link_warning_getpwuid_r, @object
196 .size __evoke_link_warning_getpwuid_r, 134
197 __evoke_link_warning_getpwuid_r:
198 .string "Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
199 .hidden _dl_mcount_wrapper_check
200 .hidden __nss_next2
201 .hidden __nss_passwd_lookup2