clarify the purpose of this project
[nyanglibc.git] / libio / iowpadn.s
blobe79ef8406328f3fc80ff802176f7716659860f86
1 .text
2 .p2align 4,,15
3 .globl _IO_wpadn
4 .type _IO_wpadn, @function
5 _IO_wpadn:
6 pushq %r15
7 pushq %r14
8 pushq %r13
9 pushq %r12
10 leaq blanks(%rip), %r13
11 pushq %rbp
12 pushq %rbx
13 movq %rdi, %rbp
14 subq $88, %rsp
15 cmpl $32, %esi
16 je .L2
17 cmpl $48, %esi
18 leaq zeroes(%rip), %r13
19 je .L2
20 leaq 16(%rsp), %r13
21 leaq 12(%rsp), %rcx
22 leaq 60(%r13), %rax
23 .p2align 4,,10
24 .p2align 3
25 .L3:
26 movl %esi, (%rax)
27 subq $4, %rax
28 cmpq %rcx, %rax
29 jne .L3
30 .L2:
31 cmpl $15, %edx
32 movl %edx, %r15d
33 jle .L13
34 movl %edx, %r12d
35 movq __stop___libc_IO_vtables@GOTPCREL(%rip), %r14
36 xorl %ebx, %ebx
37 subq __start___libc_IO_vtables@GOTPCREL(%rip), %r14
38 andl $15, %r12d
39 jmp .L8
40 .p2align 4,,10
41 .p2align 3
42 .L5:
43 movl $16, %edx
44 movq %r13, %rsi
45 movq %rbp, %rdi
46 call *56(%rax)
47 addq %rax, %rbx
48 cmpq $16, %rax
49 jne .L1
50 subl $16, %r15d
51 cmpl %r12d, %r15d
52 je .L4
53 .L8:
54 movq 216(%rbp), %rax
55 movq %rax, %rdx
56 subq __start___libc_IO_vtables@GOTPCREL(%rip), %rdx
57 cmpq %rdx, %r14
58 ja .L5
59 movq %rax, 8(%rsp)
60 call _IO_vtable_check
61 movq 8(%rsp), %rax
62 jmp .L5
63 .p2align 4,,10
64 .p2align 3
65 .L13:
66 xorl %ebx, %ebx
67 .p2align 4,,10
68 .p2align 3
69 .L4:
70 testl %r15d, %r15d
71 jle .L1
72 movq 216(%rbp), %r12
73 movq __start___libc_IO_vtables@GOTPCREL(%rip), %rdx
74 movq __stop___libc_IO_vtables@GOTPCREL(%rip), %rax
75 movq %r12, %rcx
76 subq %rdx, %rax
77 subq %rdx, %rcx
78 cmpq %rcx, %rax
79 jbe .L20
80 .L10:
81 movslq %r15d, %rdx
82 movq %r13, %rsi
83 movq %rbp, %rdi
84 call *56(%r12)
85 addq %rax, %rbx
86 .L1:
87 addq $88, %rsp
88 movq %rbx, %rax
89 popq %rbx
90 popq %rbp
91 popq %r12
92 popq %r13
93 popq %r14
94 popq %r15
95 ret
96 .L20:
97 call _IO_vtable_check
98 jmp .L10
99 .size _IO_wpadn, .-_IO_wpadn
100 .section .rodata
101 .align 32
102 .type zeroes, @object
103 .size zeroes, 64
104 zeroes:
105 .long 48
106 .long 48
107 .long 48
108 .long 48
109 .long 48
110 .long 48
111 .long 48
112 .long 48
113 .long 48
114 .long 48
115 .long 48
116 .long 48
117 .long 48
118 .long 48
119 .long 48
120 .long 48
121 .align 32
122 .type blanks, @object
123 .size blanks, 64
124 blanks:
125 .long 32
126 .long 32
127 .long 32
128 .long 32
129 .long 32
130 .long 32
131 .long 32
132 .long 32
133 .long 32
134 .long 32
135 .long 32
136 .long 32
137 .long 32
138 .long 32
139 .long 32
140 .long 32
141 .weak __start___libc_IO_vtables
142 .weak __stop___libc_IO_vtables
143 .hidden _IO_vtable_check