1 ; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.30319.01
\r
3 TITLE D:\FMU\FMUSolution\zlib-1.2.6\uncompr.c
\r
11 PUBLIC _uncompress@16
\r
12 ; Function compile flags: /Ogtp
\r
13 ; File d:\fmu\fmusolution\zlib-1.2.6\uncompr.c
\r
14 ; COMDAT _uncompress@16
\r
16 _stream$ = -56 ; size = 56
\r
17 _dest$ = 8 ; size = 4
\r
18 _destLen$ = 12 ; size = 4
\r
19 _source$ = 16 ; size = 4
\r
20 _sourceLen$ = 20 ; size = 4
\r
21 _uncompress@16 PROC ; COMDAT
\r
26 00001 8b ec mov ebp, esp
\r
27 00003 83 e4 f8 and esp, -8 ; fffffff8H
\r
28 00006 83 ec 38 sub esp, 56 ; 00000038H
\r
30 ; 30 : z_stream stream;
\r
33 ; 33 : stream.next_in = (Bytef*)source;
\r
34 ; 34 : stream.avail_in = (uInt)sourceLen;
\r
36 00009 8b 4d 14 mov ecx, DWORD PTR _sourceLen$[ebp]
\r
37 0000c 8b 45 10 mov eax, DWORD PTR _source$[ebp]
\r
39 ; 35 : /* Check for source > 64K on 16-bit machine: */
\r
40 ; 36 : if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
\r
42 ; 38 : stream.next_out = dest;
\r
44 0000f 8b 55 08 mov edx, DWORD PTR _dest$[ebp]
\r
48 ; 39 : stream.avail_out = (uInt)*destLen;
\r
50 00014 8b 7d 0c mov edi, DWORD PTR _destLen$[ebp]
\r
52 ; 40 : if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
\r
54 ; 42 : stream.zalloc = (alloc_func)0;
\r
55 ; 43 : stream.zfree = (free_func)0;
\r
57 ; 45 : err = inflateInit(&stream);
\r
59 00017 6a 38 push 56 ; 00000038H
\r
60 00019 89 4c 24 10 mov DWORD PTR _stream$[esp+72], ecx
\r
61 0001d 89 44 24 0c mov DWORD PTR _stream$[esp+68], eax
\r
62 00021 8b 07 mov eax, DWORD PTR [edi]
\r
63 00023 68 00 00 00 00 push OFFSET ??_C@_05BOAHNBIE@1?42?46?$AA@
\r
64 00028 8d 4c 24 10 lea ecx, DWORD PTR _stream$[esp+72]
\r
66 0002d 89 54 24 20 mov DWORD PTR _stream$[esp+88], edx
\r
67 00031 89 44 24 24 mov DWORD PTR _stream$[esp+92], eax
\r
68 00035 c7 44 24 34 00
\r
69 00 00 00 mov DWORD PTR _stream$[esp+108], 0
\r
70 0003d c7 44 24 38 00
\r
71 00 00 00 mov DWORD PTR _stream$[esp+112], 0
\r
72 00045 e8 00 00 00 00 call _inflateInit_@12
\r
74 ; 46 : if (err != Z_OK) return err;
\r
76 0004a 85 c0 test eax, eax
\r
77 0004c 75 55 jne SHORT $LN7@uncompress
\r
80 ; 48 : err = inflate(&stream, Z_FINISH);
\r
83 00050 8d 54 24 0c lea edx, DWORD PTR _stream$[esp+68]
\r
85 00055 e8 00 00 00 00 call _inflate@8
\r
86 0005a 8b f0 mov esi, eax
\r
88 ; 49 : if (err != Z_STREAM_END) {
\r
90 0005c 83 fe 01 cmp esi, 1
\r
91 0005f 74 32 je SHORT $LN3@uncompress
\r
93 ; 50 : inflateEnd(&stream);
\r
95 00061 8d 44 24 08 lea eax, DWORD PTR _stream$[esp+64]
\r
97 00066 e8 00 00 00 00 call _inflateEnd@4
\r
99 ; 51 : if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
\r
101 0006b 83 fe 02 cmp esi, 2
\r
102 0006e 74 16 je SHORT $LN1@uncompress
\r
103 00070 83 fe fb cmp esi, -5 ; fffffffbH
\r
104 00073 75 07 jne SHORT $LN2@uncompress
\r
105 00075 83 7c 24 0c 00 cmp DWORD PTR _stream$[esp+68], 0
\r
106 0007a 74 0a je SHORT $LN1@uncompress
\r
111 0007c 8b c6 mov eax, esi
\r
118 00080 8b e5 mov esp, ebp
\r
120 00083 c2 10 00 ret 16 ; 00000010H
\r
123 ; 52 : return Z_DATA_ERROR;
\r
125 00086 b8 fd ff ff ff mov eax, -3 ; fffffffdH
\r
132 0008d 8b e5 mov esp, ebp
\r
134 00090 c2 10 00 ret 16 ; 00000010H
\r
138 ; 55 : *destLen = stream.total_out;
\r
140 00093 8b 4c 24 1c mov ecx, DWORD PTR _stream$[esp+84]
\r
143 ; 57 : err = inflateEnd(&stream);
\r
145 00097 8d 54 24 08 lea edx, DWORD PTR _stream$[esp+64]
\r
147 0009c 89 0f mov DWORD PTR [edi], ecx
\r
148 0009e e8 00 00 00 00 call _inflateEnd@4
\r
156 000a5 8b e5 mov esp, ebp
\r
158 000a8 c2 10 00 ret 16 ; 00000010H
\r
159 _uncompress@16 ENDP
\r