clarify the purpose of this project
[nyanglibc.git] / libio / iofwrite_u.shared.s
blob0c2191ae86be9636be165cc2d9d62c198e5e11bc
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 __GI_fwrite_unlocked
9 .hidden __GI_fwrite_unlocked
10 .type __GI_fwrite_unlocked, @function
11 __GI_fwrite_unlocked:
12 pushq %r13
13 pushq %r12
14 pushq %rbp
15 pushq %rbx
16 movq %rsi, %rbx
17 imulq %rdx, %rbx
18 subq $24, %rsp
19 testq %rbx, %rbx
20 je .L1
21 movl 192(%rcx), %eax
22 testl %eax, %eax
23 jne .L3
24 movl $-1, 192(%rcx)
25 .L4:
26 movq 216(%rcx), %r13
27 movq %rdx, %r12
28 leaq __stop___libc_IO_vtables(%rip), %rax
29 leaq __start___libc_IO_vtables(%rip), %rdx
30 movq %rsi, %rbp
31 movq %rdi, %rsi
32 movq %r13, %rdi
33 subq %rdx, %rax
34 subq %rdx, %rdi
35 cmpq %rdi, %rax
36 jbe .L14
37 .L6:
38 movq %rbx, %rdx
39 movq %rcx, %rdi
40 call *56(%r13)
41 cmpq %rax, %rbx
42 je .L8
43 cmpq $-1, %rax
44 je .L8
45 xorl %edx, %edx
46 divq %rbp
47 movq %rax, %rbx
48 .L1:
49 addq $24, %rsp
50 movq %rbx, %rax
51 popq %rbx
52 popq %rbp
53 popq %r12
54 popq %r13
55 ret
56 .p2align 4,,10
57 .p2align 3
58 .L3:
59 cmpl $-1, %eax
60 je .L4
61 addq $24, %rsp
62 xorl %ebx, %ebx
63 movq %rbx, %rax
64 popq %rbx
65 popq %rbp
66 popq %r12
67 popq %r13
68 ret
69 .p2align 4,,10
70 .p2align 3
71 .L8:
72 movq %r12, %rbx
73 jmp .L1
74 .p2align 4,,10
75 .p2align 3
76 .L14:
77 movq %rcx, 8(%rsp)
78 movq %rsi, (%rsp)
79 call _IO_vtable_check
80 movq 8(%rsp), %rcx
81 movq (%rsp), %rsi
82 jmp .L6
83 .size __GI_fwrite_unlocked, .-__GI_fwrite_unlocked
84 .globl fwrite_unlocked
85 .set fwrite_unlocked,__GI_fwrite_unlocked
86 .hidden _IO_vtable_check
87 .hidden __start___libc_IO_vtables
88 .hidden __stop___libc_IO_vtables