// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/zlib-1.3.0.1/trees.c
// Function: pqdownheap
local void pqdownheap(deflate_state *s, ct_data *tree, int k) {
    int v = s->heap[k];
    int j = k << 1;  /* left son of k */
    while (j <= s->heap_len) {
        /* Set j to the smallest of the two sons: */
        if (j < s->heap_len &&
            smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) {
            j++;
        }
        /* Exit if v is smaller than both sons */
        if (smaller(tree, v, s->heap[j], s->depth)) break;

        /* Exchange v with the smallest son */
        s->heap[k] = s->heap[j];  k = j;

        /* And continue down the tree, setting j to the left son of k */
        j <<= 1;
    }
    s->heap[k] = v;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movq -0x8(%rsp), %rax
movslq -0x14(%rsp), %rcx
movl 0xbc0(%rax,%rcx,4), %eax
movl %eax, -0x18(%rsp)
movl -0x14(%rsp), %eax
shll %eax
movl %eax, -0x1c(%rsp)
movl -0x1c(%rsp), %eax
movq -0x8(%rsp), %rcx
cmpl 0x14b4(%rcx), %eax
jg 0xd8875
movl -0x1c(%rsp), %eax
movq -0x8(%rsp), %rcx
cmpl 0x14b4(%rcx), %eax
jge 0xd87ab
movq -0x10(%rsp), %rax
movq -0x8(%rsp), %rcx
movl -0x1c(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq 0xbc0(%rcx,%rdx,4), %rcx
movzwl (%rax,%rcx,4), %eax
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x1c(%rsp), %rsi
movslq 0xbc0(%rdx,%rsi,4), %rdx
movzwl (%rcx,%rdx,4), %ecx
cmpl %ecx, %eax
jl 0xd87a0
movq -0x10(%rsp), %rax
movq -0x8(%rsp), %rcx
movl -0x1c(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq 0xbc0(%rcx,%rdx,4), %rcx
movzwl (%rax,%rcx,4), %eax
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x1c(%rsp), %rsi
movslq 0xbc0(%rdx,%rsi,4), %rdx
movzwl (%rcx,%rdx,4), %ecx
cmpl %ecx, %eax
jne 0xd87ab
movq -0x8(%rsp), %rax
movq -0x8(%rsp), %rcx
movl -0x1c(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movslq 0xbc0(%rcx,%rdx,4), %rcx
movzbl 0x14bc(%rax,%rcx), %eax
movq -0x8(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x1c(%rsp), %rsi
movslq 0xbc0(%rdx,%rsi,4), %rdx
movzbl 0x14bc(%rcx,%rdx), %ecx
cmpl %ecx, %eax
jg 0xd87ab
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movslq -0x18(%rsp), %rcx
movzwl (%rax,%rcx,4), %eax
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x1c(%rsp), %rsi
movslq 0xbc0(%rdx,%rsi,4), %rdx
movzwl (%rcx,%rdx,4), %ecx
cmpl %ecx, %eax
jl 0xd883a
movq -0x10(%rsp), %rax
movslq -0x18(%rsp), %rcx
movzwl (%rax,%rcx,4), %eax
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x1c(%rsp), %rsi
movslq 0xbc0(%rdx,%rsi,4), %rdx
movzwl (%rcx,%rdx,4), %ecx
cmpl %ecx, %eax
jne 0xd883c
movq -0x8(%rsp), %rax
movslq -0x18(%rsp), %rcx
movzbl 0x14bc(%rax,%rcx), %eax
movq -0x8(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x1c(%rsp), %rsi
movslq 0xbc0(%rdx,%rsi,4), %rdx
movzbl 0x14bc(%rcx,%rdx), %ecx
cmpl %ecx, %eax
jg 0xd883c
jmp 0xd8875
movq -0x8(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movl 0xbc0(%rax,%rcx,4), %edx
movq -0x8(%rsp), %rax
movslq -0x14(%rsp), %rcx
movl %edx, 0xbc0(%rax,%rcx,4)
movl -0x1c(%rsp), %eax
movl %eax, -0x14(%rsp)
movl -0x1c(%rsp), %eax
shll %eax
movl %eax, -0x1c(%rsp)
jmp 0xd86ad
movl -0x18(%rsp), %edx
movq -0x8(%rsp), %rax
movslq -0x14(%rsp), %rcx
movl %edx, 0xbc0(%rax,%rcx,4)
retq
nopl (%rax,%rax)