clarify the purpose of this project
[nyanglibc.git] / libio / iogetwline.shared.s
blob930bc19c26f55ad3e78cde671007f4fad9799643
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_getwline_info
9 .type _IO_getwline_info, @function
10 _IO_getwline_info:
11 .LFB72:
12 pushq %r15
13 pushq %r14
14 movq %rdi, %r15
15 pushq %r13
16 pushq %r12
17 movq %rdx, %r13
18 pushq %rbp
19 pushq %rbx
20 movq %rsi, %rbp
21 movl %ecx, %r12d
22 subq $40, %rsp
23 testq %r9, %r9
24 movl %r8d, 20(%rsp)
25 movq %r9, 24(%rsp)
26 je .L2
27 movl $0, (%r9)
28 .L2:
29 movl 192(%r15), %eax
30 testl %eax, %eax
31 je .L31
32 .L3:
33 testq %r13, %r13
34 movq %rbp, 8(%rsp)
35 jne .L15
36 jmp .L16
37 .p2align 4,,10
38 .p2align 3
39 .L5:
40 cmpq %r13, %rbx
41 movl %r12d, %esi
42 movq %r14, %rdi
43 cmovnb %r13, %rbx
44 movq %rbx, %rdx
45 call __GI_wmemchr
46 testq %rax, %rax
47 movq %rax, %r8
48 jne .L32
49 movq %rbx, %rdx
50 movq %rbp, %rdi
51 movq %r14, %rsi
52 call __wmemcpy
53 movq 160(%r15), %rdx
54 leaq 0(,%rbx,4), %rax
55 subq %rbx, %r13
56 addq %rax, %rbp
57 addq %rax, (%rdx)
58 testq %r13, %r13
59 je .L33
60 .L15:
61 movq 160(%r15), %rax
62 movq (%rax), %r14
63 movq 8(%rax), %rax
64 subq %r14, %rax
65 movq %rax, %rbx
66 sarq $2, %rbx
67 testq %rax, %rax
68 jg .L5
69 movq %r15, %rdi
70 call __GI___wuflow
71 cmpl $-1, %eax
72 je .L34
73 cmpl %eax, %r12d
74 je .L35
75 subq $1, %r13
76 movl %eax, 0(%rbp)
77 addq $4, %rbp
78 testq %r13, %r13
79 jne .L15
80 .L33:
81 subq 8(%rsp), %rbp
82 sarq $2, %rbp
83 .L1:
84 addq $40, %rsp
85 movq %rbp, %rax
86 popq %rbx
87 popq %rbp
88 popq %r12
89 popq %r13
90 popq %r14
91 popq %r15
92 ret
93 .p2align 4,,10
94 .p2align 3
95 .L32:
96 movq %rbp, %rbx
97 subq 8(%rsp), %rbx
98 movl 20(%rsp), %ecx
99 movq %rax, %r12
100 subq %r14, %r12
101 sarq $2, %r12
102 sarq $2, %rbx
103 testl %ecx, %ecx
104 js .L14
105 leaq 1(%r12), %rax
106 addq $4, %r8
107 testl %ecx, %ecx
108 cmovne %rax, %r12
109 .L14:
110 movq %rbp, %rdi
111 movq %r12, %rdx
112 movq %r14, %rsi
113 movq %r8, 8(%rsp)
114 leaq (%r12,%rbx), %rbp
115 call __wmemcpy
116 movq 160(%r15), %rax
117 movq 8(%rsp), %r8
118 movq %r8, (%rax)
119 jmp .L1
120 .L31:
121 movl $1, %esi
122 movq %r15, %rdi
123 call _IO_fwide@PLT
124 jmp .L3
125 .L34:
126 subq 8(%rsp), %rbp
127 movq 24(%rsp), %rcx
128 sarq $2, %rbp
129 testq %rcx, %rcx
130 je .L1
131 movl %eax, (%rcx)
132 jmp .L1
133 .L35:
134 cmpl $0, 20(%rsp)
135 jle .L8
136 leaq 4(%rbp), %rbx
137 movl %r12d, 0(%rbp)
138 .L9:
139 subq 8(%rsp), %rbx
140 movq %rbx, %rbp
141 sarq $2, %rbp
142 jmp .L1
143 .L16:
144 xorl %ebp, %ebp
145 jmp .L1
146 .L8:
147 movq %rbp, %rbx
148 je .L9
149 movl %r12d, %esi
150 movq %r15, %rdi
151 call __GI__IO_sputbackc
152 jmp .L9
153 .LFE72:
154 .size _IO_getwline_info, .-_IO_getwline_info
155 .p2align 4,,15
156 .globl _IO_getwline
157 .type _IO_getwline, @function
158 _IO_getwline:
159 .LFB71:
160 xorl %r9d, %r9d
161 jmp _IO_getwline_info@PLT
162 .LFE71:
163 .size _IO_getwline, .-_IO_getwline
164 .hidden __wmemcpy