clarify the purpose of this project
[nyanglibc.git] / libio / iogetline.shared.s
blob9f806a87a4aa1115554de56d4f237d7ff890926e
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__IO_getline_info
9 .hidden __GI__IO_getline_info
10 .type __GI__IO_getline_info, @function
11 __GI__IO_getline_info:
12 .LFB69:
13 pushq %r15
14 pushq %r14
15 movq %rdi, %r15
16 pushq %r13
17 pushq %r12
18 movq %rdx, %r13
19 pushq %rbp
20 pushq %rbx
21 movq %rsi, %rbp
22 movl %ecx, %r12d
23 subq $40, %rsp
24 testq %r9, %r9
25 movl %r8d, 20(%rsp)
26 movq %r9, 24(%rsp)
27 je .L2
28 movl $0, (%r9)
29 .L2:
30 movl 192(%r15), %eax
31 testl %eax, %eax
32 je .L31
33 .L3:
34 testq %r13, %r13
35 movq %rbp, 8(%rsp)
36 jne .L15
37 jmp .L16
38 .p2align 4,,10
39 .p2align 3
40 .L5:
41 cmpq %r13, %rbx
42 movl %r12d, %esi
43 movq %r14, %rdi
44 cmovnb %r13, %rbx
45 movq %rbx, %rdx
46 call __GI_memchr
47 testq %rax, %rax
48 movq %rax, %r8
49 jne .L32
50 movq %rbp, %rdi
51 movq %rbx, %rdx
52 movq %r14, %rsi
53 subq %rbx, %r13
54 addq %rbx, %rbp
55 call __GI_memcpy@PLT
56 addq %rbx, 8(%r15)
57 testq %r13, %r13
58 je .L33
59 .L15:
60 movq 8(%r15), %r14
61 movq 16(%r15), %rbx
62 subq %r14, %rbx
63 testq %rbx, %rbx
64 jg .L5
65 movq %r15, %rdi
66 call __GI___uflow
67 cmpl $-1, %eax
68 je .L34
69 cmpl %eax, %r12d
70 je .L35
71 subq $1, %r13
72 movb %al, 0(%rbp)
73 addq $1, %rbp
74 testq %r13, %r13
75 jne .L15
76 .L33:
77 subq 8(%rsp), %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 %rax, %r12
92 movl 20(%rsp), %eax
93 movq %rbp, %rbx
94 subq %r14, %r12
95 subq 8(%rsp), %rbx
96 testl %eax, %eax
97 js .L14
98 addq $1, %r8
99 cmpl $1, %eax
100 sbbq $-1, %r12
101 .L14:
102 movq %rbp, %rdi
103 movq %r12, %rdx
104 movq %r14, %rsi
105 movq %r8, 8(%rsp)
106 leaq (%r12,%rbx), %rbp
107 call __GI_memcpy@PLT
108 movq 8(%rsp), %r8
109 movq %r8, 8(%r15)
110 jmp .L1
111 .L31:
112 movl $-1, 192(%r15)
113 jmp .L3
114 .L34:
115 movq 24(%rsp), %rcx
116 subq 8(%rsp), %rbp
117 testq %rcx, %rcx
118 je .L1
119 movl %eax, (%rcx)
120 jmp .L1
121 .L35:
122 cmpl $0, 20(%rsp)
123 jle .L8
124 leaq 1(%rbp), %rbx
125 movb %r12b, 0(%rbp)
126 .L9:
127 subq 8(%rsp), %rbx
128 movq %rbx, %rbp
129 jmp .L1
130 .L16:
131 xorl %ebp, %ebp
132 jmp .L1
133 .L8:
134 movq %rbp, %rbx
135 je .L9
136 movl %r12d, %esi
137 movq %r15, %rdi
138 call __GI__IO_sputbackc
139 jmp .L9
140 .LFE69:
141 .size __GI__IO_getline_info, .-__GI__IO_getline_info
142 .globl _IO_getline_info
143 .set _IO_getline_info,__GI__IO_getline_info
144 .p2align 4,,15
145 .globl __GI__IO_getline
146 .hidden __GI__IO_getline
147 .type __GI__IO_getline, @function
148 __GI__IO_getline:
149 .LFB68:
150 xorl %r9d, %r9d
151 jmp __GI__IO_getline_info
152 .LFE68:
153 .size __GI__IO_getline, .-__GI__IO_getline
154 .globl _IO_getline
155 .set _IO_getline,__GI__IO_getline