clarify the purpose of this project
[nyanglibc.git] / intl / textdomain.s
bloba6275edca58566b94ee1e314a119d2768e1d2cec
1 .text
2 .p2align 4,,15
3 .globl __textdomain
4 .type __textdomain, @function
5 __textdomain:
6 pushq %rbp
7 pushq %rbx
8 subq $8, %rsp
9 testq %rdi, %rdi
10 movq _nl_current_default_domain(%rip), %rbx
11 je .L1
12 cmpq $0, __pthread_rwlock_wrlock@GOTPCREL(%rip)
13 movq %rdi, %rbx
14 je .L4
15 leaq _nl_state_lock(%rip), %rdi
16 call __pthread_rwlock_wrlock@PLT
17 .L4:
18 cmpb $0, (%rbx)
19 movq _nl_current_default_domain(%rip), %rbp
20 jne .L26
21 .L5:
22 leaq _nl_default_default_domain(%rip), %rax
23 movq %rax, _nl_current_default_domain(%rip)
24 movq %rax, %rbx
25 .L7:
26 addl $1, _nl_msg_cat_cntr(%rip)
27 cmpq %rax, %rbp
28 je .L9
29 cmpq %rbx, %rbp
30 je .L9
31 movq %rbp, %rdi
32 call free@PLT
33 .L9:
34 cmpq $0, __pthread_rwlock_unlock@GOTPCREL(%rip)
35 je .L1
36 .L28:
37 leaq _nl_state_lock(%rip), %rdi
38 call __pthread_rwlock_unlock@PLT
39 .L1:
40 addq $8, %rsp
41 movq %rbx, %rax
42 popq %rbx
43 popq %rbp
44 ret
45 .p2align 4,,10
46 .p2align 3
47 .L26:
48 leaq _nl_default_default_domain(%rip), %rsi
49 movq %rbx, %rdi
50 call strcmp
51 testl %eax, %eax
52 je .L5
53 movq %rbp, %rsi
54 movq %rbx, %rdi
55 call strcmp
56 testl %eax, %eax
57 jne .L27
58 addl $1, _nl_msg_cat_cntr(%rip)
59 cmpq $0, __pthread_rwlock_unlock@GOTPCREL(%rip)
60 movq %rbp, %rbx
61 jne .L28
62 jmp .L1
63 .p2align 4,,10
64 .p2align 3
65 .L27:
66 movq %rbx, %rdi
67 call __strdup
68 testq %rax, %rax
69 movq %rax, %rbx
70 je .L9
71 movq %rax, _nl_current_default_domain(%rip)
72 leaq _nl_default_default_domain(%rip), %rax
73 jmp .L7
74 .size __textdomain, .-__textdomain
75 .weak textdomain
76 .set textdomain,__textdomain
77 .weak __pthread_rwlock_unlock
78 .weak __pthread_rwlock_wrlock
79 .hidden __strdup
80 .hidden strcmp
81 .hidden _nl_default_default_domain
82 .hidden _nl_state_lock
83 .hidden _nl_current_default_domain