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