-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathutf8.s
More file actions
166 lines (166 loc) · 2.66 KB
/
utf8.s
File metadata and controls
166 lines (166 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
.file "utf8.c"
.def ___main; .scl 2; .type 32; .endef
.section .rdata,"dr"
LC0:
.ascii "%d\12\0"
.text
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
LFB10:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
andl $-16, %esp
subl $32, %esp
call ___main
movl $1819043176, 18(%esp)
movw $111, 22(%esp)
leal 18(%esp), %eax
movl %eax, (%esp)
call _puts
movl $1, 28(%esp)
jmp L2
L3:
movl 28(%esp), %eax
movl %eax, 4(%esp)
movl $LC0, (%esp)
call _printf
L2:
movl 28(%esp), %eax
leal -1(%eax), %edx
movl %edx, 28(%esp)
testl %eax, %eax
jg L3
movl $100, 24(%esp)
leal 18(%esp), %eax
movl %eax, (%esp)
call _spc_utf8_isvalid
movl %eax, 24(%esp)
movl 24(%esp), %eax
movl %eax, 4(%esp)
movl $LC0, (%esp)
call _printf
movl $0, %eax
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE10:
.globl _spc_utf8_isvalid
.def _spc_utf8_isvalid; .scl 2; .type 32; .endef
_spc_utf8_isvalid:
LFB11:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
subl $16, %esp
movl 8(%ebp), %eax
movl %eax, -8(%ebp)
movl 8(%ebp), %eax
movl %eax, -8(%ebp)
jmp L6
L17:
movl -8(%ebp), %eax
movzbl (%eax), %eax
testb %al, %al
js L7
movl $0, -4(%ebp)
jmp L15
L7:
movl -8(%ebp), %eax
movzbl (%eax), %eax
movzbl %al, %eax
andl $192, %eax
cmpl $128, %eax
jne L9
movl $0, %eax
jmp L10
L9:
movl -8(%ebp), %eax
movzbl (%eax), %eax
movzbl %al, %eax
andl $224, %eax
cmpl $192, %eax
jne L11
movl $1, -4(%ebp)
jmp L15
L11:
movl -8(%ebp), %eax
movzbl (%eax), %eax
movzbl %al, %eax
andl $240, %eax
cmpl $224, %eax
jne L12
movl $2, -4(%ebp)
jmp L15
L12:
movl -8(%ebp), %eax
movzbl (%eax), %eax
movzbl %al, %eax
andl $248, %eax
cmpl $240, %eax
jne L13
movl $3, -4(%ebp)
jmp L15
L13:
movl -8(%ebp), %eax
movzbl (%eax), %eax
movzbl %al, %eax
andl $252, %eax
cmpl $248, %eax
jne L14
movl $4, -4(%ebp)
jmp L15
L14:
movl -8(%ebp), %eax
movzbl (%eax), %eax
movzbl %al, %eax
andl $254, %eax
cmpl $252, %eax
jne L15
movl $5, -4(%ebp)
jmp L15
L16:
movl -4(%ebp), %edx
movl -8(%ebp), %eax
addl %edx, %eax
movzbl (%eax), %eax
movzbl %al, %eax
andl $192, %eax
cmpl $128, %eax
je L15
movl $0, %eax
jmp L10
L15:
movl -4(%ebp), %eax
leal -1(%eax), %edx
movl %edx, -4(%ebp)
testl %eax, %eax
jg L16
movl -4(%ebp), %eax
addl $1, %eax
addl %eax, -8(%ebp)
L6:
movl -8(%ebp), %eax
movzbl (%eax), %eax
testb %al, %al
jne L17
movl $1, %eax
L10:
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE11:
.ident "GCC: (MinGW.org GCC-6.3.0-1) 6.3.0"
.def _puts; .scl 2; .type 32; .endef
.def _printf; .scl 2; .type 32; .endef