1 ; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.30319.01
\r
3 TITLE C:\Workspaces\Sysdyn\org.simantics.fmu\FMUSolution\zlib-1.2.6\gzread.c
\r
11 PUBLIC ??_C@_0BH@CFIIDOJD@unexpected?5end?5of?5file?$AA@ ; `string'
\r
12 PUBLIC ??_C@_0CH@CPOLIEKA@internal?5error?3?5inflate?5stream?5c@ ; `string'
\r
13 PUBLIC ??_C@_0BG@HCKBMIHF@compressed?5data?5error?$AA@ ; `string'
\r
14 PUBLIC ??_C@_0CF@MLPJFDMM@requested?5length?5does?5not?5fit?5in@ ; `string'
\r
15 PUBLIC ??_C@_0BP@IIKIGMCC@out?5of?5room?5to?5push?5characters?$AA@ ; `string'
\r
16 EXTRN __imp__memchr:PROC
\r
17 EXTRN __imp__memmove:PROC
\r
18 EXTRN __imp__strerror:PROC
\r
19 EXTRN __imp___errno:PROC
\r
22 ; COMDAT ??_C@_0BP@IIKIGMCC@out?5of?5room?5to?5push?5characters?$AA@
\r
24 ??_C@_0BP@IIKIGMCC@out?5of?5room?5to?5push?5characters?$AA@ DB 'out of ro'
\r
25 DB 'om to push characters', 00H ; `string'
\r
27 ; COMDAT ??_C@_0CF@MLPJFDMM@requested?5length?5does?5not?5fit?5in@
\r
29 ??_C@_0CF@MLPJFDMM@requested?5length?5does?5not?5fit?5in@ DB 'requested l'
\r
30 DB 'ength does not fit in int', 00H ; `string'
\r
32 ; COMDAT ??_C@_0BG@HCKBMIHF@compressed?5data?5error?$AA@
\r
34 ??_C@_0BG@HCKBMIHF@compressed?5data?5error?$AA@ DB 'compressed data error'
\r
37 ; COMDAT ??_C@_0CH@CPOLIEKA@internal?5error?3?5inflate?5stream?5c@
\r
39 ??_C@_0CH@CPOLIEKA@internal?5error?3?5inflate?5stream?5c@ DB 'internal er'
\r
40 DB 'ror: inflate stream corrupt', 00H ; `string'
\r
42 ; COMDAT ??_C@_0BH@CFIIDOJD@unexpected?5end?5of?5file?$AA@
\r
44 ??_C@_0BH@CFIIDOJD@unexpected?5end?5of?5file?$AA@ DB 'unexpected end of f'
\r
45 DB 'ile', 00H ; `string'
\r
47 ; Function compile flags: /Ogtp
\r
48 ; File c:\workspaces\sysdyn\org.simantics.fmu\fmusolution\zlib-1.2.6\gzread.c
\r
49 ; COMDAT _gzclose_r@4
\r
51 _err$ = 8 ; size = 4
\r
52 _file$ = 8 ; size = 4
\r
53 _gzclose_r@4 PROC ; COMDAT
\r
58 00001 8b ec mov ebp, esp
\r
61 ; 560 : int ret, err;
\r
62 ; 561 : gz_statep state;
\r
64 ; 563 : /* get internal structure */
\r
65 ; 564 : if (file == NULL)
\r
67 00004 8b 75 08 mov esi, DWORD PTR _file$[ebp]
\r
68 00007 85 f6 test esi, esi
\r
69 00009 75 0a jne SHORT $LN3@gzclose_r
\r
72 ; 565 : return Z_STREAM_ERROR;
\r
74 0000b b8 fe ff ff ff mov eax, -2 ; fffffffeH
\r
80 00012 c2 04 00 ret 4
\r
83 ; 566 : state = (gz_statep)file;
\r
85 ; 568 : /* check that we're reading */
\r
86 ; 569 : if (state->mode != GZ_READ)
\r
88 00015 81 7e 10 4f 1c
\r
89 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
91 ; 570 : return Z_STREAM_ERROR;
\r
93 0001c 75 ed jne SHORT $LN8@gzclose_r
\r
96 ; 572 : /* free memory and close file */
\r
97 ; 573 : if (state->size) {
\r
99 0001e 83 7e 1c 00 cmp DWORD PTR [esi+28], 0
\r
102 00024 8b 3d 00 00 00
\r
103 00 mov edi, DWORD PTR __imp__free
\r
104 0002a 74 18 je SHORT $LN1@gzclose_r
\r
106 ; 574 : inflateEnd(&(state->strm));
\r
108 0002c 8d 46 64 lea eax, DWORD PTR [esi+100]
\r
110 00030 e8 00 00 00 00 call _inflateEnd@4
\r
112 ; 575 : free(state->out);
\r
114 00035 8b 4e 28 mov ecx, DWORD PTR [esi+40]
\r
116 00039 ff d7 call edi
\r
118 ; 576 : free(state->in);
\r
120 0003b 8b 56 24 mov edx, DWORD PTR [esi+36]
\r
122 0003f ff d7 call edi
\r
123 00041 83 c4 08 add esp, 8
\r
127 ; 578 : err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK;
\r
129 00044 33 c0 xor eax, eax
\r
130 00046 83 7e 5c fb cmp DWORD PTR [esi+92], -5 ; fffffffbH
\r
132 ; 579 : gz_error(state, Z_OK, NULL);
\r
135 0004c 0f 95 c0 setne al
\r
136 0004f 8b ce mov ecx, esi
\r
138 00052 83 e0 fb and eax, -5 ; fffffffbH
\r
139 00055 89 45 08 mov DWORD PTR _err$[ebp], eax
\r
140 00058 33 c0 xor eax, eax
\r
141 0005a e8 00 00 00 00 call _gz_error
\r
143 ; 580 : free(state->path);
\r
145 0005f 8b 4e 18 mov ecx, DWORD PTR [esi+24]
\r
147 00063 ff d7 call edi
\r
149 ; 581 : ret = close(state->fd);
\r
151 00065 8b 56 14 mov edx, DWORD PTR [esi+20]
\r
153 00069 e8 00 00 00 00 call _close
\r
155 ; 582 : free(state);
\r
158 0006f 8b d8 mov ebx, eax
\r
159 00071 ff d7 call edi
\r
160 00073 83 c4 10 add esp, 16 ; 00000010H
\r
163 ; 583 : return ret ? Z_ERRNO : err;
\r
165 00077 85 db test ebx, ebx
\r
167 0007a 74 08 je SHORT $LN6@gzclose_r
\r
168 0007c 83 c8 ff or eax, -1
\r
174 00081 c2 04 00 ret 4
\r
177 ; 583 : return ret ? Z_ERRNO : err;
\r
179 00084 8b 45 08 mov eax, DWORD PTR _err$[ebp]
\r
185 00089 c2 04 00 ret 4
\r
187 ; Function compile flags: /Ogtp
\r
191 _buf$ = 8 ; size = 4
\r
192 _gz_load PROC ; COMDAT
\r
200 00001 8b ec mov ebp, esp
\r
206 00003 c7 06 00 00 00
\r
207 00 mov DWORD PTR [esi], 0
\r
208 00009 8d a4 24 00 00
\r
213 ; 30 : ret = read(state->fd, buf + *have, len - *have);
\r
215 00010 8b 06 mov eax, DWORD PTR [esi]
\r
216 00012 8b cf mov ecx, edi
\r
217 00014 2b c8 sub ecx, eax
\r
218 00016 03 45 08 add eax, DWORD PTR _buf$[ebp]
\r
221 0001b 8b 43 14 mov eax, DWORD PTR [ebx+20]
\r
223 0001f e8 00 00 00 00 call _read
\r
224 00024 83 c4 0c add esp, 12 ; 0000000cH
\r
226 ; 31 : if (ret <= 0)
\r
228 00027 85 c0 test eax, eax
\r
229 00029 7e 08 jle SHORT $LN11@gz_load
\r
232 ; 33 : *have += ret;
\r
234 0002b 01 06 add DWORD PTR [esi], eax
\r
236 ; 34 : } while (*have < len);
\r
238 0002d 39 3e cmp DWORD PTR [esi], edi
\r
239 0002f 72 df jb SHORT $LL6@gz_load
\r
241 ; 35 : if (ret < 0) {
\r
243 00031 85 c0 test eax, eax
\r
245 00033 79 22 jns SHORT $LN2@gz_load
\r
247 ; 36 : gz_error(state, Z_ERRNO, zstrerror());
\r
249 00035 ff 15 00 00 00
\r
250 00 call DWORD PTR __imp___errno
\r
251 0003b 8b 08 mov ecx, DWORD PTR [eax]
\r
253 0003e ff 15 00 00 00
\r
254 00 call DWORD PTR __imp__strerror
\r
256 00045 83 c8 ff or eax, -1
\r
257 00048 8b cb mov ecx, ebx
\r
258 0004a e8 00 00 00 00 call _gz_error
\r
259 0004f 83 c4 08 add esp, 8
\r
263 00052 83 c8 ff or eax, -1
\r
272 ; 39 : if (ret == 0)
\r
274 00057 85 c0 test eax, eax
\r
275 00059 75 07 jne SHORT $LN1@gz_load
\r
277 ; 40 : state->eof = 1;
\r
279 0005b c7 43 40 01 00
\r
280 00 00 mov DWORD PTR [ebx+64], 1
\r
285 00062 33 c0 xor eax, eax
\r
292 ; Function compile flags: /Ogtp
\r
295 _got$ = -4 ; size = 4
\r
296 _gz_avail PROC ; COMDAT
\r
302 00001 8b ec mov ebp, esp
\r
305 00005 8b d8 mov ebx, eax
\r
307 ; 54 : unsigned got;
\r
308 ; 55 : z_streamp strm = &(state->strm);
\r
310 ; 57 : if (state->err != Z_OK && state->err != Z_BUF_ERROR)
\r
312 00007 8b 43 5c mov eax, DWORD PTR [ebx+92]
\r
313 0000a 85 c0 test eax, eax
\r
314 0000c 74 0d je SHORT $LN4@gz_avail
\r
315 0000e 83 f8 fb cmp eax, -5 ; fffffffbH
\r
316 00011 74 08 je SHORT $LN4@gz_avail
\r
321 00013 83 c8 ff or eax, -1
\r
326 00017 8b e5 mov esp, ebp
\r
331 ; 59 : if (state->eof == 0) {
\r
333 0001b 83 7b 40 00 cmp DWORD PTR [ebx+64], 0
\r
334 0001f 75 47 jne SHORT $LN3@gz_avail
\r
336 ; 60 : if (strm->avail_in)
\r
338 00021 8b 43 68 mov eax, DWORD PTR [ebx+104]
\r
339 00024 85 c0 test eax, eax
\r
340 00026 74 12 je SHORT $LN2@gz_avail
\r
342 ; 61 : memmove(state->in, strm->next_in, strm->avail_in);
\r
344 00028 8b 4b 24 mov ecx, DWORD PTR [ebx+36]
\r
346 0002c 8b 43 64 mov eax, DWORD PTR [ebx+100]
\r
349 00031 ff 15 00 00 00
\r
350 00 call DWORD PTR __imp__memmove
\r
351 00037 83 c4 0c add esp, 12 ; 0000000cH
\r
354 ; 62 : if (gz_load(state, state->in + strm->avail_in,
\r
355 ; 63 : state->size - strm->avail_in, &got) == -1)
\r
357 0003a 8b 43 68 mov eax, DWORD PTR [ebx+104]
\r
358 0003d 8b 53 24 mov edx, DWORD PTR [ebx+36]
\r
361 00042 8b 7b 1c mov edi, DWORD PTR [ebx+28]
\r
362 00045 03 d0 add edx, eax
\r
363 00047 2b f8 sub edi, eax
\r
365 0004a 8d 75 fc lea esi, DWORD PTR _got$[ebp]
\r
366 0004d e8 00 00 00 00 call _gz_load
\r
367 00052 83 c4 04 add esp, 4
\r
370 00057 83 f8 ff cmp eax, -1
\r
374 0005a 74 b7 je SHORT $LN7@gz_avail
\r
376 ; 65 : strm->avail_in += got;
\r
378 0005c 8b 45 fc mov eax, DWORD PTR _got$[ebp]
\r
379 0005f 01 43 68 add DWORD PTR [ebx+104], eax
\r
381 ; 66 : strm->next_in = state->in;
\r
383 00062 8b 4b 24 mov ecx, DWORD PTR [ebx+36]
\r
384 00065 89 4b 64 mov DWORD PTR [ebx+100], ecx
\r
390 00068 33 c0 xor eax, eax
\r
395 0006b 8b e5 mov esp, ebp
\r
399 ; Function compile flags: /Ogtp
\r
400 ; COMDAT _gz_decomp
\r
402 _had$ = -4 ; size = 4
\r
403 _gz_decomp PROC ; COMDAT
\r
409 00001 8b ec mov ebp, esp
\r
412 ; 169 : int ret = Z_OK;
\r
413 ; 170 : unsigned had;
\r
414 ; 171 : z_streamp strm = &(state->strm);
\r
416 ; 173 : /* fill output buffer up to end of deflate stream */
\r
417 ; 174 : had = strm->avail_out;
\r
419 00004 8b 43 74 mov eax, DWORD PTR [ebx+116]
\r
422 00009 8d 7b 64 lea edi, DWORD PTR [ebx+100]
\r
423 0000c 33 f6 xor esi, esi
\r
424 0000e 89 45 fc mov DWORD PTR _had$[ebp], eax
\r
428 ; 176 : /* get more input for inflate() */
\r
429 ; 177 : if (strm->avail_in == 0 && gz_avail(state) == -1)
\r
431 00011 83 7f 04 00 cmp DWORD PTR [edi+4], 0
\r
432 00015 75 16 jne SHORT $LN22@gz_decomp
\r
433 00017 8b c3 mov eax, ebx
\r
434 00019 e8 00 00 00 00 call _gz_avail
\r
435 0001e 83 f8 ff cmp eax, -1
\r
436 00021 0f 84 c7 00 00
\r
437 00 je $LN17@gz_decomp
\r
440 ; 179 : if (strm->avail_in == 0) {
\r
442 00027 83 7f 04 00 cmp DWORD PTR [edi+4], 0
\r
443 0002b 74 55 je SHORT $LN18@gz_decomp
\r
448 ; 184 : /* decompress and handle errors */
\r
449 ; 185 : ret = inflate(strm, Z_NO_FLUSH);
\r
453 00030 e8 00 00 00 00 call _inflate@8
\r
454 00035 8b f0 mov esi, eax
\r
456 ; 186 : if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) {
\r
458 00037 83 fe fe cmp esi, -2 ; fffffffeH
\r
459 0003a 0f 84 9a 00 00
\r
460 00 je $LN5@gz_decomp
\r
461 00040 83 fe 02 cmp esi, 2
\r
462 00043 0f 84 91 00 00
\r
463 00 je $LN5@gz_decomp
\r
466 ; 191 : if (ret == Z_MEM_ERROR) {
\r
468 00049 83 fe fc cmp esi, -4 ; fffffffcH
\r
469 0004c 74 4a je SHORT $LN20@gz_decomp
\r
473 ; 195 : if (ret == Z_DATA_ERROR) { /* deflate stream invalid */
\r
475 0004e 83 fe fd cmp esi, -3 ; fffffffdH
\r
476 00051 74 62 je SHORT $LN21@gz_decomp
\r
480 ; 200 : } while (strm->avail_out && ret != Z_STREAM_END);
\r
482 00053 83 7f 10 00 cmp DWORD PTR [edi+16], 0
\r
483 00057 74 05 je SHORT $LN9@gz_decomp
\r
484 00059 83 fe 01 cmp esi, 1
\r
485 0005c 75 b3 jne SHORT $LL11@gz_decomp
\r
489 ; 202 : /* update available output */
\r
490 ; 203 : state->x.have = had - strm->avail_out;
\r
492 0005e 8b 45 fc mov eax, DWORD PTR _had$[ebp]
\r
493 00061 2b 47 10 sub eax, DWORD PTR [edi+16]
\r
494 00064 89 03 mov DWORD PTR [ebx], eax
\r
496 ; 204 : state->x.next = strm->next_out - state->x.have;
\r
498 00066 8b 4f 0c mov ecx, DWORD PTR [edi+12]
\r
499 00069 2b c8 sub ecx, eax
\r
500 0006b 89 4b 04 mov DWORD PTR [ebx+4], ecx
\r
503 ; 206 : /* if the gzip stream completed successfully, look for another */
\r
504 ; 207 : if (ret == Z_STREAM_END)
\r
506 0006e 83 fe 01 cmp esi, 1
\r
507 00071 75 07 jne SHORT $LN1@gz_decomp
\r
509 ; 208 : state->how = LOOK;
\r
511 00073 c7 43 30 00 00
\r
512 00 00 mov DWORD PTR [ebx+48], 0
\r
517 ; 210 : /* good decompression */
\r
520 0007b 33 c0 xor eax, eax
\r
525 0007e 8b e5 mov esp, ebp
\r
530 ; 180 : gz_error(state, Z_BUF_ERROR, "unexpected end of file");
\r
532 00082 68 00 00 00 00 push OFFSET ??_C@_0BH@CFIIDOJD@unexpected?5end?5of?5file?$AA@
\r
533 00087 b8 fb ff ff ff mov eax, -5 ; fffffffbH
\r
534 0008c 8b cb mov ecx, ebx
\r
535 0008e e8 00 00 00 00 call _gz_error
\r
536 00093 83 c4 04 add esp, 4
\r
540 00096 eb c6 jmp SHORT $LN9@gz_decomp
\r
543 ; 192 : gz_error(state, Z_MEM_ERROR, "out of memory");
\r
545 00098 68 00 00 00 00 push OFFSET ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@
\r
546 0009d b8 fc ff ff ff mov eax, -4 ; fffffffcH
\r
547 000a2 8b cb mov ecx, ebx
\r
548 000a4 e8 00 00 00 00 call _gz_error
\r
549 000a9 83 c4 04 add esp, 4
\r
551 000ad 83 c8 ff or eax, -1
\r
556 000b1 8b e5 mov esp, ebp
\r
561 ; 196 : gz_error(state, Z_DATA_ERROR,
\r
562 ; 197 : strm->msg == NULL ? "compressed data error" : strm->msg);
\r
564 000b5 8b 7f 18 mov edi, DWORD PTR [edi+24]
\r
565 000b8 85 ff test edi, edi
\r
566 000ba 75 05 jne SHORT $LN14@gz_decomp
\r
567 000bc bf 00 00 00 00 mov edi, OFFSET ??_C@_0BG@HCKBMIHF@compressed?5data?5error?$AA@
\r
570 000c2 b8 fd ff ff ff mov eax, -3 ; fffffffdH
\r
571 000c7 8b cb mov ecx, ebx
\r
572 000c9 e8 00 00 00 00 call _gz_error
\r
573 000ce 83 c4 04 add esp, 4
\r
575 000d2 83 c8 ff or eax, -1
\r
580 000d6 8b e5 mov esp, ebp
\r
585 ; 187 : gz_error(state, Z_STREAM_ERROR,
\r
586 ; 188 : "internal error: inflate stream corrupt");
\r
588 000da 68 00 00 00 00 push OFFSET ??_C@_0CH@CPOLIEKA@internal?5error?3?5inflate?5stream?5c@
\r
589 000df b8 fe ff ff ff mov eax, -2 ; fffffffeH
\r
590 000e4 8b cb mov ecx, ebx
\r
591 000e6 e8 00 00 00 00 call _gz_error
\r
592 000eb 83 c4 04 add esp, 4
\r
598 000ef 83 c8 ff or eax, -1
\r
603 000f3 8b e5 mov esp, ebp
\r
607 ; Function compile flags: /Ogtp
\r
611 tv68 = -4 ; size = 4
\r
612 _gz_look PROC ; COMDAT
\r
618 00001 8b ec mov ebp, esp
\r
622 ; 83 : z_streamp strm = &(state->strm);
\r
624 ; 85 : /* allocate read buffers and inflate memory */
\r
625 ; 86 : if (state->size == 0) {
\r
627 00005 33 db xor ebx, ebx
\r
629 00008 8d 7e 64 lea edi, DWORD PTR [esi+100]
\r
630 0000b 39 5e 1c cmp DWORD PTR [esi+28], ebx
\r
631 0000e 0f 85 ce 00 00
\r
632 00 jne $LN7@gz_look
\r
634 ; 87 : /* allocate buffers */
\r
635 ; 88 : state->in = malloc(state->want);
\r
637 00014 8b 5e 20 mov ebx, DWORD PTR [esi+32]
\r
639 00018 ff 15 00 00 00
\r
640 00 call DWORD PTR __imp__malloc
\r
641 0001e 89 45 fc mov DWORD PTR tv68[ebp], eax
\r
642 00021 89 46 24 mov DWORD PTR [esi+36], eax
\r
644 ; 89 : state->out = malloc(state->want << 1);
\r
646 00024 8d 04 1b lea eax, DWORD PTR [ebx+ebx]
\r
648 00028 ff 15 00 00 00
\r
649 00 call DWORD PTR __imp__malloc
\r
651 ; 90 : if (state->in == NULL || state->out == NULL) {
\r
653 0002e 33 c9 xor ecx, ecx
\r
654 00030 83 c4 08 add esp, 8
\r
655 00033 89 46 28 mov DWORD PTR [esi+40], eax
\r
656 00036 39 4d fc cmp DWORD PTR tv68[ebp], ecx
\r
657 00039 74 67 je SHORT $LN10@gz_look
\r
658 0003b 3b c1 cmp eax, ecx
\r
659 0003d 74 73 je SHORT $LN15@gz_look
\r
662 ; 98 : state->size = state->want;
\r
664 ; 100 : /* allocate inflate memory */
\r
665 ; 101 : state->strm.zalloc = Z_NULL;
\r
666 ; 102 : state->strm.zfree = Z_NULL;
\r
667 ; 103 : state->strm.opaque = Z_NULL;
\r
668 ; 104 : state->strm.avail_in = 0;
\r
669 ; 105 : state->strm.next_in = Z_NULL;
\r
670 ; 106 : if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */
\r
672 0003f 6a 38 push 56 ; 00000038H
\r
673 00041 68 00 00 00 00 push OFFSET ??_C@_05BOAHNBIE@1?42?46?$AA@
\r
674 00046 6a 1f push 31 ; 0000001fH
\r
676 00049 89 5e 1c mov DWORD PTR [esi+28], ebx
\r
677 0004c 89 8e 84 00 00
\r
678 00 mov DWORD PTR [esi+132], ecx
\r
679 00052 89 8e 88 00 00
\r
680 00 mov DWORD PTR [esi+136], ecx
\r
681 00058 89 8e 8c 00 00
\r
682 00 mov DWORD PTR [esi+140], ecx
\r
683 0005e 89 4e 68 mov DWORD PTR [esi+104], ecx
\r
684 00061 89 0f mov DWORD PTR [edi], ecx
\r
685 00063 e8 00 00 00 00 call _inflateInit2_@16
\r
686 00068 85 c0 test eax, eax
\r
687 0006a 74 74 je SHORT $LN16@gz_look
\r
689 ; 107 : free(state->out);
\r
691 0006c 8b 4e 28 mov ecx, DWORD PTR [esi+40]
\r
692 0006f 8b 3d 00 00 00
\r
693 00 mov edi, DWORD PTR __imp__free
\r
695 00076 ff d7 call edi
\r
697 ; 108 : free(state->in);
\r
699 00078 8b 56 24 mov edx, DWORD PTR [esi+36]
\r
701 0007c ff d7 call edi
\r
703 ; 109 : state->size = 0;
\r
704 ; 110 : gz_error(state, Z_MEM_ERROR, "out of memory");
\r
706 0007e 68 00 00 00 00 push OFFSET ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@
\r
707 00083 b8 fc ff ff ff mov eax, -4 ; fffffffcH
\r
708 00088 8b ce mov ecx, esi
\r
709 0008a c7 46 1c 00 00
\r
710 00 00 mov DWORD PTR [esi+28], 0
\r
711 00091 e8 00 00 00 00 call _gz_error
\r
712 00096 83 c4 0c add esp, 12 ; 0000000cH
\r
717 0009a 83 c8 ff or eax, -1
\r
722 0009e 8b e5 mov esp, ebp
\r
727 ; 91 : if (state->out != NULL)
\r
729 000a2 3b c1 cmp eax, ecx
\r
730 000a4 74 0c je SHORT $LN15@gz_look
\r
732 ; 92 : free(state->out);
\r
735 000a7 ff 15 00 00 00
\r
736 00 call DWORD PTR __imp__free
\r
737 000ad 83 c4 04 add esp, 4
\r
738 000b0 33 c9 xor ecx, ecx
\r
741 ; 93 : if (state->in != NULL)
\r
743 000b2 8b 46 24 mov eax, DWORD PTR [esi+36]
\r
744 000b5 3b c1 cmp eax, ecx
\r
745 000b7 74 0a je SHORT $LN8@gz_look
\r
747 ; 94 : free(state->in);
\r
750 000ba ff 15 00 00 00
\r
751 00 call DWORD PTR __imp__free
\r
752 000c0 83 c4 04 add esp, 4
\r
755 ; 95 : gz_error(state, Z_MEM_ERROR, "out of memory");
\r
757 000c3 68 00 00 00 00 push OFFSET ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@
\r
758 000c8 b8 fc ff ff ff mov eax, -4 ; fffffffcH
\r
759 000cd 8b ce mov ecx, esi
\r
760 000cf e8 00 00 00 00 call _gz_error
\r
761 000d4 83 c4 04 add esp, 4
\r
767 000d8 83 c8 ff or eax, -1
\r
772 000dc 8b e5 mov esp, ebp
\r
777 ; 94 : free(state->in);
\r
779 000e0 33 db xor ebx, ebx
\r
785 ; 115 : /* get at least the magic bytes in the input buffer */
\r
786 ; 116 : if (strm->avail_in < 2) {
\r
788 000e2 8b 47 04 mov eax, DWORD PTR [edi+4]
\r
789 000e5 83 f8 02 cmp eax, 2
\r
790 000e8 73 13 jae SHORT $LN4@gz_look
\r
792 ; 117 : if (gz_avail(state) == -1)
\r
794 000ea 8b c6 mov eax, esi
\r
795 000ec e8 00 00 00 00 call _gz_avail
\r
796 000f1 83 f8 ff cmp eax, -1
\r
800 000f4 74 e1 je SHORT $LN18@gz_look
\r
802 ; 119 : if (strm->avail_in == 0)
\r
804 000f6 8b 47 04 mov eax, DWORD PTR [edi+4]
\r
805 000f9 3b c3 cmp eax, ebx
\r
809 000fb 74 70 je SHORT $LN17@gz_look
\r
814 ; 123 : /* look for gzip magic bytes -- if there, do gzip decoding (note: there is
\r
815 ; 124 : a logical dilemma here when considering the case of a partially written
\r
816 ; 125 : gzip file, to wit, if a single 31 byte is written, then we cannot tell
\r
817 ; 126 : whether this is a single-byte file, or just a partially written gzip
\r
818 ; 127 : file -- for here we assume that if a gzip file is being written, then
\r
819 ; 128 : the header will be written in a single operation, so that reading a
\r
820 ; 129 : single byte is sufficient indication that it is not a gzip file) */
\r
821 ; 130 : if (strm->avail_in > 1 &&
\r
822 ; 131 : strm->next_in[0] == 31 && strm->next_in[1] == 139) {
\r
824 000fd ba 01 00 00 00 mov edx, 1
\r
825 00102 3b c2 cmp eax, edx
\r
826 00104 76 25 jbe SHORT $LN3@gz_look
\r
827 00106 8b 07 mov eax, DWORD PTR [edi]
\r
828 00108 80 38 1f cmp BYTE PTR [eax], 31 ; 0000001fH
\r
829 0010b 75 1e jne SHORT $LN3@gz_look
\r
830 0010d 80 78 01 8b cmp BYTE PTR [eax+1], 139 ; 0000008bH
\r
831 00111 75 18 jne SHORT $LN3@gz_look
\r
833 ; 132 : inflateReset(strm);
\r
836 00114 e8 00 00 00 00 call _inflateReset@4
\r
839 ; 133 : state->how = GZIP;
\r
840 ; 134 : state->direct = 0;
\r
842 0011a 89 5e 2c mov DWORD PTR [esi+44], ebx
\r
843 0011d c7 46 30 02 00
\r
844 00 00 mov DWORD PTR [esi+48], 2
\r
848 00124 33 c0 xor eax, eax
\r
853 00127 8b e5 mov esp, ebp
\r
861 ; 138 : /* no gzip header -- if we were decoding gzip before, then this is trailing
\r
862 ; 139 : garbage. Ignore the trailing garbage and finish. */
\r
863 ; 140 : if (state->direct == 0) {
\r
865 0012b 39 5e 2c cmp DWORD PTR [esi+44], ebx
\r
866 0012e 75 10 jne SHORT $LN2@gz_look
\r
868 ; 141 : strm->avail_in = 0;
\r
870 00130 89 5f 04 mov DWORD PTR [edi+4], ebx
\r
873 ; 142 : state->eof = 1;
\r
874 ; 143 : state->x.have = 0;
\r
876 00134 89 1e mov DWORD PTR [esi], ebx
\r
877 00136 89 56 40 mov DWORD PTR [esi+64], edx
\r
881 00139 33 c0 xor eax, eax
\r
886 0013c 8b e5 mov esp, ebp
\r
894 ; 147 : /* doing raw i/o, copy any leftover input to output -- this assumes that
\r
895 ; 148 : the output buffer is larger than the input buffer, which also assures
\r
896 ; 149 : space for gzungetc() */
\r
897 ; 150 : state->x.next = state->out;
\r
899 00140 8b 46 28 mov eax, DWORD PTR [esi+40]
\r
900 00143 89 46 04 mov DWORD PTR [esi+4], eax
\r
902 ; 151 : if (strm->avail_in) {
\r
904 00146 8b 4f 04 mov ecx, DWORD PTR [edi+4]
\r
905 00149 3b cb cmp ecx, ebx
\r
906 0014b 74 1a je SHORT $LN1@gz_look
\r
908 ; 152 : memcpy(state->x.next, strm->next_in, strm->avail_in);
\r
911 0014e 8b 0f mov ecx, DWORD PTR [edi]
\r
914 00152 e8 00 00 00 00 call _memcpy
\r
916 ; 153 : state->x.have = strm->avail_in;
\r
918 00157 8b 57 04 mov edx, DWORD PTR [edi+4]
\r
919 0015a 89 16 mov DWORD PTR [esi], edx
\r
920 0015c 83 c4 0c add esp, 12 ; 0000000cH
\r
922 ; 154 : strm->avail_in = 0;
\r
924 0015f 89 5f 04 mov DWORD PTR [edi+4], ebx
\r
925 00162 ba 01 00 00 00 mov edx, 1
\r
929 ; 156 : state->how = COPY;
\r
931 00167 89 56 30 mov DWORD PTR [esi+48], edx
\r
933 ; 157 : state->direct = 1;
\r
935 0016a 89 56 2c mov DWORD PTR [esi+44], edx
\r
941 0016e 33 c0 xor eax, eax
\r
946 00171 8b e5 mov esp, ebp
\r
951 ; Function compile flags: /Ogtp
\r
952 ; COMDAT _gzdirect@4
\r
954 _file$ = 8 ; size = 4
\r
955 _gzdirect@4 PROC ; COMDAT
\r
960 00001 8b ec mov ebp, esp
\r
963 ; 540 : gz_statep state;
\r
965 ; 542 : /* get internal structure */
\r
966 ; 543 : if (file == NULL)
\r
968 00004 8b 75 08 mov esi, DWORD PTR _file$[ebp]
\r
969 00007 85 f6 test esi, esi
\r
970 00009 75 07 jne SHORT $LN2@gzdirect
\r
974 0000b 33 c0 xor eax, eax
\r
980 0000f c2 04 00 ret 4
\r
983 ; 545 : state = (gz_statep)file;
\r
985 ; 547 : /* if the state is not known, but we can find out, then do so (this is
\r
986 ; 548 : mainly for right after a gzopen() or gzdopen()) */
\r
987 ; 549 : if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0)
\r
989 00012 81 7e 10 4f 1c
\r
990 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
991 00019 75 10 jne SHORT $LN1@gzdirect
\r
992 0001b 83 7e 30 00 cmp DWORD PTR [esi+48], 0
\r
993 0001f 75 0a jne SHORT $LN1@gzdirect
\r
994 00021 83 3e 00 cmp DWORD PTR [esi], 0
\r
995 00024 75 05 jne SHORT $LN1@gzdirect
\r
997 ; 550 : (void)gz_look(state);
\r
999 00026 e8 00 00 00 00 call _gz_look
\r
1003 ; 552 : /* return 1 if transparent, 0 if processing a gzip stream */
\r
1004 ; 553 : return state->direct;
\r
1006 0002b 8b 46 2c mov eax, DWORD PTR [esi+44]
\r
1012 00030 c2 04 00 ret 4
\r
1014 ; Function compile flags: /Ogtp
\r
1016 ; COMDAT _gz_fetch
\r
1018 _gz_fetch PROC ; COMDAT
\r
1025 00002 8b f0 mov esi, eax
\r
1028 ; 223 : z_streamp strm = &(state->strm);
\r
1031 ; 226 : switch(state->how) {
\r
1033 00004 8b 46 30 mov eax, DWORD PTR [esi+48]
\r
1034 00007 83 e8 00 sub eax, 0
\r
1035 0000a 74 26 je SHORT $LN8@gz_fetch
\r
1037 0000d 74 49 je SHORT $LN5@gz_fetch
\r
1039 00010 75 30 jne SHORT $LN12@gz_fetch
\r
1042 ; 239 : case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */
\r
1043 ; 240 : strm->avail_out = state->size << 1;
\r
1045 00012 8b 46 1c mov eax, DWORD PTR [esi+28]
\r
1046 00015 03 c0 add eax, eax
\r
1047 00017 89 46 74 mov DWORD PTR [esi+116], eax
\r
1049 ; 241 : strm->next_out = state->out;
\r
1051 0001a 8b 4e 28 mov ecx, DWORD PTR [esi+40]
\r
1053 ; 242 : if (gz_decomp(state) == -1)
\r
1055 0001d 8b de mov ebx, esi
\r
1056 0001f 89 4e 70 mov DWORD PTR [esi+112], ecx
\r
1057 00022 e8 00 00 00 00 call _gz_decomp
\r
1058 00027 83 f8 ff cmp eax, -1
\r
1059 0002a 75 16 jne SHORT $LN12@gz_fetch
\r
1063 ; 229 : return -1;
\r
1065 0002d 83 c8 ff or eax, -1
\r
1073 ; 227 : case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */
\r
1074 ; 228 : if (gz_look(state) == -1)
\r
1076 00032 e8 00 00 00 00 call _gz_look
\r
1077 00037 83 f8 ff cmp eax, -1
\r
1078 0003a 74 f0 je SHORT $LN19@gz_fetch
\r
1080 ; 230 : if (state->how == LOOK)
\r
1082 0003c 83 7e 30 00 cmp DWORD PTR [esi+48], 0
\r
1083 00040 74 11 je SHORT $LN1@gz_fetch
\r
1086 ; 243 : return -1;
\r
1088 ; 245 : } while (state->x.have == 0 && (!state->eof || strm->avail_in));
\r
1090 00042 83 3e 00 cmp DWORD PTR [esi], 0
\r
1091 00045 75 0c jne SHORT $LN1@gz_fetch
\r
1092 00047 83 7e 40 00 cmp DWORD PTR [esi+64], 0
\r
1093 0004b 74 b7 je SHORT $LL13@gz_fetch
\r
1094 0004d 83 7e 68 00 cmp DWORD PTR [esi+104], 0
\r
1095 00051 75 b1 jne SHORT $LL13@gz_fetch
\r
1101 00054 33 c0 xor eax, eax
\r
1111 ; 233 : case COPY: /* -> COPY */
\r
1112 ; 234 : if (gz_load(state, state->out, state->size << 1, &(state->x.have))
\r
1115 00058 8b 56 28 mov edx, DWORD PTR [esi+40]
\r
1117 0005c 8b 7e 1c mov edi, DWORD PTR [esi+28]
\r
1118 0005f 03 ff add edi, edi
\r
1120 00062 8b de mov ebx, esi
\r
1121 00064 e8 00 00 00 00 call _gz_load
\r
1122 00069 83 c4 04 add esp, 4
\r
1124 0006d 83 f8 ff cmp eax, -1
\r
1126 ; 236 : return -1;
\r
1128 00070 74 ba je SHORT $LN19@gz_fetch
\r
1130 ; 237 : state->x.next = state->out;
\r
1132 00072 8b 46 28 mov eax, DWORD PTR [esi+40]
\r
1133 00075 89 46 04 mov DWORD PTR [esi+4], eax
\r
1138 00079 33 c0 xor eax, eax
\r
1145 ; Function compile flags: /Ogtp
\r
1148 _len$ = 8 ; size = 8
\r
1149 _gz_skip PROC ; COMDAT
\r
1155 00001 8b ec mov ebp, esp
\r
1158 ; 254 : unsigned n;
\r
1160 ; 256 : /* skip over len bytes or reach end-of-file, whichever comes first */
\r
1161 ; 257 : while (len)
\r
1163 00004 8b 5d 0c mov ebx, DWORD PTR _len$[ebp+4]
\r
1165 00008 8b 7d 08 mov edi, DWORD PTR _len$[ebp]
\r
1166 0000b 8b c7 mov eax, edi
\r
1167 0000d 0b c3 or eax, ebx
\r
1168 0000f 74 4b je SHORT $LN6@gz_skip
\r
1171 ; 258 : /* skip over whatever is in output buffer */
\r
1172 ; 259 : if (state->x.have) {
\r
1174 00011 8b 0e mov ecx, DWORD PTR [esi]
\r
1175 00013 85 c9 test ecx, ecx
\r
1176 00015 74 27 je SHORT $LN5@gz_skip
\r
1178 ; 260 : n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ?
\r
1179 ; 261 : (unsigned)len : state->x.have;
\r
1181 00017 33 c0 xor eax, eax
\r
1182 00019 3b c3 cmp eax, ebx
\r
1183 0001b 7f 0a jg SHORT $LN10@gz_skip
\r
1184 0001d 7c 04 jl SHORT $LN15@gz_skip
\r
1185 0001f 3b cf cmp ecx, edi
\r
1186 00021 77 04 ja SHORT $LN10@gz_skip
\r
1188 00023 8b c1 mov eax, ecx
\r
1189 00025 eb 02 jmp SHORT $LN11@gz_skip
\r
1191 00027 8b c7 mov eax, edi
\r
1194 ; 262 : state->x.have -= n;
\r
1195 ; 263 : state->x.next += n;
\r
1197 00029 01 46 04 add DWORD PTR [esi+4], eax
\r
1198 0002c 2b c8 sub ecx, eax
\r
1199 0002e 89 0e mov DWORD PTR [esi], ecx
\r
1201 ; 264 : state->x.pos += n;
\r
1203 00030 33 c9 xor ecx, ecx
\r
1204 00032 01 46 08 add DWORD PTR [esi+8], eax
\r
1205 00035 11 4e 0c adc DWORD PTR [esi+12], ecx
\r
1209 00038 2b f8 sub edi, eax
\r
1210 0003a 1b d9 sbb ebx, ecx
\r
1211 0003c eb 18 jmp SHORT $LN1@gz_skip
\r
1216 ; 268 : /* output buffer empty -- return if we're at the end of the input */
\r
1217 ; 269 : else if (state->eof && state->strm.avail_in == 0)
\r
1219 0003e 83 7e 40 00 cmp DWORD PTR [esi+64], 0
\r
1220 00042 74 06 je SHORT $LN3@gz_skip
\r
1221 00044 83 7e 68 00 cmp DWORD PTR [esi+104], 0
\r
1222 00048 74 12 je SHORT $LN6@gz_skip
\r
1227 ; 272 : /* need more data to skip -- load up output buffer */
\r
1229 ; 274 : /* get more output, looking for header if required */
\r
1230 ; 275 : if (gz_fetch(state) == -1)
\r
1232 0004a 8b c6 mov eax, esi
\r
1233 0004c e8 00 00 00 00 call _gz_fetch
\r
1234 00051 83 f8 ff cmp eax, -1
\r
1235 00054 74 0c je SHORT $LN14@gz_skip
\r
1238 ; 254 : unsigned n;
\r
1240 ; 256 : /* skip over len bytes or reach end-of-file, whichever comes first */
\r
1241 ; 257 : while (len)
\r
1243 00056 8b cf mov ecx, edi
\r
1244 00058 0b cb or ecx, ebx
\r
1245 0005a 75 b5 jne SHORT $LL7@gz_skip
\r
1252 0005d 33 c0 xor eax, eax
\r
1262 ; 276 : return -1;
\r
1264 00063 83 c8 ff or eax, -1
\r
1273 ; Function compile flags: /Ogtp
\r
1274 ; COMDAT _gzgets@12
\r
1276 _left$ = 8 ; size = 4
\r
1277 _file$ = 8 ; size = 4
\r
1278 _buf$ = 12 ; size = 4
\r
1279 _str$ = 16 ; size = 4
\r
1280 _len$ = 16 ; size = 4
\r
1281 _gzgets@12 PROC ; COMDAT
\r
1286 00001 8b ec mov ebp, esp
\r
1290 ; 478 : unsigned left, n;
\r
1291 ; 479 : char *str;
\r
1292 ; 480 : unsigned char *eol;
\r
1293 ; 481 : gz_statep state;
\r
1295 ; 483 : /* check parameters and get internal structure */
\r
1296 ; 484 : if (file == NULL || buf == NULL || len < 1)
\r
1298 00005 8b 75 08 mov esi, DWORD PTR _file$[ebp]
\r
1300 00009 85 f6 test esi, esi
\r
1301 0000b 0f 84 f0 00 00
\r
1302 00 je $LN14@gzgets
\r
1303 00011 8b 7d 0c mov edi, DWORD PTR _buf$[ebp]
\r
1304 00014 85 ff test edi, edi
\r
1305 00016 0f 84 e5 00 00
\r
1306 00 je $LN14@gzgets
\r
1307 0001c 8b 5d 10 mov ebx, DWORD PTR _len$[ebp]
\r
1308 0001f 83 fb 01 cmp ebx, 1
\r
1309 00022 0f 8c d9 00 00
\r
1310 00 jl $LN14@gzgets
\r
1312 ; 486 : state = (gz_statep)file;
\r
1314 ; 488 : /* check that we're reading and that there's no (serious) error */
\r
1315 ; 489 : if (state->mode != GZ_READ ||
\r
1316 ; 490 : (state->err != Z_OK && state->err != Z_BUF_ERROR))
\r
1318 00028 81 7e 10 4f 1c
\r
1319 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
1320 0002f 0f 85 cc 00 00
\r
1321 00 jne $LN14@gzgets
\r
1322 00035 8b 46 5c mov eax, DWORD PTR [esi+92]
\r
1323 00038 85 c0 test eax, eax
\r
1324 0003a 74 09 je SHORT $LN13@gzgets
\r
1325 0003c 83 f8 fb cmp eax, -5 ; fffffffbH
\r
1326 0003f 0f 85 bc 00 00
\r
1327 00 jne $LN14@gzgets
\r
1330 ; 491 : return NULL;
\r
1332 ; 493 : /* process a skip request */
\r
1333 ; 494 : if (state->seek) {
\r
1335 00045 83 7e 58 00 cmp DWORD PTR [esi+88], 0
\r
1336 00049 74 20 je SHORT $LN25@gzgets
\r
1338 ; 495 : state->seek = 0;
\r
1339 ; 496 : if (gz_skip(state, state->skip) == -1)
\r
1341 0004b 8b 46 54 mov eax, DWORD PTR [esi+84]
\r
1342 0004e 8b 4e 50 mov ecx, DWORD PTR [esi+80]
\r
1345 00053 c7 46 58 00 00
\r
1346 00 00 mov DWORD PTR [esi+88], 0
\r
1347 0005a e8 00 00 00 00 call _gz_skip
\r
1348 0005f 83 c4 08 add esp, 8
\r
1349 00062 83 f8 ff cmp eax, -1
\r
1351 ; 497 : return NULL;
\r
1353 00065 0f 84 96 00 00
\r
1354 00 je $LN14@gzgets
\r
1359 ; 500 : /* copy output bytes up to new line or len - 1, whichever comes first --
\r
1360 ; 501 : append a terminating zero to the string (we don't check for a zero in
\r
1361 ; 502 : the contents, let the user worry about that) */
\r
1362 ; 503 : str = buf;
\r
1363 ; 504 : left = (unsigned)len - 1;
\r
1366 0006c 89 7d 10 mov DWORD PTR _str$[ebp], edi
\r
1367 0006f 89 5d 08 mov DWORD PTR _left$[ebp], ebx
\r
1369 ; 505 : if (left) do {
\r
1371 00072 0f 84 89 00 00
\r
1372 00 je $LN14@gzgets
\r
1375 ; 506 : /* assure that something is in the output buffer */
\r
1376 ; 507 : if (state->x.have == 0 && gz_fetch(state) == -1)
\r
1378 00078 8b 3e mov edi, DWORD PTR [esi]
\r
1379 0007a 85 ff test edi, edi
\r
1380 0007c 75 12 jne SHORT $LN24@gzgets
\r
1381 0007e 8b c6 mov eax, esi
\r
1382 00080 e8 00 00 00 00 call _gz_fetch
\r
1383 00085 83 f8 ff cmp eax, -1
\r
1384 00088 74 77 je SHORT $LN14@gzgets
\r
1386 ; 508 : return NULL; /* error */
\r
1387 ; 509 : if (state->x.have == 0) { /* end of file */
\r
1389 0008a 8b 3e mov edi, DWORD PTR [esi]
\r
1390 0008c 85 ff test edi, edi
\r
1391 0008e 74 56 je SHORT $LN22@gzgets
\r
1394 ; 511 : break; /* return what we have */
\r
1397 ; 514 : /* look for end-of-line in current output buffer */
\r
1398 ; 515 : n = state->x.have > left ? left : state->x.have;
\r
1400 00090 3b fb cmp edi, ebx
\r
1401 00092 76 02 jbe SHORT $LN18@gzgets
\r
1402 00094 8b fb mov edi, ebx
\r
1405 ; 516 : eol = memchr(state->x.next, '\n', n);
\r
1407 00096 8b 56 04 mov edx, DWORD PTR [esi+4]
\r
1409 0009a 6a 0a push 10 ; 0000000aH
\r
1411 0009d ff 15 00 00 00
\r
1412 00 call DWORD PTR __imp__memchr
\r
1413 000a3 8b d8 mov ebx, eax
\r
1414 000a5 83 c4 0c add esp, 12 ; 0000000cH
\r
1416 ; 517 : if (eol != NULL)
\r
1418 000a8 85 db test ebx, ebx
\r
1419 000aa 74 06 je SHORT $LN3@gzgets
\r
1421 ; 518 : n = (unsigned)(eol - state->x.next) + 1;
\r
1423 000ac 8b fb mov edi, ebx
\r
1424 000ae 2b 7e 04 sub edi, DWORD PTR [esi+4]
\r
1429 ; 520 : /* copy through end-of-line, or remainder if not found */
\r
1430 ; 521 : memcpy(buf, state->x.next, n);
\r
1432 000b2 8b 46 04 mov eax, DWORD PTR [esi+4]
\r
1433 000b5 8b 4d 0c mov ecx, DWORD PTR _buf$[ebp]
\r
1437 000bb e8 00 00 00 00 call _memcpy
\r
1439 ; 522 : state->x.have -= n;
\r
1441 000c0 29 3e sub DWORD PTR [esi], edi
\r
1443 ; 523 : state->x.next += n;
\r
1445 000c2 01 7e 04 add DWORD PTR [esi+4], edi
\r
1447 ; 524 : state->x.pos += n;
\r
1448 ; 525 : left -= n;
\r
1450 000c5 8b 45 08 mov eax, DWORD PTR _left$[ebp]
\r
1451 000c8 83 c4 0c add esp, 12 ; 0000000cH
\r
1452 000cb 01 7e 08 add DWORD PTR [esi+8], edi
\r
1453 000ce 83 56 0c 00 adc DWORD PTR [esi+12], 0
\r
1457 000d2 01 7d 0c add DWORD PTR _buf$[ebp], edi
\r
1458 000d5 2b c7 sub eax, edi
\r
1459 000d7 89 45 08 mov DWORD PTR _left$[ebp], eax
\r
1461 ; 527 : } while (left && eol == NULL);
\r
1463 000da 85 c0 test eax, eax
\r
1464 000dc 74 0f je SHORT $LN2@gzgets
\r
1465 000de 85 db test ebx, ebx
\r
1466 000e0 75 0b jne SHORT $LN2@gzgets
\r
1467 000e2 8b d8 mov ebx, eax
\r
1468 000e4 eb 92 jmp SHORT $LL8@gzgets
\r
1471 ; 510 : state->past = 1; /* read past end */
\r
1473 000e6 c7 46 44 01 00
\r
1474 00 00 mov DWORD PTR [esi+68], 1
\r
1478 ; 529 : /* return terminated string, or if nothing, end of file */
\r
1479 ; 530 : if (buf == str)
\r
1481 000ed 8b 4d 0c mov ecx, DWORD PTR _buf$[ebp]
\r
1482 000f0 8b 45 10 mov eax, DWORD PTR _str$[ebp]
\r
1483 000f3 3b c8 cmp ecx, eax
\r
1485 ; 531 : return NULL;
\r
1487 000f5 74 0a je SHORT $LN14@gzgets
\r
1489 ; 532 : buf[0] = 0;
\r
1493 000f9 c6 01 00 mov BYTE PTR [ecx], 0
\r
1496 ; 533 : return str;
\r
1500 000fe c2 0c 00 ret 12 ; 0000000cH
\r
1505 ; 485 : return NULL;
\r
1507 00103 33 c0 xor eax, eax
\r
1510 ; 533 : return str;
\r
1514 00107 c2 0c 00 ret 12 ; 0000000cH
\r
1517 PUBLIC _gzungetc@8
\r
1518 ; Function compile flags: /Ogtp
\r
1519 ; COMDAT _gzungetc@8
\r
1521 _c$ = 8 ; size = 4
\r
1522 _file$ = 12 ; size = 4
\r
1523 _gzungetc@8 PROC ; COMDAT
\r
1528 00001 8b ec mov ebp, esp
\r
1531 ; 417 : gz_statep state;
\r
1533 ; 419 : /* get internal structure */
\r
1534 ; 420 : if (file == NULL)
\r
1536 00004 8b 75 0c mov esi, DWORD PTR _file$[ebp]
\r
1538 00008 33 ff xor edi, edi
\r
1539 0000a 3b f7 cmp esi, edi
\r
1540 0000c 75 09 jne SHORT $LN11@gzungetc
\r
1544 ; 421 : return -1;
\r
1546 0000f 83 c8 ff or eax, -1
\r
1553 00014 c2 08 00 ret 8
\r
1556 ; 422 : state = (gz_statep)file;
\r
1558 ; 424 : /* check that we're reading and that there's no (serious) error */
\r
1559 ; 425 : if (state->mode != GZ_READ ||
\r
1560 ; 426 : (state->err != Z_OK && state->err != Z_BUF_ERROR))
\r
1562 00017 81 7e 10 4f 1c
\r
1563 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
1564 0001e 75 ee jne SHORT $LN9@gzungetc
\r
1565 00020 8b 46 5c mov eax, DWORD PTR [esi+92]
\r
1566 00023 3b c7 cmp eax, edi
\r
1567 00025 74 05 je SHORT $LN10@gzungetc
\r
1568 00027 83 f8 fb cmp eax, -5 ; fffffffbH
\r
1569 0002a 75 e2 jne SHORT $LN9@gzungetc
\r
1573 ; 427 : return -1;
\r
1575 ; 429 : /* process a skip request */
\r
1576 ; 430 : if (state->seek) {
\r
1578 0002d 83 cb ff or ebx, -1
\r
1579 00030 39 7e 58 cmp DWORD PTR [esi+88], edi
\r
1580 00033 74 17 je SHORT $LN7@gzungetc
\r
1582 ; 431 : state->seek = 0;
\r
1583 ; 432 : if (gz_skip(state, state->skip) == -1)
\r
1585 00035 8b 46 54 mov eax, DWORD PTR [esi+84]
\r
1586 00038 8b 4e 50 mov ecx, DWORD PTR [esi+80]
\r
1589 0003d 89 7e 58 mov DWORD PTR [esi+88], edi
\r
1590 00040 e8 00 00 00 00 call _gz_skip
\r
1591 00045 83 c4 08 add esp, 8
\r
1592 00048 3b c3 cmp eax, ebx
\r
1594 ; 433 : return -1;
\r
1596 0004a 74 4d je SHORT $LN18@gzungetc
\r
1601 ; 436 : /* can't push EOF */
\r
1602 ; 437 : if (c < 0)
\r
1604 0004c 8b 45 08 mov eax, DWORD PTR _c$[ebp]
\r
1605 0004f 3b c7 cmp eax, edi
\r
1607 ; 438 : return -1;
\r
1609 00051 7c 46 jl SHORT $LN18@gzungetc
\r
1612 ; 440 : /* if output buffer empty, put byte at end (allows more pushing) */
\r
1613 ; 441 : if (state->x.have == 0) {
\r
1615 00053 8b 0e mov ecx, DWORD PTR [esi]
\r
1617 ; 442 : state->x.have = 1;
\r
1618 ; 443 : state->x.next = state->out + (state->size << 1) - 1;
\r
1620 00055 8b 56 1c mov edx, DWORD PTR [esi+28]
\r
1621 00058 3b cf cmp ecx, edi
\r
1622 0005a 75 22 jne SHORT $LN5@gzungetc
\r
1623 0005c 8b 4e 28 mov ecx, DWORD PTR [esi+40]
\r
1624 0005f 8d 4c 51 ff lea ecx, DWORD PTR [ecx+edx*2-1]
\r
1625 00063 c7 06 01 00 00
\r
1626 00 mov DWORD PTR [esi], 1
\r
1627 00069 89 4e 04 mov DWORD PTR [esi+4], ecx
\r
1629 ; 444 : state->x.next[0] = c;
\r
1631 0006c 88 01 mov BYTE PTR [ecx], al
\r
1633 ; 467 : state->x.pos--;
\r
1635 0006e 01 5e 08 add DWORD PTR [esi+8], ebx
\r
1636 00071 89 7e 44 mov DWORD PTR [esi+68], edi
\r
1637 00074 11 5e 0c adc DWORD PTR [esi+12], ebx
\r
1646 0007b c2 08 00 ret 8
\r
1649 ; 445 : state->x.pos--;
\r
1650 ; 446 : state->past = 0;
\r
1654 ; 450 : /* if no room, give up (must have already done a gzungetc()) */
\r
1655 ; 451 : if (state->x.have == (state->size << 1)) {
\r
1657 0007e 8d 3c 12 lea edi, DWORD PTR [edx+edx]
\r
1658 00081 3b cf cmp ecx, edi
\r
1659 00083 75 1d jne SHORT $LN4@gzungetc
\r
1661 ; 452 : gz_error(state, Z_DATA_ERROR, "out of room to push characters");
\r
1663 00085 68 00 00 00 00 push OFFSET ??_C@_0BP@IIKIGMCC@out?5of?5room?5to?5push?5characters?$AA@
\r
1664 0008a b8 fd ff ff ff mov eax, -3 ; fffffffdH
\r
1665 0008f 8b ce mov ecx, esi
\r
1666 00091 e8 00 00 00 00 call _gz_error
\r
1667 00096 83 c4 04 add esp, 4
\r
1670 ; 453 : return -1;
\r
1672 00099 8b c3 mov eax, ebx
\r
1681 0009f c2 08 00 ret 8
\r
1686 ; 456 : /* slide output data if needed and insert byte before existing data */
\r
1687 ; 457 : if (state->x.next == state->out) {
\r
1689 000a2 8b 7e 28 mov edi, DWORD PTR [esi+40]
\r
1690 000a5 39 7e 04 cmp DWORD PTR [esi+4], edi
\r
1691 000a8 75 1b jne SHORT $LN3@gzungetc
\r
1693 ; 458 : unsigned char *src = state->out + state->x.have;
\r
1695 000aa 03 cf add ecx, edi
\r
1697 ; 459 : unsigned char *dest = state->out + (state->size << 1);
\r
1699 000ac 8d 14 57 lea edx, DWORD PTR [edi+edx*2]
\r
1701 ; 460 : while (src > state->out)
\r
1703 000af 3b cf cmp ecx, edi
\r
1704 000b1 76 0f jbe SHORT $LN1@gzungetc
\r
1707 ; 461 : *--dest = *--src;
\r
1709 000b3 8a 59 ff mov bl, BYTE PTR [ecx-1]
\r
1712 000b8 88 1a mov BYTE PTR [edx], bl
\r
1713 000ba 3b 4e 28 cmp ecx, DWORD PTR [esi+40]
\r
1714 000bd 77 f4 ja SHORT $LL2@gzungetc
\r
1716 ; 460 : while (src > state->out)
\r
1718 000bf 83 cb ff or ebx, -1
\r
1721 ; 462 : state->x.next = dest;
\r
1723 000c2 89 56 04 mov DWORD PTR [esi+4], edx
\r
1727 ; 464 : state->x.have++;
\r
1728 ; 465 : state->x.next--;
\r
1730 000c5 01 5e 04 add DWORD PTR [esi+4], ebx
\r
1731 000c8 ff 06 inc DWORD PTR [esi]
\r
1732 000ca 8b 4e 04 mov ecx, DWORD PTR [esi+4]
\r
1734 ; 466 : state->x.next[0] = c;
\r
1736 000cd 88 01 mov BYTE PTR [ecx], al
\r
1738 ; 467 : state->x.pos--;
\r
1740 000cf 01 5e 08 add DWORD PTR [esi+8], ebx
\r
1742 ; 468 : state->past = 0;
\r
1744 000d2 c7 46 44 00 00
\r
1745 00 00 mov DWORD PTR [esi+68], 0
\r
1746 000d9 11 5e 0c adc DWORD PTR [esi+12], ebx
\r
1755 000e0 c2 08 00 ret 8
\r
1759 ; Function compile flags: /Ogtp
\r
1760 ; COMDAT _gzread@12
\r
1762 _n$ = 8 ; size = 4
\r
1763 _file$ = 8 ; size = 4
\r
1764 _buf$ = 12 ; size = 4
\r
1765 _got$ = 16 ; size = 4
\r
1766 _len$ = 16 ; size = 4
\r
1767 _gzread@12 PROC ; COMDAT
\r
1772 00001 8b ec mov ebp, esp
\r
1775 ; 287 : unsigned got, n;
\r
1776 ; 288 : gz_statep state;
\r
1777 ; 289 : z_streamp strm;
\r
1779 ; 291 : /* get internal structure */
\r
1780 ; 292 : if (file == NULL)
\r
1782 00004 8b 5d 08 mov ebx, DWORD PTR _file$[ebp]
\r
1783 00007 85 db test ebx, ebx
\r
1784 00009 75 08 jne SHORT $LN22@gzread
\r
1787 ; 293 : return -1;
\r
1789 0000b 83 c8 ff or eax, -1
\r
1795 00010 c2 0c 00 ret 12 ; 0000000cH
\r
1798 ; 294 : state = (gz_statep)file;
\r
1799 ; 295 : strm = &(state->strm);
\r
1801 ; 297 : /* check that we're reading and that there's no (serious) error */
\r
1802 ; 298 : if (state->mode != GZ_READ ||
\r
1803 ; 299 : (state->err != Z_OK && state->err != Z_BUF_ERROR))
\r
1805 00013 81 7b 10 4f 1c
\r
1806 00 00 cmp DWORD PTR [ebx+16], 7247 ; 00001c4fH
\r
1807 0001a 75 ef jne SHORT $LN20@gzread
\r
1808 0001c 8b 43 5c mov eax, DWORD PTR [ebx+92]
\r
1809 0001f 85 c0 test eax, eax
\r
1810 00021 74 05 je SHORT $LN21@gzread
\r
1811 00023 83 f8 fb cmp eax, -5 ; fffffffbH
\r
1812 00026 75 e3 jne SHORT $LN20@gzread
\r
1816 ; 300 : return -1;
\r
1818 ; 302 : /* since an int is returned, make sure len fits in one, otherwise return
\r
1819 ; 303 : with an error (this avoids the flaw in the interface) */
\r
1820 ; 304 : if ((int)len < 0) {
\r
1822 00029 8b 7d 10 mov edi, DWORD PTR _len$[ebp]
\r
1823 0002c 85 ff test edi, edi
\r
1824 0002e 79 1d jns SHORT $LN37@gzread
\r
1826 ; 305 : gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
\r
1828 00030 68 00 00 00 00 push OFFSET ??_C@_0CF@MLPJFDMM@requested?5length?5does?5not?5fit?5in@
\r
1829 00035 b8 fd ff ff ff mov eax, -3 ; fffffffdH
\r
1830 0003a 8b cb mov ecx, ebx
\r
1831 0003c e8 00 00 00 00 call _gz_error
\r
1832 00041 83 c4 04 add esp, 4
\r
1835 ; 306 : return -1;
\r
1837 00045 83 c8 ff or eax, -1
\r
1843 0004a c2 0c 00 ret 12 ; 0000000cH
\r
1848 ; 309 : /* if len is zero, avoid unnecessary operations */
\r
1849 ; 310 : if (len == 0)
\r
1851 0004d 75 08 jne SHORT $LN18@gzread
\r
1856 00050 33 c0 xor eax, eax
\r
1862 00054 c2 0c 00 ret 12 ; 0000000cH
\r
1866 ; 313 : /* process a skip request */
\r
1867 ; 314 : if (state->seek) {
\r
1869 00057 83 7b 58 00 cmp DWORD PTR [ebx+88], 0
\r
1871 0005c 74 22 je SHORT $LN32@gzread
\r
1873 ; 315 : state->seek = 0;
\r
1874 ; 316 : if (gz_skip(state, state->skip) == -1)
\r
1876 0005e 8b 43 54 mov eax, DWORD PTR [ebx+84]
\r
1877 00061 8b 4b 50 mov ecx, DWORD PTR [ebx+80]
\r
1880 00066 8b f3 mov esi, ebx
\r
1881 00068 c7 43 58 00 00
\r
1882 00 00 mov DWORD PTR [ebx+88], 0
\r
1883 0006f e8 00 00 00 00 call _gz_skip
\r
1884 00074 83 c4 08 add esp, 8
\r
1885 00077 83 f8 ff cmp eax, -1
\r
1887 ; 317 : return -1;
\r
1889 0007a 0f 84 eb 00 00
\r
1890 00 je $LN31@gzread
\r
1895 ; 320 : /* get len bytes to buf, or less than len if at the end */
\r
1898 00080 c7 45 10 00 00
\r
1899 00 00 mov DWORD PTR _got$[ebp], 0
\r
1903 ; 323 : /* first just try copying data from the output buffer */
\r
1904 ; 324 : if (state->x.have) {
\r
1906 00087 8b 33 mov esi, DWORD PTR [ebx]
\r
1907 00089 85 f6 test esi, esi
\r
1908 0008b 74 33 je SHORT $LN12@gzread
\r
1910 ; 325 : n = state->x.have > len ? len : state->x.have;
\r
1912 0008d 3b f7 cmp esi, edi
\r
1913 0008f 76 02 jbe SHORT $LN25@gzread
\r
1914 00091 8b f7 mov esi, edi
\r
1917 ; 326 : memcpy(buf, state->x.next, n);
\r
1919 00093 8b 53 04 mov edx, DWORD PTR [ebx+4]
\r
1920 00096 8b 45 0c mov eax, DWORD PTR _buf$[ebp]
\r
1924 0009c 89 75 08 mov DWORD PTR _n$[ebp], esi
\r
1925 0009f e8 00 00 00 00 call _memcpy
\r
1927 ; 327 : state->x.next += n;
\r
1929 000a4 01 73 04 add DWORD PTR [ebx+4], esi
\r
1931 ; 328 : state->x.have -= n;
\r
1933 000a7 29 33 sub DWORD PTR [ebx], esi
\r
1935 ; 361 : state->x.have = 0;
\r
1938 ; 364 : /* update progress */
\r
1940 ; 366 : buf = (char *)buf + n;
\r
1942 000a9 01 75 0c add DWORD PTR _buf$[ebp], esi
\r
1946 000ac 01 75 10 add DWORD PTR _got$[ebp], esi
\r
1947 000af 83 c4 0c add esp, 12 ; 0000000cH
\r
1948 000b2 2b fe sub edi, esi
\r
1950 ; 368 : state->x.pos += n;
\r
1952 000b4 01 73 08 add DWORD PTR [ebx+8], esi
\r
1953 000b7 83 53 0c 00 adc DWORD PTR [ebx+12], 0
\r
1954 000bb e9 88 00 00 00 jmp $LN14@gzread
\r
1959 ; 331 : /* output buffer empty -- return if we're at the end of the input */
\r
1960 ; 332 : else if (state->eof && strm->avail_in == 0) {
\r
1962 000c0 83 7b 40 00 cmp DWORD PTR [ebx+64], 0
\r
1963 000c4 74 0a je SHORT $LN10@gzread
\r
1964 000c6 83 7b 68 00 cmp DWORD PTR [ebx+104], 0
\r
1965 000ca 0f 84 8a 00 00
\r
1966 00 je $LN28@gzread
\r
1969 ; 333 : state->past = 1; /* tried to read past end */
\r
1973 ; 337 : /* need output data -- for small len or new stream load up our output
\r
1975 ; 339 : else if (state->how == LOOK || len < (state->size << 1)) {
\r
1977 000d0 8b 43 30 mov eax, DWORD PTR [ebx+48]
\r
1978 000d3 85 c0 test eax, eax
\r
1979 000d5 74 65 je SHORT $LN7@gzread
\r
1980 000d7 8b 4b 1c mov ecx, DWORD PTR [ebx+28]
\r
1981 000da 03 c9 add ecx, ecx
\r
1982 000dc 3b f9 cmp edi, ecx
\r
1983 000de 72 5c jb SHORT $LN7@gzread
\r
1985 ; 343 : continue; /* no progress yet -- go back to memcpy() above */
\r
1986 ; 344 : /* the copy above assures that we will leave with space in the
\r
1987 ; 345 : output buffer, allowing at least one gzungetc() to succeed */
\r
1990 ; 348 : /* large len -- read directly into user buffer */
\r
1991 ; 349 : else if (state->how == COPY) { /* read directly */
\r
1993 000e0 83 f8 01 cmp eax, 1
\r
1994 000e3 75 28 jne SHORT $LN4@gzread
\r
1996 ; 350 : if (gz_load(state, buf, len, &n) == -1)
\r
1998 000e5 8b 55 0c mov edx, DWORD PTR _buf$[ebp]
\r
2000 000e9 8d 75 08 lea esi, DWORD PTR _n$[ebp]
\r
2001 000ec e8 00 00 00 00 call _gz_load
\r
2002 000f1 83 c4 04 add esp, 4
\r
2003 000f4 83 f8 ff cmp eax, -1
\r
2004 000f7 74 72 je SHORT $LN31@gzread
\r
2006 ; 351 : return -1;
\r
2009 ; 354 : /* large len -- decompress directly into user buffer */
\r
2010 ; 355 : else { /* state->how == GZIP */
\r
2012 000f9 8b 75 08 mov esi, DWORD PTR _n$[ebp]
\r
2014 ; 361 : state->x.have = 0;
\r
2017 ; 364 : /* update progress */
\r
2019 ; 366 : buf = (char *)buf + n;
\r
2021 000fc 01 75 0c add DWORD PTR _buf$[ebp], esi
\r
2025 000ff 01 75 10 add DWORD PTR _got$[ebp], esi
\r
2026 00102 2b fe sub edi, esi
\r
2028 ; 368 : state->x.pos += n;
\r
2030 00104 01 73 08 add DWORD PTR [ebx+8], esi
\r
2031 00107 83 53 0c 00 adc DWORD PTR [ebx+12], 0
\r
2032 0010b eb 3b jmp SHORT $LN14@gzread
\r
2035 ; 356 : strm->avail_out = len;
\r
2036 ; 357 : strm->next_out = buf;
\r
2038 0010d 8b 45 0c mov eax, DWORD PTR _buf$[ebp]
\r
2039 00110 89 7b 74 mov DWORD PTR [ebx+116], edi
\r
2040 00113 89 43 70 mov DWORD PTR [ebx+112], eax
\r
2042 ; 358 : if (gz_decomp(state) == -1)
\r
2044 00116 e8 00 00 00 00 call _gz_decomp
\r
2045 0011b 83 f8 ff cmp eax, -1
\r
2046 0011e 74 4b je SHORT $LN31@gzread
\r
2048 ; 359 : return -1;
\r
2049 ; 360 : n = state->x.have;
\r
2051 00120 8b 33 mov esi, DWORD PTR [ebx]
\r
2053 ; 361 : state->x.have = 0;
\r
2056 ; 364 : /* update progress */
\r
2058 ; 366 : buf = (char *)buf + n;
\r
2060 00122 01 75 0c add DWORD PTR _buf$[ebp], esi
\r
2064 00125 01 75 10 add DWORD PTR _got$[ebp], esi
\r
2065 00128 2b fe sub edi, esi
\r
2067 ; 368 : state->x.pos += n;
\r
2069 0012a 01 73 08 add DWORD PTR [ebx+8], esi
\r
2070 0012d 89 75 08 mov DWORD PTR _n$[ebp], esi
\r
2071 00130 c7 03 00 00 00
\r
2072 00 mov DWORD PTR [ebx], 0
\r
2073 00136 83 53 0c 00 adc DWORD PTR [ebx+12], 0
\r
2074 0013a eb 0c jmp SHORT $LN14@gzread
\r
2077 ; 340 : /* get more output, looking for header if required */
\r
2078 ; 341 : if (gz_fetch(state) == -1)
\r
2080 0013c 8b c3 mov eax, ebx
\r
2081 0013e e8 00 00 00 00 call _gz_fetch
\r
2082 00143 83 f8 ff cmp eax, -1
\r
2083 00146 74 23 je SHORT $LN31@gzread
\r
2086 ; 369 : } while (len);
\r
2088 00148 85 ff test edi, edi
\r
2089 0014a 0f 85 37 ff ff
\r
2090 ff jne $LL15@gzread
\r
2093 ; 371 : /* return number of bytes read into user buffer (will fit in int) */
\r
2094 ; 372 : return (int)got;
\r
2096 00150 8b 45 10 mov eax, DWORD PTR _got$[ebp]
\r
2104 00157 c2 0c 00 ret 12 ; 0000000cH
\r
2108 ; 371 : /* return number of bytes read into user buffer (will fit in int) */
\r
2109 ; 372 : return (int)got;
\r
2111 0015a 8b 45 10 mov eax, DWORD PTR _got$[ebp]
\r
2114 0015f c7 43 44 01 00
\r
2115 00 00 mov DWORD PTR [ebx+68], 1
\r
2121 00168 c2 0c 00 ret 12 ; 0000000cH
\r
2126 ; 342 : return -1;
\r
2128 0016d 83 c8 ff or eax, -1
\r
2134 00172 c2 0c 00 ret 12 ; 0000000cH
\r
2137 ; Function compile flags: /Ogtp
\r
2138 ; COMDAT _gzgetc_@4
\r
2140 _file$ = 8 ; size = 4
\r
2141 _buf$ = 11 ; size = 1
\r
2142 _gzgetc_@4 PROC ; COMDAT
\r
2147 00001 8b ec mov ebp, esp
\r
2150 ; 380 : unsigned char buf[1];
\r
2151 ; 381 : gz_statep state;
\r
2153 ; 383 : /* get internal structure */
\r
2154 ; 384 : if (file == NULL)
\r
2156 00003 8b 45 08 mov eax, DWORD PTR _file$[ebp]
\r
2157 00006 85 c0 test eax, eax
\r
2159 ; 385 : return -1;
\r
2161 00008 74 4f je SHORT $LN2@gzgetc_
\r
2163 ; 386 : state = (gz_statep)file;
\r
2165 ; 388 : /* check that we're reading and that there's no (serious) error */
\r
2166 ; 389 : if (state->mode != GZ_READ ||
\r
2167 ; 390 : (state->err != Z_OK && state->err != Z_BUF_ERROR))
\r
2169 0000a 81 78 10 4f 1c
\r
2170 00 00 cmp DWORD PTR [eax+16], 7247 ; 00001c4fH
\r
2171 00011 75 46 jne SHORT $LN2@gzgetc_
\r
2172 00013 8b 48 5c mov ecx, DWORD PTR [eax+92]
\r
2173 00016 85 c9 test ecx, ecx
\r
2174 00018 74 05 je SHORT $LN3@gzgetc_
\r
2175 0001a 83 f9 fb cmp ecx, -5 ; fffffffbH
\r
2176 0001d 75 3a jne SHORT $LN2@gzgetc_
\r
2180 ; 393 : /* try output buffer (no need to check for skip request) */
\r
2181 ; 394 : if (state->x.have) {
\r
2183 0001f 8b 08 mov ecx, DWORD PTR [eax]
\r
2184 00021 85 c9 test ecx, ecx
\r
2185 00023 74 1b je SHORT $LN1@gzgetc_
\r
2187 ; 395 : state->x.have--;
\r
2191 ; 396 : state->x.pos++;
\r
2193 00026 83 40 08 01 add DWORD PTR [eax+8], 1
\r
2194 0002a 89 08 mov DWORD PTR [eax], ecx
\r
2196 ; 397 : return *(state->x.next)++;
\r
2198 0002c 8b 48 04 mov ecx, DWORD PTR [eax+4]
\r
2199 0002f 83 50 0c 00 adc DWORD PTR [eax+12], 0
\r
2200 00033 8a 11 mov dl, BYTE PTR [ecx]
\r
2202 00036 89 48 04 mov DWORD PTR [eax+4], ecx
\r
2203 00039 0f b6 c2 movzx eax, dl
\r
2208 0003d c2 04 00 ret 4
\r
2213 ; 400 : /* nothing there -- try gzread() */
\r
2214 ; 401 : ret = gzread(file, buf, 1);
\r
2216 00040 6a 01 push 1
\r
2217 00042 8d 4d 0b lea ecx, DWORD PTR _buf$[ebp]
\r
2220 00047 e8 00 00 00 00 call _gzread@12
\r
2222 ; 402 : return ret < 1 ? -1 : buf[0];
\r
2224 0004c 83 f8 01 cmp eax, 1
\r
2225 0004f 7c 08 jl SHORT $LN2@gzgetc_
\r
2226 00051 0f b6 45 0b movzx eax, BYTE PTR _buf$[ebp]
\r
2231 00056 c2 04 00 ret 4
\r
2234 ; 391 : return -1;
\r
2236 00059 83 c8 ff or eax, -1
\r
2241 0005d c2 04 00 ret 4
\r
2245 ; Function compile flags: /Ogtp
\r
2246 ; COMDAT _gzgetc@4
\r
2248 _file$ = 8 ; size = 4
\r
2249 _gzgetc@4 PROC ; COMDAT
\r
2254 00001 8b ec mov ebp, esp
\r
2260 ; 409 : return gzgetc_(file);
\r
2262 00004 e9 00 00 00 00 jmp _gzgetc_@4
\r