clarify the purpose of this project
[nyanglibc.git] / resolv / resolv_context.shared.s
blobe3def9e7588651431bcdb618ff85505722c59f4a
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section .rodata.str1.1,"aMS",@progbits,1
7 .LC0:
8 .string "resolv_context.c"
9 .LC1:
10 .string "current->__from_res"
11 .LC2:
12 .string "current->__refcount > 0"
13 #NO_APP
14 .text
15 .p2align 4,,15
16 .type context_reuse, @function
17 context_reuse:
18 subq $8, %rsp
19 movq current@gottpoff(%rip), %rax
20 movq %fs:(%rax), %rax
21 cmpb $0, 24(%rax)
22 je .L6
23 addq $1, 16(%rax)
24 je .L7
25 addq $8, %rsp
26 ret
27 .L6:
28 leaq __PRETTY_FUNCTION__.6947(%rip), %rcx
29 leaq .LC0(%rip), %rsi
30 leaq .LC1(%rip), %rdi
31 movl $162, %edx
32 call __GI___assert_fail
33 .L7:
34 leaq __PRETTY_FUNCTION__.6947(%rip), %rcx
35 leaq .LC0(%rip), %rsi
36 leaq .LC2(%rip), %rdi
37 movl $168, %edx
38 call __GI___assert_fail
39 .size context_reuse, .-context_reuse
40 .p2align 4,,15
41 .type context_alloc, @function
42 context_alloc:
43 pushq %rbp
44 pushq %rbx
45 movq %rdi, %rbp
46 movl $40, %edi
47 subq $8, %rsp
48 call malloc@PLT
49 testq %rax, %rax
50 movq %rax, %rbx
51 je .L8
52 movq %rbp, (%rax)
53 movq %rbp, %rdi
54 call __resolv_conf_get
55 movq %rax, 8(%rbx)
56 movq current@gottpoff(%rip), %rax
57 movq $1, 16(%rbx)
58 movb $1, 24(%rbx)
59 movq %fs:(%rax), %rdx
60 movq %rbx, %fs:(%rax)
61 movq %rdx, 32(%rbx)
62 .L8:
63 addq $8, %rsp
64 movq %rbx, %rax
65 popq %rbx
66 popq %rbp
67 ret
68 .size context_alloc, .-context_alloc
69 .p2align 4,,15
70 .type context_free, @function
71 context_free:
72 pushq %r12
73 pushq %rbp
74 movq __libc_errno@gottpoff(%rip), %rbp
75 pushq %rbx
76 movq %rdi, %rbx
77 movq 32(%rdi), %rdx
78 movq current@gottpoff(%rip), %rax
79 movq 8(%rdi), %rdi
80 movl %fs:0(%rbp), %r12d
81 movq %rdx, %fs:(%rax)
82 call __resolv_conf_put
83 movq %rbx, %rdi
84 call free@PLT
85 movl %r12d, %fs:0(%rbp)
86 popq %rbx
87 popq %rbp
88 popq %r12
89 ret
90 .size context_free, .-context_free
91 .section .rodata.str1.1
92 .LC3:
93 .string "ctx->conf == NULL"
94 .text
95 .p2align 4,,15
96 .type context_get.part.1, @function
97 context_get.part.1:
98 pushq %rbp
99 pushq %rbx
100 movl %edi, %ebp
101 subq $24, %rsp
102 movq __libc_resp@gottpoff(%rip), %rax
103 movq %fs:(%rax), %rdi
104 call context_alloc
105 testq %rax, %rax
106 movq %rax, %rbx
107 je .L16
108 movq (%rax), %rdi
109 movq 8(%rdi), %rax
110 testb $1, %al
111 jne .L44
112 cmpq $0, 8(%rbx)
113 jne .L45
114 testb %bpl, %bpl
115 je .L24
116 movl (%rdi), %edx
117 testl %edx, %edx
118 jne .L25
119 movl $5, (%rdi)
120 .L25:
121 movl 4(%rdi), %eax
122 testl %eax, %eax
123 jne .L26
124 movl $2, 4(%rdi)
125 .L26:
126 cmpw $0, 68(%rdi)
127 movq $704, 8(%rdi)
128 je .L46
129 .L24:
130 movzbl %bpl, %esi
131 call __res_vinit
132 testl %eax, %eax
133 js .L28
134 movq (%rbx), %rdi
135 call __resolv_conf_get
136 movq %rax, 8(%rbx)
137 .L16:
138 addq $24, %rsp
139 movq %rbx, %rax
140 popq %rbx
141 popq %rbp
143 .p2align 4,,10
144 .p2align 3
145 .L44:
146 testl $33554432, %eax
147 jne .L16
148 movq 8(%rbx), %rdx
149 testq %rdx, %rdx
150 je .L16
151 movl 56(%rdx), %ecx
152 cmpq %rcx, %rax
153 jne .L16
154 movl 60(%rdx), %eax
155 cmpl %eax, (%rdi)
156 jne .L16
157 movl 64(%rdx), %eax
158 cmpl %eax, 4(%rdi)
159 jne .L16
160 movzbl 392(%rdi), %eax
161 andl $15, %eax
162 cmpl 68(%rdx), %eax
163 jne .L16
164 movq %rdi, 8(%rsp)
165 call __resolv_conf_get_current
166 testq %rax, %rax
167 movq %rax, %rbp
168 movq 8(%rsp), %rdi
169 je .L28
170 cmpq 8(%rbx), %rbp
171 je .L20
172 movl 16(%rdi), %ecx
173 testl %ecx, %ecx
174 jle .L21
175 movl $1, %esi
176 call __GI___res_iclose
177 .L21:
178 movq (%rbx), %rdi
179 movq %rbp, %rsi
180 call __resolv_conf_attach
181 testb %al, %al
182 je .L16
183 movq 8(%rbx), %rdi
184 call __resolv_conf_put
185 movq %rbp, 8(%rbx)
186 jmp .L16
187 .p2align 4,,10
188 .p2align 3
189 .L28:
190 movq %rbx, %rdi
191 xorl %ebx, %ebx
192 call context_free
193 addq $24, %rsp
194 movq %rbx, %rax
195 popq %rbx
196 popq %rbp
198 .p2align 4,,10
199 .p2align 3
200 .L46:
201 movq %rdi, 8(%rsp)
202 call __GI___res_randomid
203 movq 8(%rsp), %rdi
204 movw %ax, 68(%rdi)
205 jmp .L24
206 .L20:
207 movq %rbp, %rdi
208 call __resolv_conf_put
209 jmp .L16
210 .L45:
211 leaq __PRETTY_FUNCTION__.6935(%rip), %rcx
212 leaq .LC0(%rip), %rsi
213 leaq .LC3(%rip), %rdi
214 movl $110, %edx
215 call __GI___assert_fail
216 .size context_get.part.1, .-context_get.part.1
217 .p2align 4,,15
218 .globl __GI___resolv_context_get
219 .hidden __GI___resolv_context_get
220 .type __GI___resolv_context_get, @function
221 __GI___resolv_context_get:
222 movq current@gottpoff(%rip), %rax
223 cmpq $0, %fs:(%rax)
224 je .L48
225 jmp context_reuse
226 .p2align 4,,10
227 .p2align 3
228 .L48:
229 xorl %edi, %edi
230 jmp context_get.part.1
231 .size __GI___resolv_context_get, .-__GI___resolv_context_get
232 .globl __resolv_context_get
233 .set __resolv_context_get,__GI___resolv_context_get
234 .p2align 4,,15
235 .globl __GI___resolv_context_get_preinit
236 .hidden __GI___resolv_context_get_preinit
237 .type __GI___resolv_context_get_preinit, @function
238 __GI___resolv_context_get_preinit:
239 movq current@gottpoff(%rip), %rax
240 cmpq $0, %fs:(%rax)
241 je .L50
242 jmp context_reuse
243 .p2align 4,,10
244 .p2align 3
245 .L50:
246 movl $1, %edi
247 jmp context_get.part.1
248 .size __GI___resolv_context_get_preinit, .-__GI___resolv_context_get_preinit
249 .globl __resolv_context_get_preinit
250 .set __resolv_context_get_preinit,__GI___resolv_context_get_preinit
251 .p2align 4,,15
252 .globl __GI___resolv_context_get_override
253 .hidden __GI___resolv_context_get_override
254 .type __GI___resolv_context_get_override, @function
255 __GI___resolv_context_get_override:
256 subq $8, %rsp
257 call context_alloc
258 testq %rax, %rax
259 je .L51
260 movb $0, 24(%rax)
261 .L51:
262 addq $8, %rsp
264 .size __GI___resolv_context_get_override, .-__GI___resolv_context_get_override
265 .globl __resolv_context_get_override
266 .set __resolv_context_get_override,__GI___resolv_context_get_override
267 .section .rodata.str1.1
268 .LC4:
269 .string "current == ctx"
270 .LC5:
271 .string "ctx->__refcount > 0"
272 .text
273 .p2align 4,,15
274 .globl __GI___resolv_context_put
275 .hidden __GI___resolv_context_put
276 .type __GI___resolv_context_put, @function
277 __GI___resolv_context_put:
278 testq %rdi, %rdi
279 je .L66
280 subq $8, %rsp
281 movq current@gottpoff(%rip), %rax
282 cmpq %rdi, %fs:(%rax)
283 jne .L69
284 movq 16(%rdi), %rax
285 testq %rax, %rax
286 je .L70
287 cmpb $0, 24(%rdi)
288 je .L64
289 subq $1, %rax
290 testq %rax, %rax
291 movq %rax, 16(%rdi)
292 je .L64
293 addq $8, %rsp
295 .p2align 4,,10
296 .p2align 3
297 .L64:
298 addq $8, %rsp
299 jmp context_free
300 .p2align 4,,10
301 .p2align 3
302 .L66:
303 rep ret
304 .L69:
305 leaq __PRETTY_FUNCTION__.6971(%rip), %rcx
306 leaq .LC0(%rip), %rsi
307 leaq .LC4(%rip), %rdi
308 movl $229, %edx
309 call __GI___assert_fail
310 .L70:
311 leaq __PRETTY_FUNCTION__.6971(%rip), %rcx
312 leaq .LC0(%rip), %rsi
313 leaq .LC5(%rip), %rdi
314 movl $230, %edx
315 call __GI___assert_fail
316 .size __GI___resolv_context_put, .-__GI___resolv_context_put
317 .globl __resolv_context_put
318 .set __resolv_context_put,__GI___resolv_context_put
319 .p2align 4,,15
320 .globl __resolv_context_freeres
321 .hidden __resolv_context_freeres
322 .type __resolv_context_freeres, @function
323 __resolv_context_freeres:
324 movq current@gottpoff(%rip), %rax
325 movq %fs:(%rax), %rdi
326 movq $0, %fs:(%rax)
327 testq %rdi, %rdi
328 je .L79
329 pushq %rbx
330 .p2align 4,,10
331 .p2align 3
332 .L73:
333 movq 32(%rdi), %rbx
334 call context_free
335 testq %rbx, %rbx
336 movq %rbx, %rdi
337 jne .L73
338 popq %rbx
340 .p2align 4,,10
341 .p2align 3
342 .L79:
343 rep ret
344 .size __resolv_context_freeres, .-__resolv_context_freeres
345 .section .rodata.str1.16,"aMS",@progbits,1
346 .align 16
347 .type __PRETTY_FUNCTION__.6971, @object
348 .size __PRETTY_FUNCTION__.6971, 21
349 __PRETTY_FUNCTION__.6971:
350 .string "__resolv_context_put"
351 .section .rodata.str1.8,"aMS",@progbits,1
352 .align 8
353 .type __PRETTY_FUNCTION__.6935, @object
354 .size __PRETTY_FUNCTION__.6935, 11
355 __PRETTY_FUNCTION__.6935:
356 .string "maybe_init"
357 .align 8
358 .type __PRETTY_FUNCTION__.6947, @object
359 .size __PRETTY_FUNCTION__.6947, 14
360 __PRETTY_FUNCTION__.6947:
361 .string "context_reuse"
362 .section .tbss,"awT",@nobits
363 .align 8
364 .type current, @object
365 .size current, 8
366 current:
367 .zero 8
368 .hidden __resolv_conf_attach
369 .hidden __resolv_conf_get_current
370 .hidden __res_vinit
371 .hidden __resolv_conf_put
372 .hidden __resolv_conf_get