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