clarify the purpose of this project
[nyanglibc.git] / inet / getsrvbynm_r.shared.s
blob7b79eea4c574b16b0b0e160134117d83ee019ccb
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __new_getservbyname_r,getservbyname_r@@GLIBC_2.2.5
7 .section .rodata.str1.1,"aMS",@progbits,1
8 .LC0:
9 .string "getservbyname_r"
10 #NO_APP
11 .text
12 .p2align 4,,15
13 .globl __getservbyname_r
14 .hidden __getservbyname_r
15 .type __getservbyname_r, @function
16 __getservbyname_r:
17 pushq %r15
18 pushq %r14
19 pushq %r13
20 pushq %r12
21 pushq %rbp
22 pushq %rbx
23 subq $88, %rsp
24 leaq 72(%rsp), %r13
25 leaq 64(%rsp), %r12
26 movq %rsi, 24(%rsp)
27 leaq .LC0(%rip), %rsi
28 movq %rdi, 16(%rsp)
29 movq %rdx, 8(%rsp)
30 movq %rcx, 32(%rsp)
31 xorl %edx, %edx
32 movq %r13, %rcx
33 movq %r12, %rdi
34 movq %r8, (%rsp)
35 movq %r9, 56(%rsp)
36 call __GI___nss_services_lookup2
37 testl %eax, %eax
38 movl %eax, 52(%rsp)
39 jne .L2
40 xorl %ebp, %ebp
41 movq $0, 40(%rsp)
42 movq %fs:0, %r15
43 movq __libc_errno@gottpoff(%rip), %rbx
44 jmp .L13
45 .p2align 4,,10
46 .p2align 3
47 .L3:
48 testl %ebp, %ebp
49 je .L6
50 cmpl $1, %eax
51 jne .L7
52 movl $22, %fs:(%rbx)
53 xorl %ebp, %ebp
54 movl $-1, %r14d
55 .p2align 4,,10
56 .p2align 3
57 .L8:
58 leaq .LC0(%rip), %rsi
59 xorl %r9d, %r9d
60 xorl %edx, %edx
61 movl %r14d, %r8d
62 movq %r13, %rcx
63 movq %r12, %rdi
64 call __GI___nss_next2
65 testl %eax, %eax
66 jne .L35
67 .L13:
68 movq 72(%rsp), %rdi
69 call __GI__dl_mcount_wrapper_check
70 leaq (%r15,%rbx), %r9
71 movq (%rsp), %r8
72 movq 32(%rsp), %rcx
73 movq 8(%rsp), %rdx
74 movq 24(%rsp), %rsi
75 movq 16(%rsp), %rdi
76 call *72(%rsp)
77 cmpl $-2, %eax
78 movl %eax, %r14d
79 jne .L3
80 cmpl $34, %fs:(%rbx)
81 je .L36
82 testl %ebp, %ebp
83 je .L6
84 .L7:
85 movq 64(%rsp), %rax
86 movl $22, %fs:(%rbx)
87 movl 8(%rax), %eax
88 shrl $6, %eax
89 andl $3, %eax
90 cmpl $2, %eax
91 jne .L17
92 .L11:
93 cmpq $0, 40(%rsp)
94 je .L37
95 .L10:
96 movl $22, %fs:(%rbx)
97 movl $-1, %r14d
98 movl $1, %ebp
99 jmp .L8
100 .p2align 4,,10
101 .p2align 3
102 .L6:
103 movq 64(%rsp), %rax
104 leal 4(%r14,%r14), %ecx
105 movl 8(%rax), %eax
106 shrl %cl, %eax
107 andl $3, %eax
108 cmpl $2, %eax
109 jne .L18
110 cmpl $1, %r14d
111 je .L11
112 .L18:
113 xorl %ebp, %ebp
114 jmp .L8
115 .p2align 4,,10
116 .p2align 3
117 .L17:
118 movl $1, %r14d
119 movl $1, %ebp
120 jmp .L8
121 .p2align 4,,10
122 .p2align 3
123 .L35:
124 movq 40(%rsp), %rdi
125 call free@PLT
126 cmpl $1, %r14d
127 movq 56(%rsp), %rax
128 je .L16
129 movq $0, (%rax)
130 jbe .L15
131 movl %fs:(%rbx), %eax
132 cmpl $34, %eax
133 movl %eax, 52(%rsp)
134 je .L38
135 .L1:
136 movl 52(%rsp), %eax
137 addq $88, %rsp
138 popq %rbx
139 popq %rbp
140 popq %r12
141 popq %r13
142 popq %r14
143 popq %r15
145 .p2align 4,,10
146 .p2align 3
147 .L16:
148 movq 8(%rsp), %rdx
149 movq %rdx, (%rax)
150 .L15:
151 movl 52(%rsp), %eax
152 movl %eax, %fs:(%rbx)
153 jmp .L1
154 .p2align 4,,10
155 .p2align 3
156 .L37:
157 movq (%rsp), %rdi
158 call malloc@PLT
159 testq %rax, %rax
160 movq %rax, 40(%rsp)
161 jne .L10
162 movq 56(%rsp), %rax
163 movl $12, %fs:(%rbx)
164 movl $12, 52(%rsp)
165 movq $0, (%rax)
166 jmp .L1
167 .p2align 4,,10
168 .p2align 3
169 .L36:
170 movq 40(%rsp), %rdi
171 call free@PLT
172 movq 56(%rsp), %rax
173 movl $34, 52(%rsp)
174 movq $0, (%rax)
175 jmp .L1
176 .L38:
177 cmpl $-2, %r14d
178 je .L1
179 .L19:
180 movl $22, 52(%rsp)
181 jmp .L15
182 .L2:
183 movq 56(%rsp), %rax
184 movq __libc_errno@gottpoff(%rip), %rbx
185 movq $0, (%rax)
186 movl %fs:(%rbx), %eax
187 cmpl $34, %eax
188 movl %eax, 52(%rsp)
189 jne .L1
190 jmp .L19
191 .size __getservbyname_r, .-__getservbyname_r
192 .globl __new_getservbyname_r
193 .set __new_getservbyname_r,__getservbyname_r