clarify the purpose of this project
[nyanglibc.git] / io / faccessat.shared.s
blobc3324c2b38e7063fa0cda0cf36dceb1c2acf1ebc
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __faccessat
9 .type __faccessat, @function
10 __faccessat:
11 pushq %r14
12 pushq %r13
13 movl %ecx, %r14d
14 pushq %r12
15 pushq %rbp
16 movl %ecx, %r10d
17 pushq %rbx
18 movl $439, %ecx
19 movl %edi, %ebx
20 movq %rsi, %rbp
21 movl %edx, %r13d
22 movl %ecx, %eax
23 subq $144, %rsp
24 #APP
25 # 29 "../sysdeps/unix/sysv/linux/faccessat.c" 1
26 syscall
28 # 0 "" 2
29 #NO_APP
30 cmpq $-4096, %rax
31 movq %rax, %rdx
32 ja .L33
33 testl %eax, %eax
34 jne .L4
35 .L11:
36 xorl %eax, %eax
37 .L1:
38 addq $144, %rsp
39 popq %rbx
40 popq %rbp
41 popq %r12
42 popq %r13
43 popq %r14
44 ret
45 .p2align 4,,10
46 .p2align 3
47 .L4:
48 movq __libc_errno@gottpoff(%rip), %r12
49 movl %fs:(%r12), %edx
50 .L3:
51 cmpl $38, %edx
52 jne .L1
53 testl $-769, %r14d
54 jne .L34
55 testl %r14d, %r14d
56 je .L7
57 testl $-513, %r14d
58 jne .L8
59 movq __libc_enable_secure@GOTPCREL(%rip), %rax
60 movl (%rax), %eax
61 testl %eax, %eax
62 je .L7
63 .L8:
64 movl %r14d, %ecx
65 movq %rbp, %rsi
66 movl %ebx, %edi
67 andl $256, %ecx
68 movq %rsp, %rdx
69 call __GI___fstatat64
70 testl %eax, %eax
71 jne .L21
72 movl %r13d, %ebx
73 andl $7, %ebx
74 je .L11
75 andl $512, %r14d
76 je .L12
77 call __geteuid
78 .L13:
79 testl %eax, %eax
80 jne .L14
81 andl $1, %r13d
82 je .L11
83 testb $73, 24(%rsp)
84 jne .L11
85 .L14:
86 cmpl %eax, 28(%rsp)
87 je .L35
88 testl %r14d, %r14d
89 movl 32(%rsp), %ebp
90 je .L17
91 call __getegid
92 .L18:
93 cmpl %eax, %ebp
94 je .L20
95 movl 32(%rsp), %edi
96 call __group_member
97 testl %eax, %eax
98 jne .L20
99 movl 24(%rsp), %eax
100 andl %ebx, %eax
101 .p2align 4,,10
102 .p2align 3
103 .L16:
104 cmpl %ebx, %eax
105 je .L11
106 movl $13, %fs:(%r12)
107 orl $-1, %eax
108 jmp .L1
109 .p2align 4,,10
110 .p2align 3
111 .L7:
112 movl %r13d, %edx
113 movq %rbp, %rsi
114 movl %ebx, %edi
115 movl $269, %eax
116 #APP
117 # 40 "../sysdeps/unix/sysv/linux/faccessat.c" 1
118 syscall
120 # 0 "" 2
121 #NO_APP
122 cmpq $-4096, %rax
123 jbe .L1
124 negl %eax
125 movl %eax, %fs:(%r12)
126 movl $-1, %eax
127 jmp .L1
128 .p2align 4,,10
129 .p2align 3
130 .L33:
131 movq __libc_errno@gottpoff(%rip), %r12
132 negl %edx
133 movl $-1, %eax
134 movl %edx, %fs:(%r12)
135 jmp .L3
136 .L34:
137 movl $22, %fs:(%r12)
138 movl $-1, %eax
139 jmp .L1
140 .p2align 4,,10
141 .p2align 3
142 .L12:
143 call __getuid
144 jmp .L13
145 .p2align 4,,10
146 .p2align 3
147 .L20:
148 leal 0(,%rbx,8), %eax
149 andl 24(%rsp), %eax
150 shrl $3, %eax
151 jmp .L16
152 .L35:
153 movl %ebx, %eax
154 sall $6, %eax
155 andl 24(%rsp), %eax
156 shrl $6, %eax
157 jmp .L16
158 .L17:
159 call __getgid
160 jmp .L18
161 .L21:
162 movl $-1, %eax
163 jmp .L1
164 .size __faccessat, .-__faccessat
165 .weak faccessat
166 .set faccessat,__faccessat
167 .hidden __getgid
168 .hidden __getuid
169 .hidden __group_member
170 .hidden __getegid
171 .hidden __geteuid