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