clarify the purpose of this project
[nyanglibc.git] / stdlib / rpmatch.shared.s
blobe347088d75d8ccb91c40cd4935f98cb9b92af6d6
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .type try, @function
9 try:
10 pushq %r15
11 pushq %r14
12 movq %rdi, %r15
13 pushq %r13
14 pushq %r12
15 movl %esi, %edi
16 pushq %rbp
17 pushq %rbx
18 movq %r8, %r12
19 movl %edx, %ebx
20 movl %ecx, %r14d
21 movq %r9, %r13
22 subq $8, %rsp
23 call __GI_nl_langinfo
24 movq %rax, %rbp
25 movq (%r12), %rax
26 cmpq %rbp, %rax
27 je .L2
28 testq %rax, %rax
29 je .L3
30 movq %r13, %rdi
31 call __GI___regfree
32 movq $0, (%r12)
33 .L3:
34 movl $1, %edx
35 movq %rbp, %rsi
36 movq %r13, %rdi
37 call __GI___regcomp
38 testl %eax, %eax
39 jne .L5
40 movq %rbp, (%r12)
41 .L2:
42 xorl %r8d, %r8d
43 xorl %ecx, %ecx
44 xorl %edx, %edx
45 movq %r15, %rsi
46 movq %r13, %rdi
47 call __GI___regexec
48 testl %eax, %eax
49 movl %r14d, %eax
50 cmove %ebx, %eax
51 .L1:
52 addq $8, %rsp
53 popq %rbx
54 popq %rbp
55 popq %r12
56 popq %r13
57 popq %r14
58 popq %r15
59 ret
60 .p2align 4,,10
61 .p2align 3
62 .L5:
63 movl $-1, %eax
64 jmp .L1
65 .size try, .-try
66 .p2align 4,,15
67 .globl rpmatch
68 .type rpmatch, @function
69 rpmatch:
70 pushq %rbx
71 leaq yesre.4174(%rip), %r9
72 leaq yesexpr.4172(%rip), %r8
73 xorl %ecx, %ecx
74 movl $1, %edx
75 movl $327680, %esi
76 movq %rdi, %rbx
77 call try
78 testl %eax, %eax
79 je .L15
80 popq %rbx
81 ret
82 .p2align 4,,10
83 .p2align 3
84 .L15:
85 movq %rbx, %rdi
86 leaq nore.4175(%rip), %r9
87 leaq noexpr.4173(%rip), %r8
88 popq %rbx
89 movl $-1, %ecx
90 xorl %edx, %edx
91 movl $327681, %esi
92 jmp try
93 .size rpmatch, .-rpmatch
94 .local nore.4175
95 .comm nore.4175,64,32
96 .local noexpr.4173
97 .comm noexpr.4173,8,8
98 .local yesre.4174
99 .comm yesre.4174,64,32
100 .local yesexpr.4172
101 .comm yesexpr.4172,8,8