clarify the purpose of this project
[nyanglibc.git] / grp / getgrnam_r.s
blobde159d8689e991f6e1211e16b654115826cbaa43
1 .text
2 #APP
3 .section .gnu.warning.getgrnam_r
4 .previous
5 .section .rodata.str1.1,"aMS",@progbits,1
6 .LC0:
7 .string "getgrnam_r"
8 #NO_APP
9 .text
10 .p2align 4,,15
11 .globl __getgrnam_r
12 .hidden __getgrnam_r
13 .type __getgrnam_r, @function
14 __getgrnam_r:
15 .LFB70:
16 pushq %r15
17 pushq %r14
18 pushq %r13
19 pushq %r12
20 movq %rcx, %r12
21 pushq %rbp
22 pushq %rbx
23 movq %rsi, %rbp
24 leaq .LC0(%rip), %rsi
25 movq %rdx, %r13
26 xorl %edx, %edx
27 subq $152, %rsp
28 leaq 88(%rsp), %rax
29 leaq 104(%rsp), %rcx
30 movq %rdi, 8(%rsp)
31 movq %r8, 72(%rsp)
32 movq $0, 96(%rsp)
33 movq %rax, %rdi
34 movq %rcx, 24(%rsp)
35 movq %rax, 32(%rsp)
36 call __nss_group_lookup2
37 testl %eax, %eax
38 movl %eax, 60(%rsp)
39 jne .L2
40 movq __libc_errno@gottpoff(%rip), %r15
41 xorl %ebx, %ebx
42 movq $0, 40(%rsp)
43 movq %r15, %rax
44 addq %fs:0, %rax
45 movq %rax, 16(%rsp)
46 leaq 96(%rsp), %rax
47 movq %rax, 64(%rsp)
48 leaq 112(%rsp), %rax
49 movq %rax, 48(%rsp)
50 .p2align 4,,10
51 .p2align 3
52 .L12:
53 movq 104(%rsp), %rdi
54 call _dl_mcount_wrapper_check
55 movq 16(%rsp), %r8
56 movq %r12, %rcx
57 movq %r13, %rdx
58 movq %rbp, %rsi
59 movq 8(%rsp), %rdi
60 call *104(%rsp)
61 cmpl $-2, %eax
62 movl %eax, %r14d
63 je .L44
64 testl %ebx, %ebx
65 je .L6
66 cmpl $1, %eax
67 jne .L7
68 movq 96(%rsp), %rdx
69 movq 40(%rsp), %rsi
70 movq %r13, %r9
71 movq 48(%rsp), %rdi
72 movq %rbp, %r8
73 movq %r12, %rcx
74 call __merge_grp
75 testl %eax, %eax
76 movl %eax, %ebx
77 je .L8
78 cmpl $34, %eax
79 movl %eax, %fs:(%r15)
80 movl $0, %ebx
81 movl $-1, %r14d
82 jne .L9
83 movl $-2, %r14d
84 .p2align 4,,10
85 .p2align 3
86 .L9:
87 movq 24(%rsp), %rcx
88 movq 32(%rsp), %rdi
89 leaq .LC0(%rip), %rsi
90 xorl %r9d, %r9d
91 xorl %edx, %edx
92 movl %r14d, %r8d
93 call __nss_next2
94 testl %eax, %eax
95 je .L12
96 movq 40(%rsp), %rdi
97 call free@PLT
98 cmpl $1, %r14d
99 movq 72(%rsp), %rax
100 jne .L45
101 movq %rbp, (%rax)
102 .L14:
103 movl 60(%rsp), %eax
104 movl %eax, %fs:(%r15)
105 .L1:
106 movl 60(%rsp), %eax
107 addq $152, %rsp
108 popq %rbx
109 popq %rbp
110 popq %r12
111 popq %r13
112 popq %r14
113 popq %r15
115 .p2align 4,,10
116 .p2align 3
117 .L44:
118 cmpl $34, %fs:(%r15)
119 je .L46
120 testl %ebx, %ebx
121 je .L9
122 .L7:
123 pushq 136(%rsp)
124 pushq 136(%rsp)
125 xorl %ecx, %ecx
126 pushq 136(%rsp)
127 pushq 136(%rsp)
128 movq %r13, %rdx
129 movq %rbp, %rsi
130 movq %r12, %rdi
131 movl $1, %ebx
132 call __copy_grp
133 addq $32, %rsp
134 testl %eax, %eax
135 je .L8
136 movl %eax, %fs:(%r15)
137 .L8:
138 movq 88(%rsp), %rax
139 movl $1, %r14d
140 movl 8(%rax), %eax
141 shrl $6, %eax
142 andl $3, %eax
143 cmpl $2, %eax
144 jne .L9
145 .L16:
146 cmpq $0, 40(%rsp)
147 je .L47
148 .L10:
149 pushq 24(%rbp)
150 pushq 16(%rbp)
151 movq %r12, %rdi
152 pushq 8(%rbp)
153 pushq 0(%rbp)
154 movq 96(%rsp), %rcx
155 movq 72(%rsp), %rdx
156 movq 80(%rsp), %rsi
157 call __copy_grp
158 addq $32, %rsp
159 testl %eax, %eax
160 je .L19
161 xorl %r14d, %r14d
162 cmpl $34, %eax
163 movl %eax, %fs:(%r15)
164 setne %r14b
165 movl $1, %ebx
166 subl $2, %r14d
167 jmp .L9
168 .p2align 4,,10
169 .p2align 3
170 .L6:
171 leal 4(%rax,%rax), %ecx
172 movq 88(%rsp), %rax
173 movl 8(%rax), %eax
174 shrl %cl, %eax
175 andl $3, %eax
176 cmpl $2, %eax
177 jne .L9
178 cmpl $1, %r14d
179 jne .L9
180 jmp .L16
181 .p2align 4,,10
182 .p2align 3
183 .L19:
184 movl $1, %r14d
185 movl $1, %ebx
186 jmp .L9
187 .p2align 4,,10
188 .p2align 3
189 .L47:
190 movq %r12, %rdi
191 call malloc@PLT
192 testq %rax, %rax
193 movq %rax, 40(%rsp)
194 jne .L10
195 movq 72(%rsp), %rax
196 movl $12, %fs:(%r15)
197 movl $12, 60(%rsp)
198 movq $0, (%rax)
199 jmp .L1
200 .p2align 4,,10
201 .p2align 3
202 .L45:
203 movq $0, (%rax)
204 jbe .L14
205 movl %fs:(%r15), %eax
206 cmpl $34, %eax
207 movl %eax, 60(%rsp)
208 jne .L1
209 cmpl $-2, %r14d
210 je .L1
211 .L21:
212 movl $22, 60(%rsp)
213 jmp .L14
214 .p2align 4,,10
215 .p2align 3
216 .L46:
217 movq 40(%rsp), %rdi
218 call free@PLT
219 movq 72(%rsp), %rax
220 movl $34, 60(%rsp)
221 movq $0, (%rax)
222 jmp .L1
223 .L2:
224 movq 72(%rsp), %rax
225 movq __libc_errno@gottpoff(%rip), %r15
226 movq $0, (%rax)
227 movl %fs:(%r15), %eax
228 cmpl $34, %eax
229 movl %eax, 60(%rsp)
230 jne .L1
231 jmp .L21
232 .LFE70:
233 .size __getgrnam_r, .-__getgrnam_r
234 .globl __new_getgrnam_r
235 .set __new_getgrnam_r,__getgrnam_r
236 .weak getgrnam_r
237 .set getgrnam_r,__new_getgrnam_r
238 .section .gnu.warning.getgrnam_r
239 #,"a",@progbits
240 .align 32
241 .type __evoke_link_warning_getgrnam_r, @object
242 .size __evoke_link_warning_getgrnam_r, 134
243 __evoke_link_warning_getgrnam_r:
244 .string "Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
245 .hidden __copy_grp
246 .hidden __nss_next2
247 .hidden __merge_grp
248 .hidden _dl_mcount_wrapper_check
249 .hidden __nss_group_lookup2