clarify the purpose of this project
[nyanglibc.git] / sunrpc / compat-pm_getport.shared.s
blobcdf70c707ded4351ae90c220a32c5bc1208f97b5
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __EI_pmap_getport, pmap_getport@GLIBC_2.2.5
7 #NO_APP
8 .p2align 4,,15
9 .globl __get_socket
10 .hidden __get_socket
11 .type __get_socket, @function
12 __get_socket:
13 pushq %rbp
14 pushq %rbx
15 movq %rdi, %rbp
16 movl $6, %edx
17 movl $1, %esi
18 movl $2, %edi
19 subq $24, %rsp
20 call __GI___socket
21 testl %eax, %eax
22 js .L5
23 movq %rsp, %rsi
24 movl $16, %edx
25 movl %eax, %edi
26 movl %eax, %ebx
27 movq $2, (%rsp)
28 call __bind
29 testl %eax, %eax
30 js .L4
31 movl $16, %edx
32 movq %rbp, %rsi
33 movl %ebx, %edi
34 call __GI___connect
35 testl %eax, %eax
36 js .L4
37 .L1:
38 addq $24, %rsp
39 movl %ebx, %eax
40 popq %rbx
41 popq %rbp
42 ret
43 .p2align 4,,10
44 .p2align 3
45 .L4:
46 movl %ebx, %edi
47 movl $-1, %ebx
48 call __GI___close
49 addq $24, %rsp
50 movl %ebx, %eax
51 popq %rbx
52 popq %rbp
53 ret
54 .p2align 4,,10
55 .p2align 3
56 .L5:
57 movl $-1, %ebx
58 jmp .L1
59 .size __get_socket, .-__get_socket
60 .p2align 4,,15
61 .globl __GI___libc_rpc_getport
62 .hidden __GI___libc_rpc_getport
63 .type __GI___libc_rpc_getport, @function
64 __GI___libc_rpc_getport:
65 pushq %r15
66 pushq %r14
67 movl $28416, %r10d
68 pushq %r13
69 pushq %r12
70 movq %r9, %r13
71 pushq %rbp
72 pushq %rbx
73 xorl %r9d, %r9d
74 xorl %r14d, %r14d
75 movq %rdi, %rbx
76 movq %rsi, %r15
77 subq $88, %rsp
78 cmpl $6, %ecx
79 movl %ecx, %ebp
80 movq %rdx, 16(%rsp)
81 movw %r9w, 42(%rsp)
82 movl $-1, 44(%rsp)
83 movw %r10w, 2(%rdi)
84 je .L21
85 pushq $400
86 pushq $400
87 movq %r8, %rcx
88 movl $100000, %esi
89 xorl %r8d, %r8d
90 movl $2, %edx
91 leaq 60(%rsp), %r9
92 call __GI_clntudp_bufcreate
93 popq %rsi
94 popq %rdi
95 testq %rax, %rax
96 movq %rax, %r12
97 movb $0, 15(%rsp)
98 je .L12
99 .L10:
100 call __GI___rpc_thread_createerr
101 movq %rax, 24(%rsp)
102 movq 16(%rsp), %rax
103 leaq 48(%rsp), %rcx
104 movq %r15, 48(%rsp)
105 movq $0, 72(%rsp)
106 leaq __GI_xdr_pmap(%rip), %rdx
107 leaq __GI_xdr_u_short(%rip), %r8
108 movl $3, %esi
109 movq %r12, %rdi
110 movq %rax, 56(%rsp)
111 movl %ebp, %eax
112 movq %rax, 64(%rsp)
113 movq 8(%r12), %rax
114 pushq %r14
115 pushq %r13
116 leaq 58(%rsp), %r9
117 call *(%rax)
118 popq %rdx
119 testl %eax, %eax
120 popq %rcx
121 movq 24(%rsp), %r11
122 je .L13
123 movq 8(%r12), %rax
124 movl $14, (%r11)
125 leaq 8(%r11), %rsi
126 movq %r12, %rdi
127 call *16(%rax)
128 .L14:
129 movq 8(%r12), %rax
130 movq %r12, %rdi
131 call *32(%rax)
132 .L11:
133 cmpb $0, 15(%rsp)
134 je .L12
135 movl 44(%rsp), %edi
136 call __GI___close
137 .L12:
138 xorl %eax, %eax
139 movw %ax, 2(%rbx)
140 movzwl 42(%rsp), %eax
141 addq $88, %rsp
142 popq %rbx
143 popq %rbp
144 popq %r12
145 popq %r13
146 popq %r14
147 popq %r15
149 .p2align 4,,10
150 .p2align 3
151 .L21:
152 call __get_socket
153 leaq 44(%rsp), %rcx
154 cmpl $-1, %eax
155 movl $400, %r9d
156 movl $400, %r8d
157 movl $2, %edx
158 movl $100000, %esi
159 movq %rbx, %rdi
160 setne 15(%rsp)
161 movl %eax, 44(%rsp)
162 call __GI_clnttcp_create
163 testq %rax, %rax
164 movq %rax, %r12
165 jne .L10
166 jmp .L11
167 .p2align 4,,10
168 .p2align 3
169 .L13:
170 cmpw $0, 42(%rsp)
171 jne .L14
172 movl $15, (%r11)
173 jmp .L14
174 .size __GI___libc_rpc_getport, .-__GI___libc_rpc_getport
175 .globl __libc_rpc_getport
176 .set __libc_rpc_getport,__GI___libc_rpc_getport
177 .p2align 4,,15
178 .globl __GI_pmap_getport
179 .hidden __GI_pmap_getport
180 .type __GI_pmap_getport, @function
181 __GI_pmap_getport:
182 movl $60, %r9d
183 movl $5, %r8d
184 jmp __GI___libc_rpc_getport
185 .size __GI_pmap_getport, .-__GI_pmap_getport
186 .globl __EI_pmap_getport
187 .set __EI_pmap_getport,__GI_pmap_getport
188 .hidden __bind