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\gzlib.c
\r
11 PUBLIC ??_C@_07EBNKNFJN@?$DMfd?3?$CFd?$DO?$AA@ ; `string'
\r
12 PUBLIC ??_C@_00CNPNBAHC@?$AA@ ; `string'
\r
13 PUBLIC ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@ ; `string'
\r
14 PUBLIC ??_C@_02LMMGGCAJ@?3?5?$AA@ ; `string'
\r
15 EXTRN __imp__sprintf:PROC
\r
17 EXTRN __imp___lseeki64:PROC
\r
18 EXTRN __imp__free:PROC
\r
19 EXTRN __imp__malloc:PROC
\r
20 ; COMDAT ??_C@_02LMMGGCAJ@?3?5?$AA@
\r
22 ??_C@_02LMMGGCAJ@?3?5?$AA@ DB ': ', 00H ; `string'
\r
24 ; COMDAT ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@
\r
26 ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@ DB 'out of memory', 00H ; `string'
\r
28 ; COMDAT ??_C@_00CNPNBAHC@?$AA@
\r
30 ??_C@_00CNPNBAHC@?$AA@ DB 00H ; `string'
\r
32 ; COMDAT ??_C@_07EBNKNFJN@?$DMfd?3?$CFd?$DO?$AA@
\r
34 ??_C@_07EBNKNFJN@?$DMfd?3?$CFd?$DO?$AA@ DB '<fd:%d>', 00H ; `string'
\r
36 ; Function compile flags: /Ogtp
\r
37 ; File c:\workspaces\sysdyn\org.simantics.fmu\fmusolution\zlib-1.2.6\gzlib.c
\r
40 _msg$ = 8 ; size = 4
\r
41 _gz_error PROC ; COMDAT
\r
48 00001 8b ec mov ebp, esp
\r
51 00005 8b f9 mov edi, ecx
\r
52 00007 8b f0 mov esi, eax
\r
54 ; 513 : /* free previously allocated message and clear */
\r
55 ; 514 : if (state->msg != NULL) {
\r
57 00009 8b 47 60 mov eax, DWORD PTR [edi+96]
\r
58 0000c 85 c0 test eax, eax
\r
59 0000e 74 17 je SHORT $LN16@gz_error
\r
61 ; 515 : if (state->err != Z_MEM_ERROR)
\r
63 00010 83 7f 5c fc cmp DWORD PTR [edi+92], -4 ; fffffffcH
\r
64 00014 74 0a je SHORT $LN5@gz_error
\r
66 ; 516 : free(state->msg);
\r
69 00017 ff 15 00 00 00
\r
70 00 call DWORD PTR __imp__free
\r
71 0001d 83 c4 04 add esp, 4
\r
74 ; 517 : state->msg = NULL;
\r
76 00020 c7 47 60 00 00
\r
77 00 00 mov DWORD PTR [edi+96], 0
\r
82 ; 520 : /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */
\r
83 ; 521 : if (err != Z_OK && err != Z_BUF_ERROR)
\r
85 00027 85 f6 test esi, esi
\r
86 00029 74 0b je SHORT $LN4@gz_error
\r
87 0002b 83 fe fb cmp esi, -5 ; fffffffbH
\r
88 0002e 74 06 je SHORT $LN4@gz_error
\r
90 ; 522 : state->x.have = 0;
\r
92 00030 c7 07 00 00 00
\r
93 00 mov DWORD PTR [edi], 0
\r
97 ; 524 : /* set error code, and if no message, then done */
\r
98 ; 525 : state->err = err;
\r
99 ; 526 : if (msg == NULL)
\r
101 00036 8b 45 08 mov eax, DWORD PTR _msg$[ebp]
\r
102 00039 89 77 5c mov DWORD PTR [edi+92], esi
\r
103 0003c 85 c0 test eax, eax
\r
104 0003e 0f 84 b6 00 00
\r
105 00 je $LN7@gz_error
\r
109 ; 529 : /* for an out of memory error, save as static string */
\r
110 ; 530 : if (err == Z_MEM_ERROR) {
\r
112 00044 83 fe fc cmp esi, -4 ; fffffffcH
\r
113 00047 75 07 jne SHORT $LN2@gz_error
\r
115 ; 531 : state->msg = (char *)msg;
\r
117 00049 89 47 60 mov DWORD PTR [edi+96], eax
\r
132 ; 535 : /* construct error message with path */
\r
133 ; 536 : if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) {
\r
135 00051 8b 5f 18 mov ebx, DWORD PTR [edi+24]
\r
136 00054 8b c3 mov eax, ebx
\r
137 00056 8d 50 01 lea edx, DWORD PTR [eax+1]
\r
138 00059 8d a4 24 00 00
\r
141 00060 8a 08 mov cl, BYTE PTR [eax]
\r
143 00063 84 c9 test cl, cl
\r
144 00065 75 f9 jne SHORT $LL11@gz_error
\r
145 00067 2b c2 sub eax, edx
\r
146 00069 8b d0 mov edx, eax
\r
147 0006b 8b 45 08 mov eax, DWORD PTR _msg$[ebp]
\r
148 0006e 8d 70 01 lea esi, DWORD PTR [eax+1]
\r
150 00071 8a 08 mov cl, BYTE PTR [eax]
\r
152 00074 84 c9 test cl, cl
\r
153 00076 75 f9 jne SHORT $LL12@gz_error
\r
154 00078 2b c6 sub eax, esi
\r
155 0007a 8d 44 10 03 lea eax, DWORD PTR [eax+edx+3]
\r
157 0007f ff 15 00 00 00
\r
158 00 call DWORD PTR __imp__malloc
\r
159 00085 83 c4 04 add esp, 4
\r
160 00088 89 47 60 mov DWORD PTR [edi+96], eax
\r
161 0008b 85 c0 test eax, eax
\r
162 0008d 75 13 jne SHORT $LN1@gz_error
\r
164 ; 537 : state->err = Z_MEM_ERROR;
\r
167 00090 c7 47 5c fc ff
\r
168 ff ff mov DWORD PTR [edi+92], -4 ; fffffffcH
\r
170 ; 538 : state->msg = (char *)"out of memory";
\r
172 00097 c7 47 60 00 00
\r
173 00 00 mov DWORD PTR [edi+96], OFFSET ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@
\r
186 ; 541 : strcpy(state->msg, state->path);
\r
188 000a2 8b cb mov ecx, ebx
\r
189 000a4 8b d0 mov edx, eax
\r
191 000a6 8a 01 mov al, BYTE PTR [ecx]
\r
192 000a8 88 02 mov BYTE PTR [edx], al
\r
195 000ac 84 c0 test al, al
\r
196 000ae 75 f6 jne SHORT $LL9@gz_error
\r
198 ; 542 : strcat(state->msg, ": ");
\r
200 000b0 8b 47 60 mov eax, DWORD PTR [edi+96]
\r
203 000b4 8a 48 01 mov cl, BYTE PTR [eax+1]
\r
205 000b8 84 c9 test cl, cl
\r
206 000ba 75 f8 jne SHORT $LL13@gz_error
\r
207 000bc 66 8b 0d 00 00
\r
208 00 00 mov cx, WORD PTR ??_C@_02LMMGGCAJ@?3?5?$AA@
\r
209 000c3 66 89 08 mov WORD PTR [eax], cx
\r
210 000c6 8a 15 02 00 00
\r
211 00 mov dl, BYTE PTR ??_C@_02LMMGGCAJ@?3?5?$AA@+2
\r
212 000cc 88 50 02 mov BYTE PTR [eax+2], dl
\r
214 ; 543 : strcat(state->msg, msg);
\r
216 000cf 8b 45 08 mov eax, DWORD PTR _msg$[ebp]
\r
217 000d2 8b c8 mov ecx, eax
\r
219 000d4 8a 10 mov dl, BYTE PTR [eax]
\r
221 000d7 84 d2 test dl, dl
\r
222 000d9 75 f9 jne SHORT $LL14@gz_error
\r
223 000db 8b 7f 60 mov edi, DWORD PTR [edi+96]
\r
224 000de 2b c1 sub eax, ecx
\r
225 000e0 8b f1 mov esi, ecx
\r
228 000e3 8a 4f 01 mov cl, BYTE PTR [edi+1]
\r
230 000e7 84 c9 test cl, cl
\r
231 000e9 75 f8 jne SHORT $LL15@gz_error
\r
232 000eb 8b c8 mov ecx, eax
\r
233 000ed c1 e9 02 shr ecx, 2
\r
234 000f0 f3 a5 rep movsd
\r
235 000f2 8b c8 mov ecx, eax
\r
236 000f4 83 e1 03 and ecx, 3
\r
237 000f7 f3 a4 rep movsb
\r
250 PUBLIC _gzclearerr@4
\r
251 ; Function compile flags: /Ogtp
\r
252 ; COMDAT _gzclearerr@4
\r
254 _file$ = 8 ; size = 4
\r
255 _gzclearerr@4 PROC ; COMDAT
\r
260 00001 8b ec mov ebp, esp
\r
262 ; 485 : gz_statep state;
\r
264 ; 487 : /* get internal structure and check integrity */
\r
265 ; 488 : if (file == NULL)
\r
267 00003 8b 4d 08 mov ecx, DWORD PTR _file$[ebp]
\r
268 00006 33 d2 xor edx, edx
\r
269 00008 3b ca cmp ecx, edx
\r
270 0000a 74 29 je SHORT $LN4@gzclearerr
\r
273 ; 490 : state = (gz_statep)file;
\r
274 ; 491 : if (state->mode != GZ_READ && state->mode != GZ_WRITE)
\r
276 0000c 8b 41 10 mov eax, DWORD PTR [ecx+16]
\r
277 0000f 3d 4f 1c 00 00 cmp eax, 7247 ; 00001c4fH
\r
278 00014 74 0e je SHORT $LN7@gzclearerr
\r
279 00016 3d b1 79 00 00 cmp eax, 31153 ; 000079b1H
\r
280 0001b 75 18 jne SHORT $LN4@gzclearerr
\r
284 ; 494 : /* clear error and end-of-file */
\r
285 ; 495 : if (state->mode == GZ_READ) {
\r
287 0001d 3d 4f 1c 00 00 cmp eax, 7247 ; 00001c4fH
\r
288 00022 75 06 jne SHORT $LN1@gzclearerr
\r
291 ; 496 : state->eof = 0;
\r
293 00024 89 51 40 mov DWORD PTR [ecx+64], edx
\r
295 ; 497 : state->past = 0;
\r
297 00027 89 51 44 mov DWORD PTR [ecx+68], edx
\r
301 ; 499 : gz_error(state, Z_OK, NULL);
\r
304 0002b 33 c0 xor eax, eax
\r
305 0002d e8 00 00 00 00 call _gz_error
\r
306 00032 83 c4 04 add esp, 4
\r
312 00036 c2 04 00 ret 4
\r
316 ; Function compile flags: /Ogtp
\r
317 ; COMDAT _gzerror@8
\r
319 _file$ = 8 ; size = 4
\r
320 _errnum$ = 12 ; size = 4
\r
321 _gzerror@8 PROC ; COMDAT
\r
326 00001 8b ec mov ebp, esp
\r
328 ; 466 : gz_statep state;
\r
330 ; 468 : /* get internal structure and check integrity */
\r
331 ; 469 : if (file == NULL)
\r
333 00003 8b 45 08 mov eax, DWORD PTR _file$[ebp]
\r
334 00006 85 c0 test eax, eax
\r
335 00008 75 06 jne SHORT $LN3@gzerror
\r
338 ; 470 : return NULL;
\r
340 0000a 33 c0 xor eax, eax
\r
345 0000d c2 08 00 ret 8
\r
348 ; 471 : state = (gz_statep)file;
\r
349 ; 472 : if (state->mode != GZ_READ && state->mode != GZ_WRITE)
\r
351 00010 8b 48 10 mov ecx, DWORD PTR [eax+16]
\r
352 00013 81 f9 4f 1c 00
\r
353 00 cmp ecx, 7247 ; 00001c4fH
\r
354 00019 74 08 je SHORT $LN2@gzerror
\r
355 0001b 81 f9 b1 79 00
\r
356 00 cmp ecx, 31153 ; 000079b1H
\r
358 ; 473 : return NULL;
\r
360 00021 75 e7 jne SHORT $LN8@gzerror
\r
364 ; 475 : /* return error information */
\r
365 ; 476 : if (errnum != NULL)
\r
367 00023 8b 4d 0c mov ecx, DWORD PTR _errnum$[ebp]
\r
368 00026 85 c9 test ecx, ecx
\r
369 00028 74 05 je SHORT $LN1@gzerror
\r
371 ; 477 : *errnum = state->err;
\r
373 0002a 8b 50 5c mov edx, DWORD PTR [eax+92]
\r
374 0002d 89 11 mov DWORD PTR [ecx], edx
\r
377 ; 478 : return state->msg == NULL ? "" : state->msg;
\r
379 0002f 8b 40 60 mov eax, DWORD PTR [eax+96]
\r
380 00032 85 c0 test eax, eax
\r
381 00034 75 05 jne SHORT $LN4@gzerror
\r
382 00036 b8 00 00 00 00 mov eax, OFFSET ??_C@_00CNPNBAHC@?$AA@
\r
388 0003c c2 08 00 ret 8
\r
392 ; Function compile flags: /Ogtp
\r
395 _file$ = 8 ; size = 4
\r
396 _gzeof@4 PROC ; COMDAT
\r
401 00001 8b ec mov ebp, esp
\r
403 ; 448 : gz_statep state;
\r
405 ; 450 : /* get internal structure and check integrity */
\r
406 ; 451 : if (file == NULL)
\r
408 00003 8b 4d 08 mov ecx, DWORD PTR _file$[ebp]
\r
409 00006 85 c9 test ecx, ecx
\r
413 00008 74 1f je SHORT $LN5@gzeof
\r
415 ; 453 : state = (gz_statep)file;
\r
416 ; 454 : if (state->mode != GZ_READ && state->mode != GZ_WRITE)
\r
418 0000a 8b 41 10 mov eax, DWORD PTR [ecx+16]
\r
419 0000d 3d 4f 1c 00 00 cmp eax, 7247 ; 00001c4fH
\r
420 00012 74 0e je SHORT $LN8@gzeof
\r
421 00014 3d b1 79 00 00 cmp eax, 31153 ; 000079b1H
\r
425 00019 75 0e jne SHORT $LN5@gzeof
\r
428 ; 457 : /* return end-of-file state */
\r
429 ; 458 : return state->mode == GZ_READ ? state->past : 0;
\r
431 0001b 3d 4f 1c 00 00 cmp eax, 7247 ; 00001c4fH
\r
432 00020 75 07 jne SHORT $LN5@gzeof
\r
434 00022 8b 41 44 mov eax, DWORD PTR [ecx+68]
\r
439 00026 c2 04 00 ret 4
\r
443 ; 457 : /* return end-of-file state */
\r
444 ; 458 : return state->mode == GZ_READ ? state->past : 0;
\r
446 00029 33 c0 xor eax, eax
\r
451 0002c c2 04 00 ret 4
\r
454 PUBLIC _gzoffset64@4
\r
455 ; Function compile flags: /Ogtp
\r
456 ; COMDAT _gzoffset64@4
\r
458 _gzoffset64@4 PROC ; COMDAT
\r
461 ; 415 : z_off64_t offset;
\r
462 ; 416 : gz_statep state;
\r
464 ; 418 : /* get internal structure and check integrity */
\r
465 ; 419 : if (file == NULL)
\r
467 00000 85 f6 test esi, esi
\r
468 00002 75 06 jne SHORT $LN4@gzoffset64
\r
473 00004 83 c8 ff or eax, -1
\r
474 00007 0b d0 or edx, eax
\r
476 ; 431 : return offset;
\r
482 ; 421 : state = (gz_statep)file;
\r
483 ; 422 : if (state->mode != GZ_READ && state->mode != GZ_WRITE)
\r
485 0000a 8b 46 10 mov eax, DWORD PTR [esi+16]
\r
486 0000d 3d 4f 1c 00 00 cmp eax, 7247 ; 00001c4fH
\r
487 00012 74 07 je SHORT $LN3@gzoffset64
\r
488 00014 3d b1 79 00 00 cmp eax, 31153 ; 000079b1H
\r
492 00019 75 e9 jne SHORT $LN7@gzoffset64
\r
496 ; 425 : /* compute and return effective offset in file */
\r
497 ; 426 : offset = LSEEK(state->fd, 0, SEEK_CUR);
\r
499 0001b 8b 46 14 mov eax, DWORD PTR [esi+20]
\r
503 00023 ff 15 00 00 00
\r
504 00 call DWORD PTR __imp___lseeki64
\r
507 ; 427 : if (offset == -1)
\r
509 0002a 8b c8 mov ecx, eax
\r
510 0002c 23 ca and ecx, edx
\r
511 0002e 83 c4 0c add esp, 12 ; 0000000cH
\r
512 00031 83 f9 ff cmp ecx, -1
\r
516 00034 74 ce je SHORT $LN7@gzoffset64
\r
518 ; 429 : if (state->mode == GZ_READ) /* reading */
\r
520 00036 81 7e 10 4f 1c
\r
521 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
522 0003d 75 06 jne SHORT $LN5@gzoffset64
\r
524 ; 430 : offset -= state->strm.avail_in; /* don't count buffered input */
\r
526 0003f 2b 46 68 sub eax, DWORD PTR [esi+104]
\r
527 00042 83 da 00 sbb edx, 0
\r
530 ; 431 : return offset;
\r
537 ; Function compile flags: /Ogtp
\r
538 ; COMDAT _gztell64@4
\r
540 _gztell64@4 PROC ; COMDAT
\r
543 ; 388 : gz_statep state;
\r
545 ; 390 : /* get internal structure and check integrity */
\r
546 ; 391 : if (file == NULL)
\r
548 00000 85 c9 test ecx, ecx
\r
549 00002 75 06 jne SHORT $LN2@gztell64
\r
554 00004 83 c8 ff or eax, -1
\r
555 00007 0b d0 or edx, eax
\r
562 ; 393 : state = (gz_statep)file;
\r
563 ; 394 : if (state->mode != GZ_READ && state->mode != GZ_WRITE)
\r
565 0000a 8b 41 10 mov eax, DWORD PTR [ecx+16]
\r
566 0000d 3d 4f 1c 00 00 cmp eax, 7247 ; 00001c4fH
\r
567 00012 74 07 je SHORT $LN1@gztell64
\r
568 00014 3d b1 79 00 00 cmp eax, 31153 ; 000079b1H
\r
572 00019 75 e9 jne SHORT $LN7@gztell64
\r
576 ; 397 : /* return position */
\r
577 ; 398 : return state->x.pos + (state->seek ? state->skip : 0);
\r
579 0001b 83 79 58 00 cmp DWORD PTR [ecx+88], 0
\r
581 00020 74 12 je SHORT $LN5@gztell64
\r
582 00022 8b 51 50 mov edx, DWORD PTR [ecx+80]
\r
583 00025 8b 41 08 mov eax, DWORD PTR [ecx+8]
\r
584 00028 8b 71 54 mov esi, DWORD PTR [ecx+84]
\r
585 0002b 03 c2 add eax, edx
\r
586 0002d 8b 51 0c mov edx, DWORD PTR [ecx+12]
\r
587 00030 13 d6 adc edx, esi
\r
596 ; 397 : /* return position */
\r
597 ; 398 : return state->x.pos + (state->seek ? state->skip : 0);
\r
599 00034 8b 41 08 mov eax, DWORD PTR [ecx+8]
\r
600 00037 33 d2 xor edx, edx
\r
601 00039 33 f6 xor esi, esi
\r
602 0003b 03 c2 add eax, edx
\r
603 0003d 8b 51 0c mov edx, DWORD PTR [ecx+12]
\r
604 00040 13 d6 adc edx, esi
\r
613 ; Function compile flags: /Ogtp
\r
614 ; COMDAT _gzbuffer@8
\r
616 _file$ = 8 ; size = 4
\r
617 _size$ = 12 ; size = 4
\r
618 _gzbuffer@8 PROC ; COMDAT
\r
623 00001 8b ec mov ebp, esp
\r
625 ; 252 : gz_statep state;
\r
627 ; 254 : /* get internal structure and check integrity */
\r
628 ; 255 : if (file == NULL)
\r
630 00003 8b 4d 08 mov ecx, DWORD PTR _file$[ebp]
\r
631 00006 85 c9 test ecx, ecx
\r
632 00008 75 07 jne SHORT $LN4@gzbuffer
\r
637 0000a 83 c8 ff or eax, -1
\r
642 0000e c2 08 00 ret 8
\r
645 ; 257 : state = (gz_statep)file;
\r
646 ; 258 : if (state->mode != GZ_READ && state->mode != GZ_WRITE)
\r
648 00011 8b 41 10 mov eax, DWORD PTR [ecx+16]
\r
649 00014 3d 4f 1c 00 00 cmp eax, 7247 ; 00001c4fH
\r
650 00019 74 07 je SHORT $LN3@gzbuffer
\r
651 0001b 3d b1 79 00 00 cmp eax, 31153 ; 000079b1H
\r
655 00020 75 e8 jne SHORT $LN7@gzbuffer
\r
659 ; 261 : /* make sure we haven't already allocated memory */
\r
660 ; 262 : if (state->size != 0)
\r
662 00022 83 79 1c 00 cmp DWORD PTR [ecx+28], 0
\r
666 00026 75 e2 jne SHORT $LN7@gzbuffer
\r
669 ; 265 : /* check and set requested size */
\r
670 ; 266 : if (size < 2)
\r
672 00028 8b 45 0c mov eax, DWORD PTR _size$[ebp]
\r
673 0002b 83 f8 02 cmp eax, 2
\r
674 0002e 73 05 jae SHORT $LN1@gzbuffer
\r
676 ; 267 : size = 2; /* need two bytes to check magic header */
\r
678 00030 b8 02 00 00 00 mov eax, 2
\r
681 ; 268 : state->want = size;
\r
683 00035 89 41 20 mov DWORD PTR [ecx+32], eax
\r
687 00038 33 c0 xor eax, eax
\r
692 0003b c2 08 00 ret 8
\r
694 ; Function compile flags: /Ogtp
\r
698 _gz_reset PROC ; COMDAT
\r
705 ; 78 : state->x.have = 0; /* no output data available */
\r
707 00001 33 ff xor edi, edi
\r
709 ; 79 : if (state->mode == GZ_READ) { /* for reading ... */
\r
711 00003 81 7e 10 4f 1c
\r
712 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
713 0000a 89 3e mov DWORD PTR [esi], edi
\r
714 0000c 75 09 jne SHORT $LN1@gz_reset
\r
716 ; 80 : state->eof = 0; /* not at end of file */
\r
718 0000e 89 7e 40 mov DWORD PTR [esi+64], edi
\r
720 ; 81 : state->past = 0; /* have not read past end yet */
\r
722 00011 89 7e 44 mov DWORD PTR [esi+68], edi
\r
724 ; 82 : state->how = LOOK; /* look for gzip header */
\r
726 00014 89 7e 30 mov DWORD PTR [esi+48], edi
\r
730 ; 84 : state->seek = 0; /* no seek request pending */
\r
731 ; 85 : gz_error(state, Z_OK, NULL); /* clear error */
\r
734 00018 33 c0 xor eax, eax
\r
735 0001a 8b ce mov ecx, esi
\r
736 0001c 89 7e 58 mov DWORD PTR [esi+88], edi
\r
737 0001f e8 00 00 00 00 call _gz_error
\r
738 00024 83 c4 04 add esp, 4
\r
740 ; 86 : state->x.pos = 0; /* no uncompressed data yet */
\r
742 00027 89 7e 08 mov DWORD PTR [esi+8], edi
\r
743 0002a 89 7e 0c mov DWORD PTR [esi+12], edi
\r
745 ; 87 : state->strm.avail_in = 0; /* no input data yet */
\r
747 0002d 89 7e 68 mov DWORD PTR [esi+104], edi
\r
755 ; Function compile flags: /Ogtp
\r
756 ; COMDAT _gzoffset@4
\r
758 _file$ = 8 ; size = 4
\r
759 _gzoffset@4 PROC ; COMDAT
\r
764 00001 8b ec mov ebp, esp
\r
765 00003 83 e4 f8 and esp, -8 ; fffffff8H
\r
769 ; 438 : z_off64_t ret;
\r
771 ; 440 : ret = gzoffset64(file);
\r
773 00008 8b 75 08 mov esi, DWORD PTR _file$[ebp]
\r
774 0000b e8 00 00 00 00 call _gzoffset64@4
\r
775 00010 8b c8 mov ecx, eax
\r
776 00012 8b f2 mov esi, edx
\r
778 ; 441 : return ret == (z_off_t)ret ? (z_off_t)ret : -1;
\r
781 00015 3b c8 cmp ecx, eax
\r
782 00017 75 0d jne SHORT $LN3@gzoffset
\r
783 00019 3b f2 cmp esi, edx
\r
784 0001b 75 09 jne SHORT $LN3@gzoffset
\r
785 0001d 8b c1 mov eax, ecx
\r
790 00020 8b e5 mov esp, ebp
\r
792 00023 c2 04 00 ret 4
\r
795 ; 441 : return ret == (z_off_t)ret ? (z_off_t)ret : -1;
\r
797 00026 83 c8 ff or eax, -1
\r
802 0002a 8b e5 mov esp, ebp
\r
804 0002d c2 04 00 ret 4
\r
808 ; Function compile flags: /Ogtp
\r
811 _file$ = 8 ; size = 4
\r
812 _gztell@4 PROC ; COMDAT
\r
817 00001 8b ec mov ebp, esp
\r
819 ; 405 : z_off64_t ret;
\r
821 ; 407 : ret = gztell64(file);
\r
823 00003 8b 4d 08 mov ecx, DWORD PTR _file$[ebp]
\r
825 00007 e8 00 00 00 00 call _gztell64@4
\r
826 0000c 8b c8 mov ecx, eax
\r
827 0000e 8b f2 mov esi, edx
\r
829 ; 408 : return ret == (z_off_t)ret ? (z_off_t)ret : -1;
\r
832 00011 3b c8 cmp ecx, eax
\r
833 00013 75 0b jne SHORT $LN3@gztell
\r
834 00015 3b f2 cmp esi, edx
\r
835 00017 75 07 jne SHORT $LN3@gztell
\r
836 00019 8b c1 mov eax, ecx
\r
842 0001d c2 04 00 ret 4
\r
845 ; 408 : return ret == (z_off_t)ret ? (z_off_t)ret : -1;
\r
847 00020 83 c8 ff or eax, -1
\r
853 00025 c2 04 00 ret 4
\r
857 ; Function compile flags: /Ogtp
\r
858 ; COMDAT _gzrewind@4
\r
860 _file$ = 8 ; size = 4
\r
861 _gzrewind@4 PROC ; COMDAT
\r
866 00001 8b ec mov ebp, esp
\r
867 00003 83 e4 f8 and esp, -8 ; fffffff8H
\r
871 ; 276 : gz_statep state;
\r
873 ; 278 : /* get internal structure */
\r
874 ; 279 : if (file == NULL)
\r
876 00008 8b 75 08 mov esi, DWORD PTR _file$[ebp]
\r
877 0000b 85 f6 test esi, esi
\r
881 0000d 74 3f je SHORT $LN2@gzrewind
\r
883 ; 281 : state = (gz_statep)file;
\r
885 ; 283 : /* check that we're reading and that there's no error */
\r
886 ; 284 : if (state->mode != GZ_READ ||
\r
887 ; 285 : (state->err != Z_OK && state->err != Z_BUF_ERROR))
\r
889 0000f 81 7e 10 4f 1c
\r
890 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
891 00016 75 36 jne SHORT $LN2@gzrewind
\r
892 00018 8b 46 5c mov eax, DWORD PTR [esi+92]
\r
893 0001b 85 c0 test eax, eax
\r
894 0001d 74 05 je SHORT $LN3@gzrewind
\r
895 0001f 83 f8 fb cmp eax, -5 ; fffffffbH
\r
896 00022 75 2a jne SHORT $LN2@gzrewind
\r
900 ; 288 : /* back up and start over */
\r
901 ; 289 : if (LSEEK(state->fd, state->start, SEEK_SET) == -1)
\r
903 00024 8b 46 3c mov eax, DWORD PTR [esi+60]
\r
904 00027 8b 4e 38 mov ecx, DWORD PTR [esi+56]
\r
905 0002a 8b 56 14 mov edx, DWORD PTR [esi+20]
\r
910 00032 ff 15 00 00 00
\r
911 00 call DWORD PTR __imp___lseeki64
\r
912 00038 83 c4 10 add esp, 16 ; 00000010H
\r
913 0003b 83 f8 ff cmp eax, -1
\r
917 0003e 74 0e je SHORT $LN2@gzrewind
\r
919 ; 291 : gz_reset(state);
\r
921 00040 e8 00 00 00 00 call _gz_reset
\r
925 00045 33 c0 xor eax, eax
\r
930 00048 8b e5 mov esp, ebp
\r
932 0004b c2 04 00 ret 4
\r
937 0004e 83 c8 ff or eax, -1
\r
942 00052 8b e5 mov esp, ebp
\r
944 00055 c2 04 00 ret 4
\r
946 ; Function compile flags: /Ogtp
\r
950 _path$ = 8 ; size = 4
\r
951 _fd$ = 12 ; size = 4
\r
952 _gz_open PROC ; COMDAT
\r
958 00001 8b ec mov ebp, esp
\r
962 ; 96 : gz_statep state;
\r
964 ; 98 : /* check input */
\r
965 ; 99 : if (path == NULL)
\r
967 00005 33 ff xor edi, edi
\r
968 00007 8b d8 mov ebx, eax
\r
969 00009 39 7d 08 cmp DWORD PTR _path$[ebp], edi
\r
970 0000c 75 06 jne SHORT $LN27@gz_open
\r
972 ; 100 : return NULL;
\r
975 0000f 33 c0 xor eax, eax
\r
986 ; 102 : /* allocate gzFile structure to return */
\r
987 ; 103 : state = malloc(sizeof(gz_state));
\r
989 00015 68 a0 00 00 00 push 160 ; 000000a0H
\r
990 0001a ff 15 00 00 00
\r
991 00 call DWORD PTR __imp__malloc
\r
992 00020 8b f0 mov esi, eax
\r
993 00022 83 c4 04 add esp, 4
\r
995 ; 104 : if (state == NULL)
\r
997 00025 3b f7 cmp esi, edi
\r
999 ; 105 : return NULL;
\r
1001 00027 0f 84 5b 01 00
\r
1002 00 je $LN42@gz_open
\r
1004 ; 106 : state->size = 0; /* no buffers allocated yet */
\r
1005 ; 107 : state->want = GZBUFSIZE; /* requested buffer size */
\r
1006 ; 108 : state->msg = NULL; /* no error message yet */
\r
1008 ; 110 : /* interpret mode */
\r
1009 ; 111 : state->mode = GZ_NONE;
\r
1010 ; 112 : state->level = Z_DEFAULT_COMPRESSION;
\r
1011 ; 113 : state->strategy = Z_DEFAULT_STRATEGY;
\r
1012 ; 114 : state->direct = 0;
\r
1013 ; 115 : while (*mode) {
\r
1015 0002d 8a 03 mov al, BYTE PTR [ebx]
\r
1016 0002f 89 7e 1c mov DWORD PTR [esi+28], edi
\r
1017 00032 c7 46 20 00 20
\r
1018 00 00 mov DWORD PTR [esi+32], 8192 ; 00002000H
\r
1019 00039 89 7e 60 mov DWORD PTR [esi+96], edi
\r
1020 0003c 89 7e 10 mov DWORD PTR [esi+16], edi
\r
1021 0003f c7 46 48 ff ff
\r
1022 ff ff mov DWORD PTR [esi+72], -1
\r
1023 00046 89 7e 4c mov DWORD PTR [esi+76], edi
\r
1024 00049 89 7e 2c mov DWORD PTR [esi+44], edi
\r
1025 0004c 84 c0 test al, al
\r
1026 0004e 74 78 je SHORT $LN24@gz_open
\r
1027 00050 ba 03 00 00 00 mov edx, 3
\r
1028 00055 8d 4a 01 lea ecx, DWORD PTR [edx+1]
\r
1031 ; 116 : if (*mode >= '0' && *mode <= '9')
\r
1033 00058 3c 30 cmp al, 48 ; 00000030H
\r
1034 0005a 7c 0f jl SHORT $LN23@gz_open
\r
1035 0005c 3c 39 cmp al, 57 ; 00000039H
\r
1036 0005e 7f 0b jg SHORT $LN23@gz_open
\r
1038 ; 117 : state->level = *mode - '0';
\r
1040 00060 0f be c0 movsx eax, al
\r
1041 00063 83 e8 30 sub eax, 48 ; 00000030H
\r
1042 00066 89 46 48 mov DWORD PTR [esi+72], eax
\r
1046 00069 eb 55 jmp SHORT $LN40@gz_open
\r
1049 ; 119 : switch (*mode) {
\r
1051 0006b 0f be c0 movsx eax, al
\r
1052 0006e 83 c0 d5 add eax, -43 ; ffffffd5H
\r
1053 00071 83 f8 4c cmp eax, 76 ; 0000004cH
\r
1054 00074 77 4a ja SHORT $LN40@gz_open
\r
1055 00076 0f b6 80 00 00
\r
1056 00 00 movzx eax, BYTE PTR $LN38@gz_open[eax]
\r
1057 0007d ff 24 85 00 00
\r
1058 00 00 jmp DWORD PTR $LN44@gz_open[eax*4]
\r
1062 ; 121 : state->mode = GZ_READ;
\r
1064 00084 c7 46 10 4f 1c
\r
1065 00 00 mov DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
1069 0008b eb 33 jmp SHORT $LN40@gz_open
\r
1072 ; 123 : #ifndef NO_GZCOMPRESS
\r
1074 ; 125 : state->mode = GZ_WRITE;
\r
1076 0008d c7 46 10 b1 79
\r
1077 00 00 mov DWORD PTR [esi+16], 31153 ; 000079b1H
\r
1081 00094 eb 2a jmp SHORT $LN40@gz_open
\r
1085 ; 128 : state->mode = GZ_APPEND;
\r
1087 00096 c7 46 10 01 00
\r
1088 00 00 mov DWORD PTR [esi+16], 1
\r
1092 0009d eb 21 jmp SHORT $LN40@gz_open
\r
1096 ; 131 : case '+': /* can't read and write at the same time */
\r
1097 ; 132 : free(state);
\r
1098 ; 133 : return NULL;
\r
1099 ; 134 : case 'b': /* ignore -- will request binary anyway */
\r
1102 ; 137 : state->strategy = Z_FILTERED;
\r
1104 0009f c7 46 4c 01 00
\r
1105 00 00 mov DWORD PTR [esi+76], 1
\r
1109 000a6 eb 18 jmp SHORT $LN40@gz_open
\r
1113 ; 140 : state->strategy = Z_HUFFMAN_ONLY;
\r
1115 000a8 c7 46 4c 02 00
\r
1116 00 00 mov DWORD PTR [esi+76], 2
\r
1120 000af eb 0f jmp SHORT $LN40@gz_open
\r
1124 ; 143 : state->strategy = Z_RLE;
\r
1126 000b1 89 56 4c mov DWORD PTR [esi+76], edx
\r
1130 000b4 eb 0a jmp SHORT $LN40@gz_open
\r
1134 ; 146 : state->strategy = Z_FIXED;
\r
1136 000b6 89 4e 4c mov DWORD PTR [esi+76], ecx
\r
1140 ; 148 : state->direct = 1;
\r
1142 000b9 c7 46 2c 01 00
\r
1143 00 00 mov DWORD PTR [esi+44], 1
\r
1146 ; 106 : state->size = 0; /* no buffers allocated yet */
\r
1147 ; 107 : state->want = GZBUFSIZE; /* requested buffer size */
\r
1148 ; 108 : state->msg = NULL; /* no error message yet */
\r
1150 ; 110 : /* interpret mode */
\r
1151 ; 111 : state->mode = GZ_NONE;
\r
1152 ; 112 : state->level = Z_DEFAULT_COMPRESSION;
\r
1153 ; 113 : state->strategy = Z_DEFAULT_STRATEGY;
\r
1154 ; 114 : state->direct = 0;
\r
1155 ; 115 : while (*mode) {
\r
1157 000c0 8a 43 01 mov al, BYTE PTR [ebx+1]
\r
1159 ; 149 : default: /* could consider as an error, but just ignore */
\r
1165 000c4 84 c0 test al, al
\r
1166 000c6 75 90 jne SHORT $LL25@gz_open
\r
1171 ; 155 : /* must provide an "r", "w", or "a" */
\r
1172 ; 156 : if (state->mode == GZ_NONE) {
\r
1174 000c8 8b 5e 10 mov ebx, DWORD PTR [esi+16]
\r
1175 000cb 3b df cmp ebx, edi
\r
1177 ; 157 : free(state);
\r
1178 ; 158 : return NULL;
\r
1180 000cd 74 3e je SHORT $LN43@gz_open
\r
1184 ; 161 : /* can't force transparent read */
\r
1185 ; 162 : if (state->mode == GZ_READ) {
\r
1187 000cf 81 fb 4f 1c 00
\r
1188 00 cmp ebx, 7247 ; 00001c4fH
\r
1189 000d5 75 0c jne SHORT $LN7@gz_open
\r
1191 ; 163 : if (state->direct) {
\r
1193 000d7 39 7e 2c cmp DWORD PTR [esi+44], edi
\r
1195 ; 164 : free(state);
\r
1196 ; 165 : return NULL;
\r
1198 000da 75 31 jne SHORT $LN43@gz_open
\r
1201 ; 167 : state->direct = 1; /* for empty file */
\r
1203 000dc c7 46 2c 01 00
\r
1204 00 00 mov DWORD PTR [esi+44], 1
\r
1209 ; 170 : /* save the path name for error messages */
\r
1210 ; 171 : state->path = malloc(strlen(path) + 1);
\r
1212 000e3 8b 45 08 mov eax, DWORD PTR _path$[ebp]
\r
1213 000e6 8d 50 01 lea edx, DWORD PTR [eax+1]
\r
1214 000e9 8d a4 24 00 00
\r
1217 000f0 8a 08 mov cl, BYTE PTR [eax]
\r
1219 000f3 84 c9 test cl, cl
\r
1220 000f5 75 f9 jne SHORT $LL39@gz_open
\r
1221 000f7 2b c2 sub eax, edx
\r
1224 000fb ff 15 00 00 00
\r
1225 00 call DWORD PTR __imp__malloc
\r
1226 00101 8b f8 mov edi, eax
\r
1227 00103 83 c4 04 add esp, 4
\r
1228 00106 89 7e 18 mov DWORD PTR [esi+24], edi
\r
1230 ; 172 : if (state->path == NULL) {
\r
1232 00109 85 ff test edi, edi
\r
1233 0010b 75 11 jne SHORT $LN5@gz_open
\r
1236 ; 173 : free(state);
\r
1239 0010e ff 15 00 00 00
\r
1240 00 call DWORD PTR __imp__free
\r
1241 00114 83 c4 04 add esp, 4
\r
1245 ; 174 : return NULL;
\r
1247 00119 33 c0 xor eax, eax
\r
1257 ; 176 : strcpy(state->path, path);
\r
1259 0011e 8b 4d 08 mov ecx, DWORD PTR _path$[ebp]
\r
1260 00121 8b d7 mov edx, edi
\r
1262 00123 8a 01 mov al, BYTE PTR [ecx]
\r
1263 00125 88 02 mov BYTE PTR [edx], al
\r
1266 00129 84 c0 test al, al
\r
1267 0012b 75 f6 jne SHORT $LL30@gz_open
\r
1270 ; 178 : /* open the file with the appropriate mode (or just use fd) */
\r
1271 ; 179 : state->fd = fd != -1 ? fd :
\r
1272 ; 180 : open(path,
\r
1273 ; 181 : #ifdef O_LARGEFILE
\r
1274 ; 182 : O_LARGEFILE |
\r
1276 ; 184 : #ifdef O_BINARY
\r
1277 ; 185 : O_BINARY |
\r
1279 ; 187 : (state->mode == GZ_READ ?
\r
1280 ; 188 : O_RDONLY :
\r
1281 ; 189 : (O_WRONLY | O_CREAT | (
\r
1282 ; 190 : state->mode == GZ_WRITE ?
\r
1284 ; 192 : O_APPEND))),
\r
1287 0012d 8b 45 0c mov eax, DWORD PTR _fd$[ebp]
\r
1288 00130 83 f8 ff cmp eax, -1
\r
1289 00133 75 3c jne SHORT $LN34@gz_open
\r
1290 00135 81 fb 4f 1c 00
\r
1291 00 cmp ebx, 7247 ; 00001c4fH
\r
1292 0013b 75 04 jne SHORT $LN31@gz_open
\r
1293 0013d 33 c0 xor eax, eax
\r
1294 0013f eb 19 jmp SHORT $LN32@gz_open
\r
1296 00141 8d 83 4f 86 ff
\r
1297 ff lea eax, DWORD PTR [ebx-31153]
\r
1298 00147 f7 d8 neg eax
\r
1299 00149 1b c0 sbb eax, eax
\r
1300 0014b 25 08 fe ff ff and eax, -504 ; fffffe08H
\r
1301 00150 05 00 02 00 00 add eax, 512 ; 00000200H
\r
1302 00155 0d 01 01 00 00 or eax, 257 ; 00000101H
\r
1304 0015a 8b 4d 08 mov ecx, DWORD PTR _path$[ebp]
\r
1305 0015d 68 b6 01 00 00 push 438 ; 000001b6H
\r
1306 00162 0d 00 80 00 00 or eax, 32768 ; 00008000H
\r
1309 00169 e8 00 00 00 00 call _open
\r
1310 0016e 83 c4 0c add esp, 12 ; 0000000cH
\r
1312 00171 89 46 14 mov DWORD PTR [esi+20], eax
\r
1314 ; 194 : if (state->fd == -1) {
\r
1316 00174 83 f8 ff cmp eax, -1
\r
1317 00177 75 16 jne SHORT $LN4@gz_open
\r
1319 ; 195 : free(state->path);
\r
1322 0017a 8b 3d 00 00 00
\r
1323 00 mov edi, DWORD PTR __imp__free
\r
1324 00180 ff d7 call edi
\r
1326 ; 196 : free(state);
\r
1329 00183 ff d7 call edi
\r
1330 00185 83 c4 08 add esp, 8
\r
1333 ; 197 : return NULL;
\r
1337 0018a 33 c0 xor eax, eax
\r
1347 ; 199 : if (state->mode == GZ_APPEND)
\r
1349 0018f 83 fb 01 cmp ebx, 1
\r
1350 00192 75 07 jne SHORT $LN3@gz_open
\r
1352 ; 200 : state->mode = GZ_WRITE; /* simplify later checks */
\r
1354 00194 c7 46 10 b1 79
\r
1355 00 00 mov DWORD PTR [esi+16], 31153 ; 000079b1H
\r
1359 ; 202 : /* save the current position for rewinding (only if reading) */
\r
1360 ; 203 : if (state->mode == GZ_READ) {
\r
1362 0019b 81 7e 10 4f 1c
\r
1363 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
1364 001a2 75 26 jne SHORT $LN1@gz_open
\r
1366 ; 204 : state->start = LSEEK(state->fd, 0, SEEK_CUR);
\r
1368 001a4 6a 01 push 1
\r
1369 001a6 33 ff xor edi, edi
\r
1372 001aa ff 15 00 00 00
\r
1373 00 call DWORD PTR __imp___lseeki64
\r
1375 001b1 89 56 3c mov DWORD PTR [esi+60], edx
\r
1377 ; 205 : if (state->start == -1) state->start = 0;
\r
1379 001b4 8b d0 mov edx, eax
\r
1380 001b6 23 56 3c and edx, DWORD PTR [esi+60]
\r
1381 001b9 83 c4 0c add esp, 12 ; 0000000cH
\r
1382 001bc 89 46 38 mov DWORD PTR [esi+56], eax
\r
1383 001bf 83 fa ff cmp edx, -1
\r
1384 001c2 75 06 jne SHORT $LN1@gz_open
\r
1385 001c4 89 7e 38 mov DWORD PTR [esi+56], edi
\r
1386 001c7 89 7e 3c mov DWORD PTR [esi+60], edi
\r
1391 ; 208 : /* initialize stream */
\r
1392 ; 209 : gz_reset(state);
\r
1394 001ca e8 00 00 00 00 call _gz_reset
\r
1397 ; 211 : /* return stream */
\r
1398 ; 212 : return (gzFile)state;
\r
1400 001cf 8b c6 mov eax, esi
\r
1409 001d6 8b ff npad 2
\r
1411 001d8 00 00 00 00 DD $LN43@gz_open
\r
1412 001dc 00 00 00 00 DD $LN11@gz_open
\r
1413 001e0 00 00 00 00 DD $LN12@gz_open
\r
1414 001e4 00 00 00 00 DD $LN10@gz_open
\r
1415 001e8 00 00 00 00 DD $LN17@gz_open
\r
1416 001ec 00 00 00 00 DD $LN14@gz_open
\r
1417 001f0 00 00 00 00 DD $LN13@gz_open
\r
1418 001f4 00 00 00 00 DD $LN19@gz_open
\r
1419 001f8 00 00 00 00 DD $LN18@gz_open
\r
1420 001fc 00 00 00 00 DD $LN40@gz_open
\r
1500 PUBLIC _gzseek64@16
\r
1501 ; Function compile flags: /Ogtp
\r
1502 ; COMDAT _gzseek64@16
\r
1504 tv405 = 8 ; size = 8
\r
1505 _offset$ = 8 ; size = 8
\r
1506 _gzseek64@16 PROC ; COMDAT
\r
1513 00001 8b ec mov ebp, esp
\r
1517 ; 301 : unsigned n;
\r
1518 ; 302 : z_off64_t ret;
\r
1519 ; 303 : gz_statep state;
\r
1521 ; 305 : /* get internal structure and check integrity */
\r
1522 ; 306 : if (file == NULL)
\r
1524 00005 85 f6 test esi, esi
\r
1526 ; 307 : return -1;
\r
1528 00007 74 28 je SHORT $LN28@gzseek64
\r
1530 ; 308 : state = (gz_statep)file;
\r
1531 ; 309 : if (state->mode != GZ_READ && state->mode != GZ_WRITE)
\r
1533 00009 8b 56 10 mov edx, DWORD PTR [esi+16]
\r
1534 0000c 81 fa 4f 1c 00
\r
1535 00 cmp edx, 7247 ; 00001c4fH
\r
1536 00012 74 08 je SHORT $LN14@gzseek64
\r
1537 00014 81 fa b1 79 00
\r
1538 00 cmp edx, 31153 ; 000079b1H
\r
1540 ; 310 : return -1;
\r
1542 0001a 75 15 jne SHORT $LN28@gzseek64
\r
1546 ; 312 : /* check that there's no error */
\r
1547 ; 313 : if (state->err != Z_OK && state->err != Z_BUF_ERROR)
\r
1549 0001c 8b 46 5c mov eax, DWORD PTR [esi+92]
\r
1550 0001f 85 c0 test eax, eax
\r
1551 00021 74 05 je SHORT $LN13@gzseek64
\r
1552 00023 83 f8 fb cmp eax, -5 ; fffffffbH
\r
1554 ; 314 : return -1;
\r
1556 00026 75 09 jne SHORT $LN28@gzseek64
\r
1560 ; 316 : /* can only seek from start or relative to current position */
\r
1561 ; 317 : if (whence != SEEK_SET && whence != SEEK_CUR)
\r
1563 00028 85 c9 test ecx, ecx
\r
1564 0002a 74 10 je SHORT $LN20@gzseek64
\r
1565 0002c 83 f9 01 cmp ecx, 1
\r
1566 0002f 74 19 je SHORT $LN11@gzseek64
\r
1569 ; 318 : return -1;
\r
1571 00031 83 c8 ff or eax, -1
\r
1572 00034 0b d0 or edx, eax
\r
1579 00039 c2 08 00 ret 8
\r
1583 ; 320 : /* normalize offset to a SEEK_CUR specification */
\r
1584 ; 321 : if (whence == SEEK_SET)
\r
1585 ; 322 : offset -= state->x.pos;
\r
1587 0003c 8b 5d 08 mov ebx, DWORD PTR _offset$[ebp]
\r
1588 0003f 2b 5e 08 sub ebx, DWORD PTR [esi+8]
\r
1589 00042 8b 7d 0c mov edi, DWORD PTR _offset$[ebp+4]
\r
1590 00045 1b 7e 0c sbb edi, DWORD PTR [esi+12]
\r
1591 00048 eb 12 jmp SHORT $LN9@gzseek64
\r
1594 ; 323 : else if (state->seek)
\r
1596 0004a 83 7e 58 00 cmp DWORD PTR [esi+88], 0
\r
1598 ; 324 : offset += state->skip;
\r
1600 0004e 8b 5d 08 mov ebx, DWORD PTR _offset$[ebp]
\r
1601 00051 8b 7d 0c mov edi, DWORD PTR _offset$[ebp+4]
\r
1602 00054 74 06 je SHORT $LN9@gzseek64
\r
1603 00056 03 5e 50 add ebx, DWORD PTR [esi+80]
\r
1604 00059 13 7e 54 adc edi, DWORD PTR [esi+84]
\r
1607 ; 325 : state->seek = 0;
\r
1609 0005c c7 46 58 00 00
\r
1610 00 00 mov DWORD PTR [esi+88], 0
\r
1613 ; 327 : /* if within raw area while reading, just go there */
\r
1614 ; 328 : if (state->mode == GZ_READ && state->how == COPY &&
\r
1615 ; 329 : state->x.pos + offset >= 0) {
\r
1617 00063 81 fa 4f 1c 00
\r
1618 00 cmp edx, 7247 ; 00001c4fH
\r
1619 00069 75 6c jne SHORT $LN8@gzseek64
\r
1620 0006b 83 7e 30 01 cmp DWORD PTR [esi+48], 1
\r
1621 0006f 75 66 jne SHORT $LN8@gzseek64
\r
1622 00071 8b c3 mov eax, ebx
\r
1623 00073 03 46 08 add eax, DWORD PTR [esi+8]
\r
1624 00076 8b cf mov ecx, edi
\r
1625 00078 13 4e 0c adc ecx, DWORD PTR [esi+12]
\r
1626 0007b 89 4d 0c mov DWORD PTR tv405[ebp+4], ecx
\r
1627 0007e 78 57 js SHORT $LN8@gzseek64
\r
1628 00080 7f 04 jg SHORT $LN21@gzseek64
\r
1629 00082 85 c0 test eax, eax
\r
1630 00084 72 51 jb SHORT $LN8@gzseek64
\r
1633 ; 330 : ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
\r
1634 ; 331 : if (ret == -1)
\r
1636 00086 33 c0 xor eax, eax
\r
1637 00088 8b cb mov ecx, ebx
\r
1638 0008a 2b 0e sub ecx, DWORD PTR [esi]
\r
1639 0008c 6a 01 push 1
\r
1640 0008e 8b d7 mov edx, edi
\r
1641 00090 1b d0 sbb edx, eax
\r
1642 00092 8b 46 14 mov eax, DWORD PTR [esi+20]
\r
1646 00098 ff 15 00 00 00
\r
1647 00 call DWORD PTR __imp___lseeki64
\r
1648 0009e 83 c4 10 add esp, 16 ; 00000010H
\r
1649 000a1 83 f8 ff cmp eax, -1
\r
1651 ; 332 : return -1;
\r
1653 000a4 74 8b je SHORT $LN28@gzseek64
\r
1655 ; 333 : state->x.have = 0;
\r
1657 000a6 33 c0 xor eax, eax
\r
1659 ; 334 : state->eof = 0;
\r
1660 ; 335 : state->past = 0;
\r
1661 ; 336 : state->seek = 0;
\r
1662 ; 337 : gz_error(state, Z_OK, NULL);
\r
1665 000a9 8b ce mov ecx, esi
\r
1666 000ab 89 06 mov DWORD PTR [esi], eax
\r
1667 000ad 89 46 40 mov DWORD PTR [esi+64], eax
\r
1668 000b0 89 46 44 mov DWORD PTR [esi+68], eax
\r
1669 000b3 89 46 58 mov DWORD PTR [esi+88], eax
\r
1670 000b6 e8 00 00 00 00 call _gz_error
\r
1671 000bb 83 c4 04 add esp, 4
\r
1673 ; 338 : state->strm.avail_in = 0;
\r
1674 ; 339 : state->x.pos += offset;
\r
1676 000be 01 5e 08 add DWORD PTR [esi+8], ebx
\r
1678 ; 340 : return state->x.pos;
\r
1680 000c1 8b 46 08 mov eax, DWORD PTR [esi+8]
\r
1681 000c4 c7 46 68 00 00
\r
1682 00 00 mov DWORD PTR [esi+104], 0
\r
1683 000cb 11 7e 0c adc DWORD PTR [esi+12], edi
\r
1684 000ce 8b 56 0c mov edx, DWORD PTR [esi+12]
\r
1691 000d4 c2 08 00 ret 8
\r
1696 ; 343 : /* calculate skip amount, rewinding if needed for back seek when reading */
\r
1697 ; 344 : if (offset < 0) {
\r
1699 000d7 85 ff test edi, edi
\r
1700 000d9 7f 39 jg SHORT $LN3@gzseek64
\r
1701 000db 7c 04 jl SHORT $LN22@gzseek64
\r
1702 000dd 85 db test ebx, ebx
\r
1703 000df 73 33 jae SHORT $LN3@gzseek64
\r
1706 ; 345 : if (state->mode != GZ_READ) /* writing -- can't go backwards */
\r
1708 000e1 81 fa 4f 1c 00
\r
1709 00 cmp edx, 7247 ; 00001c4fH
\r
1711 ; 346 : return -1;
\r
1713 000e7 0f 85 44 ff ff
\r
1714 ff jne $LN28@gzseek64
\r
1716 ; 347 : offset += state->x.pos;
\r
1718 000ed 03 5e 08 add ebx, DWORD PTR [esi+8]
\r
1719 000f0 13 7e 0c adc edi, DWORD PTR [esi+12]
\r
1721 ; 348 : if (offset < 0) /* before start of file! */
\r
1723 000f3 85 ff test edi, edi
\r
1724 000f5 7f 0e jg SHORT $LN4@gzseek64
\r
1725 000f7 0f 8c 34 ff ff
\r
1726 ff jl $LN28@gzseek64
\r
1727 000fd 85 db test ebx, ebx
\r
1729 ; 349 : return -1;
\r
1731 000ff 0f 82 2c ff ff
\r
1732 ff jb $LN28@gzseek64
\r
1735 ; 350 : if (gzrewind(file) == -1) /* rewind, then skip to offset */
\r
1738 00106 e8 00 00 00 00 call _gzrewind@4
\r
1739 0010b 83 f8 ff cmp eax, -1
\r
1741 ; 351 : return -1;
\r
1743 0010e 0f 84 1d ff ff
\r
1744 ff je $LN28@gzseek64
\r
1749 ; 354 : /* if reading, skip what's in output buffer (one less gzgetc() check) */
\r
1750 ; 355 : if (state->mode == GZ_READ) {
\r
1752 00114 81 7e 10 4f 1c
\r
1753 00 00 cmp DWORD PTR [esi+16], 7247 ; 00001c4fH
\r
1754 0011b 75 27 jne SHORT $LN2@gzseek64
\r
1756 ; 356 : n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ?
\r
1757 ; 357 : (unsigned)offset : state->x.have;
\r
1759 0011d 8b 0e mov ecx, DWORD PTR [esi]
\r
1760 0011f 33 c0 xor eax, eax
\r
1761 00121 3b c7 cmp eax, edi
\r
1762 00123 7f 0a jg SHORT $LN18@gzseek64
\r
1763 00125 7c 04 jl SHORT $LN24@gzseek64
\r
1764 00127 3b cb cmp ecx, ebx
\r
1765 00129 77 04 ja SHORT $LN18@gzseek64
\r
1767 0012b 8b c1 mov eax, ecx
\r
1768 0012d eb 02 jmp SHORT $LN19@gzseek64
\r
1770 0012f 8b c3 mov eax, ebx
\r
1773 ; 358 : state->x.have -= n;
\r
1774 ; 359 : state->x.next += n;
\r
1776 00131 01 46 04 add DWORD PTR [esi+4], eax
\r
1777 00134 2b c8 sub ecx, eax
\r
1778 00136 89 0e mov DWORD PTR [esi], ecx
\r
1780 ; 360 : state->x.pos += n;
\r
1782 00138 33 c9 xor ecx, ecx
\r
1783 0013a 01 46 08 add DWORD PTR [esi+8], eax
\r
1784 0013d 11 4e 0c adc DWORD PTR [esi+12], ecx
\r
1786 ; 361 : offset -= n;
\r
1788 00140 2b d8 sub ebx, eax
\r
1789 00142 1b f9 sbb edi, ecx
\r
1794 ; 364 : /* request skip (if not zero) */
\r
1795 ; 365 : if (offset) {
\r
1797 00144 8b c3 mov eax, ebx
\r
1798 00146 0b c7 or eax, edi
\r
1799 00148 74 0d je SHORT $LN1@gzseek64
\r
1801 ; 366 : state->seek = 1;
\r
1803 0014a c7 46 58 01 00
\r
1804 00 00 mov DWORD PTR [esi+88], 1
\r
1806 ; 367 : state->skip = offset;
\r
1808 00151 89 5e 50 mov DWORD PTR [esi+80], ebx
\r
1809 00154 89 7e 54 mov DWORD PTR [esi+84], edi
\r
1813 ; 369 : return state->x.pos + offset;
\r
1815 00157 8b 46 08 mov eax, DWORD PTR [esi+8]
\r
1816 0015a 8b 56 0c mov edx, DWORD PTR [esi+12]
\r
1817 0015d 03 c3 add eax, ebx
\r
1818 0015f 13 d7 adc edx, edi
\r
1825 00164 c2 08 00 ret 8
\r
1829 ; Function compile flags: /Ogtp
\r
1830 ; COMDAT _gzdopen@8
\r
1832 _fd$ = 8 ; size = 4
\r
1833 _mode$ = 12 ; size = 4
\r
1834 _gzdopen@8 PROC ; COMDAT
\r
1839 00001 8b ec mov ebp, esp
\r
1843 ; 236 : char *path; /* identifier for error messages */
\r
1844 ; 237 : gzFile gz;
\r
1846 ; 239 : if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
\r
1848 00005 8b 7d 08 mov edi, DWORD PTR _fd$[ebp]
\r
1849 00008 83 ff ff cmp edi, -1
\r
1850 0000b 74 3c je SHORT $LN1@gzdopen
\r
1851 0000d 6a 13 push 19 ; 00000013H
\r
1852 0000f ff 15 00 00 00
\r
1853 00 call DWORD PTR __imp__malloc
\r
1854 00015 8b f0 mov esi, eax
\r
1855 00017 83 c4 04 add esp, 4
\r
1856 0001a 85 f6 test esi, esi
\r
1857 0001c 74 2b je SHORT $LN1@gzdopen
\r
1859 ; 241 : sprintf(path, "<fd:%d>", fd); /* for debugging */
\r
1862 0001f 68 00 00 00 00 push OFFSET ??_C@_07EBNKNFJN@?$DMfd?3?$CFd?$DO?$AA@
\r
1864 00025 ff 15 00 00 00
\r
1865 00 call DWORD PTR __imp__sprintf
\r
1867 ; 242 : gz = gz_open(path, fd, mode);
\r
1869 0002b 8b 45 0c mov eax, DWORD PTR _mode$[ebp]
\r
1872 00030 e8 00 00 00 00 call _gz_open
\r
1874 ; 243 : free(path);
\r
1877 00036 8b f8 mov edi, eax
\r
1878 00038 ff 15 00 00 00
\r
1879 00 call DWORD PTR __imp__free
\r
1880 0003e 83 c4 18 add esp, 24 ; 00000018H
\r
1882 ; 244 : return gz;
\r
1884 00041 8b c7 mov eax, edi
\r
1891 00046 c2 08 00 ret 8
\r
1895 ; 240 : return NULL;
\r
1897 0004a 33 c0 xor eax, eax
\r
1903 0004e c2 08 00 ret 8
\r
1907 ; Function compile flags: /Ogtp
\r
1908 ; COMDAT _gzopen@8
\r
1910 _path$ = 8 ; size = 4
\r
1911 _mode$ = 12 ; size = 4
\r
1912 _gzopen@8 PROC ; COMDAT
\r
1917 00001 8b ec mov ebp, esp
\r
1919 ; 220 : return gz_open(path, -1, mode);
\r
1921 00003 8b 45 08 mov eax, DWORD PTR _path$[ebp]
\r
1922 00006 6a ff push -1
\r
1924 00009 8b 45 0c mov eax, DWORD PTR _mode$[ebp]
\r
1925 0000c e8 00 00 00 00 call _gz_open
\r
1926 00011 83 c4 08 add esp, 8
\r
1931 00015 c2 08 00 ret 8
\r
1934 ; Function compile flags: /Ogtp
\r
1935 ; COMDAT _gzseek@12
\r
1937 _file$ = 8 ; size = 4
\r
1938 _offset$ = 12 ; size = 4
\r
1939 _whence$ = 16 ; size = 4
\r
1940 _gzseek@12 PROC ; COMDAT
\r
1945 00001 8b ec mov ebp, esp
\r
1946 00003 83 e4 f8 and esp, -8 ; fffffff8H
\r
1949 ; 378 : z_off64_t ret;
\r
1951 ; 380 : ret = gzseek64(file, (z_off64_t)offset, whence);
\r
1953 00007 8b 45 0c mov eax, DWORD PTR _offset$[ebp]
\r
1954 0000a 8b 4d 10 mov ecx, DWORD PTR _whence$[ebp]
\r
1956 0000e 8b 75 08 mov esi, DWORD PTR _file$[ebp]
\r
1960 00014 e8 00 00 00 00 call _gzseek64@16
\r
1961 00019 8b c8 mov ecx, eax
\r
1962 0001b 8b f2 mov esi, edx
\r
1964 ; 381 : return ret == (z_off_t)ret ? (z_off_t)ret : -1;
\r
1967 0001e 3b c8 cmp ecx, eax
\r
1968 00020 75 0d jne SHORT $LN3@gzseek
\r
1969 00022 3b f2 cmp esi, edx
\r
1970 00024 75 09 jne SHORT $LN3@gzseek
\r
1971 00026 8b c1 mov eax, ecx
\r
1976 00029 8b e5 mov esp, ebp
\r
1978 0002c c2 0c 00 ret 12 ; 0000000cH
\r
1981 ; 381 : return ret == (z_off_t)ret ? (z_off_t)ret : -1;
\r
1983 0002f 83 c8 ff or eax, -1
\r
1988 00033 8b e5 mov esp, ebp
\r
1990 00036 c2 0c 00 ret 12 ; 0000000cH
\r