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