1 ; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.30319.01
\r
3 TITLE D:\FMU\FMUSolution\zlib-1.2.6\compress.c
\r
11 PUBLIC ??_C@_05BOAHNBIE@1?42?46?$AA@ ; `string'
\r
12 ; COMDAT ??_C@_05BOAHNBIE@1?42?46?$AA@
\r
14 ??_C@_05BOAHNBIE@1?42?46?$AA@ DB '1.2.6', 00H ; `string'
\r
15 PUBLIC _compressBound@4
\r
16 ; Function compile flags: /Ogtp
\r
17 ; File d:\fmu\fmusolution\zlib-1.2.6\compress.c
\r
18 ; COMDAT _compressBound@4
\r
20 _sourceLen$ = 8 ; size = 4
\r
21 _compressBound@4 PROC ; COMDAT
\r
26 00001 8b ec mov ebp, esp
\r
28 ; 78 : return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
\r
29 ; 79 : (sourceLen >> 25) + 13;
\r
31 00003 8b 45 08 mov eax, DWORD PTR _sourceLen$[ebp]
\r
32 00006 8b d0 mov edx, eax
\r
33 00008 8b c8 mov ecx, eax
\r
34 0000a c1 ea 0e shr edx, 14 ; 0000000eH
\r
35 0000d 03 d0 add edx, eax
\r
36 0000f c1 e9 19 shr ecx, 25 ; 00000019H
\r
37 00012 c1 e8 0c shr eax, 12 ; 0000000cH
\r
38 00015 03 d1 add edx, ecx
\r
39 00017 8d 44 10 0d lea eax, DWORD PTR [eax+edx+13]
\r
44 0001c c2 04 00 ret 4
\r
45 _compressBound@4 ENDP
\r
46 PUBLIC _compress2@20
\r
47 ; Function compile flags: /Ogtp
\r
48 ; COMDAT _compress2@20
\r
50 _stream$ = -56 ; size = 56
\r
51 _dest$ = 8 ; size = 4
\r
52 _destLen$ = 12 ; size = 4
\r
53 _source$ = 16 ; size = 4
\r
54 _sourceLen$ = 20 ; size = 4
\r
55 _level$ = 24 ; size = 4
\r
56 _compress2@20 PROC ; COMDAT
\r
61 00001 8b ec mov ebp, esp
\r
62 00003 83 e4 f8 and esp, -8 ; fffffff8H
\r
63 00006 83 ec 38 sub esp, 56 ; 00000038H
\r
65 ; 29 : z_stream stream;
\r
68 ; 32 : stream.next_in = (Bytef*)source;
\r
69 ; 33 : stream.avail_in = (uInt)sourceLen;
\r
71 00009 8b 4d 14 mov ecx, DWORD PTR _sourceLen$[ebp]
\r
73 ; 34 : #ifdef MAXSEG_64K
\r
74 ; 35 : /* Check for source > 64K on 16-bit machine: */
\r
75 ; 36 : if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
\r
77 ; 38 : stream.next_out = dest;
\r
79 0000c 8b 55 08 mov edx, DWORD PTR _dest$[ebp]
\r
80 0000f 8b 45 10 mov eax, DWORD PTR _source$[ebp]
\r
83 ; 39 : stream.avail_out = (uInt)*destLen;
\r
85 00013 8b 5d 0c mov ebx, DWORD PTR _destLen$[ebp]
\r
88 ; 40 : if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
\r
90 ; 42 : stream.zalloc = (alloc_func)0;
\r
91 ; 43 : stream.zfree = (free_func)0;
\r
92 ; 44 : stream.opaque = (voidpf)0;
\r
94 ; 46 : err = deflateInit(&stream, level);
\r
96 00017 6a 38 push 56 ; 00000038H
\r
97 00019 89 4c 24 10 mov DWORD PTR _stream$[esp+72], ecx
\r
98 0001d 8b 4d 18 mov ecx, DWORD PTR _level$[ebp]
\r
99 00020 68 00 00 00 00 push OFFSET ??_C@_05BOAHNBIE@1?42?46?$AA@
\r
100 00025 89 54 24 1c mov DWORD PTR _stream$[esp+84], edx
\r
101 00029 89 44 24 10 mov DWORD PTR _stream$[esp+72], eax
\r
102 0002d 8b 03 mov eax, DWORD PTR [ebx]
\r
104 00030 8d 54 24 14 lea edx, DWORD PTR _stream$[esp+76]
\r
106 00035 89 44 24 28 mov DWORD PTR _stream$[esp+96], eax
\r
107 00039 c7 44 24 38 00
\r
108 00 00 00 mov DWORD PTR _stream$[esp+112], 0
\r
109 00041 c7 44 24 3c 00
\r
110 00 00 00 mov DWORD PTR _stream$[esp+116], 0
\r
111 00049 c7 44 24 40 00
\r
112 00 00 00 mov DWORD PTR _stream$[esp+120], 0
\r
113 00051 e8 00 00 00 00 call _deflateInit_@16
\r
115 ; 47 : if (err != Z_OK) return err;
\r
117 00056 85 c0 test eax, eax
\r
118 00058 75 40 jne SHORT $LN4@compress2
\r
121 ; 49 : err = deflate(&stream, Z_FINISH);
\r
124 0005c 8d 44 24 0c lea eax, DWORD PTR _stream$[esp+68]
\r
126 00061 e8 00 00 00 00 call _deflate@8
\r
127 00066 8b f0 mov esi, eax
\r
129 ; 50 : if (err != Z_STREAM_END) {
\r
131 00068 83 fe 01 cmp esi, 1
\r
132 0006b 74 1d je SHORT $LN1@compress2
\r
134 ; 51 : deflateEnd(&stream);
\r
136 0006d 8d 4c 24 08 lea ecx, DWORD PTR _stream$[esp+64]
\r
138 00072 e8 00 00 00 00 call _deflateEnd@4
\r
140 ; 52 : return err == Z_OK ? Z_BUF_ERROR : err;
\r
142 00077 b8 fb ff ff ff mov eax, -5 ; fffffffbH
\r
143 0007c 85 f6 test esi, esi
\r
144 0007e 74 1a je SHORT $LN4@compress2
\r
145 00080 8b c6 mov eax, esi
\r
152 00084 8b e5 mov esp, ebp
\r
154 00087 c2 14 00 ret 20 ; 00000014H
\r
158 ; 54 : *destLen = stream.total_out;
\r
160 0008a 8b 54 24 1c mov edx, DWORD PTR _stream$[esp+84]
\r
163 ; 56 : err = deflateEnd(&stream);
\r
165 0008e 8d 44 24 08 lea eax, DWORD PTR _stream$[esp+64]
\r
167 00093 89 13 mov DWORD PTR [ebx], edx
\r
168 00095 e8 00 00 00 00 call _deflateEnd@4
\r
176 0009c 8b e5 mov esp, ebp
\r
178 0009f c2 14 00 ret 20 ; 00000014H
\r
180 PUBLIC _compress@16
\r
181 ; Function compile flags: /Ogtp
\r
182 ; COMDAT _compress@16
\r
184 _dest$ = 8 ; size = 4
\r
185 _destLen$ = 12 ; size = 4
\r
186 _source$ = 16 ; size = 4
\r
187 _sourceLen$ = 20 ; size = 4
\r
188 _compress@16 PROC ; COMDAT
\r
193 00001 8b ec mov ebp, esp
\r
195 ; 68 : return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
\r
197 00003 8b 45 14 mov eax, DWORD PTR _sourceLen$[ebp]
\r
198 00006 8b 4d 10 mov ecx, DWORD PTR _source$[ebp]
\r
199 00009 8b 55 0c mov edx, DWORD PTR _destLen$[ebp]
\r
200 0000c 6a ff push -1
\r
202 0000f 8b 45 08 mov eax, DWORD PTR _dest$[ebp]
\r
206 00015 e8 00 00 00 00 call _compress2@20
\r
211 0001b c2 10 00 ret 16 ; 00000010H
\r