clarify the purpose of this project
[nyanglibc.git] / argp / argp-fs-xinl.shared.s
blobd55033fd0187063115271f2cdbc3f963483629d8
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 __argp_fmtstream_write
9 .hidden __argp_fmtstream_write
10 .type __argp_fmtstream_write, @function
11 __argp_fmtstream_write:
12 pushq %r12
13 pushq %rbp
14 movq %rsi, %r12
15 pushq %rbx
16 movq %rdi, %rbx
17 movq 56(%rdi), %rdi
18 movq %rdx, %rbp
19 leaq (%rdi,%rdx), %rax
20 cmpq %rax, 64(%rbx)
21 jnb .L2
22 movq %rdx, %rsi
23 movq %rbx, %rdi
24 call __argp_fmtstream_ensure
25 movl %eax, %edx
26 xorl %eax, %eax
27 testl %edx, %edx
28 je .L1
29 movq 56(%rbx), %rdi
30 .L2:
31 movq %rbp, %rdx
32 movq %r12, %rsi
33 call __GI_memcpy@PLT
34 addq %rbp, 56(%rbx)
35 movq %rbp, %rax
36 .L1:
37 popq %rbx
38 popq %rbp
39 popq %r12
40 ret
41 .size __argp_fmtstream_write, .-__argp_fmtstream_write
42 .p2align 4,,15
43 .globl __argp_fmtstream_puts
44 .type __argp_fmtstream_puts, @function
45 __argp_fmtstream_puts:
46 pushq %r12
47 pushq %rbp
48 movq %rdi, %r12
49 pushq %rbx
50 movq %rsi, %rdi
51 movq %rsi, %rbp
52 call __GI_strlen
53 movq %rax, %rbx
54 xorl %eax, %eax
55 testq %rbx, %rbx
56 je .L8
57 movq %rbx, %rdx
58 movq %rbp, %rsi
59 movq %r12, %rdi
60 call __argp_fmtstream_write
61 cmpq %rax, %rbx
62 setne %al
63 movzbl %al, %eax
64 negl %eax
65 .L8:
66 popq %rbx
67 popq %rbp
68 popq %r12
69 ret
70 .size __argp_fmtstream_puts, .-__argp_fmtstream_puts
71 .p2align 4,,15
72 .globl __argp_fmtstream_putc
73 .type __argp_fmtstream_putc, @function
74 __argp_fmtstream_putc:
75 pushq %rbp
76 pushq %rbx
77 movq %rdi, %rbp
78 movl %esi, %ebx
79 subq $8, %rsp
80 movq 56(%rdi), %rax
81 cmpq 64(%rdi), %rax
82 jnb .L19
83 .L15:
84 leaq 1(%rax), %rdx
85 movq %rdx, 56(%rbp)
86 movb %bl, (%rax)
87 movsbl %bl, %eax
88 .L14:
89 addq $8, %rsp
90 popq %rbx
91 popq %rbp
92 ret
93 .p2align 4,,10
94 .p2align 3
95 .L19:
96 movl $1, %esi
97 call __argp_fmtstream_ensure
98 testl %eax, %eax
99 je .L17
100 movq 56(%rbp), %rax
101 jmp .L15
102 .L17:
103 movl $-1, %eax
104 jmp .L14
105 .size __argp_fmtstream_putc, .-__argp_fmtstream_putc
106 .p2align 4,,15
107 .globl __argp_fmtstream_set_lmargin
108 .type __argp_fmtstream_set_lmargin, @function
109 __argp_fmtstream_set_lmargin:
110 pushq %rbx
111 movq %rdi, %rbx
112 subq $16, %rsp
113 movq 56(%rdi), %rax
114 subq 48(%rdi), %rax
115 cmpq 32(%rdi), %rax
116 jbe .L21
117 movq %rsi, 8(%rsp)
118 call __argp_fmtstream_update
119 movq 8(%rsp), %rsi
120 .L21:
121 movq 8(%rbx), %rax
122 movq %rsi, 8(%rbx)
123 addq $16, %rsp
124 popq %rbx
126 .size __argp_fmtstream_set_lmargin, .-__argp_fmtstream_set_lmargin
127 .p2align 4,,15
128 .globl __argp_fmtstream_set_rmargin
129 .type __argp_fmtstream_set_rmargin, @function
130 __argp_fmtstream_set_rmargin:
131 pushq %rbx
132 movq %rdi, %rbx
133 subq $16, %rsp
134 movq 56(%rdi), %rax
135 subq 48(%rdi), %rax
136 cmpq 32(%rdi), %rax
137 jbe .L24
138 movq %rsi, 8(%rsp)
139 call __argp_fmtstream_update
140 movq 8(%rsp), %rsi
141 .L24:
142 movq 16(%rbx), %rax
143 movq %rsi, 16(%rbx)
144 addq $16, %rsp
145 popq %rbx
147 .size __argp_fmtstream_set_rmargin, .-__argp_fmtstream_set_rmargin
148 .p2align 4,,15
149 .globl __argp_fmtstream_set_wmargin
150 .type __argp_fmtstream_set_wmargin, @function
151 __argp_fmtstream_set_wmargin:
152 pushq %rbx
153 movq %rdi, %rbx
154 subq $16, %rsp
155 movq 56(%rdi), %rax
156 subq 48(%rdi), %rax
157 cmpq 32(%rdi), %rax
158 jbe .L27
159 movq %rsi, 8(%rsp)
160 call __argp_fmtstream_update
161 movq 8(%rsp), %rsi
162 .L27:
163 movq 24(%rbx), %rax
164 movq %rsi, 24(%rbx)
165 addq $16, %rsp
166 popq %rbx
168 .size __argp_fmtstream_set_wmargin, .-__argp_fmtstream_set_wmargin
169 .p2align 4,,15
170 .globl __argp_fmtstream_point
171 .type __argp_fmtstream_point, @function
172 __argp_fmtstream_point:
173 movq 56(%rdi), %rax
174 subq 48(%rdi), %rax
175 cmpq 32(%rdi), %rax
176 pushq %rbx
177 movq %rdi, %rbx
178 jbe .L30
179 call __argp_fmtstream_update
180 .L30:
181 cmpq $0, 40(%rbx)
182 movl $0, %eax
183 cmovns 40(%rbx), %rax
184 popq %rbx
186 .size __argp_fmtstream_point, .-__argp_fmtstream_point
187 .hidden __argp_fmtstream_update
188 .hidden __argp_fmtstream_ensure