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