clarify the purpose of this project
[nyanglibc.git] / dirent / scandir64-tail.s
blobd70c814290f64b177f797b5a388ebc8382bea9c7
1 .text
2 .p2align 4,,15
3 .globl __scandir64_tail
4 .hidden __scandir64_tail
5 .type __scandir64_tail, @function
6 __scandir64_tail:
7 .LFB47:
8 testq %rdi, %rdi
9 je .L36
10 pushq %r15
11 pushq %r14
12 movq %rdi, %r15
13 pushq %r13
14 pushq %r12
15 movq %rdx, %r12
16 pushq %rbp
17 pushq %rbx
18 pxor %xmm0, %xmm0
19 subq $88, %rsp
20 movq __libc_errno@gottpoff(%rip), %r14
21 leaq 48(%rsp), %r13
22 movq %rcx, 32(%rsp)
23 movq %rsi, 24(%rsp)
24 movups %xmm0, 56(%rsp)
25 movl %fs:(%r14), %eax
26 movq %rdi, 48(%rsp)
27 movl %eax, 44(%rsp)
28 movl $0, %fs:(%r14)
29 movq $0, 16(%rsp)
30 movq $0, 8(%rsp)
31 .L4:
32 movq %r15, %rdi
33 movq %r13, %rbp
34 .LEHB0:
35 call __readdir64
36 testq %rax, %rax
37 movq %rax, %rbx
38 je .L11
39 .L12:
40 testq %r12, %r12
41 je .L9
42 movq %r13, %rbp
43 movq %rbx, %rdi
44 call *%r12
45 testl %eax, %eax
46 movl $0, %fs:(%r14)
47 je .L4
48 .L9:
49 movq 64(%rsp), %rbp
50 cmpq 16(%rsp), %rbp
51 je .L37
52 .L7:
53 movzwl 16(%rbx), %edx
54 movq %rdx, %rdi
55 movq %rdx, (%rsp)
56 call malloc@PLT
57 testq %rax, %rax
58 je .L11
59 movq (%rsp), %rdx
60 leaq 1(%rbp), %rcx
61 movq %rbx, %rsi
62 movq %rax, %rdi
63 movq %rcx, 64(%rsp)
64 call memcpy@PLT
65 movq 8(%rsp), %rsi
66 movq %r15, %rdi
67 movl $0, %fs:(%r14)
68 movq %rax, (%rsi,%rbp,8)
69 movq %r13, %rbp
70 call __readdir64
71 testq %rax, %rax
72 movq %rax, %rbx
73 jne .L12
74 .L11:
75 movl %fs:(%r14), %eax
76 leaq 48(%rsp), %rbp
77 testl %eax, %eax
78 jne .L13
79 movq %r15, %rdi
80 call __closedir
81 movq 32(%rsp), %rcx
82 movq 64(%rsp), %rsi
83 testq %rcx, %rcx
84 je .L14
85 movq 8(%rsp), %rdi
86 movl $8, %edx
87 leaq 48(%rsp), %rbp
88 call qsort
89 movq 64(%rsp), %rsi
90 .L14:
91 movq 24(%rsp), %rax
92 movq 8(%rsp), %rcx
93 testl %esi, %esi
94 movq %rcx, (%rax)
95 movl %esi, %eax
96 js .L1
97 movl 44(%rsp), %ecx
98 movl %ecx, %fs:(%r14)
99 .L1:
100 addq $88, %rsp
101 popq %rbx
102 popq %rbp
103 popq %r12
104 popq %r13
105 popq %r14
106 popq %r15
108 .p2align 4,,10
109 .p2align 3
110 .L37:
111 movq 16(%rsp), %rax
112 testq %rax, %rax
113 jne .L38
114 movl $80, %esi
115 movq $10, 16(%rsp)
116 .L10:
117 movq 8(%rsp), %rdi
118 call realloc@PLT
119 testq %rax, %rax
120 je .L11
121 movq %rax, 56(%rsp)
122 movq %rax, 8(%rsp)
123 jmp .L7
124 .p2align 4,,10
125 .p2align 3
126 .L38:
127 addq %rax, %rax
128 movq %rax, 16(%rsp)
129 leaq 0(,%rax,8), %rsi
130 jmp .L10
131 .L13:
132 movq %rbp, %rdi
133 call __scandir_cancel_handler
134 .LEHE0:
135 addq $88, %rsp
136 movl $-1, %eax
137 popq %rbx
138 popq %rbp
139 popq %r12
140 popq %r13
141 popq %r14
142 popq %r15
144 .L36:
145 movl $-1, %eax
147 .L19:
148 movq %rax, %rbx
149 movq %rbp, %rdi
150 .LEHB1:
151 call __scandir_cancel_handler
152 movq %rbx, %rdi
153 call _Unwind_Resume@PLT
154 .LEHE1:
155 .LFE47:
156 .globl __gcc_personality_v0
157 .section .gcc_except_table,"a",@progbits
158 .LLSDA47:
159 .byte 0xff
160 .byte 0xff
161 .byte 0x1
162 .uleb128 .LLSDACSE47-.LLSDACSB47
163 .LLSDACSB47:
164 .uleb128 .LEHB0-.LFB47
165 .uleb128 .LEHE0-.LEHB0
166 .uleb128 .L19-.LFB47
167 .uleb128 0
168 .uleb128 .LEHB1-.LFB47
169 .uleb128 .LEHE1-.LEHB1
170 .uleb128 0
171 .uleb128 0
172 .LLSDACSE47:
173 .text
174 .size __scandir64_tail, .-__scandir64_tail
175 .hidden DW.ref.__gcc_personality_v0
176 .weak DW.ref.__gcc_personality_v0
177 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
178 .align 8
179 .type DW.ref.__gcc_personality_v0, @object
180 .size DW.ref.__gcc_personality_v0, 8
181 DW.ref.__gcc_personality_v0:
182 .quad __gcc_personality_v0
183 .hidden __scandir_cancel_handler
184 .hidden qsort
185 .hidden __closedir
186 .hidden __readdir64