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