clarify the purpose of this project
[nyanglibc.git] / locale / freelocale.s
blob16dca2fc9ac2131f1d28e8d765352597104fe04e
1 .text
2 .p2align 4,,15
3 .globl __freelocale
4 .type __freelocale, @function
5 __freelocale:
6 leaq _nl_C_locobj(%rip), %rax
7 cmpq %rax, %rdi
8 je .L1
9 pushq %rbp
10 pushq %rbx
11 movq %rdi, %rbp
12 subq $8, %rsp
13 cmpq $0, __pthread_rwlock_wrlock@GOTPCREL(%rip)
14 je .L3
15 leaq __libc_setlocale_lock(%rip), %rdi
16 call __pthread_rwlock_wrlock@PLT
17 .L3:
18 xorl %ebx, %ebx
19 jmp .L7
20 .p2align 4,,10
21 .p2align 3
22 .L4:
23 addq $1, %rbx
24 .L7:
25 cmpq $6, %rbx
26 je .L4
27 movq 0(%rbp,%rbx,8), %rsi
28 cmpl $-1, 48(%rsi)
29 je .L5
30 movl %ebx, %edi
31 call _nl_remove_locale
32 .L5:
33 cmpl $12, %ebx
34 jne .L4
35 cmpq $0, __pthread_rwlock_unlock@GOTPCREL(%rip)
36 je .L6
37 leaq __libc_setlocale_lock(%rip), %rdi
38 call __pthread_rwlock_unlock@PLT
39 .L6:
40 addq $8, %rsp
41 movq %rbp, %rdi
42 popq %rbx
43 popq %rbp
44 jmp free@PLT
45 .p2align 4,,10
46 .p2align 3
47 .L1:
48 rep ret
49 .size __freelocale, .-__freelocale
50 .weak freelocale
51 .set freelocale,__freelocale
52 .weak __pthread_rwlock_unlock
53 .weak __pthread_rwlock_wrlock
54 .hidden _nl_remove_locale
55 .hidden __libc_setlocale_lock
56 .hidden _nl_C_locobj