clarify the purpose of this project
[nyanglibc.git] / libio / wfiledoalloc.shared.s
blob2098b52543ab50a4f8b587eb71ae7ed8fe1378e4
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 _IO_wfile_doallocate
9 .type _IO_wfile_doallocate, @function
10 _IO_wfile_doallocate:
11 pushq %rbp
12 pushq %rbx
13 movq %rdi, %rbp
14 subq $8, %rsp
15 movq 56(%rdi), %rax
16 testq %rax, %rax
17 je .L11
18 .L2:
19 movq 64(%rbp), %rdx
20 subq %rax, %rdx
21 leaq 3(%rdx), %rax
22 shrq $2, %rax
23 testb $1, 0(%rbp)
24 cmovne %rax, %rdx
25 leaq 0(,%rdx,4), %rbx
26 movq %rbx, %rdi
27 call malloc@PLT
28 movq %rax, %rsi
29 movl $-1, %eax
30 testq %rsi, %rsi
31 je .L1
32 leaq (%rsi,%rbx), %rdx
33 movl $1, %ecx
34 movq %rbp, %rdi
35 call __GI__IO_wsetb
36 movl $1, %eax
37 .L1:
38 addq $8, %rsp
39 popq %rbx
40 popq %rbp
41 ret
42 .p2align 4,,10
43 .p2align 3
44 .L11:
45 call __GI__IO_file_doallocate
46 movq 56(%rbp), %rax
47 jmp .L2
48 .size _IO_wfile_doallocate, .-_IO_wfile_doallocate