// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/zlib-1.3.0.1/trees.c
// Function: send_all_trees
local void send_all_trees(deflate_state *s, int lcodes, int dcodes,
                          int blcodes) {
    int rank;                    /* index in bl_order */

    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
            "too many codes");
    Tracev((stderr, "\nbl counts: "));
    send_bits(s, lcodes - 257, 5);  /* not +255 as stated in appnote.txt */
    send_bits(s, dcodes - 1,   5);
    send_bits(s, blcodes - 4,  4);  /* not -3 as stated in appnote.txt */
    for (rank = 0; rank < blcodes; rank++) {
        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
    }
    Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));

    send_tree(s, (ct_data *)s->dyn_ltree, lcodes - 1);  /* literal tree */
    Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));

    send_tree(s, (ct_data *)s->dyn_dtree, dcodes - 1);  /* distance tree */
    Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movl $0x5, 0x1c(%rsp)
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %eax
movl $0x10, %ecx
subl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
jle 0xd8045
movl 0x2c(%rsp), %eax
subl $0x101, %eax            # imm = 0x101
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
movzwl %ax, %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movl 0x18(%rsp), %eax
movzwl %ax, %eax
movq 0x30(%rsp), %rdx
movl $0x10, %ecx
subl 0x1734(%rdx), %ecx
sarl %cl, %eax
movw %ax, %cx
movq 0x30(%rsp), %rax
movw %cx, 0x1730(%rax)
movl 0x1c(%rsp), %ecx
subl $0x10, %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
jmp 0xd8088
movl 0x2c(%rsp), %eax
subl $0x101, %eax            # imm = 0x101
movzwl %ax, %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movl 0x1c(%rsp), %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
movl $0x5, 0x14(%rsp)
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %eax
movl $0x10, %ecx
subl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jle 0xd8186
movl 0x28(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movzwl %ax, %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movl 0x10(%rsp), %eax
movzwl %ax, %eax
movq 0x30(%rsp), %rdx
movl $0x10, %ecx
subl 0x1734(%rdx), %ecx
sarl %cl, %eax
movw %ax, %cx
movq 0x30(%rsp), %rax
movw %cx, 0x1730(%rax)
movl 0x14(%rsp), %ecx
subl $0x10, %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
jmp 0xd81c7
movl 0x28(%rsp), %eax
subl $0x1, %eax
movzwl %ax, %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movl 0x14(%rsp), %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
movl $0x4, 0xc(%rsp)
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %eax
movl $0x10, %ecx
subl 0xc(%rsp), %ecx
cmpl %ecx, %eax
jle 0xd82c5
movl 0x24(%rsp), %eax
subl $0x4, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movzwl %ax, %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movl 0x8(%rsp), %eax
movzwl %ax, %eax
movq 0x30(%rsp), %rdx
movl $0x10, %ecx
subl 0x1734(%rdx), %ecx
sarl %cl, %eax
movw %ax, %cx
movq 0x30(%rsp), %rax
movw %cx, 0x1730(%rax)
movl 0xc(%rsp), %ecx
subl $0x10, %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
jmp 0xd8306
movl 0x24(%rsp), %eax
subl $0x4, %eax
movzwl %ax, %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movl 0xc(%rsp), %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0xd8493
movl $0x3, 0x4(%rsp)
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %eax
movl $0x10, %ecx
subl 0x4(%rsp), %ecx
cmpl %ecx, %eax
jle 0xd842d
movq 0x30(%rsp), %rax
movslq 0x20(%rsp), %rdx
leaq 0x9e9bf(%rip), %rcx     # 0x176d10
movzbl (%rcx,%rdx), %ecx
movzwl 0xabe(%rax,%rcx,4), %eax
movl %eax, (%rsp)
movl (%rsp), %eax
movzwl %ax, %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movl (%rsp), %eax
movzwl %ax, %eax
movq 0x30(%rsp), %rdx
movl $0x10, %ecx
subl 0x1734(%rdx), %ecx
sarl %cl, %eax
movw %ax, %cx
movq 0x30(%rsp), %rax
movw %cx, 0x1730(%rax)
movl 0x4(%rsp), %ecx
subl $0x10, %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
jmp 0xd8481
movq 0x30(%rsp), %rax
movslq 0x20(%rsp), %rdx
leaq 0x9e8d2(%rip), %rcx     # 0x176d10
movzbl (%rcx,%rdx), %ecx
movzwl 0xabe(%rax,%rcx,4), %edx
movq 0x30(%rsp), %rax
movl 0x1734(%rax), %ecx
shll %cl, %edx
movq 0x30(%rsp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movl 0x4(%rsp), %ecx
movq 0x30(%rsp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
jmp 0xd8483
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xd830e
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0xd4, %rsi
movl 0x2c(%rsp), %edx
subl $0x1, %edx
callq 0xd8f70
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x9c8, %rsi            # imm = 0x9C8
movl 0x28(%rsp), %edx
subl $0x1, %edx
callq 0xd8f70
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)