OSDN Git Service

#26977 DTXViewerで使用しているjpeglib, libpng, zlib, libogg, libvorbisを最新のものにした。詳細はチケットを参照。
[dtxmania/dtxmania.git] / @libpngソリューション / zlib-1.2.8 / contrib / masmx86 / match686.lst
1 Microsoft (R) Macro Assembler Version 10.00.40219.01        08/26/16 23:18:06
2 match686.asm                                                 Page 1 - 1
3
4
5                                 ; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86
6                                 ; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
7                                 ; File written by Gilles Vollant, by converting match686.S from Brian Raiter
8                                 ; for MASM. This is as assembly version of longest_match
9                                 ;  from Jean-loup Gailly in deflate.c
10                                 ;
11                                 ;         http://www.zlib.net
12                                 ;         http://www.winimage.com/zLibDll
13                                 ;         http://www.muppetlabs.com/~breadbox/software/assembly.html
14                                 ;
15                                 ; For Visual C++ 4.x and higher and ML 6.x and higher
16                                 ;   ml.exe is distributed in
17                                 ;  http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
18                                 ;
19                                 ; this file contain two implementation of longest_match
20                                 ;
21                                 ;  this longest_match was written by Brian raiter (1998), optimized for Pentium Pro
22                                 ;   (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom)
23                                 ;
24                                 ;  for using an assembly version of longest_match, you need define ASMV in project
25                                 ;
26                                 ;    compile the asm file running
27                                 ;           ml /coff /Zi /c /Flmatch686.lst match686.asm
28                                 ;    and do not include match686.obj in your project
29                                 ;
30                                 ; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for
31                                 ;  Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor
32                                 ;  with autoselect (with cpu detection code)
33                                 ;  if you want support the old pentium optimization, you can still use these version
34                                 ;
35                                 ; this file is not optimized for old pentium, but it compatible with all x86 32 bits
36                                 ; processor (starting 80386)
37                                 ;
38                                 ;
39                                 ; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
40
41                                 ;uInt longest_match(s, cur_match)
42                                 ;    deflate_state *s;
43                                 ;    IPos cur_match;                             /* current match */
44
45  = 0000004C                         NbStack         equ     76
46  = dword ptr[esp+NbStack-0]         cur_match       equ     dword ptr[esp+NbStack-0]
47  = dword ptr[esp+NbStack-4]         str_s           equ     dword ptr[esp+NbStack-4]
48                                 ; 5 dword on top (ret,ebp,esi,edi,ebx)
49  = dword ptr[esp+NbStack-8]         adrret          equ     dword ptr[esp+NbStack-8]
50  = dword ptr[esp+NbStack-12         pushebp         equ     dword ptr[esp+NbStack-12]
51    ]
52  = dword ptr[esp+NbStack-16         pushedi         equ     dword ptr[esp+NbStack-16]
53    ]
54  = dword ptr[esp+NbStack-20         pushesi         equ     dword ptr[esp+NbStack-20]
55    ]
56  = dword ptr[esp+NbStack-24         pushebx         equ     dword ptr[esp+NbStack-24]
57    ]
58
59  = dword ptr [esp+NbStack-2         chain_length    equ     dword ptr [esp+NbStack-28]
60    8]
61  = dword ptr [esp+NbStack-3         limit           equ     dword ptr [esp+NbStack-32]
62    2]
63  = dword ptr [esp+NbStack-3         best_len        equ     dword ptr [esp+NbStack-36]
64    6]
65  = dword ptr [esp+NbStack-4         window          equ     dword ptr [esp+NbStack-40]
66    0]
67  = dword ptr [esp+NbStack-4         prev            equ     dword ptr [esp+NbStack-44]
68    4]
69  = word ptr [esp+NbStack-48         scan_start      equ      word ptr [esp+NbStack-48]
70    ]
71  = dword ptr [esp+NbStack-5         wmask           equ     dword ptr [esp+NbStack-52]
72    2]
73  = dword ptr [esp+NbStack-5         match_start_ptr equ     dword ptr [esp+NbStack-56]
74    6]
75  = dword ptr [esp+NbStack-6         nice_match      equ     dword ptr [esp+NbStack-60]
76    0]
77  = dword ptr [esp+NbStack-6         scan            equ     dword ptr [esp+NbStack-64]
78    4]
79
80  = dword ptr [esp+NbStack-6         windowlen       equ     dword ptr [esp+NbStack-68]
81    8]
82  = dword ptr [esp+NbStack-7         match_start     equ     dword ptr [esp+NbStack-72]
83    2]
84  = dword ptr [esp+NbStack-7         strend          equ     dword ptr [esp+NbStack-76]
85    6]
86  = 00000034                         NbStackAdd      equ     (NbStack-24)
87
88                                     .386p
89
90                                     name    gvmatch
91                                     .MODEL  FLAT
92
93
94
95                                 ;  all the +zlib1222add offsets are due to the addition of fields
96                                 ;  in zlib in the deflate_state structure since the asm code was first written
97                                 ;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
98                                 ;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
99                                 ;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
100
101  = 00000008                         zlib1222add         equ     8
102
103                                 ;  Note : these value are good with a 8 bytes boundary pack structure
104  = 0000007C                         dep_chain_length    equ     74h+zlib1222add
105  = 00000038                         dep_window          equ     30h+zlib1222add
106  = 0000006C                         dep_strstart        equ     64h+zlib1222add
107  = 00000078                         dep_prev_length     equ     70h+zlib1222add
108  = 00000090                         dep_nice_match      equ     88h+zlib1222add
109  = 0000002C                         dep_w_size          equ     24h+zlib1222add
110  = 00000040                         dep_prev            equ     38h+zlib1222add
111  = 00000034                         dep_w_mask          equ     2ch+zlib1222add
112  = 0000008C                         dep_good_match      equ     84h+zlib1222add
113  = 00000070                         dep_match_start     equ     68h+zlib1222add
114  = 00000074                         dep_lookahead       equ     6ch+zlib1222add
115
116
117  00000000                       _TEXT                   segment
118
119                                 IFDEF NOUNDERLINE
120                                 ELSE
121                                             public  _longest_match
122                                             public  _match_init
123                                 ENDIF
124
125  = 00000102                         MAX_MATCH           equ     258
126  = 00000003                         MIN_MATCH           equ     3
127  = 00000106                         MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)
128
129
130
131  = 00000102                     MAX_MATCH       equ     258
132  = 00000003                     MIN_MATCH       equ     3
133  = 00000106                     MIN_LOOKAHEAD   equ     (MAX_MATCH + MIN_MATCH + 1)
134  = 00000100                     MAX_MATCH_8_     equ     ((MAX_MATCH + 7) AND 0FFF0h)
135
136
137                                 ;;; stack frame offsets
138
139  = esp + 0                      chainlenwmask   equ  esp + 0    ; high word: current chain len
140                                                     ; low word: s->wmask
141  = esp + 4                      window      equ  esp + 4    ; local copy of s->window
142  = esp + 8                      windowbestlen   equ  esp + 8    ; s->window + bestlen
143  = esp + 16                     scanstart   equ  esp + 16   ; first two bytes of string
144  = esp + 12                     scanend     equ  esp + 12   ; last two bytes of string
145  = esp + 20                     scanalign   equ  esp + 20   ; dword-misalignment of string
146  = esp + 24                     nicematch   equ  esp + 24   ; a good enough match size
147  = esp + 28                     bestlen     equ  esp + 28   ; size of best match so far
148  = esp + 32                     scan        equ  esp + 32   ; ptr to string wanting match
149
150  = 00000024                     LocalVarsSize   equ 36
151                                 ;   saved ebx   byte esp + 36
152                                 ;   saved edi   byte esp + 40
153                                 ;   saved esi   byte esp + 44
154                                 ;   saved ebp   byte esp + 48
155                                 ;   return address  byte esp + 52
156  = esp + 56                     deflatestate    equ  esp + 56   ; the function arguments
157  = esp + 60                     curmatch    equ  esp + 60
158
159                                 ;;; Offsets for fields in the deflate_state structure. These numbers
160                                 ;;; are calculated from the definition of deflate_state, with the
161                                 ;;; assumption that the compiler will dword-align the fields. (Thus,
162                                 ;;; changing the definition of deflate_state could easily cause this
163                                 ;;; program to crash horribly, without so much as a warning at
164                                 ;;; compile time. Sigh.)
165
166  = 0000002C                     dsWSize     equ 36+zlib1222add
167  = 00000034                     dsWMask     equ 44+zlib1222add
168  = 00000038                     dsWindow    equ 48+zlib1222add
169  = 00000040                     dsPrev      equ 56+zlib1222add
170  = 00000060                     dsMatchLen  equ 88+zlib1222add
171  = 00000064                     dsPrevMatch equ 92+zlib1222add
172  = 0000006C                     dsStrStart  equ 100+zlib1222add
173  = 00000070                     dsMatchStart    equ 104+zlib1222add
174  = 00000074                     dsLookahead equ 108+zlib1222add
175  = 00000078                     dsPrevLen   equ 112+zlib1222add
176  = 0000007C                     dsMaxChainLen   equ 116+zlib1222add
177  = 0000008C                     dsGoodMatch equ 132+zlib1222add
178  = 00000090                     dsNiceMatch equ 136+zlib1222add
179
180
181                                 ;;; match686.asm -- Pentium-Pro-optimized version of longest_match()
182                                 ;;; Written for zlib 1.1.2
183                                 ;;; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
184                                 ;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
185                                 ;;;
186                                 ;;
187                                 ;;  This software is provided 'as-is', without any express or implied
188                                 ;;  warranty.  In no event will the authors be held liable for any damages
189                                 ;;  arising from the use of this software.
190                                 ;;
191                                 ;;  Permission is granted to anyone to use this software for any purpose,
192                                 ;;  including commercial applications, and to alter it and redistribute it
193                                 ;;  freely, subject to the following restrictions:
194                                 ;;
195                                 ;;  1. The origin of this software must not be misrepresented; you must not
196                                 ;;     claim that you wrote the original software. If you use this software
197                                 ;;     in a product, an acknowledgment in the product documentation would be
198                                 ;;     appreciated but is not required.
199                                 ;;  2. Altered source versions must be plainly marked as such, and must not be
200                                 ;;     misrepresented as being the original software
201                                 ;;  3. This notice may not be removed or altered from any source distribution.
202                                 ;;
203
204                                 ;GLOBAL _longest_match, _match_init
205
206
207                                 ;SECTION    .text
208
209                                 ;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
210
211                                 ;_longest_match:
212                                     IFDEF NOUNDERLINE
213                                     ELSE
214  00000000                           _longest_match      proc near
215                                     ENDIF
216  00000000                       .FPO (9, 4, 0, 0, 1, 0)
217
218                                 ;;; Save registers that the compiler may be using, and adjust esp to
219                                 ;;; make room for our stack frame.
220
221  00000000  55                           push    ebp
222  00000001  57                           push    edi
223  00000002  56                           push    esi
224  00000003  53                           push    ebx
225  00000004  83 EC 24                     sub esp, LocalVarsSize
226
227                                 ;;; Retrieve the function arguments. ecx will hold cur_match
228                                 ;;; throughout the entire function. edx will hold the pointer to the
229                                 ;;; deflate_state structure during the function's setup (before
230                                 ;;; entering the main loop.
231
232  00000007  8B 54 24 38                  mov edx, [deflatestate]
233  0000000B  8B 4C 24 3C                  mov ecx, [curmatch]
234
235                                 ;;; uInt wmask = s->w_mask;
236                                 ;;; unsigned chain_length = s->max_chain_length;
237                                 ;;; if (s->prev_length >= s->good_match) {
238                                 ;;;     chain_length >>= 2;
239                                 ;;; }
240
241  0000000F  8B 42 78                     mov eax, [edx + dsPrevLen]
242  00000012  8B 9A 0000008C               mov ebx, [edx + dsGoodMatch]
243  00000018  3B C3                        cmp eax, ebx
244  0000001A  8B 42 34                     mov eax, [edx + dsWMask]
245  0000001D  8B 5A 7C                     mov ebx, [edx + dsMaxChainLen]
246  00000020  7C 03                        jl  LastMatchGood
247  00000022  C1 EB 02                     shr ebx, 2
248  00000025                       LastMatchGood:
249
250                                 ;;; chainlen is decremented once beforehand so that the function can
251                                 ;;; use the sign flag instead of the zero flag for the exit test.
252                                 ;;; It is then shifted into the high word, to make room for the wmask
253                                 ;;; value, which it will always accompany.
254
255  00000025  4B                           dec ebx
256  00000026  C1 E3 10                     shl ebx, 16
257  00000029  0B D8                        or  ebx, eax
258  0000002B  89 1C 24                     mov [chainlenwmask], ebx
259
260                                 ;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
261
262  0000002E  8B 82 00000090               mov eax, [edx + dsNiceMatch]
263  00000034  8B 5A 74                     mov ebx, [edx + dsLookahead]
264  00000037  3B D8                        cmp ebx, eax
265  00000039  7C 02                        jl  LookaheadLess
266  0000003B  8B D8                        mov ebx, eax
267  0000003D  89 5C 24 18          LookaheadLess:  mov [nicematch], ebx
268
269                                 ;;; register Bytef *scan = s->window + s->strstart;
270
271  00000041  8B 72 38                     mov esi, [edx + dsWindow]
272  00000044  89 74 24 04                  mov [window], esi
273  00000048  8B 6A 6C                     mov ebp, [edx + dsStrStart]
274  0000004B  8D 7C 35 00                  lea edi, [esi + ebp]
275  0000004F  89 7C 24 20                  mov [scan], edi
276
277                                 ;;; Determine how many bytes the scan ptr is off from being
278                                 ;;; dword-aligned.
279
280  00000053  8B C7                        mov eax, edi
281  00000055  F7 D8                        neg eax
282  00000057  83 E0 03                     and eax, 3
283  0000005A  89 44 24 14                  mov [scanalign], eax
284
285                                 ;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
286                                 ;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;
287
288  0000005E  8B 42 2C                     mov eax, [edx + dsWSize]
289  00000061  2D 00000106                  sub eax, MIN_LOOKAHEAD
290  00000066  2B E8                        sub ebp, eax
291  00000068  7F 02                        jg  LimitPositive
292  0000006A  33 ED                        xor ebp, ebp
293  0000006C                       LimitPositive:
294
295                                 ;;; int best_len = s->prev_length;
296
297  0000006C  8B 42 78                     mov eax, [edx + dsPrevLen]
298  0000006F  89 44 24 1C                  mov [bestlen], eax
299
300                                 ;;; Store the sum of s->window + best_len in esi locally, and in esi.
301
302  00000073  03 F0                        add esi, eax
303  00000075  89 74 24 08                  mov [windowbestlen], esi
304
305                                 ;;; register ush scan_start = *(ushf*)scan;
306                                 ;;; register ush scan_end   = *(ushf*)(scan+best_len-1);
307                                 ;;; Posf *prev = s->prev;
308
309  00000079  0F B7 1F                     movzx   ebx, word ptr [edi]
310  0000007C  89 5C 24 10                  mov [scanstart], ebx
311  00000080  0F B7 5C 38 FF               movzx   ebx, word ptr [edi + eax - 1]
312  00000085  89 5C 24 0C                  mov [scanend], ebx
313  00000089  8B 7A 40                     mov edi, [edx + dsPrev]
314
315                                 ;;; Jump into the main loop.
316
317  0000008C  8B 14 24                     mov edx, [chainlenwmask]
318  0000008F  EB 1D                        jmp short LoopEntry
319
320                                 align 4
321
322                                 ;;; do {
323                                 ;;;     match = s->window + cur_match;
324                                 ;;;     if (*(ushf*)(match+best_len-1) != scan_end ||
325                                 ;;;         *(ushf*)match != scan_start) continue;
326                                 ;;;     [...]
327                                 ;;; } while ((cur_match = prev[cur_match & wmask]) > limit
328                                 ;;;          && --chain_length != 0);
329                                 ;;;
330                                 ;;; Here is the inner loop of the function. The function will spend the
331                                 ;;; majority of its time in this loop, and majority of that time will
332                                 ;;; be spent in the first ten instructions.
333                                 ;;;
334                                 ;;; Within this loop:
335                                 ;;; ebx = scanend
336                                 ;;; ecx = curmatch
337                                 ;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
338                                 ;;; esi = windowbestlen - i.e., (window + bestlen)
339                                 ;;; edi = prev
340                                 ;;; ebp = limit
341
342  00000094                       LookupLoop:
343  00000094  23 CA                        and ecx, edx
344  00000096  0F B7 0C 4F                  movzx   ecx, word ptr [edi + ecx*2]
345  0000009A  3B CD                        cmp ecx, ebp
346  0000009C  0F 86 000000E0               jbe LeaveNow
347  000000A2  81 EA 00010000               sub edx, 00010000h
348  000000A8  0F 88 000000D4               js  LeaveNow
349  000000AE  0F B7 44 31 FF       LoopEntry:  movzx   eax, word ptr [esi + ecx - 1]
350  000000B3  3B C3                        cmp eax, ebx
351  000000B5  75 DD                        jnz LookupLoop
352  000000B7  8B 44 24 04                  mov eax, [window]
353  000000BB  0F B7 04 01                  movzx   eax, word ptr [eax + ecx]
354  000000BF  3B 44 24 10                  cmp eax, [scanstart]
355  000000C3  75 CF                        jnz LookupLoop
356
357                                 ;;; Store the current value of chainlen.
358
359  000000C5  89 14 24                     mov [chainlenwmask], edx
360
361                                 ;;; Point edi to the string under scrutiny, and esi to the string we
362                                 ;;; are hoping to match it up with. In actuality, esi and edi are
363                                 ;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
364                                 ;;; initialized to -(MAX_MATCH_8 - scanalign).
365
366  000000C8  8B 74 24 04                  mov esi, [window]
367  000000CC  8B 7C 24 20                  mov edi, [scan]
368  000000D0  03 F1                        add esi, ecx
369  000000D2  8B 44 24 14                  mov eax, [scanalign]
370  000000D6  BA FFFFFEF8                  mov edx, 0fffffef8h; -(MAX_MATCH_8)
371  000000DB  8D BC 38                     lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
372            00000108
373  000000E2  8D B4 30                     lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
374            00000108
375
376                                 ;;; Test the strings for equality, 8 bytes at a time. At the end,
377                                 ;;; adjust edx so that it is offset to the exact byte that mismatched.
378                                 ;;;
379                                 ;;; We already know at this point that the first three bytes of the
380                                 ;;; strings match each other, and they can be safely passed over before
381                                 ;;; starting the compare loop. So what this code does is skip over 0-3
382                                 ;;; bytes, as much as necessary in order to dword-align the edi
383                                 ;;; pointer. (esi will still be misaligned three times out of four.)
384                                 ;;;
385                                 ;;; It should be confessed that this loop usually does not represent
386                                 ;;; much of the total running time. Replacing it with a more
387                                 ;;; straightforward "rep cmpsb" would not drastically degrade
388                                 ;;; performance.
389
390  000000E9                       LoopCmps:
391  000000E9  8B 04 32                     mov eax, [esi + edx]
392  000000EC  33 04 3A                     xor eax, [edi + edx]
393  000000EF  75 14                        jnz LeaveLoopCmps
394  000000F1  8B 44 32 04                  mov eax, [esi + edx + 4]
395  000000F5  33 44 3A 04                  xor eax, [edi + edx + 4]
396  000000F9  75 07                        jnz LeaveLoopCmps4
397  000000FB  83 C2 08                     add edx, 8
398  000000FE  75 E9                        jnz LoopCmps
399  00000100  EB 71                        jmp short LenMaximum
400  00000102  83 C2 04             LeaveLoopCmps4: add edx, 4
401  00000105  A9 0000FFFF          LeaveLoopCmps:  test    eax, 0000FFFFh
402  0000010A  75 06                        jnz LenLower
403  0000010C  83 C2 02                     add edx,  2
404  0000010F  C1 E8 10                     shr eax, 16
405  00000112  2C 01                LenLower:   sub al, 1
406  00000114  83 D2 00                     adc edx, 0
407
408                                 ;;; Calculate the length of the match. If it is longer than MAX_MATCH,
409                                 ;;; then automatically accept it as the best possible match and leave.
410
411  00000117  8D 04 3A                     lea eax, [edi + edx]
412  0000011A  8B 7C 24 20                  mov edi, [scan]
413  0000011E  2B C7                        sub eax, edi
414  00000120  3D 00000102                  cmp eax, MAX_MATCH
415  00000125  7D 4C                        jge LenMaximum
416
417                                 ;;; If the length of the match is not longer than the best match we
418                                 ;;; have so far, then forget it and return to the lookup loop.
419
420  00000127  8B 54 24 38                  mov edx, [deflatestate]
421  0000012B  8B 5C 24 1C                  mov ebx, [bestlen]
422  0000012F  3B C3                        cmp eax, ebx
423  00000131  7F 13                        jg  LongerMatch
424  00000133  8B 74 24 08                  mov esi, [windowbestlen]
425  00000137  8B 7A 40                     mov edi, [edx + dsPrev]
426  0000013A  8B 5C 24 0C                  mov ebx, [scanend]
427  0000013E  8B 14 24                     mov edx, [chainlenwmask]
428  00000141  E9 FFFFFF4E                  jmp LookupLoop
429
430                                 ;;;         s->match_start = cur_match;
431                                 ;;;         best_len = len;
432                                 ;;;         if (len >= nice_match) break;
433                                 ;;;         scan_end = *(ushf*)(scan+best_len-1);
434
435  00000146  8B 5C 24 18          LongerMatch:    mov ebx, [nicematch]
436  0000014A  89 44 24 1C                  mov [bestlen], eax
437  0000014E  89 4A 70                     mov [edx + dsMatchStart], ecx
438  00000151  3B C3                        cmp eax, ebx
439  00000153  7D 2D                        jge LeaveNow
440  00000155  8B 74 24 04                  mov esi, [window]
441  00000159  03 F0                        add esi, eax
442  0000015B  89 74 24 08                  mov [windowbestlen], esi
443  0000015F  0F B7 5C 38 FF               movzx   ebx, word ptr [edi + eax - 1]
444  00000164  8B 7A 40                     mov edi, [edx + dsPrev]
445  00000167  89 5C 24 0C                  mov [scanend], ebx
446  0000016B  8B 14 24                     mov edx, [chainlenwmask]
447  0000016E  E9 FFFFFF21                  jmp LookupLoop
448
449                                 ;;; Accept the current string, with the maximum possible length.
450
451  00000173  8B 54 24 38          LenMaximum: mov edx, [deflatestate]
452  00000177  C7 44 24 1C                  mov dword ptr [bestlen], MAX_MATCH
453            00000102
454  0000017F  89 4A 70                     mov [edx + dsMatchStart], ecx
455
456                                 ;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
457                                 ;;; return s->lookahead;
458
459  00000182                       LeaveNow:
460  00000182  8B 54 24 38                  mov edx, [deflatestate]
461  00000186  8B 5C 24 1C                  mov ebx, [bestlen]
462  0000018A  8B 42 74                     mov eax, [edx + dsLookahead]
463  0000018D  3B D8                        cmp ebx, eax
464  0000018F  7F 02                        jg  LookaheadRet
465  00000191  8B C3                        mov eax, ebx
466  00000193                       LookaheadRet:
467
468                                 ;;; Restore the stack and return from whence we came.
469
470  00000193  83 C4 24                     add esp, LocalVarsSize
471  00000196  5B                           pop ebx
472  00000197  5E                           pop esi
473  00000198  5F                           pop edi
474  00000199  5D                           pop ebp
475
476  0000019A  C3                           ret
477                                 ; please don't remove this string !
478                                 ; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary!
479  0000019B  0D 0A 61 73 6D           db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
480            36 38 36 20 77
481            69 74 68 20 6D
482            61 73 6D 2C 20
483            6F 70 74 69 6D
484            69 73 65 64 20
485            61 73 73 65 6D
486            62 6C 79 20 63
487            6F 64 65 20 66
488            72 6F 6D 20 42
489            72 69 61 6E 20
490            52 61 69 74 65
491            72 2C 20 77 72
492            69 74 74 65 6E
493            20 31 39 39 38
494            0D 0A
495
496
497                                     IFDEF NOUNDERLINE
498                                     ELSE
499  000001E8                           _longest_match      endp
500                                     ENDIF
501
502                                     IFDEF NOUNDERLINE
503                                     ELSE
504  000001E8                           _match_init     proc near
505  000001E8  C3                                       ret
506  000001E9                           _match_init     endp
507                                     ENDIF
508
509
510  000001E9                       _TEXT   ends
511                                 end
512 \fMicrosoft (R) Macro Assembler Version 10.00.40219.01       08/26/16 23:18:06
513 match686.asm                                                 Symbols 2 - 1
514
515
516
517
518 Segments and Groups:
519
520                 N a m e                 Size     Length   Align   Combine Class
521
522 FLAT . . . . . . . . . . . . . .        GROUP
523 _DATA  . . . . . . . . . . . . .        32 Bit   00000000 Para    Public  'DATA'        
524 _TEXT  . . . . . . . . . . . . .        32 Bit   000001E9 Para    Public  'CODE'        
525
526
527 Procedures, parameters, and locals:
528
529                 N a m e                 Type     Value    Attr
530
531 _longest_match . . . . . . . . .        P Near   00000000 _TEXT Length= 000001E8 Public
532   LastMatchGood  . . . . . . . .        L Near   00000025 _TEXT 
533   LookaheadLess  . . . . . . . .        L Near   0000003D _TEXT 
534   LimitPositive  . . . . . . . .        L Near   0000006C _TEXT 
535   LookupLoop . . . . . . . . . .        L Near   00000094 _TEXT 
536   LoopEntry  . . . . . . . . . .        L Near   000000AE _TEXT 
537   LoopCmps . . . . . . . . . . .        L Near   000000E9 _TEXT 
538   LeaveLoopCmps4 . . . . . . . .        L Near   00000102 _TEXT 
539   LeaveLoopCmps  . . . . . . . .        L Near   00000105 _TEXT 
540   LenLower . . . . . . . . . . .        L Near   00000112 _TEXT 
541   LongerMatch  . . . . . . . . .        L Near   00000146 _TEXT 
542   LenMaximum . . . . . . . . . .        L Near   00000173 _TEXT 
543   LeaveNow . . . . . . . . . . .        L Near   00000182 _TEXT 
544   LookaheadRet . . . . . . . . .        L Near   00000193 _TEXT 
545 _match_init  . . . . . . . . . .        P Near   000001E8 _TEXT Length= 00000001 Public
546
547
548 Symbols:
549
550                 N a m e                 Type     Value    Attr
551
552 @CodeSize  . . . . . . . . . . .        Number   00000000h   
553 @DataSize  . . . . . . . . . . .        Number   00000000h   
554 @Interface . . . . . . . . . . .        Number   00000000h   
555 @Model . . . . . . . . . . . . .        Number   00000007h   
556 @code  . . . . . . . . . . . . .        Text     _TEXT
557 @data  . . . . . . . . . . . . .        Text     FLAT
558 @fardata?  . . . . . . . . . . .        Text     FLAT
559 @fardata . . . . . . . . . . . .        Text     FLAT
560 @stack . . . . . . . . . . . . .        Text     FLAT
561 LocalVarsSize  . . . . . . . . .        Number   00000024h   
562 MAX_MATCH_8_ . . . . . . . . . .        Number   00000100h   
563 MAX_MATCH  . . . . . . . . . . .        Number   00000102h   
564 MIN_LOOKAHEAD  . . . . . . . . .        Number   00000106h   
565 MIN_MATCH  . . . . . . . . . . .        Number   00000003h   
566 NbStackAdd . . . . . . . . . . .        Number   00000034h   
567 NbStack  . . . . . . . . . . . .        Number   0000004Ch   
568 adrret . . . . . . . . . . . . .        Text     dword ptr[esp+NbStack-8]
569 best_len . . . . . . . . . . . .        Text     dword ptr [esp+NbStack-36]
570 bestlen  . . . . . . . . . . . .        Text     esp + 28
571 chain_length . . . . . . . . . .        Text     dword ptr [esp+NbStack-28]
572 chainlenwmask  . . . . . . . . .        Text     esp + 0
573 cur_match  . . . . . . . . . . .        Text     dword ptr[esp+NbStack-0]
574 curmatch . . . . . . . . . . . .        Text     esp + 60
575 deflatestate . . . . . . . . . .        Text     esp + 56
576 dep_chain_length . . . . . . . .        Number   0000007Ch   
577 dep_good_match . . . . . . . . .        Number   0000008Ch   
578 dep_lookahead  . . . . . . . . .        Number   00000074h   
579 dep_match_start  . . . . . . . .        Number   00000070h   
580 dep_nice_match . . . . . . . . .        Number   00000090h   
581 dep_prev_length  . . . . . . . .        Number   00000078h   
582 dep_prev . . . . . . . . . . . .        Number   00000040h   
583 dep_strstart . . . . . . . . . .        Number   0000006Ch   
584 dep_w_mask . . . . . . . . . . .        Number   00000034h   
585 dep_w_size . . . . . . . . . . .        Number   0000002Ch   
586 dep_window . . . . . . . . . . .        Number   00000038h   
587 dsGoodMatch  . . . . . . . . . .        Number   0000008Ch   
588 dsLookahead  . . . . . . . . . .        Number   00000074h   
589 dsMatchLen . . . . . . . . . . .        Number   00000060h   
590 dsMatchStart . . . . . . . . . .        Number   00000070h   
591 dsMaxChainLen  . . . . . . . . .        Number   0000007Ch   
592 dsNiceMatch  . . . . . . . . . .        Number   00000090h   
593 dsPrevLen  . . . . . . . . . . .        Number   00000078h   
594 dsPrevMatch  . . . . . . . . . .        Number   00000064h   
595 dsPrev . . . . . . . . . . . . .        Number   00000040h   
596 dsStrStart . . . . . . . . . . .        Number   0000006Ch   
597 dsWMask  . . . . . . . . . . . .        Number   00000034h   
598 dsWSize  . . . . . . . . . . . .        Number   0000002Ch   
599 dsWindow . . . . . . . . . . . .        Number   00000038h   
600 limit  . . . . . . . . . . . . .        Text     dword ptr [esp+NbStack-32]
601 match_start_ptr  . . . . . . . .        Text     dword ptr [esp+NbStack-56]
602 match_start  . . . . . . . . . .        Text     dword ptr [esp+NbStack-72]
603 nice_match . . . . . . . . . . .        Text     dword ptr [esp+NbStack-60]
604 nicematch  . . . . . . . . . . .        Text     esp + 24
605 prev . . . . . . . . . . . . . .        Text     dword ptr [esp+NbStack-44]
606 pushebp  . . . . . . . . . . . .        Text     dword ptr[esp+NbStack-12]
607 pushebx  . . . . . . . . . . . .        Text     dword ptr[esp+NbStack-24]
608 pushedi  . . . . . . . . . . . .        Text     dword ptr[esp+NbStack-16]
609 pushesi  . . . . . . . . . . . .        Text     dword ptr[esp+NbStack-20]
610 scan_start . . . . . . . . . . .        Text     word ptr [esp+NbStack-48]
611 scanalign  . . . . . . . . . . .        Text     esp + 20
612 scanend  . . . . . . . . . . . .        Text     esp + 12
613 scanstart  . . . . . . . . . . .        Text     esp + 16
614 scan . . . . . . . . . . . . . .        Text     esp + 32
615 str_s  . . . . . . . . . . . . .        Text     dword ptr[esp+NbStack-4]
616 strend . . . . . . . . . . . . .        Text     dword ptr [esp+NbStack-76]
617 windowbestlen  . . . . . . . . .        Text     esp + 8
618 windowlen  . . . . . . . . . . .        Text     dword ptr [esp+NbStack-68]
619 window . . . . . . . . . . . . .        Text     esp + 4
620 wmask  . . . . . . . . . . . . .        Text     dword ptr [esp+NbStack-52]
621 zlib1222add  . . . . . . . . . .        Number   00000008h   
622
623            0 Warnings
624            0 Errors