clarify the purpose of this project
[nyanglibc.git] / inet / gethstbynm2_r.shared.s
blob4a1fecf98595867e4405d14c34d28695f45f0e49
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __new_gethostbyname2_r,gethostbyname2_r@@GLIBC_2.2.5
7 .section .rodata.str1.1,"aMS",@progbits,1
8 .LC0:
9 .string "gethostbyname2_r"
10 #NO_APP
11 .text
12 .p2align 4,,15
13 .globl __gethostbyname2_r
14 .hidden __gethostbyname2_r
15 .type __gethostbyname2_r, @function
16 __gethostbyname2_r:
17 .LFB86:
18 pushq %r15
19 pushq %r14
20 movl %esi, %r15d
21 pushq %r13
22 pushq %r12
23 movq %rdi, %r14
24 pushq %rbp
25 pushq %rbx
26 movq %rdx, %r12
27 movq %r8, %r13
28 movq %r9, %rbp
29 subq $104, %rsp
30 movq %rcx, 56(%rsp)
31 movq %r9, 32(%rsp)
32 movq 160(%rsp), %rbx
33 movl $-1, 76(%rsp)
34 call __GI___resolv_context_get
35 testq %rax, %rax
36 movq %rax, 40(%rsp)
37 je .L43
38 leaq 56(%rsp), %rdx
39 subq $8, %rsp
40 xorl %ecx, %ecx
41 pushq %rbx
42 pushq %r15
43 movq %r13, %r8
44 movq %r12, %rsi
45 movq %r14, %rdi
46 leaq 100(%rsp), %rax
47 pushq %rax
48 movq 64(%rsp), %r9
49 call __GI___nss_hostname_digits_dots
50 addq $32, %rsp
51 cmpl $-1, %eax
52 je .L5
53 cmpl $1, %eax
54 je .L44
55 leaq 80(%rsp), %rax
56 leaq 88(%rsp), %rcx
57 leaq .LC0(%rip), %rsi
58 xorl %edx, %edx
59 movq %rax, %rdi
60 movq %rcx, 24(%rsp)
61 movq %rax, 16(%rsp)
62 call __GI___nss_hosts_lookup2
63 testl %eax, %eax
64 jne .L9
65 movq __libc_errno@gottpoff(%rip), %rax
66 xorl %ebp, %ebp
67 movq $0, 48(%rsp)
68 movq %rax, (%rsp)
69 addq %fs:0, %rax
70 movq %rax, 8(%rsp)
71 jmp .L18
72 .p2align 4,,10
73 .p2align 3
74 .L10:
75 testl %ebp, %ebp
76 jne .L13
77 cmpl $1, %r8d
78 leal 4(%r8,%r8), %ecx
79 sete %dl
80 .L14:
81 movq 80(%rsp), %rax
82 movl 8(%rax), %eax
83 shrl %cl, %eax
84 andl $3, %eax
85 cmpl $2, %eax
86 jne .L16
87 testb %dl, %dl
88 jne .L45
89 .L16:
90 movq 24(%rsp), %rcx
91 movq 16(%rsp), %rdi
92 leaq .LC0(%rip), %rsi
93 xorl %r9d, %r9d
94 xorl %edx, %edx
95 call __GI___nss_next2
96 testl %eax, %eax
97 jne .L46
98 .L18:
99 movq 88(%rsp), %rdi
100 call __GI__dl_mcount_wrapper_check
101 subq $8, %rsp
102 movq %r13, %r8
103 movq %r12, %rdx
104 pushq %rbx
105 movl %r15d, %esi
106 movq 24(%rsp), %r9
107 movq 72(%rsp), %rcx
108 movq %r14, %rdi
109 call *104(%rsp)
110 movl %eax, %r8d
111 movl %eax, 92(%rsp)
112 cmpl $-2, %r8d
113 popq %rax
114 popq %rdx
115 jne .L10
116 cmpl $-1, (%rbx)
117 je .L47
118 .L11:
119 testl %ebp, %ebp
120 je .L16
121 .L15:
122 movq (%rsp), %rax
123 movl $1, 76(%rsp)
124 movl $1, %edx
125 movl $6, %ecx
126 movl $1, %r8d
127 movl $1, %ebp
128 movl $22, %fs:(%rax)
129 jmp .L14
130 .p2align 4,,10
131 .p2align 3
132 .L43:
133 movq __libc_errno@gottpoff(%rip), %rax
134 movl $-1, (%rbx)
135 movq $0, 0(%rbp)
136 movl %fs:(%rax), %eax
137 .L1:
138 addq $104, %rsp
139 popq %rbx
140 popq %rbp
141 popq %r12
142 popq %r13
143 popq %r14
144 popq %r15
146 .p2align 4,,10
147 .p2align 3
148 .L44:
149 cmpl $1, 76(%rsp)
150 je .L48
151 movq 32(%rsp), %rax
152 movq $0, (%rax)
153 movq __libc_errno@gottpoff(%rip), %rax
154 movq %rax, (%rsp)
155 .L8:
156 movq 40(%rsp), %rdi
157 call __GI___resolv_context_put
158 movl 76(%rsp), %edx
159 cmpl $1, %edx
160 jbe .L25
161 movq (%rsp), %rax
162 movl %fs:(%rax), %eax
163 cmpl $34, %eax
164 je .L49
165 cmpl $-2, %edx
166 jne .L1
167 .L24:
168 cmpl $-1, (%rbx)
169 je .L1
170 movl $11, %eax
171 .L22:
172 movq (%rsp), %rbx
173 movl %eax, %fs:(%rbx)
174 addq $104, %rsp
175 popq %rbx
176 popq %rbp
177 popq %r12
178 popq %r13
179 popq %r14
180 popq %r15
182 .p2align 4,,10
183 .p2align 3
184 .L5:
185 movq 40(%rsp), %rdi
186 call __GI___resolv_context_put
187 movq __libc_errno@gottpoff(%rip), %rax
188 movl %fs:(%rax), %eax
189 addq $104, %rsp
190 popq %rbx
191 popq %rbp
192 popq %r12
193 popq %r13
194 popq %r14
195 popq %r15
197 .p2align 4,,10
198 .p2align 3
199 .L13:
200 cmpl $1, %r8d
201 jne .L15
202 movq (%rsp), %rax
203 movl $-1, 76(%rsp)
204 xorl %ebp, %ebp
205 movl $-1, %r8d
206 movl $22, %fs:(%rax)
207 jmp .L16
208 .p2align 4,,10
209 .p2align 3
210 .L45:
211 cmpq $0, 48(%rsp)
212 je .L50
213 .L17:
214 movq (%rsp), %rax
215 movl $-1, 76(%rsp)
216 movl $-1, %r8d
217 movl $1, %ebp
218 movl $22, %fs:(%rax)
219 jmp .L16
220 .p2align 4,,10
221 .p2align 3
222 .L47:
223 movq (%rsp), %rax
224 cmpl $34, %fs:(%rax)
225 jne .L11
226 movq 48(%rsp), %rdi
227 call free@PLT
228 movq 32(%rsp), %rax
229 movq $0, (%rax)
230 jmp .L8
231 .p2align 4,,10
232 .p2align 3
233 .L46:
234 movl 76(%rsp), %r13d
235 movl $1, %ebp
236 .L19:
237 movq 48(%rsp), %rdi
238 call free@PLT
239 cmpl $1, %r13d
240 je .L7
241 movq 32(%rsp), %rax
242 cmpl $-1, %r13d
243 movq $0, (%rax)
244 jne .L20
245 testb %bpl, %bpl
246 jne .L8
247 movq (%rsp), %rax
248 cmpl $2, %fs:(%rax)
249 je .L21
250 movl %r13d, (%rbx)
251 jmp .L8
252 .p2align 4,,10
253 .p2align 3
254 .L20:
255 testb %bpl, %bpl
256 jne .L8
257 .L21:
258 movl $3, (%rbx)
259 jmp .L8
260 .p2align 4,,10
261 .p2align 3
262 .L25:
263 xorl %eax, %eax
264 jmp .L22
265 .p2align 4,,10
266 .p2align 3
267 .L48:
268 movq __libc_errno@gottpoff(%rip), %rax
269 movq %rax, (%rsp)
270 .L7:
271 movq 32(%rsp), %rax
272 movq %r12, %rdi
273 movq %r12, (%rax)
274 call _res_hconf_reorder_addrs@PLT
275 jmp .L8
276 .p2align 4,,10
277 .p2align 3
278 .L50:
279 movq %r13, %rdi
280 call malloc@PLT
281 testq %rax, %rax
282 movq %rax, 48(%rsp)
283 jne .L17
284 movq (%rsp), %rax
285 movl $-1, 76(%rsp)
286 movl $12, %fs:(%rax)
287 movq 32(%rsp), %rax
288 movq $0, (%rax)
289 jmp .L8
290 .p2align 4,,10
291 .p2align 3
292 .L49:
293 cmpl $-2, %edx
294 je .L24
295 movl $22, %eax
296 jmp .L22
297 .L9:
298 movq __libc_errno@gottpoff(%rip), %rax
299 movl 76(%rsp), %r13d
300 xorl %ebp, %ebp
301 movq $0, 48(%rsp)
302 movq %rax, (%rsp)
303 jmp .L19
304 .LFE86:
305 .size __gethostbyname2_r, .-__gethostbyname2_r
306 .globl __new_gethostbyname2_r
307 .set __new_gethostbyname2_r,__gethostbyname2_r