clarify the purpose of this project
[nyanglibc.git] / login / utmp_file.s
blob5cedf1894d3b283131d5ffef034536d05178146b
1 .text
2 .p2align 4,,15
3 .type timeout_handler, @function
4 timeout_handler:
5 rep ret
6 .size timeout_handler, .-timeout_handler
7 .p2align 4,,15
8 .type try_file_lock, @function
9 try_file_lock:
10 pushq %r14
11 pushq %r13
12 pushq %r12
13 pushq %rbp
14 movl %esi, %ebp
15 pushq %rbx
16 movl %edi, %ebx
17 xorl %edi, %edi
18 subq $352, %rsp
19 leaq 32(%rsp), %r12
20 call alarm
21 leaq 192(%rsp), %rsi
22 movl %eax, %r13d
23 leaq timeout_handler(%rip), %rax
24 movq %r12, %rdx
25 movl $14, %edi
26 movq $0, 200(%rsp)
27 movq %rax, 192(%rsp)
28 movl $0, 328(%rsp)
29 call __sigaction
30 movl $10, %edi
31 call alarm
32 pxor %xmm0, %xmm0
33 xorl %eax, %eax
34 movq %rsp, %rdx
35 movl $7, %esi
36 movl %ebx, %edi
37 movw %ax, 30(%rsp)
38 xorl %eax, %eax
39 movw %bp, (%rsp)
40 movups %xmm0, 2(%rsp)
41 movq $0, 18(%rsp)
42 movl $0, 26(%rsp)
43 call __fcntl64_nocancel
44 xorl %edi, %edi
45 shrl $31, %eax
46 movq __libc_errno@gottpoff(%rip), %rbp
47 movl %eax, %ebx
48 movl %fs:0(%rbp), %r14d
49 call alarm
50 xorl %edx, %edx
51 movq %r12, %rsi
52 movl $14, %edi
53 call __sigaction
54 testl %r13d, %r13d
55 je .L4
56 movl %r13d, %edi
57 call alarm
58 .L4:
59 movl %r14d, %fs:0(%rbp)
60 addq $352, %rsp
61 movl %ebx, %eax
62 popq %rbx
63 popq %rbp
64 popq %r12
65 popq %r13
66 popq %r14
67 ret
68 .size try_file_lock, .-try_file_lock
69 .p2align 4,,15
70 .type read_last_entry, @function
71 read_last_entry:
72 pushq %rbx
73 movl $384, %edx
74 subq $384, %rsp
75 movq file_offset(%rip), %rcx
76 movl file_fd(%rip), %edi
77 movq %rsp, %rbx
78 movq %rbx, %rsi
79 call __pread64_nocancel
80 testq %rax, %rax
81 js .L11
82 movq %rax, %rdx
83 xorl %eax, %eax
84 cmpq $384, %rdx
85 jne .L9
86 leaq last_entry(%rip), %rdi
87 movl $48, %ecx
88 movq %rbx, %rsi
89 rep movsq
90 addq $384, file_offset(%rip)
91 movl $1, %eax
92 .L9:
93 addq $384, %rsp
94 popq %rbx
95 ret
96 .p2align 4,,10
97 .p2align 3
98 .L11:
99 movq $-1, %rax
100 jmp .L9
101 .size read_last_entry, .-read_last_entry
102 .p2align 4,,15
103 .type matches_last_entry, @function
104 matches_last_entry:
105 xorl %eax, %eax
106 cmpq $0, file_offset(%rip)
107 jle .L23
108 movzwl (%rdi), %edx
109 movzwl last_entry(%rip), %ecx
110 leal -1(%rdx), %esi
111 cmpw $3, %si
112 ja .L16
113 cmpw %cx, %dx
114 sete %al
116 .p2align 4,,10
117 .p2align 3
118 .L16:
119 subl $5, %ecx
120 cmpw $3, %cx
121 ja .L23
122 subl $5, %edx
123 cmpw $3, %dx
124 ja .L23
125 subq $8, %rsp
126 cmpb $0, 40+last_entry(%rip)
127 je .L18
128 cmpb $0, 40(%rdi)
129 je .L18
130 leaq 40(%rdi), %rsi
131 leaq 40+last_entry(%rip), %rdi
132 movl $4, %edx
133 call strncmp
134 testl %eax, %eax
135 sete %al
136 jmp .L14
137 .p2align 4,,10
138 .p2align 3
139 .L23:
140 rep ret
141 .p2align 4,,10
142 .p2align 3
143 .L18:
144 leaq 8(%rdi), %rsi
145 leaq 8+last_entry(%rip), %rdi
146 movl $32, %edx
147 call strncmp
148 testl %eax, %eax
149 sete %al
150 .L14:
151 addq $8, %rsp
153 .size matches_last_entry, .-matches_last_entry
154 .p2align 4,,15
155 .type internal_getut_nolock, @function
156 internal_getut_nolock:
157 pushq %rbx
158 movq %rdi, %rbx
159 jmp .L29
160 .p2align 4,,10
161 .p2align 3
162 .L36:
163 je .L34
164 movq %rbx, %rdi
165 call matches_last_entry
166 testb %al, %al
167 jne .L35
168 .L29:
169 call read_last_entry
170 testq %rax, %rax
171 jns .L36
172 movl $-1, %eax
173 popq %rbx
175 .p2align 4,,10
176 .p2align 3
177 .L34:
178 movq __libc_errno@gottpoff(%rip), %rax
179 movl $3, %fs:(%rax)
180 movl $-1, %eax
181 popq %rbx
183 .p2align 4,,10
184 .p2align 3
185 .L35:
186 xorl %eax, %eax
187 popq %rbx
189 .size internal_getut_nolock, .-internal_getut_nolock
190 .section .rodata.str1.1,"aMS",@progbits,1
191 .LC0:
192 .string "/var/log/wtmpx"
193 .LC1:
194 .string "/var/run/utmpx"
195 .LC2:
196 .string "/var/run/utmp"
197 .LC3:
198 .string "/var/log/wtmp"
199 .text
200 .p2align 4,,15
201 .globl __libc_setutent
202 .hidden __libc_setutent
203 .type __libc_setutent, @function
204 __libc_setutent:
205 subq $8, %rsp
206 movl file_fd(%rip), %edi
207 testl %edi, %edi
208 jns .L38
209 movq __libc_utmp_file_name(%rip), %rdx
210 leaq .LC2(%rip), %rdi
211 movl $14, %ecx
212 movq %rdx, %rsi
213 repz cmpsb
214 je .L54
215 .L39:
216 leaq .LC3(%rip), %rdi
217 movl $14, %ecx
218 movq %rdx, %rsi
219 repz cmpsb
220 je .L55
221 .L41:
222 leaq .LC1(%rip), %rax
223 movl $15, %ecx
224 movq %rdx, %rsi
225 movq %rax, %rdi
226 repz cmpsb
227 je .L56
228 .L42:
229 leaq .LC0(%rip), %rax
230 movl $15, %ecx
231 movq %rdx, %rsi
232 movq %rax, %rdi
233 repz cmpsb
234 je .L57
235 .L40:
236 movq %rdx, %rdi
237 xorl %eax, %eax
238 movl $524288, %esi
239 movb $0, file_writable(%rip)
240 call __open_nocancel
241 movl %eax, %edi
242 movl %eax, file_fd(%rip)
243 xorl %eax, %eax
244 cmpl $-1, %edi
245 je .L37
246 .L38:
247 xorl %edx, %edx
248 xorl %esi, %esi
249 call __lseek64
250 movq $0, file_offset(%rip)
251 movl $1, %eax
252 .L37:
253 addq $8, %rsp
255 .p2align 4,,10
256 .p2align 3
257 .L54:
258 leaq .LC1(%rip), %rdi
259 xorl %esi, %esi
260 call __access
261 testl %eax, %eax
262 leaq .LC1(%rip), %rdx
263 je .L40
264 movq __libc_utmp_file_name(%rip), %rdx
265 jmp .L39
266 .p2align 4,,10
267 .p2align 3
268 .L55:
269 leaq .LC0(%rip), %rdi
270 xorl %esi, %esi
271 call __access
272 testl %eax, %eax
273 leaq .LC0(%rip), %rdx
274 je .L40
275 movq __libc_utmp_file_name(%rip), %rdx
276 jmp .L41
277 .p2align 4,,10
278 .p2align 3
279 .L56:
280 xorl %esi, %esi
281 movq %rax, %rdi
282 call __access
283 testl %eax, %eax
284 leaq .LC2(%rip), %rdx
285 jne .L40
286 movq __libc_utmp_file_name(%rip), %rdx
287 jmp .L42
288 .p2align 4,,10
289 .p2align 3
290 .L57:
291 xorl %esi, %esi
292 movq %rax, %rdi
293 call __access
294 leaq .LC3(%rip), %rdx
295 testl %eax, %eax
296 cmove __libc_utmp_file_name(%rip), %rdx
297 jmp .L40
298 .size __libc_setutent, .-__libc_setutent
299 .p2align 4,,15
300 .globl __libc_getutent_r
301 .hidden __libc_getutent_r
302 .type __libc_getutent_r, @function
303 __libc_getutent_r:
304 pushq %r14
305 pushq %r13
306 pushq %r12
307 pushq %rbp
308 movq %rdi, %rbp
309 pushq %rbx
310 movq %rsi, %rbx
311 subq $32, %rsp
312 movl file_fd(%rip), %edi
313 movq __libc_errno@gottpoff(%rip), %r12
314 testl %edi, %edi
315 movl %fs:(%r12), %r13d
316 js .L70
317 .L59:
318 xorl %esi, %esi
319 call try_file_lock
320 testb %al, %al
321 jne .L71
322 call read_last_entry
323 pxor %xmm0, %xmm0
324 movl file_fd(%rip), %edi
325 movq %rax, %r14
326 movl $2, %edx
327 xorl %eax, %eax
328 movw %ax, 30(%rsp)
329 movw %dx, (%rsp)
330 xorl %eax, %eax
331 movq %rsp, %rdx
332 movl $7, %esi
333 movq $0, 18(%rsp)
334 movups %xmm0, 2(%rsp)
335 movl $0, 26(%rsp)
336 call __fcntl64_nocancel
337 cmpq $0, %r14
338 jle .L72
339 movq last_entry(%rip), %rax
340 leaq 8(%rbp), %rdi
341 movq %rbp, %rcx
342 leaq last_entry(%rip), %rsi
343 andq $-8, %rdi
344 movq %rax, 0(%rbp)
345 movq 376+last_entry(%rip), %rax
346 subq %rdi, %rcx
347 subq %rcx, %rsi
348 addl $384, %ecx
349 shrl $3, %ecx
350 movq %rax, 376(%rbp)
351 xorl %eax, %eax
352 rep movsq
353 movq %rbp, (%rbx)
354 .L58:
355 addq $32, %rsp
356 popq %rbx
357 popq %rbp
358 popq %r12
359 popq %r13
360 popq %r14
362 .p2align 4,,10
363 .p2align 3
364 .L70:
365 call __libc_setutent
366 testl %eax, %eax
367 movl file_fd(%rip), %edi
368 jne .L59
369 .L60:
370 movq $0, (%rbx)
371 addq $32, %rsp
372 movl $-1, %eax
373 popq %rbx
374 popq %rbp
375 popq %r12
376 popq %r13
377 popq %r14
379 .p2align 4,,10
380 .p2align 3
381 .L71:
382 movl $-1, %eax
383 jmp .L58
384 .p2align 4,,10
385 .p2align 3
386 .L72:
387 jne .L60
388 movl %r13d, %fs:(%r12)
389 jmp .L60
390 .size __libc_getutent_r, .-__libc_getutent_r
391 .p2align 4,,15
392 .globl __libc_getutid_r
393 .hidden __libc_getutid_r
394 .type __libc_getutid_r, @function
395 __libc_getutid_r:
396 pushq %r12
397 pushq %rbp
398 movq %rdi, %r12
399 pushq %rbx
400 movq %rsi, %rbp
401 movq %rdx, %rbx
402 subq $32, %rsp
403 movl file_fd(%rip), %edi
404 testl %edi, %edi
405 js .L85
406 .L74:
407 xorl %esi, %esi
408 call try_file_lock
409 testb %al, %al
410 jne .L75
411 movq %r12, %rdi
412 call internal_getut_nolock
413 pxor %xmm0, %xmm0
414 movl file_fd(%rip), %edi
415 movl %eax, %r12d
416 movl $2, %edx
417 xorl %eax, %eax
418 movw %ax, 30(%rsp)
419 movw %dx, (%rsp)
420 xorl %eax, %eax
421 movq %rsp, %rdx
422 movl $7, %esi
423 movq $0, 18(%rsp)
424 movups %xmm0, 2(%rsp)
425 movl $0, 26(%rsp)
426 call __fcntl64_nocancel
427 testl %r12d, %r12d
428 js .L75
429 movq last_entry(%rip), %rax
430 leaq 8(%rbp), %rdi
431 movq %rbp, %rcx
432 leaq last_entry(%rip), %rsi
433 andq $-8, %rdi
434 movq %rax, 0(%rbp)
435 movq 376+last_entry(%rip), %rax
436 subq %rdi, %rcx
437 subq %rcx, %rsi
438 addl $384, %ecx
439 shrl $3, %ecx
440 movq %rax, 376(%rbp)
441 xorl %eax, %eax
442 rep movsq
443 movq %rbp, (%rbx)
444 addq $32, %rsp
445 popq %rbx
446 popq %rbp
447 popq %r12
449 .p2align 4,,10
450 .p2align 3
451 .L85:
452 call __libc_setutent
453 testl %eax, %eax
454 movl file_fd(%rip), %edi
455 jne .L74
456 .L75:
457 movq $0, (%rbx)
458 addq $32, %rsp
459 movl $-1, %eax
460 popq %rbx
461 popq %rbp
462 popq %r12
464 .size __libc_getutid_r, .-__libc_getutid_r
465 .p2align 4,,15
466 .globl __libc_getutline_r
467 .hidden __libc_getutline_r
468 .type __libc_getutline_r, @function
469 __libc_getutline_r:
470 pushq %r14
471 pushq %r13
472 movq %rdi, %r13
473 pushq %r12
474 pushq %rbp
475 movq %rsi, %r12
476 pushq %rbx
477 movq %rdx, %rbp
478 subq $32, %rsp
479 movl file_fd(%rip), %edi
480 testl %edi, %edi
481 js .L99
482 .L87:
483 xorl %esi, %esi
484 call try_file_lock
485 testb %al, %al
486 jne .L98
487 addq $8, %r13
488 .p2align 4,,10
489 .p2align 3
490 .L95:
491 call read_last_entry
492 testq %rax, %rax
493 js .L100
494 je .L101
495 movzwl last_entry(%rip), %eax
496 leaq last_entry(%rip), %rbx
497 subl $6, %eax
498 cmpw $1, %ax
499 ja .L95
500 leaq 8(%rbx), %rsi
501 movl $32, %edx
502 movq %r13, %rdi
503 call strncmp
504 testl %eax, %eax
505 movl %eax, %r14d
506 jne .L95
507 pxor %xmm0, %xmm0
508 movl file_fd(%rip), %edi
509 xorl %eax, %eax
510 movl $2, %edx
511 movl $7, %esi
512 movw %ax, 30(%rsp)
513 movw %dx, (%rsp)
514 xorl %eax, %eax
515 movq %rsp, %rdx
516 movq $0, 18(%rsp)
517 movl $0, 26(%rsp)
518 movups %xmm0, 2(%rsp)
519 call __fcntl64_nocancel
520 leaq 8(%r12), %rdi
521 movq %rbx, %rsi
522 movq (%rbx), %rax
523 andq $-8, %rdi
524 movq %rax, (%r12)
525 movq 376+last_entry(%rip), %rax
526 movq %rax, 376(%r12)
527 movq %r12, %rax
528 subq %rdi, %rax
529 leal 384(%rax), %ecx
530 subq %rax, %rsi
531 movl %ecx, %eax
532 shrl $3, %eax
533 movl %eax, %ecx
534 movl %r14d, %eax
535 rep movsq
536 movq %r12, 0(%rbp)
537 addq $32, %rsp
538 popq %rbx
539 popq %rbp
540 popq %r12
541 popq %r13
542 popq %r14
544 .p2align 4,,10
545 .p2align 3
546 .L101:
547 pxor %xmm0, %xmm0
548 movl file_fd(%rip), %edi
549 movl $2, %esi
550 xorl %ecx, %ecx
551 movq %rsp, %rdx
552 movw %si, (%rsp)
553 xorl %eax, %eax
554 movl $7, %esi
555 movups %xmm0, 2(%rsp)
556 movq $0, 18(%rsp)
557 movl $0, 26(%rsp)
558 movw %cx, 30(%rsp)
559 call __fcntl64_nocancel
560 movq __libc_errno@gottpoff(%rip), %rax
561 movl $3, %fs:(%rax)
562 .L98:
563 movq $0, 0(%rbp)
564 movl $-1, %r14d
565 addq $32, %rsp
566 popq %rbx
567 movl %r14d, %eax
568 popq %rbp
569 popq %r12
570 popq %r13
571 popq %r14
573 .p2align 4,,10
574 .p2align 3
575 .L100:
576 xorl %edi, %edi
577 pxor %xmm0, %xmm0
578 movw %di, 30(%rsp)
579 movl file_fd(%rip), %edi
580 movl $2, %r8d
581 movq %rsp, %rdx
582 movl $7, %esi
583 xorl %eax, %eax
584 movups %xmm0, 2(%rsp)
585 movq $0, 18(%rsp)
586 movl $0, 26(%rsp)
587 movl $-1, %r14d
588 movw %r8w, (%rsp)
589 call __fcntl64_nocancel
590 movq $0, 0(%rbp)
591 addq $32, %rsp
592 movl %r14d, %eax
593 popq %rbx
594 popq %rbp
595 popq %r12
596 popq %r13
597 popq %r14
599 .p2align 4,,10
600 .p2align 3
601 .L99:
602 call __libc_setutent
603 testl %eax, %eax
604 movl file_fd(%rip), %edi
605 jne .L87
606 jmp .L98
607 .size __libc_getutline_r, .-__libc_getutline_r
608 .p2align 4,,15
609 .globl __libc_pututline
610 .hidden __libc_pututline
611 .type __libc_pututline, @function
612 __libc_pututline:
613 pushq %r12
614 pushq %rbp
615 pushq %rbx
616 movq %rdi, %rbx
617 subq $32, %rsp
618 movl file_fd(%rip), %r9d
619 testl %r9d, %r9d
620 js .L140
621 .L103:
622 cmpb $0, file_writable(%rip)
623 jne .L122
624 movq __libc_utmp_file_name(%rip), %rdx
625 leaq .LC2(%rip), %rdi
626 movl $14, %ecx
627 movq %rdx, %rsi
628 repz cmpsb
629 je .L141
630 .L105:
631 leaq .LC3(%rip), %rdi
632 movl $14, %ecx
633 movq %rdx, %rsi
634 repz cmpsb
635 je .L142
636 .L107:
637 leaq .LC1(%rip), %rax
638 movl $15, %ecx
639 movq %rdx, %rsi
640 movq %rax, %rdi
641 repz cmpsb
642 je .L143
643 .L108:
644 leaq .LC0(%rip), %rax
645 movl $15, %ecx
646 movq %rdx, %rsi
647 movq %rax, %rdi
648 repz cmpsb
649 je .L144
650 .L106:
651 xorl %eax, %eax
652 movl $524290, %esi
653 movq %rdx, %rdi
654 call __open_nocancel
655 cmpl $-1, %eax
656 movl %eax, %ebp
657 je .L139
658 movl file_fd(%rip), %esi
659 movl %eax, %edi
660 call __dup2
661 testl %eax, %eax
662 movl %ebp, %edi
663 js .L145
664 call __close_nocancel
665 movb $1, file_writable(%rip)
666 .L122:
667 movl file_fd(%rip), %edi
668 movl $1, %esi
669 call try_file_lock
670 testb %al, %al
671 movl %eax, %r12d
672 jne .L139
673 movq %rbx, %rdi
674 call matches_last_entry
675 testb %al, %al
676 je .L116
677 subq $384, file_offset(%rip)
678 call read_last_entry
679 testq %rax, %rax
680 js .L119
681 jne .L146
682 .L116:
683 movq %rbx, %rdi
684 call internal_getut_nolock
685 testl %eax, %eax
686 js .L147
687 .L113:
688 movq file_offset(%rip), %rax
689 movl $1, %r12d
690 leaq -384(%rax), %rbp
691 .L117:
692 movl file_fd(%rip), %edi
693 xorl %edx, %edx
694 movq %rbp, %rsi
695 call __lseek64
696 testq %rax, %rax
697 js .L119
698 movl file_fd(%rip), %edi
699 movl $384, %edx
700 movq %rbx, %rsi
701 call __write_nocancel
702 testq %rax, %rax
703 js .L119
704 cmpq $384, %rax
705 movl file_fd(%rip), %edi
706 jne .L148
707 pxor %xmm0, %xmm0
708 xorl %eax, %eax
709 movl $2, %edx
710 movw %ax, 30(%rsp)
711 movw %dx, (%rsp)
712 movl $7, %esi
713 movq %rsp, %rdx
714 xorl %eax, %eax
715 addq $384, %rbp
716 movups %xmm0, 2(%rsp)
717 movq $0, 18(%rsp)
718 movl $0, 26(%rsp)
719 call __fcntl64_nocancel
720 movq %rbx, %rax
721 movq %rbp, file_offset(%rip)
722 .L102:
723 addq $32, %rsp
724 popq %rbx
725 popq %rbp
726 popq %r12
728 .p2align 4,,10
729 .p2align 3
730 .L147:
731 movl file_fd(%rip), %edi
732 movl $2, %edx
733 xorl %esi, %esi
734 call __lseek64
735 movabsq $-6148914691236517205, %rdx
736 mulq %rdx
737 shrq $8, %rdx
738 leaq (%rdx,%rdx,2), %rbp
739 salq $7, %rbp
740 jmp .L117
741 .p2align 4,,10
742 .p2align 3
743 .L141:
744 leaq .LC1(%rip), %rdi
745 xorl %esi, %esi
746 call __access
747 testl %eax, %eax
748 leaq .LC1(%rip), %rdx
749 je .L106
750 movq __libc_utmp_file_name(%rip), %rdx
751 jmp .L105
752 .p2align 4,,10
753 .p2align 3
754 .L148:
755 testb %r12b, %r12b
756 jne .L121
757 movq %rbp, %rsi
758 call __ftruncate64
759 movl file_fd(%rip), %edi
760 .L121:
761 pxor %xmm0, %xmm0
762 movl $2, %esi
763 xorl %ecx, %ecx
764 movw %si, (%rsp)
765 movq %rsp, %rdx
766 movl $7, %esi
767 xorl %eax, %eax
768 movq $0, 18(%rsp)
769 movl $0, 26(%rsp)
770 movups %xmm0, 2(%rsp)
771 movw %cx, 30(%rsp)
772 call __fcntl64_nocancel
773 movq __libc_errno@gottpoff(%rip), %rax
774 movl $28, %fs:(%rax)
775 .L139:
776 xorl %eax, %eax
777 .L149:
778 addq $32, %rsp
779 popq %rbx
780 popq %rbp
781 popq %r12
783 .p2align 4,,10
784 .p2align 3
785 .L140:
786 call __libc_setutent
787 testl %eax, %eax
788 jne .L103
789 xorl %eax, %eax
790 jmp .L149
791 .p2align 4,,10
792 .p2align 3
793 .L146:
794 movq %rbx, %rdi
795 call matches_last_entry
796 testb %al, %al
797 jne .L113
798 jmp .L116
799 .p2align 4,,10
800 .p2align 3
801 .L142:
802 leaq .LC0(%rip), %rdi
803 xorl %esi, %esi
804 call __access
805 testl %eax, %eax
806 leaq .LC0(%rip), %rdx
807 je .L106
808 movq __libc_utmp_file_name(%rip), %rdx
809 jmp .L107
810 .p2align 4,,10
811 .p2align 3
812 .L143:
813 xorl %esi, %esi
814 movq %rax, %rdi
815 call __access
816 testl %eax, %eax
817 leaq .LC2(%rip), %rdx
818 jne .L106
819 movq __libc_utmp_file_name(%rip), %rdx
820 jmp .L108
821 .p2align 4,,10
822 .p2align 3
823 .L144:
824 xorl %esi, %esi
825 movq %rax, %rdi
826 call __access
827 leaq .LC3(%rip), %rdx
828 testl %eax, %eax
829 cmove __libc_utmp_file_name(%rip), %rdx
830 jmp .L106
831 .p2align 4,,10
832 .p2align 3
833 .L119:
834 xorl %edi, %edi
835 pxor %xmm0, %xmm0
836 movw %di, 30(%rsp)
837 movl file_fd(%rip), %edi
838 movl $2, %r8d
839 movq %rsp, %rdx
840 movl $7, %esi
841 xorl %eax, %eax
842 movups %xmm0, 2(%rsp)
843 movq $0, 18(%rsp)
844 movl $0, 26(%rsp)
845 movw %r8w, (%rsp)
846 call __fcntl64_nocancel
847 xorl %eax, %eax
848 jmp .L102
849 .p2align 4,,10
850 .p2align 3
851 .L145:
852 call __close_nocancel
853 xorl %eax, %eax
854 jmp .L102
855 .size __libc_pututline, .-__libc_pututline
856 .p2align 4,,15
857 .globl __libc_endutent
858 .hidden __libc_endutent
859 .type __libc_endutent, @function
860 __libc_endutent:
861 movl file_fd(%rip), %edi
862 testl %edi, %edi
863 js .L153
864 subq $8, %rsp
865 call __close_nocancel
866 movl $-1, file_fd(%rip)
867 addq $8, %rsp
869 .p2align 4,,10
870 .p2align 3
871 .L153:
872 rep ret
873 .size __libc_endutent, .-__libc_endutent
874 .p2align 4,,15
875 .globl __libc_updwtmp
876 .hidden __libc_updwtmp
877 .type __libc_updwtmp, @function
878 __libc_updwtmp:
879 pushq %r13
880 pushq %r12
881 xorl %eax, %eax
882 pushq %rbp
883 pushq %rbx
884 movq %rsi, %r12
885 movl $1, %esi
886 subq $40, %rsp
887 call __open_nocancel
888 testl %eax, %eax
889 js .L161
890 movl $1, %esi
891 movl %eax, %edi
892 movl %eax, %ebx
893 call try_file_lock
894 testb %al, %al
895 jne .L169
896 movl $2, %edx
897 xorl %esi, %esi
898 movl %ebx, %edi
899 call __lseek64
900 movabsq $-6148914691236517205, %rdx
901 movq %rax, %rbp
902 mulq %rdx
903 shrq $8, %rdx
904 leaq (%rdx,%rdx,2), %rax
905 movq %rbp, %rdx
906 salq $7, %rax
907 subq %rax, %rdx
908 je .L159
909 subq %rdx, %rbp
910 movl %ebx, %edi
911 movl $-1, %r13d
912 movq %rbp, %rsi
913 call __ftruncate64
914 xorl %esi, %esi
915 movl $2, %edx
916 movl %ebx, %edi
917 call __lseek64
918 testq %rax, %rax
919 js .L160
920 .L159:
921 movl $384, %edx
922 movq %r12, %rsi
923 movl %ebx, %edi
924 call __write_nocancel
925 xorl %r13d, %r13d
926 cmpq $384, %rax
927 jne .L170
928 .L160:
929 pxor %xmm0, %xmm0
930 xorl %eax, %eax
931 movl $2, %edx
932 movw %ax, 30(%rsp)
933 movw %dx, (%rsp)
934 movl %ebx, %edi
935 movq %rsp, %rdx
936 movl $7, %esi
937 xorl %eax, %eax
938 movups %xmm0, 2(%rsp)
939 movq $0, 18(%rsp)
940 movl $0, 26(%rsp)
941 call __fcntl64_nocancel
942 movl %ebx, %edi
943 call __close_nocancel
944 .L156:
945 addq $40, %rsp
946 movl %r13d, %eax
947 popq %rbx
948 popq %rbp
949 popq %r12
950 popq %r13
952 .p2align 4,,10
953 .p2align 3
954 .L170:
955 movq %rbp, %rsi
956 movl %ebx, %edi
957 movl $-1, %r13d
958 call __ftruncate64
959 jmp .L160
960 .p2align 4,,10
961 .p2align 3
962 .L161:
963 movl $-1, %r13d
964 jmp .L156
965 .p2align 4,,10
966 .p2align 3
967 .L169:
968 movl %ebx, %edi
969 movl $-1, %r13d
970 call __close_nocancel
971 jmp .L156
972 .size __libc_updwtmp, .-__libc_updwtmp
973 .local last_entry
974 .comm last_entry,384,32
975 .local file_offset
976 .comm file_offset,8,8
977 .local file_writable
978 .comm file_writable,1,1
979 .data
980 .align 4
981 .type file_fd, @object
982 .size file_fd, 4
983 file_fd:
984 .long -1
985 .hidden __ftruncate64
986 .hidden __write_nocancel
987 .hidden __close_nocancel
988 .hidden __dup2
989 .hidden __access
990 .hidden __lseek64
991 .hidden __open_nocancel
992 .hidden __libc_utmp_file_name
993 .hidden strncmp
994 .hidden __pread64_nocancel
995 .hidden __fcntl64_nocancel
996 .hidden __sigaction
997 .hidden alarm