clarify the purpose of this project
[nyanglibc.git] / gshadow / getsgent.shared.s
blob53d268c9779c779b7c0325a60d1f59e74d599759
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section __libc_freeres_ptrs, "aw", %nobits
7 .previous
8 #NO_APP
9 .p2align 4,,15
10 .globl getsgent
11 .type getsgent, @function
12 getsgent:
13 .LFB70:
14 pushq %rbx
15 #APP
16 # 81 "../nss/getXXent.c" 1
17 movl %fs:24,%eax
18 # 0 "" 2
19 #NO_APP
20 testl %eax, %eax
21 jne .L2
22 movl $1, %edx
23 #APP
24 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
25 cmpxchgl %edx, lock(%rip)
26 # 0 "" 2
27 #NO_APP
28 .L3:
29 leaq buffer_size.10462(%rip), %r8
30 leaq buffer(%rip), %rdx
31 leaq resbuf.10466(%rip), %rsi
32 leaq __getsgent_r(%rip), %rdi
33 xorl %r9d, %r9d
34 movl $1024, %ecx
35 call __nss_getent
36 movq __libc_errno@gottpoff(%rip), %r8
37 movq %rax, %r9
38 movl %fs:(%r8), %ebx
39 #APP
40 # 89 "../nss/getXXent.c" 1
41 movl %fs:24,%eax
42 # 0 "" 2
43 #NO_APP
44 testl %eax, %eax
45 jne .L4
46 subl $1, lock(%rip)
47 .L5:
48 movl %ebx, %fs:(%r8)
49 movq %r9, %rax
50 popq %rbx
51 ret
52 .p2align 4,,10
53 .p2align 3
54 .L2:
55 xorl %eax, %eax
56 movl $1, %edx
57 lock cmpxchgl %edx, lock(%rip)
58 je .L3
59 leaq lock(%rip), %rdi
60 call __lll_lock_wait_private
61 jmp .L3
62 .p2align 4,,10
63 .p2align 3
64 .L4:
65 xorl %eax, %eax
66 #APP
67 # 89 "../nss/getXXent.c" 1
68 xchgl %eax, lock(%rip)
69 # 0 "" 2
70 #NO_APP
71 cmpl $1, %eax
72 jle .L5
73 xorl %r10d, %r10d
74 movl $1, %edx
75 movl $129, %esi
76 leaq lock(%rip), %rdi
77 movl $202, %eax
78 #APP
79 # 89 "../nss/getXXent.c" 1
80 syscall
82 # 0 "" 2
83 #NO_APP
84 jmp .L5
85 .LFE70:
86 .size getsgent, .-getsgent
87 .local buffer_size.10462
88 .comm buffer_size.10462,8,8
89 .local resbuf.10466
90 .comm resbuf.10466,32,32
91 .section __libc_freeres_ptrs
92 #,"aw",@progbits
93 .align 8
94 .type buffer, @object
95 .size buffer, 8
96 buffer:
97 .zero 8
98 .local lock
99 .comm lock,4,4
100 .hidden __lll_lock_wait_private
101 .hidden __nss_getent
102 .hidden __getsgent_r