// File: tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: tr_align
void ZLIB_INTERNAL _tr_align(s)
    deflate_state *s;
{
    send_bits(s, STATIC_TREES<<1, 3);
    send_code(s, END_BLOCK, static_ltree);
#ifdef DEBUG
    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
#endif
    bi_flush(s);
    /* Of the 10 bits for the empty block, we have already sent
     * (10 - bi_valid) bits. The lookahead for the last real code (before
     * the EOB of the previous block) was thus at least one plus the length
     * of the EOB plus what we have just sent of the empty static block.
     */
    if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
        send_bits(s, STATIC_TREES<<1, 3);
        send_code(s, END_BLOCK, static_ltree);
#ifdef DEBUG
        s->compressed_len += 10L;
#endif
        bi_flush(s);
    }
    s->last_eob_len = 7;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x3, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %eax
movl $0x10, %ecx
subl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
jle 0x11f1ba
movl $0x2, 0x18(%rsp)
movl 0x18(%rsp), %eax
movzwl %ax, %edx
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl 0x18(%rsp), %eax
movzwl %ax, %eax
movq 0x20(%rsp), %rcx
movslq 0x1724(%rcx), %rdx
movl $0x10, %ecx
subq %rdx, %rcx
sarl %cl, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x1720(%rax)
movslq 0x1c(%rsp), %rdx
subq $0x10, %rdx
movq 0x20(%rsp), %rax
movslq 0x1724(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x1724(%rax)
jmp 0x11f1f6
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
movl $0x2, %edx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movl 0x1c(%rsp), %ecx
movq 0x20(%rsp), %rax
addl 0x1724(%rax), %ecx
movl %ecx, 0x1724(%rax)
movzwl 0x1fa45(%rip), %eax     # 0x13ec42
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %eax
movl $0x10, %ecx
subl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jle 0x11f2fd
movzwl 0x1fa1c(%rip), %eax     # 0x13ec40
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movzwl %ax, %edx
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl 0x10(%rsp), %eax
movzwl %ax, %eax
movq 0x20(%rsp), %rcx
movslq 0x1724(%rcx), %rdx
movl $0x10, %ecx
subq %rdx, %rcx
sarl %cl, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x1720(%rax)
movslq 0x14(%rsp), %rdx
subq $0x10, %rdx
movq 0x20(%rsp), %rax
movslq 0x1724(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x1724(%rax)
jmp 0x11f33b
movzwl 0x1f93c(%rip), %edx     # 0x13ec40
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movl 0x14(%rsp), %ecx
movq 0x20(%rsp), %rax
addl 0x1724(%rax), %ecx
movl %ecx, 0x1724(%rax)
movq 0x20(%rsp), %rdi
callq 0x11f610
movq 0x20(%rsp), %rax
movl 0x171c(%rax), %eax
addl $0x1, %eax
addl $0xa, %eax
movq 0x20(%rsp), %rcx
subl 0x1724(%rcx), %eax
cmpl $0x9, %eax
jge 0x11f5f3
movl $0x3, 0xc(%rsp)
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %eax
movl $0x10, %ecx
subl 0xc(%rsp), %ecx
cmpl %ecx, %eax
jle 0x11f46b
movl $0x2, 0x8(%rsp)
movl 0x8(%rsp), %eax
movzwl %ax, %edx
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl 0x8(%rsp), %eax
movzwl %ax, %eax
movq 0x20(%rsp), %rcx
movslq 0x1724(%rcx), %rdx
movl $0x10, %ecx
subq %rdx, %rcx
sarl %cl, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x1720(%rax)
movslq 0xc(%rsp), %rdx
subq $0x10, %rdx
movq 0x20(%rsp), %rax
movslq 0x1724(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x1724(%rax)
jmp 0x11f4a7
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
movl $0x2, %edx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movl 0xc(%rsp), %ecx
movq 0x20(%rsp), %rax
addl 0x1724(%rax), %ecx
movl %ecx, 0x1724(%rax)
movzwl 0x1f794(%rip), %eax     # 0x13ec42
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %eax
movl $0x10, %ecx
subl 0x4(%rsp), %ecx
cmpl %ecx, %eax
jle 0x11f5ab
movzwl 0x1f76b(%rip), %eax     # 0x13ec40
movl %eax, (%rsp)
movl (%rsp), %eax
movzwl %ax, %edx
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl (%rsp), %eax
movzwl %ax, %eax
movq 0x20(%rsp), %rcx
movslq 0x1724(%rcx), %rdx
movl $0x10, %ecx
subq %rdx, %rcx
sarl %cl, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x1720(%rax)
movslq 0x4(%rsp), %rdx
subq $0x10, %rdx
movq 0x20(%rsp), %rax
movslq 0x1724(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x1724(%rax)
jmp 0x11f5e9
movzwl 0x1f68e(%rip), %edx     # 0x13ec40
movq 0x20(%rsp), %rax
movl 0x1724(%rax), %ecx
shll %cl, %edx
movq 0x20(%rsp), %rax
movzwl 0x1720(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1720(%rax)
movl 0x4(%rsp), %ecx
movq 0x20(%rsp), %rax
addl 0x1724(%rax), %ecx
movl %ecx, 0x1724(%rax)
movq 0x20(%rsp), %rdi
callq 0x11f610
movq 0x20(%rsp), %rax
movl $0x7, 0x171c(%rax)
addq $0x28, %rsp
retq
nopw (%rax,%rax)