; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.24215.1 

include listing.inc

INCLUDELIB OLDNAMES

PUBLIC	??_C@_06CJNJFBNP@1?42?411?$AA@			; `string'
CONST	ENDS
;	COMDAT ??_C@_06CJNJFBNP@1?42?411?$AA@
CONST	SEGMENT
??_C@_06CJNJFBNP@1?42?411?$AA@ DB '1.2.11', 00H		; `string'
CONST	ENDS
PUBLIC	compressBound
PUBLIC	compress
PUBLIC	compress2
;	COMDAT pdata
pdata	SEGMENT
$pdata$compress DD imagerel $LN4
	DD	imagerel $LN4+22
	DD	imagerel $unwind$compress
pdata	ENDS
;	COMDAT pdata
pdata	SEGMENT
$pdata$compress2 DD imagerel $LN17
	DD	imagerel $LN17+243
	DD	imagerel $unwind$compress2
;	COMDAT xdata
xdata	SEGMENT
$unwind$compress2 DD 0a1b01H
	DD	016641bH
	DD	015541bH
	DD	014341bH
	DD	0f014f21bH
	DD	07010e012H
xdata	ENDS
;	COMDAT xdata
xdata	SEGMENT
$unwind$compress DD 010401H
	DD	06204H
; Function compile flags: /Ogtpy
; File c:\mywork\pkcs\zlib-1.2.11\compress.c
;	COMDAT compress2
_TEXT	SEGMENT
stream$ = 32
dest$ = 160
destLen$ = 168
source$ = 176
sourceLen$ = 184
level$ = 192
compress2 PROC						; COMDAT

; 28   : {

$LN17:
  00000	48 8b c4	 mov	 rax, rsp
  00003	48 89 58 08	 mov	 QWORD PTR [rax+8], rbx
  00007	48 89 68 10	 mov	 QWORD PTR [rax+16], rbp
  0000b	48 89 70 18	 mov	 QWORD PTR [rax+24], rsi
  0000f	57		 push	 rdi
  00010	41 56		 push	 r14
  00012	41 57		 push	 r15
  00014	48 81 ec 80 00
	00 00		 sub	 rsp, 128		; 00000080H

; 29   :     z_stream stream;
; 30   :     int err;
; 31   :     const uInt max = (uInt)-1;
; 32   :     uLong left;
; 33   : 
; 34   :     left = *destLen;

  0001b	8b 3a		 mov	 edi, DWORD PTR [rdx]

; 35   :     *destLen = 0;

  0001d	45 33 ff	 xor	 r15d, r15d
  00020	41 8b d9	 mov	 ebx, r9d
  00023	44 89 3a	 mov	 DWORD PTR [rdx], r15d
  00026	49 8b f0	 mov	 rsi, r8

; 36   : 
; 37   :     stream.zalloc = (alloc_func)0;

  00029	4c 89 78 b8	 mov	 QWORD PTR [rax-72], r15
  0002d	4c 8b f2	 mov	 r14, rdx

; 38   :     stream.zfree = (free_func)0;

  00030	4c 89 78 c0	 mov	 QWORD PTR [rax-64], r15

; 39   :     stream.opaque = (voidpf)0;
; 40   : 
; 41   :     err = deflateInit(&stream, level);

  00034	8b 94 24 c0 00
	00 00		 mov	 edx, DWORD PTR level$[rsp]
  0003b	45 8d 4f 58	 lea	 r9d, QWORD PTR [r15+88]
  0003f	48 8b e9	 mov	 rbp, rcx
  00042	4c 89 78 c8	 mov	 QWORD PTR [rax-56], r15
  00046	4c 8d 05 00 00
	00 00		 lea	 r8, OFFSET FLAT:??_C@_06CJNJFBNP@1?42?411?$AA@
  0004d	48 8d 48 88	 lea	 rcx, QWORD PTR [rax-120]
  00051	e8 00 00 00 00	 call	 deflateInit_

; 42   :     if (err != Z_OK) return err;

  00056	85 c0		 test	 eax, eax
  00058	75 7c		 jne	 SHORT $LN1@compress2

; 43   : 
; 44   :     stream.next_out = dest;
; 45   :     stream.avail_out = 0;

  0005a	41 8b c7	 mov	 eax, r15d
  0005d	48 89 6c 24 30	 mov	 QWORD PTR stream$[rsp+16], rbp

; 46   :     stream.next_in = (z_const Bytef *)source;
; 47   :     stream.avail_in = 0;

  00062	41 8b cf	 mov	 ecx, r15d
  00065	89 44 24 38	 mov	 DWORD PTR stream$[rsp+24], eax
  00069	89 4c 24 28	 mov	 DWORD PTR stream$[rsp+8], ecx
  0006d	83 cd ff	 or	 ebp, -1			; ffffffffH
  00070	48 89 74 24 20	 mov	 QWORD PTR stream$[rsp], rsi
$LL4@compress2:

; 48   : 
; 49   :     do {
; 50   :         if (stream.avail_out == 0) {

  00075	85 c0		 test	 eax, eax
  00077	75 0d		 jne	 SHORT $LN6@compress2

; 51   :             stream.avail_out = left > (uLong)max ? max : (uInt)left;

  00079	3b fd		 cmp	 edi, ebp
  0007b	8b c7		 mov	 eax, edi
  0007d	0f 47 c5	 cmova	 eax, ebp
  00080	89 44 24 38	 mov	 DWORD PTR stream$[rsp+24], eax

; 52   :             left -= stream.avail_out;

  00084	2b f8		 sub	 edi, eax
$LN6@compress2:

; 53   :         }
; 54   :         if (stream.avail_in == 0) {

  00086	85 c9		 test	 ecx, ecx
  00088	75 0d		 jne	 SHORT $LN7@compress2

; 55   :             stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;

  0008a	3b dd		 cmp	 ebx, ebp
  0008c	8b c3		 mov	 eax, ebx
  0008e	0f 47 c5	 cmova	 eax, ebp
  00091	89 44 24 28	 mov	 DWORD PTR stream$[rsp+8], eax

; 56   :             sourceLen -= stream.avail_in;

  00095	2b d8		 sub	 ebx, eax
$LN7@compress2:

; 57   :         }
; 58   :         err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);

  00097	ba 04 00 00 00	 mov	 edx, 4
  0009c	48 8d 4c 24 20	 lea	 rcx, QWORD PTR stream$[rsp]
  000a1	85 db		 test	 ebx, ebx
  000a3	41 0f 45 d7	 cmovne	 edx, r15d
  000a7	e8 00 00 00 00	 call	 deflate
  000ac	8b f0		 mov	 esi, eax

; 59   :     } while (err == Z_OK);

  000ae	85 c0		 test	 eax, eax
  000b0	75 0a		 jne	 SHORT $LN15@compress2

; 46   :     stream.next_in = (z_const Bytef *)source;
; 47   :     stream.avail_in = 0;

  000b2	8b 44 24 38	 mov	 eax, DWORD PTR stream$[rsp+24]
  000b6	8b 4c 24 28	 mov	 ecx, DWORD PTR stream$[rsp+8]
  000ba	eb b9		 jmp	 SHORT $LL4@compress2
$LN15@compress2:

; 60   : 
; 61   :     *destLen = stream.total_out;

  000bc	8b 44 24 3c	 mov	 eax, DWORD PTR stream$[rsp+28]

; 62   :     deflateEnd(&stream);

  000c0	48 8d 4c 24 20	 lea	 rcx, QWORD PTR stream$[rsp]
  000c5	41 89 06	 mov	 DWORD PTR [r14], eax
  000c8	e8 00 00 00 00	 call	 deflateEnd

; 63   :     return err == Z_STREAM_END ? Z_OK : err;

  000cd	83 fe 01	 cmp	 esi, 1
  000d0	41 0f 44 f7	 cmove	 esi, r15d
  000d4	8b c6		 mov	 eax, esi
$LN1@compress2:

; 64   : }

  000d6	4c 8d 9c 24 80
	00 00 00	 lea	 r11, QWORD PTR [rsp+128]
  000de	49 8b 5b 20	 mov	 rbx, QWORD PTR [r11+32]
  000e2	49 8b 6b 28	 mov	 rbp, QWORD PTR [r11+40]
  000e6	49 8b 73 30	 mov	 rsi, QWORD PTR [r11+48]
  000ea	49 8b e3	 mov	 rsp, r11
  000ed	41 5f		 pop	 r15
  000ef	41 5e		 pop	 r14
  000f1	5f		 pop	 rdi
  000f2	c3		 ret	 0
compress2 ENDP
_TEXT	ENDS
; Function compile flags: /Ogtpy
; File c:\mywork\pkcs\zlib-1.2.11\compress.c
;	COMDAT compress
_TEXT	SEGMENT
dest$ = 64
destLen$ = 72
source$ = 80
sourceLen$ = 88
compress PROC						; COMDAT

; 73   : {

$LN4:
  00000	48 83 ec 38	 sub	 rsp, 56			; 00000038H

; 74   :     return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);

  00004	c7 44 24 20 ff
	ff ff ff	 mov	 DWORD PTR [rsp+32], -1
  0000c	e8 00 00 00 00	 call	 compress2

; 75   : }

  00011	48 83 c4 38	 add	 rsp, 56			; 00000038H
  00015	c3		 ret	 0
compress ENDP
_TEXT	ENDS
; Function compile flags: /Ogtpy
; File c:\mywork\pkcs\zlib-1.2.11\compress.c
;	COMDAT compressBound
_TEXT	SEGMENT
sourceLen$ = 8
compressBound PROC					; COMDAT

; 84   :     return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +

  00000	8b c1		 mov	 eax, ecx
  00002	8b d1		 mov	 edx, ecx
  00004	c1 e8 0e	 shr	 eax, 14
  00007	03 c1		 add	 eax, ecx
  00009	c1 ea 19	 shr	 edx, 25
  0000c	c1 e9 0c	 shr	 ecx, 12
  0000f	03 c2		 add	 eax, edx
  00011	83 c1 0d	 add	 ecx, 13
  00014	03 c1		 add	 eax, ecx

; 85   :            (sourceLen >> 25) + 13;
; 86   : }

  00016	c3		 ret	 0
compressBound ENDP
_TEXT	ENDS
END
