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