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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
.assembly extern System.Runtime { }
.assembly extern System.Console { }
.assembly extern System.Globalization { }
.assembly GitHub_23411
{
}
.module GitHub_23411.exe
.class public auto ansi beforefieldinit GitHub_23411
extends [System.Runtime]System.Object
{
.method public hidebysig static bool
IsValidName (
string name
) cil managed
{
// Method begins at RVA 0x35c8
// Code size 431 (0x1af)
.maxstack 2
.locals init (
[0] int32,
[1] char,
[2] valuetype [System.Globalization]System.Globalization.UnicodeCategory,
[3] valuetype [System.Globalization]System.Globalization.UnicodeCategory,
[4] int32,
[5] int32
)
IL_0000: ldc.i4.0
IL_0001: stloc 5
IL_0005: ldloca 5
IL_0009: ldind.i4
IL_000a: stloc.s 4
IL_000c: ldloc.s 4
IL_000e: switch (IL_0017)
IL_0017: ldc.i4.0
IL_0018: switch (IL_0048)
IL_0021: ldloc.s 4
IL_0023: switch (IL_0170, IL_00a1, IL_005c, IL_013c, IL_0125, IL_01a8, IL_0077, IL_015d)
IL_0048: ldc.i4.0
IL_0049: stloc.0
IL_004a: ldc.i4 2
IL_004f: stloc 5
IL_0053: ldloca 5
IL_0057: ldind.i4
IL_0058: stloc.s 4
IL_005a: br.s IL_0021
IL_005c: br IL_0127
IL_0061: ldloc.0
IL_0062: ldc.i4.1
IL_0063: add
IL_0064: stloc.0
IL_0065: ldc.i4 6
IL_006a: stloc 5
IL_006e: ldloca 5
IL_0072: ldind.i4
IL_0073: stloc.s 4
IL_0075: br.s IL_0021
IL_0077: br IL_0127
IL_007c: ldc.i4.0
IL_007d: ret
IL_007e: ldarg.0
IL_007f: ldloc.0
IL_0080: callvirt instance char [System.Runtime]System.String::get_Chars(int32)
IL_0085: stloc.1
IL_0086: ldloc.1
IL_0087: call valuetype [System.Globalization]System.Globalization.UnicodeCategory [System.Runtime]System.Char::GetUnicodeCategory(char)
IL_008c: stloc.2
IL_008d: ldloc.2
IL_008e: stloc.3
IL_008f: ldc.i4 1
IL_0094: stloc 5
IL_0098: ldloca 5
IL_009c: ldind.i4
IL_009d: stloc.s 4
IL_009f: br.s IL_0021
IL_00a1: ldc.i4 -2385
IL_00a6: stloc 5
IL_00aa: ldloca 5
IL_00ae: ldind.i4
IL_00af: ldc.i4 -2385
IL_00b4: stloc 5
IL_00b8: ldloca 5
IL_00bc: ldind.i4
IL_00bd: ceq
IL_00bf: switch (IL_015d, IL_00d1, IL_015d)
IL_00d0: nop
IL_00d1: ldc.i4 1
IL_00d6: stloc 5
IL_00da: ldloca 5
IL_00de: ldind.i4
IL_00df: br.s IL_00ed
IL_00e1: ldc.i4.0
IL_00e2: stloc 5
IL_00e6: ldloca 5
IL_00ea: ldind.i4
IL_00eb: br.s IL_00ed
IL_00ed: brfalse.s IL_00ef
IL_00ef: ldc.i4.0
IL_00f0: stloc 5
IL_00f4: ldloca 5
IL_00f8: ldind.i4
IL_00f9: brfalse IL_00fe
IL_00fe: ldloc.3
IL_00ff: switch (IL_0061, IL_0061, IL_0061)
IL_0110: ldc.i4 4
IL_0115: stloc 5
IL_0119: ldloca 5
IL_011d: ldind.i4
IL_011e: stloc.s 4
IL_0120: br IL_0021
IL_0125: br.s IL_015f
IL_0127: ldc.i4 3
IL_012c: stloc 5
IL_0130: ldloca 5
IL_0134: ldind.i4
IL_0135: stloc.s 4
IL_0137: br IL_0021
IL_013c: ldloc.0
IL_013d: ldarg.0
IL_013e: callvirt instance int32 [System.Runtime]System.String::get_Length()
IL_0143: blt IL_007e
IL_0148: ldc.i4 7
IL_014d: stloc 5
IL_0151: ldloca 5
IL_0155: ldind.i4
IL_0156: stloc.s 4
IL_0158: br IL_0021
IL_015d: br.s IL_01ad
IL_015f: ldc.i4.0
IL_0160: stloc 5
IL_0164: ldloca 5
IL_0168: ldind.i4
IL_0169: stloc.s 4
IL_016b: br IL_0021
IL_0170: ldloc.3
IL_0171: ldc.i4.8
IL_0172: beq IL_0061
IL_0177: br.s IL_0186
IL_0179: ldc.i4.0
IL_017a: stloc 5
IL_017e: ldloca 5
IL_0182: ldind.i4
IL_0183: pop
IL_0184: br.s IL_0192
IL_0186: ldc.i4.0
IL_0187: stloc 5
IL_018b: ldloca 5
IL_018f: ldind.i4
IL_0190: br.s IL_0183
IL_0192: nop
IL_0193: ldc.i4 5
IL_0198: stloc 5
IL_019c: ldloca 5
IL_01a0: ldind.i4
IL_01a1: stloc.s 4
IL_01a3: br IL_0021
IL_01a8: br IL_007c
IL_01ad: ldc.i4.1
IL_01ae: ret
}
.method private hidebysig static int32
Main(string[] args) cil managed
{
.entrypoint
// Code size 59 (0x3b)
.maxstack 8
.locals init (bool V_0)
ldstr "Test"
call bool GitHub_23411::IsValidName(string)
stloc 0
ldloc 0
brfalse.s FAIL
ldstr "Pass"
call void [System.Console]System.Console::WriteLine(string)
ldc.i4.s 100
ret
FAIL:
ldstr "FAIL"
call void [System.Console]System.Console::WriteLine(string)
ldc.i4.m1
ret
} // end of method GitHub_23411::Main
} // end of class GitHub_23411
|