clarify the purpose of this project
[nyanglibc.git] / login / getutline_r.s
blob3f65ec5d7972ebc9c674791b4e4b4f8aa49c1efc
1 .text
2 .p2align 4,,15
3 .globl __getutline_r
4 .hidden __getutline_r
5 .type __getutline_r, @function
6 __getutline_r:
7 pushq %rbx
8 movq %rdi, %rbx
9 subq $16, %rsp
10 #APP
11 # 37 "getutline_r.c" 1
12 movl %fs:24,%eax
13 # 0 "" 2
14 #NO_APP
15 testl %eax, %eax
16 jne .L2
17 movl $1, %ecx
18 #APP
19 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
20 cmpxchgl %ecx, __libc_utmp_lock(%rip)
21 # 0 "" 2
22 #NO_APP
23 .L3:
24 movq %rbx, %rdi
25 call __libc_getutline_r
26 movl %eax, %r8d
27 #APP
28 # 41 "getutline_r.c" 1
29 movl %fs:24,%eax
30 # 0 "" 2
31 #NO_APP
32 testl %eax, %eax
33 jne .L4
34 subl $1, __libc_utmp_lock(%rip)
35 .L1:
36 addq $16, %rsp
37 movl %r8d, %eax
38 popq %rbx
39 ret
40 .p2align 4,,10
41 .p2align 3
42 .L2:
43 xorl %eax, %eax
44 movl $1, %ecx
45 lock cmpxchgl %ecx, __libc_utmp_lock(%rip)
46 je .L3
47 leaq __libc_utmp_lock(%rip), %rdi
48 movq %rdx, 8(%rsp)
49 movq %rsi, (%rsp)
50 call __lll_lock_wait_private
51 movq 8(%rsp), %rdx
52 movq (%rsp), %rsi
53 jmp .L3
54 .p2align 4,,10
55 .p2align 3
56 .L4:
57 xorl %eax, %eax
58 #APP
59 # 41 "getutline_r.c" 1
60 xchgl %eax, __libc_utmp_lock(%rip)
61 # 0 "" 2
62 #NO_APP
63 cmpl $1, %eax
64 jle .L1
65 xorl %r10d, %r10d
66 movl $1, %edx
67 movl $129, %esi
68 leaq __libc_utmp_lock(%rip), %rdi
69 movl $202, %eax
70 #APP
71 # 41 "getutline_r.c" 1
72 syscall
74 # 0 "" 2
75 #NO_APP
76 jmp .L1
77 .size __getutline_r, .-__getutline_r
78 .weak getutline_r
79 .set getutline_r,__getutline_r
80 .hidden __lll_lock_wait_private
81 .hidden __libc_getutline_r
82 .hidden __libc_utmp_lock