clarify the purpose of this project
[nyanglibc.git] / socket / opensock.s
blobcb4cd43b7ceb2b0ca750840f4c6113947a37514b
1 .text
2 .section .rodata.str1.8,"aMS",@progbits,1
3 .align 8
4 .LC0:
5 .string "../sysdeps/unix/sysv/linux/opensock.c"
6 .section .rodata.str1.1,"aMS",@progbits,1
7 .LC1:
8 .string "last_type != 0"
9 .LC2:
10 .string "/proc/net"
11 .text
12 .p2align 4,,15
13 .globl __opensock
14 .hidden __opensock
15 .type __opensock, @function
16 __opensock:
17 pushq %r15
18 pushq %r14
19 pushq %r13
20 pushq %r12
21 pushq %rbp
22 pushq %rbx
23 subq $40, %rsp
24 movl last_family.4838(%rip), %edi
25 testl %edi, %edi
26 je .L2
27 movl last_type.4839(%rip), %esi
28 testl %esi, %esi
29 je .L23
30 orl $524288, %esi
31 xorl %edx, %edx
32 call __socket
33 cmpl $-1, %eax
34 je .L24
35 .L1:
36 addq $40, %rsp
37 popq %rbx
38 popq %rbp
39 popq %r12
40 popq %r13
41 popq %r14
42 popq %r15
43 ret
44 .p2align 4,,10
45 .p2align 3
46 .L24:
47 movq __libc_errno@gottpoff(%rip), %rdx
48 cmpl $97, %fs:(%rdx)
49 jne .L1
50 movl $0, last_family.4838(%rip)
51 movl $0, last_type.4839(%rip)
52 .L2:
53 leaq .LC2(%rip), %rdi
54 movl $4, %esi
55 leaq 4+afs.4843(%rip), %rbx
56 movq %rsp, %r15
57 call __access
58 movl %eax, %r12d
59 movl $12131, %eax
60 movl $1869770799, (%rsp)
61 movw %ax, 4(%rsp)
62 movb $0, 6(%rsp)
63 leaq 220(%rbx), %r13
64 jmp .L10
65 .p2align 4,,10
66 .p2align 3
67 .L28:
68 cmpl $9, %ebp
69 je .L6
70 xorl %edx, %edx
71 movl $524290, %esi
72 movl %ebp, %edi
73 call __socket
74 cmpl $-1, %eax
75 movl $2, %r14d
76 jne .L25
77 .L9:
78 addq $20, %rbx
79 cmpq %r13, %rbx
80 je .L26
81 .L10:
82 cmpl $-1, %r12d
83 je .L8
84 cmpb $0, (%rbx)
85 jne .L27
86 .L8:
87 movl -4(%rbx), %ebp
88 cmpl $6, %ebp
89 jne .L28
90 .L6:
91 xorl %edx, %edx
92 movl $524293, %esi
93 movl %ebp, %edi
94 call __socket
95 cmpl $-1, %eax
96 movl $5, %r14d
97 je .L9
98 .L25:
99 movl %r14d, last_type.4839(%rip)
100 movl %ebp, last_family.4838(%rip)
101 addq $40, %rsp
102 popq %rbx
103 popq %rbp
104 popq %r12
105 popq %r13
106 popq %r14
107 popq %r15
109 .p2align 4,,10
110 .p2align 3
111 .L27:
112 leaq 6(%r15), %rdi
113 movq %rbx, %rsi
114 call strcpy
115 movl $4, %esi
116 movq %r15, %rdi
117 call __access
118 cmpl $-1, %eax
119 jne .L8
120 addq $20, %rbx
121 cmpq %r13, %rbx
122 jne .L10
123 .L26:
124 movq __libc_errno@gottpoff(%rip), %rax
125 movl $2, %fs:(%rax)
126 addq $40, %rsp
127 movl $-1, %eax
128 popq %rbx
129 popq %rbp
130 popq %r12
131 popq %r13
132 popq %r14
133 popq %r15
135 .L23:
136 leaq __PRETTY_FUNCTION__.4848(%rip), %rcx
137 leaq .LC0(%rip), %rsi
138 leaq .LC1(%rip), %rdi
139 movl $63, %edx
140 call __assert_fail
141 .size __opensock, .-__opensock
142 .section .rodata
143 .align 32
144 .type afs.4843, @object
145 .size afs.4843, 220
146 afs.4843:
147 .long 1
148 .string "net/unix"
149 .zero 6
150 .zero 1
151 .long 2
152 .string ""
153 .zero 14
154 .zero 1
155 .long 10
156 .string "net/if_inet6"
157 .zero 2
158 .zero 1
159 .long 3
160 .string "net/ax25"
161 .zero 6
162 .zero 1
163 .long 6
164 .string "net/nr"
165 .zero 8
166 .zero 1
167 .long 11
168 .string "net/rose"
169 .zero 6
170 .zero 1
171 .long 4
172 .string "net/ipx"
173 .zero 7
174 .zero 1
175 .long 5
176 .string "net/appletalk"
177 .zero 1
178 .zero 1
179 .long 19
180 .string "sys/net/econet"
181 .zero 1
182 .long 18
183 .string "sys/net/ash"
184 .zero 3
185 .zero 1
186 .long 9
187 .string "net/x25"
188 .zero 7
189 .zero 1
190 .section .rodata.str1.8
191 .align 8
192 .type __PRETTY_FUNCTION__.4848, @object
193 .size __PRETTY_FUNCTION__.4848, 11
194 __PRETTY_FUNCTION__.4848:
195 .string "__opensock"
196 .local last_type.4839
197 .comm last_type.4839,4,4
198 .local last_family.4838
199 .comm last_family.4838,4,4
200 .hidden __assert_fail
201 .hidden strcpy
202 .hidden __access
203 .hidden __socket