clarify the purpose of this project
[nyanglibc.git] / dirent / scandir-cancel.s
blobf08d52f0bf367dec260ff0ebe6c9e714a5872904
1 .text
2 .p2align 4,,15
3 .globl __scandir_cancel_handler
4 .hidden __scandir_cancel_handler
5 .type __scandir_cancel_handler, @function
6 __scandir_cancel_handler:
7 pushq %r12
8 pushq %rbp
9 movq %rdi, %rbp
10 pushq %rbx
11 cmpq $0, 16(%rdi)
12 movq 8(%rdi), %r12
13 je .L2
14 xorl %ebx, %ebx
15 .p2align 4,,10
16 .p2align 3
17 .L3:
18 movq (%r12,%rbx,8), %rdi
19 addq $1, %rbx
20 call free@PLT
21 cmpq %rbx, 16(%rbp)
22 ja .L3
23 .L2:
24 movq %r12, %rdi
25 call free@PLT
26 popq %rbx
27 movq 0(%rbp), %rdi
28 popq %rbp
29 popq %r12
30 jmp __closedir
31 .size __scandir_cancel_handler, .-__scandir_cancel_handler
32 .hidden __closedir