📄 inftrees.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 14.00.50727.762
TITLE d:\src\VS2005\cpp\CeRemoteClient\zlib123\inftrees.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB OLDNAMES
PUBLIC _inflate_copyright
_inflate_copyright DB ' inflate 1.2.3 Copyright 1995-2005 Mark Adler ', 00H
ORG $+1
?lbase@?1??inflate_table@@9@9 DW 03H ; `inflate_table'::`2'::lbase
DW 04H
DW 05H
DW 06H
DW 07H
DW 08H
DW 09H
DW 0aH
DW 0bH
DW 0dH
DW 0fH
DW 011H
DW 013H
DW 017H
DW 01bH
DW 01fH
DW 023H
DW 02bH
DW 033H
DW 03bH
DW 043H
DW 053H
DW 063H
DW 073H
DW 083H
DW 0a3H
DW 0c3H
DW 0e3H
DW 0102H
DW 00H
DW 00H
ORG $+2
?lext@?1??inflate_table@@9@9 DW 010H ; `inflate_table'::`2'::lext
DW 010H
DW 010H
DW 010H
DW 010H
DW 010H
DW 010H
DW 010H
DW 011H
DW 011H
DW 011H
DW 011H
DW 012H
DW 012H
DW 012H
DW 012H
DW 013H
DW 013H
DW 013H
DW 013H
DW 014H
DW 014H
DW 014H
DW 014H
DW 015H
DW 015H
DW 015H
DW 015H
DW 010H
DW 0c9H
DW 0c4H
ORG $+2
?dbase@?1??inflate_table@@9@9 DW 01H ; `inflate_table'::`2'::dbase
DW 02H
DW 03H
DW 04H
DW 05H
DW 07H
DW 09H
DW 0dH
DW 011H
DW 019H
DW 021H
DW 031H
DW 041H
DW 061H
DW 081H
DW 0c1H
DW 0101H
DW 0181H
DW 0201H
DW 0301H
DW 0401H
DW 0601H
DW 0801H
DW 0c01H
DW 01001H
DW 01801H
DW 02001H
DW 03001H
DW 04001H
DW 06001H
DW 00H
DW 00H
?dext@?1??inflate_table@@9@9 DW 010H ; `inflate_table'::`2'::dext
DW 010H
DW 010H
DW 010H
DW 011H
DW 011H
DW 012H
DW 012H
DW 013H
DW 013H
DW 014H
DW 014H
DW 015H
DW 015H
DW 016H
DW 016H
DW 017H
DW 017H
DW 018H
DW 018H
DW 019H
DW 019H
DW 01aH
DW 01aH
DW 01bH
DW 01bH
DW 01cH
DW 01cH
DW 01dH
DW 01dH
DW 040H
DW 040H
PUBLIC _inflate_table
; Function compile flags: /Ogtpy
; File d:\src\vs2005\cpp\ceremoteclient\zlib123\inftrees.c
; COMDAT _inflate_table
_TEXT SEGMENT
_this$ = -124 ; size = 4
_root$ = -120 ; size = 4
_len$ = -116 ; size = 4
_max$ = -112 ; size = 4
_next$ = -108 ; size = 4
tv1307 = -104 ; size = 4
_used$ = -100 ; size = 4
_end$ = -96 ; size = 4
_extra$ = -92 ; size = 4
_base$ = -88 ; size = 4
_low$ = -84 ; size = 4
tv635 = -80 ; size = 4
_mask$ = -76 ; size = 4
_min$ = -72 ; size = 4
tv664 = -68 ; size = 4
_count$ = -64 ; size = 32
_offs$ = -32 ; size = 32
_type$ = 8 ; size = 4
_lens$ = 12 ; size = 4
_codes$ = 16 ; size = 4
_table$ = 20 ; size = 4
_bits$ = 24 ; size = 4
_work$ = 28 ; size = 4
_inflate_table PROC ; COMDAT
; 39 : {
00000 83 ec 7c sub esp, 124 ; 0000007cH
00003 8b 94 24 90 00
00 00 mov edx, DWORD PTR _bits$[esp+120]
0000a 53 push ebx
0000b 8b 9c 24 90 00
00 00 mov ebx, DWORD PTR _table$[esp+124]
; 40 : unsigned len; /* a code's length in bits */
; 41 : unsigned sym; /* index of code symbols */
; 42 : unsigned min, max; /* minimum and maximum code lengths */
; 43 : unsigned root; /* number of index bits for root table */
; 44 : unsigned curr; /* number of index bits for current table */
; 45 : unsigned drop; /* code bits to drop for sub-table */
; 46 : int left; /* number of prefix codes available */
; 47 : unsigned used; /* code entries in table used */
; 48 : unsigned huff; /* Huffman code */
; 49 : unsigned incr; /* for incrementing code, index */
; 50 : unsigned fill; /* index for replicating entries */
; 51 : unsigned low; /* low bits for current root entry */
; 52 : unsigned mask; /* mask for low root bits */
; 53 : code this; /* table entry for duplication */
; 54 : code FAR *next; /* next available space in table */
; 55 : const unsigned short FAR *base; /* base value table to use */
; 56 : const unsigned short FAR *extra; /* extra bits table to use */
; 57 : int end; /* use base and extra for symbol > end */
; 58 : unsigned short count[MAXBITS+1]; /* number of codes of each length */
; 59 : unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
; 60 : static const unsigned short lbase[31] = { /* Length codes 257..285 base */
; 61 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
; 62 : 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
; 63 : static const unsigned short lext[31] = { /* Length codes 257..285 extra */
; 64 : 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
; 65 : 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
; 66 : static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
; 67 : 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
; 68 : 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
; 69 : 8193, 12289, 16385, 24577, 0, 0};
; 70 : static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
; 71 : 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
; 72 : 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
; 73 : 28, 28, 29, 29, 64, 64};
; 74 :
; 75 : /*
; 76 : Process a set of code lengths to create a canonical Huffman code. The
; 77 : code lengths are lens[0..codes-1]. Each length corresponds to the
; 78 : symbols 0..codes-1. The Huffman code is generated by first sorting the
; 79 : symbols by length from short to long, and retaining the symbol order
; 80 : for codes with equal lengths. Then the code starts with all zero bits
; 81 : for the first code of the shortest length, and the codes are integer
; 82 : increments for the same length, and zeros are appended as the length
; 83 : increases. For the deflate format, these bits are stored backwards
; 84 : from their more natural integer increment ordering, and so when the
; 85 : decoding tables are built in the large loop below, the integer codes
; 86 : are incremented backwards.
; 87 :
; 88 : This routine assumes, but does not check, that all of the entries in
; 89 : lens[] are in the range 0..MAXBITS. The caller must assure this.
; 90 : 1..MAXBITS is interpreted as that code length. zero means that that
; 91 : symbol does not occur in this code.
; 92 :
; 93 : The codes are sorted by computing a count of codes for each length,
; 94 : creating from that a table of starting indices for each length in the
; 95 : sorted table, and then entering the symbols in order in the sorted
; 96 : table. The sorted table is work[], with that space being provided by
; 97 : the caller.
; 98 :
; 99 : The length counts are used for other purposes as well, i.e. finding
; 100 : the minimum and maximum length codes, determining if there are any
; 101 : codes at all, checking for a valid set of lengths, and looking ahead
; 102 : at length counts to determine sub-table sizes when building the
; 103 : decoding tables.
; 104 : */
; 105 :
; 106 : /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
; 107 : for (len = 0; len <= MAXBITS; len++)
; 108 : count[len] = 0;
00012 33 c0 xor eax, eax
00014 55 push ebp
00015 8b ac 24 8c 00
00 00 mov ebp, DWORD PTR _lens$[esp+128]
0001c 56 push esi
0001d 8b b4 24 94 00
00 00 mov esi, DWORD PTR _codes$[esp+132]
; 109 : for (sym = 0; sym < codes; sym++)
00024 85 f6 test esi, esi
00026 89 44 24 48 mov DWORD PTR _count$[esp+136], eax
0002a 89 44 24 4c mov DWORD PTR _count$[esp+140], eax
0002e 89 44 24 50 mov DWORD PTR _count$[esp+144], eax
00032 89 44 24 54 mov DWORD PTR _count$[esp+148], eax
00036 89 44 24 58 mov DWORD PTR _count$[esp+152], eax
0003a 89 44 24 5c mov DWORD PTR _count$[esp+156], eax
0003e 89 44 24 60 mov DWORD PTR _count$[esp+160], eax
00042 89 44 24 64 mov DWORD PTR _count$[esp+164], eax
00046 76 1e jbe SHORT $LN59@inflate_ta
00048 eb 06 8d 9b 00
00 00 00 npad 8
$LL61@inflate_ta:
; 110 : count[lens[sym]]++;
00050 0f b7 4c 45 00 movzx ecx, WORD PTR [ebp+eax*2]
00055 66 83 44 4c 48
01 add WORD PTR _count$[esp+ecx*2+136], 1
0005b 8d 4c 4c 48 lea ecx, DWORD PTR _count$[esp+ecx*2+136]
0005f 83 c0 01 add eax, 1
00062 3b c6 cmp eax, esi
00064 72 ea jb SHORT $LL61@inflate_ta
$LN59@inflate_ta:
; 111 :
; 112 : /* bound code lengths, force root to be within code lengths */
; 113 : root = *bits;
00066 8b 02 mov eax, DWORD PTR [edx]
00068 89 44 24 10 mov DWORD PTR _root$[esp+136], eax
; 114 : for (max = MAXBITS; max >= 1; max--)
0006c b9 0f 00 00 00 mov ecx, 15 ; 0000000fH
$LL58@inflate_ta:
; 115 : if (count[max] != 0) break;
00071 66 83 7c 4c 48
00 cmp WORD PTR _count$[esp+ecx*2+136], 0
00077 75 08 jne SHORT $LN124@inflate_ta
00079 83 e9 01 sub ecx, 1
0007c 83 f9 01 cmp ecx, 1
0007f 73 f0 jae SHORT $LL58@inflate_ta
$LN124@inflate_ta:
; 116 : if (root > max) root = max;
00081 3b c1 cmp eax, ecx
00083 89 4c 24 18 mov DWORD PTR _max$[esp+136], ecx
00087 76 06 jbe SHORT $LN54@inflate_ta
00089 89 4c 24 10 mov DWORD PTR _root$[esp+136], ecx
0008d 8b c1 mov eax, ecx
$LN54@inflate_ta:
; 117 : if (max == 0) { /* no symbols to code at all */
0008f 85 c9 test ecx, ecx
00091 75 30 jne SHORT $LN53@inflate_ta
; 118 : this.op = (unsigned char)64; /* invalid code marker */
; 119 : this.bits = (unsigned char)1;
; 120 : this.val = (unsigned short)0;
00093 66 89 4c 24 0e mov WORD PTR _this$[esp+138], cx
; 121 : *(*table)++ = this; /* make a table to force an error */
00098 8b 0b mov ecx, DWORD PTR [ebx]
0009a c6 44 24 0c 40 mov BYTE PTR _this$[esp+136], 64 ; 00000040H
0009f c6 44 24 0d 01 mov BYTE PTR _this$[esp+137], 1
000a4 8b 44 24 0c mov eax, DWORD PTR _this$[esp+136]
000a8 89 01 mov DWORD PTR [ecx], eax
000aa 83 03 04 add DWORD PTR [ebx], 4
000ad 8b 0b mov ecx, DWORD PTR [ebx]
000af 5e pop esi
; 122 : *(*table)++ = this;
000b0 89 01 mov DWORD PTR [ecx], eax
000b2 83 03 04 add DWORD PTR [ebx], 4
000b5 5d pop ebp
; 123 : *bits = 1;
000b6 c7 02 01 00 00
00 mov DWORD PTR [edx], 1
; 124 : return 0; /* no symbols, but wait for decoding to report error */
000bc 33 c0 xor eax, eax
000be 5b pop ebx
; 329 : }
000bf 83 c4 7c add esp, 124 ; 0000007cH
000c2 c3 ret 0
$LN53@inflate_ta:
; 125 : }
; 126 : for (min = 1; min <= MAXBITS; min++)
000c3 be 01 00 00 00 mov esi, 1
$LL52@inflate_ta:
; 127 : if (count[min] != 0) break;
000c8 66 83 7c 74 48
00 cmp WORD PTR _count$[esp+esi*2+136], 0
000ce 75 3c jne SHORT $LN82@inflate_ta
000d0 66 83 7c 74 4a
00 cmp WORD PTR _count$[esp+esi*2+138], 0
000d6 75 22 jne SHORT $LN97@inflate_ta
000d8 66 83 7c 74 4c
00 cmp WORD PTR _count$[esp+esi*2+140], 0
000de 75 1f jne SHORT $LN98@inflate_ta
000e0 66 83 7c 74 4e
00 cmp WORD PTR _count$[esp+esi*2+142], 0
000e6 75 1c jne SHORT $LN99@inflate_ta
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -